Re: [PyMOL] command question RE printing out distances to text file

2014-06-17 Thread Lapolla, Suzanne M (HSC)
Sent: Tuesday, June 17, 2014 5:54 PM To: Lapolla, Suzanne M (HSC) Cc: pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] command question RE printing out distances to text file Hi Suzanne - The reason you have been getting only one distance in your output file is that your script is openin

Re: [PyMOL] command question RE printing out distances to text file

2014-06-17 Thread Sampson, Jared
close the output file. f.close() From: Robert Campbell [robert.campb...@queensu.ca<mailto:robert.campb...@queensu.ca>] Sent: Monday, June 09, 2014 10:04 AM To: pymol-users@lists.sourceforge.net<mailto:pymol-users@lists.sourceforge.net> Subject

Re: [PyMOL] command question RE printing out distances to text file

2014-06-17 Thread Lapolla, Suzanne M (HSC)
import cmd # open dist.txt for writing f=open('distnew.txt','w') # calculate the distance and store it in dst dst=cmd.distance('tmp','B///297/cb','A///17-19/cb') # write the formatted value of the distance (dst) # to the output file f.write("%8.

Re: [PyMOL] command question RE printing out distances to text file

2014-06-17 Thread Andreas Warnecke
> # out to the file "dist.txt" >> # Simply change your selections to see different distances. >> >> # import PyMOL's command namespace >> from pymol import cmd >> >> # open dist.txt for writing >> f=open('distnew.txt','w') >> >> # calculate

Re: [PyMOL] command question RE printing out distances to text file

2014-06-17 Thread Andreas Warnecke
ed value of the distance (dst) > # to the output file > f.write("%8.3f\n"%dst) > > # close the output file. > f.close() > > From: Robert Campbell [robert.campb...@queensu.ca] > Sent: Monday, June 09, 2014 10:04 AM > To: pymol-users@lists

Re: [PyMOL] command question RE printing out distances to text file

2014-06-17 Thread Lapolla, Suzanne M (HSC)
ut file f.write("%8.3f\n"%dst) # close the output file. f.close() From: Robert Campbell [robert.campb...@queensu.ca] Sent: Monday, June 09, 2014 10:04 AM To: pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] command question RE printing out distances to text file Hi Suzanne, You

Re: [PyMOL] command question RE printing out distances to text file

2014-06-09 Thread Lapolla, Suzanne M (HSC)
printing out distances to text file Hi Suzanne, You can also get the distance printed in the external GUI or terminal window by using the "cmd.distance" version of the command. So either you can assign the distance to a variable and print it or you can print the result directly. Assuming yo

Re: [PyMOL] command question RE printing out distances to text file

2014-06-09 Thread Robert Campbell
Hi Suzanne, You can also get the distance printed in the external GUI or terminal window by using the "cmd.distance" version of the command. So either you can assign the distance to a variable and print it or you can print the result directly. Assuming you have two selections, sele1 and sele2 sp

Re: [PyMOL] command question RE printing out distances to text file

2014-06-09 Thread Robert Campbell
Hi Suzanne, You can also get the distance printed in the external GUI or terminal window by using the "cmd.distance" version of the command. So either you can assign the distance to a variable and print it or you can print the result directly. Assuming you have two selections, sele1 and sele2 sp

Re: [PyMOL] command question RE printing out distances to text file

2014-06-09 Thread Thomas Holder
Hi Suzanne, you can use the get_distance command. It doesn't generate a distance object but prints the distance to the external window. http://pymolwiki.org/index.php/Get_Distance Cheers, Thomas On 06 Jun 2014, at 23:03, Lapolla, Suzanne M (HSC) wrote: > Fellow Pymol Users: > I may have a