Skip to content

Commit 16e134c

Browse files
committed
Add sources
0 parents  commit 16e134c

File tree

3 files changed

+291
-0
lines changed

3 files changed

+291
-0
lines changed

field.dat

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
1
2+
1
3+
1
4+
1
5+
1
6+
1
7+
1
8+
1
9+
1
10+
1
11+
1
12+
1
13+
1
14+
1
15+
1
16+
1
17+
1
18+
1
19+
-1
20+
-1
21+
-1
22+
-1
23+
-1
24+
-1
25+
-1
26+
-1
27+
-1
28+
-1
29+
-1
30+
-1
31+
-1
32+
-1
33+
-1
34+
-1
35+
-1
36+
-1
37+
-1
38+
-1
39+
-1
40+
-1
41+
-1
42+
-1
43+
-1
44+
-1
45+
-1
46+
-1
47+
-1
48+
-1
49+
-1
50+
-1
51+
-1
52+
-1
53+
1
54+
1
55+
1
56+
1
57+
1
58+
1
59+
1
60+
1
61+
1
62+
1
63+
1
64+
1
65+
1
66+
1
67+
1
68+
1
69+
1
70+
1
71+
1
72+
1
73+
1
74+
1

lqt.xyz

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
74
2+
lqt
3+
H 0.0 0.0 0.0
4+
H 0.0 0.5 0.0
5+
H 0.0 1.0 0.0
6+
H 0.0 1.5 0.0
7+
H 0.0 2.0 0.0
8+
H 0.0 2.5 0.0
9+
H 0.0 3.0 0.0
10+
H 0.5 0.0 0.0
11+
H 0.5 0.5 0.0
12+
H 0.5 1.0 0.0
13+
H 0.5 1.5 0.0
14+
H 0.5 2.0 0.0
15+
H 0.5 2.5 0.0
16+
H 0.5 3.0 0.0
17+
H 1.0 0.0 0.0
18+
H 1.0 0.5 0.0
19+
H 1.5 0.0 0.0
20+
H 1.5 0.5 0.0
21+
H 4.0 0.0 0.0
22+
H 4.0 0.5 0.0
23+
H 4.0 1.0 0.0
24+
H 4.0 1.5 0.0
25+
H 4.0 2.0 0.0
26+
H 4.0 2.5 0.0
27+
H 4.0 3.0 0.0
28+
H 4.5 0.0 0.0
29+
H 4.5 0.5 0.0
30+
H 4.5 1.0 0.0
31+
H 4.5 1.5 0.0
32+
H 4.5 2.0 0.0
33+
H 4.5 2.5 0.0
34+
H 4.5 3.0 0.0
35+
H 5.0 3.0 0.0
36+
H 5.0 2.5 0.0
37+
H 5.0 0.0 0.0
38+
H 5.0 0.5 0.0
39+
H 5.5 0.0 0.0
40+
H 5.5 0.5 0.0
41+
H 5.5 1.0 0.0
42+
H 5.5 1.5 0.0
43+
H 5.5 2.0 0.0
44+
H 5.5 2.5 0.0
45+
H 5.5 3.0 0.0
46+
H 6.0 0.0 0.0
47+
H 6.0 0.5 0.0
48+
H 6.0 1.0 0.0
49+
H 6.0 1.5 0.0
50+
H 6.0 2.0 0.0
51+
H 6.0 2.5 0.0
52+
H 6.0 3.0 0.0
53+
H 6.5 0.0 0.0
54+
H 6.5 0.5 0.0
55+
H 9.0 2.5 0.0
56+
H 9.0 3.0 0.0
57+
H 9.5 2.5 0.0
58+
H 9.5 3.0 0.0
59+
H 10.0 2.5 0.0
60+
H 10.0 3.0 0.0
61+
H 10.5 2.5 0.0
62+
H 10.5 3.0 0.0
63+
H 10.0 0.0 0.0
64+
H 10.0 0.5 0.0
65+
H 10.0 1.0 0.0
66+
H 10.0 1.5 0.0
67+
H 10.0 2.0 0.0
68+
H 10.5 0.0 0.0
69+
H 10.5 0.5 0.0
70+
H 10.5 1.0 0.0
71+
H 10.5 1.5 0.0
72+
H 10.5 2.0 0.0
73+
H 11.0 2.5 0.0
74+
H 11.0 3.0 0.0
75+
H 11.5 2.5 0.0
76+
H 11.5 3.0 0.0

