The Molecular Graphics Laboratory Forum

Using Python to Group Atoms in Hierarchies by Name
Page 1 of 1

Author:  DPU_Nate [ Mon Jun 23, 2014 3:23 pm ]
Post subject:  Using Python to Group Atoms in Hierarchies by Name


I am trying to write a Python script to use in conjunction with ePMV (within Cinema 4D) that will allow me to select atoms from the cpk by a portion of their name (such as ".CA." to select the alpha carbons from the cpk), and then add them as children of a fracture object. I wrote a script that can select the correct atoms after manually selecting the entire cpk, but I am not sure how to script the selection of the entire cpk. Also, I am not sure how to script moving my selection to be a child of a fracture object.

Second question, with the naming system of cpk atoms for ePMV, a typical atom will look something like "S.0.0.C3.C.23" in the object viewer. I understand that C3 means the third-to-last amino acid in the chain and "C" indicates Cysteine. Also, ".C." means it is a backbone carbon atom, and "23" means it is the 23rd-to-last atom in the protein. However, I am confused as to what information the "S.0.0" relays, as I might need to group by that part of the name as well.

Thanks for the help,


Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group