Skip to content

Instantly share code, notes, and snippets.

@charnley
Last active October 18, 2018 12:37
Show Gist options
  • Save charnley/5837a67718618056cd5df78dde5552ca to your computer and use it in GitHub Desktop.
Save charnley/5837a67718618056cd5df78dde5552ca to your computer and use it in GitHub Desktop.
pymol snippts for pretty pictures of large set of molecules
files=("$@")
reverse() {
# first argument is the array to reverse
# second is the output array
declare -n arr="$1" rev="$2"
for i in "${arr[@]}"
do
rev=("$i" "${rev[@]}")
done
}
reverse files rfiles
batch=50
convert -delay 3 -loop 0 ${files[@]} animated.test.gif
convert -delay 5 -loop 0 ${rfiles[0]} animated.wait.gif
convert -delay 3 -loop 0 ${rfiles[@]} animated.test2.gif
convert animated.test.gif animated.wait.gif animated.test2.gif test.gif
mset 1 x360
util.mroll(1,360,2)
set ray_trace_frames=1
set cache_frames=0
mclear
mpng mov
viewport 1024, 768
set ray_trace_gain, 0.1;
set ray_shadow_decay_factor, 0.1;
set ray_shadow_decay_range, 2;
set antialias, 2;
set reflect,0.5;
set light_count,20;
set spec_count,1;
set shininess, 100;
set specular, 1;
set direct,0;
set reflect,1.5;
# https://combichem.blogspot.com/2013/12/beautiful-rendereing-of-small-molecules.html
load my_molecule.xyz
bg_color white
color grey50, elem c
preset.ball_and_stick(selection='all', mode=1)
set ray_trace_mode, 0
ray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment