Query: Saved pdb doesnt have mutated residue
Respected Chimera team! I have a pdb file in which i have done mutation by using swapaa command in IDLE python but once i saved the structure then new saved structure doesn't have mutated residues in it. commands: 1.rc("open filename.pdb") 2.rc("swapaa val #0:2.a") 3.new_file_name="val.pdb" 4.rc("write format pdb #0 C:\Users\folder" + new_file_name) 5.rc("save newsession") 6.rc("close session") 7.rc("close all")
Hi Zunera, As far as I know your script should work. I have attached a similar script that opens 1gcn, swaps residue 2 to VAL, and then saves a pdb file in your home folder named "val.pdb". Try running it and see if it creates the file and if the file has residue 2 switched to VAL. If the script I sent works then I have two possibilities for what's going wrong with your script. One is that your structure does not have a residue 2 in chain A. The other is that the script is literally saving a file named C\Users\folderval.pdb. That doesn't seem like it's what you want. Maybe you are looking at an old version of the file in some other location that makes you think the script isn't doing the right thing.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jul 26, 2021, at 12:45 AM, ZUNERA JAMAL via Chimera-users chimera-users@cgl.ucsf.edu wrote:
Respected Chimera team! I have a pdb file in which i have done mutation by using swapaa command in IDLE python but once i saved the structure then new saved structure doesn't have mutated residues in it. commands: 1.rc("open filename.pdb") 2.rc("swapaa val #0:2.a") 3.new_file_name="val.pdb" 4.rc("write format pdb #0 C:\Users\folder" + new_file_name) 5.rc("save newsession") 6.rc("close session") 7.rc("close all") _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu mailto:Chimera-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
I meant C:\Users\folderval.pdb, but the point is the same.
--Eric
On Jul 26, 2021, at 9:39 AM, Eric Pettersen via Chimera-users chimera-users@cgl.ucsf.edu wrote:
C\Users\folderval.pdb
participants (2)
-
Eric Pettersen
-
ZUNERA JAMAL