tc_v1.3.0.tcl

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
#----------------------------------------------------------------------
2+
#>@brief Display the VMD "dynamic" Field (beta, charge, occupancy, ...)"
3+
#> Laboratory of Theoretical Chemistry - LQT
4+
#>@e-mail bug report to: [email protected]
5+
#>@note Revision history
6+
# 07.11.2018
7+
# 14.11.2018 Release v_1.1.0
8+
# 22.11.2018 Release v_1.2.0
9+
# 31.08.2020 Release v_1.3.0
10+
# Note: A Render is obtained with TachyonInternal
11+
#---------------------------------------------------------------------
12+
#!/usr/bin/tclsh
13+
14+
set PROG_NAME tc.tcl
15+
set VERSION v1.3.0
16+
17+
proc display_usage {name argc} {
18+
if { $argc < 0 } {
19+
puts ""
20+
puts "Not enough arguments in command line."
21+
puts "Usage: vmd -xyz <file.xyz> -e $name -args -f <field-file> "
22+
puts ""
23+
puts "Options:"
24+
puts "-h Display this help."
25+
puts "-v Display the version of script."
26+
puts "-f <field> Name field data file."
27+
puts "-r (0|1) Enable render"
28+
puts ""
29+
exit
30+
}
31+
}
32+
33+
proc display_version {name version} {
34+
puts "$name $version"
35+
puts "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/license/gpl.html>."
36+
puts "This a free software: you are free to change and redistributibe it."
37+
puts "There is NO WARRANTY, to the extent permited by law."
38+
puts ""
39+
puts "Laboratory of Theoretical Chemistry, LQT -- UFSCar"
40+
puts "e-mail: Report bug to: e-mail: [email protected]"
41+
puts ""
42+
exit
43+
}
44+
45+
proc draw_field {data} {
46+
47+
set data_exists [file exist $data]
48+
49+
if { $data_exists == 0 } {
50+
puts "No such file: $data. Check the name file."
51+
exit
52+
}
53+
54+
set data_name [open $data r]
55+
56+
set numframes [molinfo top get numframes]
57+
set numatoms [molinfo top get numatoms]
58+
59+
set min 9999.9
60+
set max -9999.9
61+
62+
for {set k 0} {$k<($numatoms)} {incr k} {
63+
set min_tmp [gets $data_name]
64+
65+
if { $min_tmp < $min } {
66+
set min $min_tmp
67+
}
68+
}
69+
70+
seek $data_name 0
71+
72+
for {set k 0} {$k<($numatoms)} {incr k} {
73+
set max_tmp [gets $data_name]
74+
75+
if { $max_tmp > $max } {
76+
set max $max_tmp
77+
}
78+
}
79+
80+
set min -1.0
81+
set max 1.0
82+
83+
seek $data_name 0
84+
85+
axes location LowerLeft
86+
87+
mol modcolor 0 top User
88+
mol colupdate 0 top 1
89+
mol scaleminmax top 0 $min $max
90+
# mol modstyle 0 0 CPK 0.5 0.0 10 0
91+
mol modstyle 0 0 VDW 0.2 25.0
92+
93+
animate goto 0
94+
95+
for {set i 0} {$i<$numframes} {incr i} {
96+
97+
for {set j 0} {$j<($numatoms)} {incr j} {
98+
set field [gets $data_name]
99+
set atomsel [atomselect top "index $j" frame $i]
100+
$atomsel set user $field
101+
$atomsel delete
102+
}
103+
}
104+
}
105+
106+
107+
set num 1
108+
foreach args $argv {
109+
switch $args {
110+
-h {
111+
display_usage $PROG_NAME $argv
112+
}
113+
-v {
114+
display_version $PROG_NAME $VERSION
115+
}
116+
-f {
117+
118+
if { $argc < 2 } {
119+
puts "Not enough arguments in command line."
120+
puts ""
121+
exit
122+
}
123+
124+
set data [lindex $argv 1]
125+
draw_field $data
126+
127+
128+
set show [lindex $argv 3]
129+
if { $show == 0 } {
130+
render TachyonInternal output.ppm
131+
}
132+
133+
}
134+
}
135+
136+
incr num
137+
}
138+
139+
if { $show == 0 } {
140+
exit
141+
}

0 commit comments

Comments
 (0)