|
From: Rui S. <Rui...@un...> - 2016-12-07 14:33:14
|
Hi,
I am assuming it is because, when you pass the arguments on the
cmd.dihedral() command, the "obj" is being read as a string, instead of
the variable obj. I think your problem will be solved if you use
something like, for your first example:
"/"+obj+"///655/CA"
Note the quotation marks placement. This is not the cleanest solution
but should help.
Rui
Le 07/12/2016 07:09, Val Yu a écrit :
> Hi,
>
> I'm trying to use this script to get a specific dihedral angle from
> all the objects and write into a file:
>
> PyMOL>f = open('dih.txt','w')
> PyMOL>for obj in cmd.get_object_list():\
> PyMOL> dih =
> cmd.dihedral('dih','/obj///655/CA','/obj///655/CB','/obj///655/CG','/obj///655/CD1')\
> PyMOL> f.write(str(dih))
>
> The software shows following complains:
> Selector-Error: Invalid selection name "obj".
> ( ( ( % obj ) & i; 655 & n; CA ) )<--
> Selector-Error: Invalid selection name "obj".
> ( ( ( % obj ) & i; 655 & n; CB ) )<--
> Selector-Error: Invalid selection name "obj".
> ( ( ( % obj ) & i; 655 & n; CG ) )<--
> Selector-Error: Invalid selection name "obj".
> ( ( ( % obj ) & i; 655 & n; CD1 ) )<--
> ...
>
> What's wrong with my script?
>
> --
> Val Yu
>
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
>
>
> _______________________________________________
> PyMOL-users mailing list (PyM...@li...)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pym...@li...
|