From: Marco Di Gennaro (TME) (Marco.Di.Gennaro_at_external.toyota-europe.com)
Date: Wed Mar 02 2022 - 03:48:17 CST

• PUBLIC 公開

Dear all,

Thank you for your answer.

My script now look like this:
‘’’
new mol dump_mol1.lammpstrj
new mol dump_mol2.lammpstrj
pbc box
rotate x by 45
‘’’

At the moment, I trying to make a movie as explained in https://www.ks.uiuc.edu/Research/vmd/script_library/

Specifically, when I try to plug into my script the function "make_trajectory_movie" from
https://www.ks.uiuc.edu/Research/vmd/script_library/scripts/trajectory_movie/trajectory_movie.tcl

but the rgb images are produced before the dynamics.
In facts, when I "molinfo top get numframes" from within the vmd cmd line I get 686,
while if I print it to screen inside the make_trajectory_movie_files function I get 11.

I have written this function, but since num<100 I get only 1 frame.

proc my_dynamics {} {
    set num [molinfo top get numframes]
    puts "$num frames found"
    for {set i 0} {$i < $num} {incr i 100} {
           set filename MOVIE/rotate_snap.[format "%04d" $i].rgb
           render snapshot $filename
           rotate y by 20
           animate goto $i
        }
exec convert -delay 10 -loop 4 MOVIE/rotate_snap.*.rgb MOVIE/movie.gif
rm MOVIE/rotate_snap.*.rgb
}

The full script and the dump file are attached.

Other parallel question, is there a way to impose DynamicBonds as drawing method and coloring method to a specific ColorID?

Thank you again

Cheers

Marco


From: Vermaas, Josh <vermaasj_at_msu.edu>
Sent: Tuesday, March 1, 2022 4:08 PM
To: Marco Di Gennaro (TME) <Marco.Di.Gennaro_at_external.toyota-europe.com>; vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: read setting from text file

CAUTION:This e-mail originated outside our organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.
Hi Marco,

It sounds like you want to write a tcl script, and then execute it with “vmd -e readfile”. You’ll need to add “mol” commands to your dumpfiles so that VMD does the right thing and understands that it needs to load the files. Right now, you are exploiting the fact that VMD will interpret command line arguments as files that it needs to open, which clearly doesn’t work for actual commands.

-Josh

From: <owner-vmd-l_at_ks.uiuc.edu<mailto:owner-vmd-l_at_ks.uiuc.edu>> on behalf of "Marco Di Gennaro (TME)" <Marco.Di.Gennaro_at_external.toyota-europe.com<mailto:Marco.Di.Gennaro_at_external.toyota-europe.com>>
Date: Tuesday, March 1, 2022 at 10:03 AM
To: "vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu>" <vmd-l_at_ks.uiuc.edu<mailto:vmd-l_at_ks.uiuc.edu>>
Subject: vmd-l: read setting from text file


• PUBLIC 公開

Hello all,

I would like to store all VMD setting in a text file, to be read multiple times.
I mean for example “pbc box”, or drawing methods to “DynamicBonds” and ideally create a movie.

I have tried “vmd `cat readfile`” where readfile contains all the LAMMPS dumpfiles I want to visualize.
This works, but if I add the topol command (such as “pbc box”), VMD interprets it as another file to read (and issues an ERROR).

Thank you for your help

Best Regards,

Marco


This e-mail may contain confidential information. If you are not an addressee or otherwise authorised to receive this message, you should not use, copy, disclose or take any action based on this e-mail. If you have received this e-mail in error, please inform the sender promptly and delete this message and any attachments immediately.