ai2_kit.tool.misc module#

ai2_kit.tool.misc.format_cp2k_inp(indent: int = 2)[source]#

cp2k uses &keyword to start a block, and &end to end a block, for example, &block1 xxx

clause 1 clause 2 &block2

clause 3

&end block2

&end block1

To format the file, this function will: 1. remove leding and trailing whitespaces 2. autoindent the file 3. print the file to stdout