Dear Bob,
Thanks a lot for your answer.
Your solution is also the one given by Matt and it works :)
I'm attaching a README file, which I wrote to keep track of what I did.
It's far from being perfect. But I hope it may be helpful to someone.
Thanks again, Bob, Matt and Angel!
Best,
Max
On 08. 07. 16 07:09, Robert Hanson wrote:
My message came out somewhat garbled, I think. Trying again:
i = 7
print getproperty('modelInfo.models['+i+'].modelProperties.FreqValue')
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users
# ~~~~
# Animating vibrations with Jmol (600x435) & Imagemagick
# ~~~~
# Jmol
# ~~~~
# Load the results file and adjust a few settings
# (no need here to change the orientation)
# --
load "vib_analysis.molden"
color background black;
restrict not selected;select not selected;wireframe 0.04
# Number of vibrational modes
# --
number_of_vib_modes = 177
# Index of the frame/model associated with the first normal mode
# --
starting_frame_index = 7
# Move to the frame/model associated with the first normal mode
# and make the necessary for displaying useful information and
# animating the vibrations
# --
i_frame = @{starting_frame_index}
frame @{i_frame}
i_vib = 1
vectors on; vectors 0.04
vectors scale 3.5; color vectors yellow
vibration on; vibration scale 2
set echo bottom left; font echo 12; color echo white;
echo DOI: uu.uuu/vvvv.vvvv.vvvvv
freq = getproperty('modelInfo.models['+i_frame+'].modelProperties.FreqValue')
set echo top left; font echo 16; color echo white;
echo @{format("%.1f",freq)} cm<sup>-1</sup>;
zoom 85
# Generate the JPG files for the animation of the first mode
# --
filename = "vib_" + format("%03i",i_vib) + "_"
filename += format("%04i",freq) + "_.jpg"
write vibration 4 @{filename}
# Redo, for the other vibrational modes
# --
while (i_vib < number_of_vib_modes)
{
++i_vib;
++i_frame;
frame next;
freq = getproperty('modelInfo.models['+i_frame+'].modelProperties.FreqValue');
echo @{format("%.1f",freq)} cm<sup>-1</sup>;
filename = "vib_" + format("%03i",i_vib) + "_"
filename += format("%04i",freq) + "_.jpg"
write vibration 4 @{filename}
#delay 3;
}
# Imagemagick
# ~~~~
for i in $(seq 1 1 177); do x=$(printf "%03i\n" $i); PREFIX="vib_$x";
MP4=$(echo $(ls ${PREFIX}_*_0001.jpg) | sed -e 's/_0001.jpg/.mp4/'); echo
${MP4}; convert ${PREFIX}_*.jpg ${MP4}; done
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users