copy_molecule does not keep representation

Hello all again!! I am using the copy_molecule from Molecule ( http://www.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/copymol.py) but when I add the new pdb to the ModelPanel it is in atoms view and grey-colored. For example, if I copy 5 pdbs that are in ribbons view, the new 5 pdb copies will be opened in atoms view and all in grey color. Is normal this behaviour when using copy_molecule? Is there a way to fix this? Thank you in advance!

Hi Pablo, I don’t know about the python script, which may be old, but the “mcopy” command has specific options for colors, display styles, etc. See: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/mcopy.html> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Feb 27, 2020, at 11:27 PM, Pablo Solar Rodríguez <pablosolar.r@gmail.com> wrote:
Hello all again!!
I am using the copy_molecule from Molecule (http://www.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/copymol.py) but when I add the new pdb to the ModelPanel it is in atoms view and grey-colored.
For example, if I copy 5 pdbs that are in ribbons view, the new 5 pdb copies will be opened in atoms view and all in grey color. Is normal this behaviour when using copy_molecule? Is there a way to fix this?
Thank you in advance!

Yes, the code that that example Chimera script is using is intended only to copy the atoms and residues but not their display styles. You can see the script does from Molecule import copy_molecule mc = copy_molecule(m) and if we look at the copy_molecule() code it is clear it does not copy colors or styles http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/Molecule/copymolec... <http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/Molecule/copymolec...> But you could call the Python routine for mcopy which copies styles, colors, visibility after making the new atoms and residues from MoleculeCopy import molecule_copy molecule_copy(m.atoms, mc.atoms) http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/MoleculeCopy/mcopy... <http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/MoleculeCopy/mcopy...> We don't have detailed Chimera Python API documentation so you have to be resourceful and look around in your Chimera distribution to find the stuff you need. If you want programming documentation you'd have to move on to ChimeraX our next generation program. Tom
On Feb 27, 2020, at 11:27 PM, Pablo Solar Rodríguez <pablosolar.r@gmail.com> wrote:
Hello all again!!
I am using the copy_molecule from Molecule (http://www.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/copymol.py <http://www.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/copymol.py>) but when I add the new pdb to the ModelPanel it is in atoms view and grey-colored.
For example, if I copy 5 pdbs that are in ribbons view, the new 5 pdb copies will be opened in atoms view and all in grey color. Is normal this behaviour when using copy_molecule? Is there a way to fix this?
Thank you in advance! _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
participants (3)
-
Elaine Meng
-
Pablo Solar Rodríguez
-
Tom Goddard