Re: [ccp4bb] generating separate pdb files

2010-12-14 Thread Donnie Berkholz
On 08:02 Tue 14 Dec , 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 informati

Re: [ccp4bb] generating separate pdb files

2010-12-14 Thread Jeremy Tame
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 "char

Re: [ccp4bb] generating separate pdb files

2010-12-14 Thread Ed Pozharski
On Tue, 2010-12-14 at 08:02 +0100, 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 >

Re: [ccp4bb] generating separate pdb files

2010-12-14 Thread Michael Kenneth Fenwick
Hi Charlie, This may not be what you want, but this perl script seemed to work just now on 1g9e.pdb $base='1g9e';open(IN,"<$base.pdb");@indata = ;$i=0; foreach $line(@indata) { if($line =~ /^MODEL/) {++$i;$file="${base}_$i.pdb";open(OUT,">$file");next} if($line =~ /^ENDMDL/) {next} if($line

Re: [ccp4bb] generating separate pdb files

2010-12-13 Thread Pavel Afonine
Hi Charlie, hope there are simpler solutions. Meanwhile, here is the universal one -:) : step 1: save the lines below (between *) in a file called split_pdb.py: * import os import iotbx.pdb import sys def run(args): pdb_inp = iotbx.pdb.input(file_name = args[0]) hierarchy = pdb_inp

[ccp4bb] generating separate pdb files

2010-12-13 Thread Charles W. Carter, Jr
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.