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