Split a multi model pdb from shell
It’s possible to use the csplit command too. In the example below, I’ve a pdb file containing 50000 models delimited by MODEL X
and ENDMDL
:
-n
: number of digits
-z
: remove empty output files
In the previous example the output files are named (in the /dev/shm/
directory):
docking_00000
docking_00001
...
docking_49999
If you want to add a suffix (for example .pdb
) you have to specify the format:
Below is the final function:
- If you want 100 structures per output file
If you want to ask me a question or leave me a message add @bougui505 in your comment.