[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] How to print/write the selected (atoms/residues) from selction?



On 6/23/16 9:20 AM, Mahesh Velusamy wrote:
I selected some set of atoms and the residues with the following two
commends:

s=selection(mdl1.atoms['CA:102:A].select_sphere(10))
s=selection(mdl1.atoms['CA:102:A].select_sphere(10)).by_residue()

And, When I try to print the selected atoms/residues Its just giving the
counts not the atoms/residues. So could you tell me how to do the same.

A selection acts much like a Python set, so you can just iterate through it and print each element, e.g.

print [a for a in s]

	Ben Webb, Modeller Caretaker
--
             https://salilab.org/modeller/
Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage