From: Sanaa S. <san...@gm...> - 2017-03-13 05:31:18
|
Hello, Can somebody please help me with creating aligned object using pymol API? i want to split chains from my protein and superimpose first chain on the rest. the chains get loaded. and superimposed as well but i am unable to save superimposed coordinates in a new file because no object is created. this is my script: list1=["chain_A","chain_B","chain_C","chain_D"] for every in list1: cmd.load("/home/sanaa/pymol/"+every+".pdb") object_list=cmd.get_object_list() aligned=[ ] list2=[ ] #object=string(alignedA_B) for j in range(len(object_list)): try: aligned=cmd.align(object_list[ 0],object_list[j+1],object=AlnAB) list2.append(aligned) except IndexError: pass this is giving me name error like: NameError: name 'AlnAB' is not defined the object is not being created after calling the align command. it creates an object if i give the command directly on pymol command line but not through the script. i have tried everything. please help! |