[Chimera-users] Help please: extracting distances from each frame of a short MD

Anne-Frances Miller afmill3r2 at gmail.com
Sat Dec 11 00:48:29 PST 2021


Thank you very much Elaine,
for a speedy answer, and also for the ~distance command!
I could do a series of GREPs to get my numbers out of the reply log, but I will first try to pursue Vinod’s kind offer.

Anne-Frances

Novel Meritorious Research (and teaching)
—•—•—•—•—•—•—•—•—•—•—•—•—•—
A.-F. Miller, Ph. D.  (she/elle/sie)
University Research Professor
Professor of Chemistry
University of Kentucky
https://www.uky.edu/~afm/

Visiting Fellow, 
        Einstein Foundation of Berlin







> On Dec 10, 2021, at 5:38 PM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> 
> Hi Anne-Frances,
> There is no way to populate the MD plots from a command script, sorry.  You would just use the GUI (MD Movie menu: Analysis... Plot), select the two atoms (for a distance) or 3-4 atoms (for an angle) and then it will be plotted across the whole trajectory:
> <https://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/movie/movie.html#plotting>
> 
> Once you create a distance monitor it is persistent across trajectory frames and will continue to display the updated distance while the trajectory plays.  If you really wanted to do it in a per-frame command script and measure distance at each trajectory frame (each value reported in the Reply Log) you could use ~distance command at each frame to remove all the distance monitors after they are added.  E.g.
> 
> distance :1058 at O2 :741 at ND1
> distance :730 at OH :741 at NE2
> distance :721 at OG1 :1058 at N5
> distance :718 at O :1058 at N3
> distance :721 at N :1058 at O4
> distance :722 at N :1058 at O4
> distance :720 at N :1058 at O4
> distance :740 at O :720 at N
> ~distance
> 
> But then you would need to save Reply Log and process its contents and then put it into some other graphing program if you wanted a plot.   This would be a pain since you have lots of different distances.  If you want a plot, or even the values in some convenient form for plotting with another program, then probably the way to go is using the GUI from the MD Movie menu.
> 
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> 
> 
> 
> 
>> On Dec 10, 2021, at 12:06 AM, Anne-Frances Miller via Chimera-users <chimera-users at cgl.ucsf.edu> wrote:
>> 
>> Dear Chimera support,
>> 
>> I want to extract a set of distances and one angle from each snapshot of an MD trajectory (there are 11 of them).
>> My plan was to have all my distances appear in one of the MD-movie analysis>plot distances windows and use ‘Dump Values’ to get my numbers out in a way I could use for other plots.
>> I realize angles cannot appear in the same plot, but hope I can measure an angle in the same script.
>> 
>> I have a ‘per-frame’ script that runs fine on the first frame, however it returns ‘Problem in per-frame script: Distance monitor already exists’ when I step forward to a second frame.
>> 
>> Nothing appears in a 'MD plots' window (such a window does not open on its own either). 
>> Reply Log shows the correct distances for the first frame but then only repeats the error after that.
>> Problem in per-frame script:
>> Distance monitor already exists
>> 
>> My work-flow:
>> Open MD/movie, load my trajectory
>> open analysis, Per-Frame
>> copy my script into the window (chimera commands)
>> click ‘apply' in the script window, click ‘play’ or step forward one frame in the MD GUI (looping disabled)
>> 
>> My script:
>> ~disp
>> ~ribbon
>> disp :718,720,721,722,730,740,741,1058
>> distance :1058 at O2 :741 at ND1
>> distance :730 at OH :741 at NE2
>> distance :721 at OG1 :1058 at N5
>> distance :718 at O :1058 at N3
>> distance :721 at N :1058 at O4
>> distance :722 at N :1058 at O4
>> distance :720 at N :1058 at O4
>> distance :740 at O :720 at N
>> angle :1058 at C2 :1058 at O2 :741 at HD1 :741 at ND1
>> 
>> Reply Log output:
>> Distance between FDM 1058 O2 and HID 741 ND1: 2.8
>> Distance between TYR 730 OH and HID 741 NE2: 2.8
>> Distance between THR 721 OG1 and FDM 1058 N5: 3.4
>> Distance between ILE 718 O and FDM 1058 N3: 3.2
>> Distance between THR 721 N and FDM 1058 O4: 2.9
>> Distance between GLY 722 N and FDM 1058 O4: 3.2
>> Distance between GLN 720 N and FDM 1058 O4: 3.2
>> Distance between GLN 740 O and GLN 720 N: 3.0
>> Dihedral #0:1058 at C2 #0:1058 at O2 #0:741 at HD1 #0:741 at ND1: -51.0515
>> Problem in per-frame script:
>> Distance monitor already exists
>> 
>> Thank you for any assistance,
>> Anne-Frances
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20211211/571d9dec/attachment.html>


More information about the Chimera-users mailing list