forked from jeiros/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_troponin_vmd.sh
More file actions
executable file
·67 lines (44 loc) · 1.98 KB
/
load_troponin_vmd.sh
File metadata and controls
executable file
·67 lines (44 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# This script creates a .tcl file in the /tmp/ directory
# with the necessary commands to call big trajectories
# from the command line. It uses a stride of 10 frames.
# If it still fails (memory error), change the stride to
# a bigger number. The file in the /tmp/ directory is
# removed after vmd is closed.
# Usage: load_big_trajs.sh topology.prmtop trajectories*.nc
if [[ $# -lt 2 ]]; then
printf "Please provide at least two arguments (top and traj file)\n"
printf "Usage: load_big_trajs.sh topology.prmtop trajectories*.nc\n"
exit 1
fi
stride=1
prmtop=$1
tmpfile=$(mktemp /tmp/vmd_readin.tcl)
cat ~/Scripts/StateFile > $tmpfile # Comment this line out if you don't have a StateFile for VMD. Or change the path to were its sitting in your machine.
echo "mol default material AOChalky" >> $tmpfile
echo "mol default representation NewCartoon" >> $tmpfile
echo "color Display {Background} white" >> $tmpfile
echo "axes location off" >> $tmpfile
echo "mol new $prmtop" >> $tmpfile
for var in ${@:2} # We skip the first argument, the top file
do
echo "mol addfile $var first 0 step $stride waitfor all" >> $tmpfile
done
echo "mol modselect 0 top resid 1 to 161" >> $tmpfile
echo "mol modcolor 0 top ColorID 0" >> $tmpfile
echo "mol addrep top" >> $tmpfile
echo "mol modselect 1 top resid 162 to 248" >> $tmpfile
echo "mol modcolor 1 top ColorID 7" >> $tmpfile
echo "mol addrep top" >> $tmpfile
echo "mol modselect 2 top resid 249 to 419" >> $tmpfile
echo "mol modcolor 2 top ColorID 1" >> $tmpfile
echo "mol addrep top" >> $tmpfile
echo "mol modselect 3 top not protein and not resname CAL" >> $tmpfile
echo "mol modstyle 3 top VDW" >> $tmpfile
echo "mol addrep top" >> $tmpfile
echo "mol modselect 4 top resname CAL" >> $tmpfile
echo "mol modstyle 4 top VDW" >> $tmpfile
echo "mol modcolor 4 top ColorID 6" >> $tmpfile
# REPLACE THE PATH TO YOUR VMD EXECUTABLE!
/Applications/VMD1.9.3.app/Contents/Resources/VMD.app/Contents/MacOS/VMD -e $tmpfile -size 1920 1080
rm $tmpfile