From: Thomas H. <sp...@us...> - 2010-09-25 16:00:16
|
Hi Zhijian, it's the at.hetatm attribute. try this: print atoms.atom[0].__dict__ Cheers, Thomas On Sat, 2010-09-25 at 22:56 +0800, zjxu wrote: > Dear everyone, > > I could print the atom properties in a script except the atom type: > atoms = cmd.get_model("object") > for at in atoms.atom: > sele1 = model + " and i. " + resi > sele2="object and resi %s and name %s"% (at.resi, at.name) > #print sele1, sele2 > dst=cmd.distance("tmp", sele1, sele2) > #print at.chain, at.resn, at.resi, at.name, at.index, "%8.3f"%dst > print model, resi, at.type, at.chain, at.resn, at.resi, at.name, > "%8.3f"%dst > everything is OK if I delete at.tpye. > From the error in the pymol, I could see that the attibute type does > not exist. > so how to print the atom tyep (the first column in the PDB, that is ATOM > or HETATM)? > > On http://www.pymolwiki.org/index.php/Label, type is one of the > properties of the object: *type* /(ATOM,HETATM)/, the type of atom > > Thanks very much in advance > > Best regards, > Zhijian Xu > > Shanghai Institute of Materia Medica, China |