From: Warren D. <wa...@de...> - 2005-11-04 14:48:37
|
Dmitriy, The very latest beta versions of PyMOL can read .xyz files directly (via the "load" or "load_raw" commands). =20 http://delsci.com/beta load_raw usage: my_xyz=3Dopen("some.xyz").read() cmd.load_raw(my_xyz, 'xyz', "my_xyz") I suspect the chempy XYZ file is limited to reading Tinker's fixed-column XYZ format. Cheers, Warren -- Warren L. DeLano, Ph.D. =20 Principal Scientist . DeLano Scientific LLC =20 . 400 Oyster Point Blvd., Suite 213 =20 . South San Francisco, CA 94080 USA =20 . Biz:(650)-872-0942 Tech:(650)-872-0834 =20 . Fax:(650)-872-0273 Cell:(650)-346-1154 . mailto:wa...@de... =20 =20 > -----Original Message----- > From: pym...@li...=20 > [mailto:pym...@li...] On Behalf Of Dmitriy > Sent: Friday, November 04, 2005 6:34 AM > To: pym...@li... > Subject: [PyMOL] .xyz file loading problem from chempy module >=20 > Hello everyone >=20 > It seems to be a problem with loading an .xyz file as a chempy model. > For example doing >=20 > from chempy import io > m =3D io.xyz.fromFile("some.xyz") >=20 > gives: >=20 > chempy: reading "some.xyz". > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File=20 > "/home/dmitriy/pymol/lib/python2.4/site-packages/chempy/__init__.py", > line 185, in fromFile > TypeError: fromList() takes exactly 1 argument (2 given) >=20 > If I've got the right idea whats going on, there should be > fromList(self,list) function in xyz.py which will hide the=20 > Storage one. > Like it's done in pdb.py (it works fine for io.pdb.fromFile) >=20 > I'm trying to establish a communication between my program=20 > and pymol in a simple .xyz format. Sending a list of strings,=20 > creating a chempy model and loading it into pymol will work.=20 > If there is some workaround or a fix for problem mention above. >=20 > Warren, Is it possible to implement a way of passing .xyz=20 > file as a string, not as a list of strings or a file? I've=20 > seen molstr, pdbstr etc. but not xyzstr.=20 > And a short description how to load pdbstr for example it in=20 > this way will be great. >=20 > Thanks > Dmitriy >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App=20 > Server. Download it for free - -and be entered to win a 42"=20 > plasma tv or your very own Sony(tm)PSP. Click here to play:=20 > http://sourceforge.net/geronimo.php > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users >=20 >=20 >=20 >=20 |