Mike,

As for NMR ensembles, so long as all of the structures loaded as multiple
states in a single object (the default behavior for NMR ensembles in
multi-model PDB format):

print cmd.intra_fit(selection, state)

will fit all of the other states to the indicated states and return the RMS
values as a list.  For example:

fetch 1i8e, async=0
print cmd.intra_fit("1i8e////CA", 1)

[-1.0, 1.1934459209442139, 1.2950557470321655, 0.71329855918884277,
0.76704370975494385, 0.78973227739334106, 0.99323123693466187,
1.0165935754776001, 0.6535714864730835, 0.95591926574707031,
1.1299723386764526, 0.28637325763702393, 0.69836461544036865,
0.40816938877105713, 1.1637680530548096]

Note that a RMS value of -1.0 is returned for the target state.

As for writing results to a file, Python provides a rich set of capabilities
for this sort of thing.  For example:

fetch 1i8e, async=0
list = cmd.intra_fit("1i8e////CA",1)

output=open("output.txt",'wa')
for rms in list: output.write(str(rms)+"\n")
output.close()

Cheers,
Warren

--
DeLano Scientific LLC
Subscriber Support Services
mailto:del...@delsci.info
 

> -----Original Message-----
> From: pymol-users-boun...@lists.sourceforge.net 
> [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf 
> Of Michael Summers
> Sent: Wednesday, February 13, 2008 8:59 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] help with batch mode
> 
> Colleagues,
> 
> Does anyone have a good method for generating alignment 
> statistics in batch mode using pymol?
> 
> I think I'd like to do something like:
> 
> pymol -c sup.py > data.txt
> 
> where sup.py is something like:
> 
>      load ./final/final.001.pdb
>      load ./final/final.002.pdb
>      fit (final.002///13-30/c,ca,n), (final.001///13-30/c,ca,n)
> 
> 
> The problem is that I only seem to be able to launch python 
> scripts automatically at startup (cmd.xxxx commands) in this 
> manner, and I don't know how to capture the RMS output.
> 
> Interestingly, if I add the above "load" and "fit" statements 
> to my .pymolrc file, and I run "pymol -c > output.txt", I do 
> get the output I want in the output.txt file.  I'm sure there 
> must be a way of doing this without having to edit my .pymolrc file,
> 
> 
> Better yet, has someone worked out a convenient way to 
> generate RMS statistics for NMR ensembles using pymol?
> 
> Many thanks,
> 
> Mike 
>                                                            
> 
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Microsoft Defy all 
> challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users


Reply via email to