[chimerax-users] Saving name attribute
David Leeming
david.leeming at student.manchester.ac.uk
Tue May 4 04:06:16 PDT 2021
Hi,
I'm attempting to use a python script to save the names of each residue in a protein
The code I have is as follows:
import chimerax, sys
from chimerax.core.commands import run
cwd = (str(sys.argv[0][:-17]))
prot = "/A"
run(session, "open 3GDM")
run(session, "save " + str(cwd) + "/script_content/sasa/name.defattr " + str(prot) + " & protein attrName r:name format defattr")
The command being input into the command line of ChimeraX by the script is as follows:
"save [file path]/name.defattr /A & protein attrName r:name format defattr"
I've also tried using:
"save [file path]/name.defattr attrName r:name format defattr models /A & protein"
However, both commands give me a file with all the residues and all the names contained within the model rather than just the chain I'm interested in.
Could you advise on how I can better use this command to save a file with the residue positions and corresponding amino acid for each residue from a single chain only?
I've attached the resultant file to this email.
Kind regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210504/6c17b94d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: name.defattr
Type: application/octet-stream
Size: 11914 bytes
Desc: name.defattr
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210504/6c17b94d/attachment.obj>
More information about the ChimeraX-users
mailing list