The error is due to you not surrounding AlnAB in quotes, so python treats it as
a variable which has not been defined.
That said, align modifies the coordinates of the existing object, the object
created just shows the correspondence of residues used for alignment. To save
the superimposed coordinates, you use the existing objects.
> On Mar 13, 2017, at 1:31 AM, Sanaa Syed wrote:
> 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:
> for every in list1:
> aligned=[ ]
> list2=[ ]
> for j in range(len(object_list)):
> except IndexError:
> 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!
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> PyMOL-users mailing list (PyMOLemail@example.com)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://firstname.lastname@example.org
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
PyMOL-users mailing list (PyMOLemail@example.com)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users