Well it's not as impressive as some solutions posted, but three lines of awk will
do the job too. Search for END or ENDMDL as you wish.
BEGIN {file = 0; filename = "charlie_" file ".pdb"}
/ENDMDL/ {getline; file ++; filename = "charlie_" file ".pdb"}
{print $0 > filename}
Call this script "charlie.awk" and then try
awk -f charlie.awk < 1G9E.pdb
cheers
Jeremy
On Dec 14, 2010, at 4:02 PM, Charles W. Carter, Jr wrote:
> I've run aground trying to find a program to write out individual pdb files from a long file with multiple (>100) models. My file does not contain separate chain IDs, so I cannot use moleman2 or splitpdb.p. I want to retain information about ligands, and so do not want to use drussel's program. CCP4 appears not to offer such capability. Anyone know how to do this?
>
> Thanks,
>
> Charlie
|