[Chimera-users] Computing 'basic' structure characteristics
pett at cgl.ucsf.edu
Mon Oct 10 10:54:08 PDT 2016
> On Oct 9, 2016, at 9:53 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> If you just want to look at predominance of secondary structures, you would not use those integers which mean first strand, second strand, first helix, etc. Instead you could just see how many residues are already assigned as strand, helix, and coil. There aren’t commands to do this directly, only some very cumbersome approaches that I imagine are vastly inferior to using Python (like “select strand” and then writing a list of all those residues with “writesel” etc.).
> I can’t help with the Python side, this is just the perspective from the commands side. All the commands I mentioned are documented,
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/framecommand.html <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/framecommand.html>>
To supplement this part of the answer, you can loop through a bunch of PDB files in Python as outlined here:
You can determine the fraction of residues in helix and sheet with code like this:
from chimera import openModels, Molecule
#… inside the loop…
for mol in openModels.list(modelTypes=[Molecule]):
sheet_fract = len([r for r in mol.residues if r.isSheet]) / len(mol.residues)
helix_fract = len([r for r in mol.residues if r.isHelix]) / len(mol.residues)
# write them to a file with “print>>f” or to the reply log with just “print”
The above assumes you have a little bit of familiarity with Python. I can provide more explanation if you need it.
UCSF Computer Graphics Lab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users