Re: [PyMOL] How to inspect contents of 's' and 'p' for an atom?

2020-05-19 Thread Thomas Holder
Hi Mungo, Introspecting the settings wrapper is a bit more tricky, but also possible: from pymol import setting, stored stored.s2dict = lambda s: dict((setting.name_dict[n], s[n]) for n in s) iterate all, print(stored.s2dict(s)) I've updated the print() syntax in the documentation, thanks for

Re: [PyMOL] How to inspect contents of 's' and 'p' for an atom?

2020-05-19 Thread Mungo Carstairs (Staff)
Hi Blaine, Thanks for that! And is there an equivalent for the settings in 's'? So for example I can PyMOL> iterate 4zho//A/26/CA,print(s.transparency) PyMOL> 0.0 but how to find all values in 's'? Best regards, Mungo [University of Dundee shield logo] Mungo

Re: [PyMOL] How to inspect contents of 's' and 'p' for an atom?

2020-05-19 Thread Mooers, Blaine H.M. (HSC)
Hi Mungo, See https://pymol.org/dokuwiki/doku.php?id=properties. This command will print the dictionary of properties for all of the atoms: iterate /4zho//A/*/*, print(properties.all) Note the Python3 print() function. The documentation needs to be updated. Best regards, Blaine Blaine

[PyMOL] How to inspect contents of 's' and 'p' for an atom?

2020-05-19 Thread Mungo Carstairs (Staff)
A PyMOL novice question here. I can write custom atom properties to its 'p' dictionary, and print them: PyMOL>fetch 4zho PyMOL>iterate 4zho//A/26/CA, p.metal_binding='Fe' PyMOL>iterate 4zho//A/26/CA, print(p.metal_binding) Fe but how do I list the contents of the dictionary if I don't know