[Chimera-users] PDB Header via command line?

Eric Pettersen pett at cgl.ucsf.edu
Thu Nov 20 10:48:31 PST 2014

On Nov 20, 2014, at 7:25 AM, Korbin West <khwest16 at wabash.edu> wrote:

> Hi,
> I'm trying to find missing atoms in certain residues. I know they are in the pdb header information, but is there a way I can use Chimera or python script to access this using the command line only? I have a large number of proteins to go through, so checking them all individually is not really efficient.

Every Molecule model has a pdbHeaders attribute that is a dictionary whose keys are PDB records types (e.g. "REMARK", "HETNAM") and whose values are lists of text lines for that record type.  Here's some sample code that would print out all the REMARK records of each model, prefixed by the model name:

from chimera import openModels, Molecule
for m in openModels.list(modelTypes=[Molecule]):
		for rec in m.pdbHeaders["REMARK"]:
			print m.name, rec
	except KeyError:
		print m.name, "has no REMARK records"

Maybe you can adapt the above into a script that does what you need.


                        Eric Pettersen
                        UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20141120/e06ec70e/attachment.html>

More information about the Chimera-users mailing list