Changes

Created page with 'This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records. It gets split into individual pdb files names model_###.pdb. grep -n 'MOD…'
This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records. It gets split into individual pdb files names model_###.pdb.

grep -n 'MODEL\|ENDMDL' models.pdb |
cut -d: -f 1 |
awk '{if(NR%2) printf "sed -n %d,",$1+1; else printf "%dp > model_%03d.pdb\n", $1-1,NR/2;}' |
bash -sf
67

edits