digichem-core 6.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- digichem/__init__.py +75 -0
- digichem/basis.py +116 -0
- digichem/config/README +3 -0
- digichem/config/__init__.py +5 -0
- digichem/config/base.py +321 -0
- digichem/config/locations.py +14 -0
- digichem/config/parse.py +90 -0
- digichem/config/util.py +117 -0
- digichem/data/README +4 -0
- digichem/data/batoms/COPYING +18 -0
- digichem/data/batoms/LICENSE +674 -0
- digichem/data/batoms/README +2 -0
- digichem/data/batoms/__init__.py +0 -0
- digichem/data/batoms/batoms-renderer.py +351 -0
- digichem/data/config/digichem.yaml +714 -0
- digichem/data/functionals.csv +15 -0
- digichem/data/solvents.csv +185 -0
- digichem/data/tachyon/COPYING.md +5 -0
- digichem/data/tachyon/LICENSE +30 -0
- digichem/data/tachyon/tachyon_LINUXAMD64 +0 -0
- digichem/data/vmd/common.tcl +468 -0
- digichem/data/vmd/generate_combined_orbital_images.tcl +70 -0
- digichem/data/vmd/generate_density_images.tcl +45 -0
- digichem/data/vmd/generate_dipole_images.tcl +68 -0
- digichem/data/vmd/generate_orbital_images.tcl +57 -0
- digichem/data/vmd/generate_spin_images.tcl +66 -0
- digichem/data/vmd/generate_structure_images.tcl +40 -0
- digichem/datas.py +14 -0
- digichem/exception/__init__.py +7 -0
- digichem/exception/base.py +133 -0
- digichem/exception/uncatchable.py +63 -0
- digichem/file/__init__.py +1 -0
- digichem/file/base.py +364 -0
- digichem/file/cube.py +284 -0
- digichem/file/fchk.py +94 -0
- digichem/file/prattle.py +277 -0
- digichem/file/types.py +97 -0
- digichem/image/__init__.py +6 -0
- digichem/image/base.py +113 -0
- digichem/image/excited_states.py +335 -0
- digichem/image/graph.py +293 -0
- digichem/image/orbitals.py +239 -0
- digichem/image/render.py +617 -0
- digichem/image/spectroscopy.py +797 -0
- digichem/image/structure.py +115 -0
- digichem/image/vmd.py +826 -0
- digichem/input/__init__.py +3 -0
- digichem/input/base.py +78 -0
- digichem/input/digichem_input.py +500 -0
- digichem/input/gaussian.py +140 -0
- digichem/log.py +179 -0
- digichem/memory.py +166 -0
- digichem/misc/__init__.py +4 -0
- digichem/misc/argparse.py +44 -0
- digichem/misc/base.py +61 -0
- digichem/misc/io.py +239 -0
- digichem/misc/layered_dict.py +285 -0
- digichem/misc/text.py +139 -0
- digichem/misc/time.py +73 -0
- digichem/parse/__init__.py +13 -0
- digichem/parse/base.py +220 -0
- digichem/parse/cclib.py +138 -0
- digichem/parse/dump.py +253 -0
- digichem/parse/gaussian.py +130 -0
- digichem/parse/orca.py +96 -0
- digichem/parse/turbomole.py +201 -0
- digichem/parse/util.py +523 -0
- digichem/result/__init__.py +6 -0
- digichem/result/alignment/AA.py +114 -0
- digichem/result/alignment/AAA.py +61 -0
- digichem/result/alignment/FAP.py +148 -0
- digichem/result/alignment/__init__.py +3 -0
- digichem/result/alignment/base.py +310 -0
- digichem/result/angle.py +153 -0
- digichem/result/atom.py +742 -0
- digichem/result/base.py +258 -0
- digichem/result/dipole_moment.py +332 -0
- digichem/result/emission.py +402 -0
- digichem/result/energy.py +323 -0
- digichem/result/excited_state.py +821 -0
- digichem/result/ground_state.py +94 -0
- digichem/result/metadata.py +644 -0
- digichem/result/multi.py +98 -0
- digichem/result/nmr.py +1086 -0
- digichem/result/orbital.py +647 -0
- digichem/result/result.py +244 -0
- digichem/result/soc.py +272 -0
- digichem/result/spectroscopy.py +514 -0
- digichem/result/tdm.py +267 -0
- digichem/result/vibration.py +167 -0
- digichem/test/__init__.py +6 -0
- digichem/test/conftest.py +4 -0
- digichem/test/test_basis.py +71 -0
- digichem/test/test_calculate.py +30 -0
- digichem/test/test_config.py +78 -0
- digichem/test/test_cube.py +369 -0
- digichem/test/test_exception.py +16 -0
- digichem/test/test_file.py +104 -0
- digichem/test/test_image.py +337 -0
- digichem/test/test_input.py +64 -0
- digichem/test/test_parsing.py +79 -0
- digichem/test/test_prattle.py +36 -0
- digichem/test/test_result.py +489 -0
- digichem/test/test_translate.py +112 -0
- digichem/test/util.py +207 -0
- digichem/translate.py +591 -0
- digichem_core-6.0.0rc1.dist-info/METADATA +96 -0
- digichem_core-6.0.0rc1.dist-info/RECORD +111 -0
- digichem_core-6.0.0rc1.dist-info/WHEEL +4 -0
- digichem_core-6.0.0rc1.dist-info/licenses/COPYING.md +10 -0
- digichem_core-6.0.0rc1.dist-info/licenses/LICENSE +11 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Name,Aliases,Turbomole,Gaussian
|
|
2
|
+
B2PLYP,,b2-plyp,
|
|
3
|
+
B3LYP,,b3-lyp,
|
|
4
|
+
B3LYP Gaussian,,b3-lyp_Gaussian,B3LYP
|
|
5
|
+
B97-3c,B973c,b97-3c,
|
|
6
|
+
B97D,,b97-d,
|
|
7
|
+
BHLYP,,bh-lyp,
|
|
8
|
+
BLYP,,b-lyp,
|
|
9
|
+
BP,,b-p,
|
|
10
|
+
BVWN,,b-vwn,
|
|
11
|
+
M062X,,m06-2x,
|
|
12
|
+
M06L,,m06-l,
|
|
13
|
+
PBE0,,pbe0,PBE1PBE
|
|
14
|
+
SVWN,,s-vwn,
|
|
15
|
+
SVWN Gaussian,,s-vwn_Gaussian,SVWN
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Name,Aliases,Gaussian,Epsilon,Refractive Index
|
|
2
|
+
1-Bromo-2-MethylPropane,,,7.7792,
|
|
3
|
+
1-BromoOctane,,,5.0244,
|
|
4
|
+
1-BromoPentane,,,6.269,
|
|
5
|
+
1-BromoPropane,,,8.0496,
|
|
6
|
+
1-Butanol,,,17.332,
|
|
7
|
+
1-ChloroHexane,,,5.9491,
|
|
8
|
+
1-ChloroPentane,,,6.5022,
|
|
9
|
+
1-ChloroPropane,,,8.3548,
|
|
10
|
+
1-Decanol,,,7.5305,
|
|
11
|
+
1-FluoroOctane,,,3.89,
|
|
12
|
+
1-Heptanol,,,11.321,
|
|
13
|
+
1-Hexanol,,,12.51,
|
|
14
|
+
1-Hexene,,,2.0717,
|
|
15
|
+
1-Hexyne,,,2.615,
|
|
16
|
+
1-IodoButane,,,6.173,
|
|
17
|
+
1-IodoHexaDecane,,,3.5338,
|
|
18
|
+
1-IodoPentane,,,5.6973,
|
|
19
|
+
1-IodoPropane,,,6.9626,
|
|
20
|
+
1-NitroPropane,,,23.73,
|
|
21
|
+
1-Nonanol,,,8.5991,
|
|
22
|
+
1-Pentanol,,,15.13,
|
|
23
|
+
1-Pentene,,,1.9905,
|
|
24
|
+
1-Propanol,,,20.524,
|
|
25
|
+
"1,1,1-TriChloroEthane",,,7.0826,
|
|
26
|
+
"1,1,2-TriChloroEthane",,,7.1937,
|
|
27
|
+
"1,2-DiBromoEthane",,,4.9313,
|
|
28
|
+
"1,2-EthaneDiol",,,40.245,
|
|
29
|
+
"1,2,4-TriMethylBenzene",,,2.3653,
|
|
30
|
+
"1,4-Dioxane",Dioxane,,2.2099,
|
|
31
|
+
2-BromoPropane,,,9.361,
|
|
32
|
+
2-Butanol,,,15.944,
|
|
33
|
+
2-ChloroButane,,,8.393,
|
|
34
|
+
2-Heptanone,,,11.658,
|
|
35
|
+
2-Hexanone,,,14.136,
|
|
36
|
+
2-MethoxyEthanol,,,17.2,
|
|
37
|
+
2-Methyl-1-Propanol,,,16.777,
|
|
38
|
+
2-Methyl-2-Propanol,,,12.47,
|
|
39
|
+
2-MethylPentane,,,1.89,
|
|
40
|
+
2-MethylPyridine,,,9.9533,
|
|
41
|
+
2-NitroPropane,,,25.654,
|
|
42
|
+
2-Octanone,,,9.4678,
|
|
43
|
+
2-Pentanone,,,15.2,
|
|
44
|
+
2-Propanol,,,19.264,
|
|
45
|
+
2-Propen-1-ol,,,19.011,
|
|
46
|
+
"2,2,2-TriFluoroEthanol",,,26.726,
|
|
47
|
+
"2,2,4-TriMethylPentane",,,1.9358,
|
|
48
|
+
"2,4-DiMethylPentane",,,1.8939,
|
|
49
|
+
"2,4-DiMethylPyridine",,,9.4176,
|
|
50
|
+
"2,6-DiMethylPyridine",,,7.1735,
|
|
51
|
+
3-MethylPyridine,,,11.645,
|
|
52
|
+
3-Pentanone,,,16.78,
|
|
53
|
+
4-Heptanone,,,12.257,
|
|
54
|
+
4-Methyl-2-Pentanone,,,12.887,
|
|
55
|
+
4-MethylPyridine,,,11.957,
|
|
56
|
+
5-Nonanone,,,10.6,
|
|
57
|
+
a-ChloroToluene,,,6.7175,
|
|
58
|
+
AceticAcid,EthanoicAcid,,6.2528,
|
|
59
|
+
Acetone,Propanone,,20.493,1.359
|
|
60
|
+
Acetonitrile,,,35.688,1.344
|
|
61
|
+
AcetoPhenone,,,17.44,
|
|
62
|
+
Aniline,,,6.8882,
|
|
63
|
+
Anisole,,,4.2247,
|
|
64
|
+
Argon,,,1.43,
|
|
65
|
+
Benzaldehyde,,,18.22,
|
|
66
|
+
Benzene,,,2.2706,1.501
|
|
67
|
+
BenzoNitrile,,,25.592,
|
|
68
|
+
BenzylAlcohol,,,12.457,
|
|
69
|
+
BromoBenzene,,,5.3954,
|
|
70
|
+
BromoEthane,,,9.01,
|
|
71
|
+
Bromoform,,,4.2488,
|
|
72
|
+
Butanal,,,13.45,
|
|
73
|
+
ButanoicAcid,,,2.9931,
|
|
74
|
+
Butanone,,,18.246,
|
|
75
|
+
ButanoNitrile,,,24.291,
|
|
76
|
+
ButylAmine,,,4.6178,
|
|
77
|
+
ButylEthanoate,,,4.9941,
|
|
78
|
+
CarbonDiSulfide,,,2.6105,
|
|
79
|
+
CarbonTetraChloride,,,2.228,1.466
|
|
80
|
+
ChloroBenzene,,,5.6968,
|
|
81
|
+
Chloroform,,,4.7113,1.45
|
|
82
|
+
"Cis-1,2-DiMethylCycloHexane",,,2.06,
|
|
83
|
+
Cis-Decalin,,,2.2139,
|
|
84
|
+
CycloHexane,,,2.0165,1.425
|
|
85
|
+
CycloHexanone,,,15.619,
|
|
86
|
+
CycloPentane,,,1.9608,
|
|
87
|
+
CycloPentanol,,,16.989,
|
|
88
|
+
CycloPentanone,,,13.58,
|
|
89
|
+
Decalin-mixture,,,2.196,
|
|
90
|
+
DiBromomEthane,,,7.2273,
|
|
91
|
+
DiButylEther,,,3.0473,
|
|
92
|
+
DiChloroEthane,,,10.125,
|
|
93
|
+
DiChloroMethane,DCM,,8.93,1.424
|
|
94
|
+
DiEthylAmine,,,3.5766,
|
|
95
|
+
DiethylEther,,,4.24,
|
|
96
|
+
DiEthylSulfide,,,5.723,
|
|
97
|
+
DiIodoMethane,,,5.32,
|
|
98
|
+
DiIsoPropylEther,,,3.38,
|
|
99
|
+
DiMethylDiSulfide,,,9.6,
|
|
100
|
+
DiMethylSulfoxide,DMSO,,46.826,1.479
|
|
101
|
+
DiPhenylEther,,,3.73,
|
|
102
|
+
DiPropylAmine,,,2.9112,
|
|
103
|
+
"e-1,2-DiChloroEthene",,,2.14,
|
|
104
|
+
e-2-Pentene,,,2.051,
|
|
105
|
+
EthaneThiol,,,6.667,
|
|
106
|
+
Ethanol,,,24.852,1.361
|
|
107
|
+
EthylBenzene,,,2.4339,
|
|
108
|
+
EthylEthanoate,,,5.9867,
|
|
109
|
+
EthylMethanoate,,,8.331,
|
|
110
|
+
EthylPhenylEther,,,4.1797,
|
|
111
|
+
FluoroBenzene,,,5.42,
|
|
112
|
+
Formamide,,,108.94,
|
|
113
|
+
FormicAcid,,,51.1,
|
|
114
|
+
Heptane,,,1.9113,
|
|
115
|
+
HexanoicAcid,,,2.6,
|
|
116
|
+
IodoBenzene,,,4.547,
|
|
117
|
+
IodoEthane,,,7.6177,
|
|
118
|
+
IodoMethane,,,6.865,
|
|
119
|
+
IsoPropylBenzene,,,2.3712,
|
|
120
|
+
IsoQuinoline,,,11,
|
|
121
|
+
Krypton,,,1.519,
|
|
122
|
+
m-Cresol,,,12.44,
|
|
123
|
+
m-Xylene,,,2.3478,
|
|
124
|
+
Mesitylene,,,2.265,
|
|
125
|
+
Methanol,,,32.613,1.329
|
|
126
|
+
MethylBenzoate,,,6.7367,
|
|
127
|
+
MethylButanoate,,,5.5607,
|
|
128
|
+
MethylCycloHexane,,,2.024,
|
|
129
|
+
MethylEthanoate,,,6.8615,
|
|
130
|
+
MethylMethanoate,,,8.8377,
|
|
131
|
+
MethylPropanoate,,,6.0777,
|
|
132
|
+
n-ButylBenzene,ButylBenzene,,2.36,
|
|
133
|
+
n-Decane,Decane,,1.9846,
|
|
134
|
+
n-Dodecane,Dodecane,,2.006,
|
|
135
|
+
n-Hexadecane,Hexadecane,,2.0402,
|
|
136
|
+
n-Hexane,Hexane,,1.8819,1.375
|
|
137
|
+
n-MethylAniline,MethylAniline,,5.96,
|
|
138
|
+
n-MethylFormamide-mixture,MethylFormamide-mixture,,181.56,
|
|
139
|
+
n-Nonane,Nonane,,1.9605,
|
|
140
|
+
n-Octane,Octane,,1.9406,
|
|
141
|
+
n-Octanol,Octanol,,9.8629,1.421
|
|
142
|
+
n-Pentadecane,Pentadecane,,2.0333,
|
|
143
|
+
n-Pentane,Pentane,,1.8371,
|
|
144
|
+
n-Undecane,Undecane,,1.991,
|
|
145
|
+
"n,n-DiMethylAcetamide",DMA,,37.781,
|
|
146
|
+
"n,n-DiMethylFormamide",DMF,,37.219,1.43
|
|
147
|
+
NitroBenzene,,,34.809,
|
|
148
|
+
NitroEthane,,,28.29,
|
|
149
|
+
NitroMethane,,,36.562,
|
|
150
|
+
o-ChloroToluene,,,4.6331,
|
|
151
|
+
o-Cresol,,,6.76,
|
|
152
|
+
o-DiChloroBenzene,,,9.9949,
|
|
153
|
+
o-NitroToluene,,,25.669,
|
|
154
|
+
o-Xylene,,,2.5454,
|
|
155
|
+
p-IsoPropylToluene,,,2.2322,
|
|
156
|
+
p-Xylene,,,2.2705,
|
|
157
|
+
Pentanal,,,10,
|
|
158
|
+
PentanoicAcid,,,2.6924,
|
|
159
|
+
PentylAmine,,,4.201,
|
|
160
|
+
PentylEthanoate,,,4.7297,
|
|
161
|
+
PerFluoroBenzene,,,2.029,
|
|
162
|
+
Propanal,,,18.5,
|
|
163
|
+
PropanoicAcid,,,3.44,
|
|
164
|
+
PropanoNitrile,,,29.324,
|
|
165
|
+
PropylAmine,,,4.9912,
|
|
166
|
+
PropylEthanoate,,,5.5205,
|
|
167
|
+
Pyridine,,,12.978,1.51
|
|
168
|
+
Quinoline,,,9.16,
|
|
169
|
+
sec-ButylBenzene,,,2.3446,
|
|
170
|
+
tert-ButylBenzene,,,2.3447,
|
|
171
|
+
TetraChloroEthene,,,2.268,
|
|
172
|
+
TetraHydroFuran,THF,,7.4257,1.407
|
|
173
|
+
"TetraHydroThiophene-s,s-dioxide",,,43.962,
|
|
174
|
+
Tetralin,,,2.771,
|
|
175
|
+
Thiophene,,,2.727,
|
|
176
|
+
Thiophenol,,,4.2728,
|
|
177
|
+
Toluene,,,2.3741,1.497
|
|
178
|
+
trans-Decalin,,,2.1781,
|
|
179
|
+
TriButylPhosphate,,,8.1781,
|
|
180
|
+
TriChloroEthene,,,3.422,
|
|
181
|
+
TriEthylAmine,,,2.3832,
|
|
182
|
+
Water,,,78.3553,1.33
|
|
183
|
+
Xenon,,,1.706,
|
|
184
|
+
Xylene-mixture,,,2.3879,
|
|
185
|
+
"z-1,2-DiChloroEthene",,,9.2,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 1994-2013 John E. Stone
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions
|
|
8
|
+
are met:
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
15
|
+
contributors may be used to endorse or promote products derived from
|
|
16
|
+
this software without specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS
|
|
19
|
+
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
21
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
22
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
24
|
+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
25
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
26
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
27
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
28
|
+
SUCH DAMAGE.
|
|
29
|
+
|
|
30
|
+
$Id: Copyright,v 1.11 2013/04/21 19:16:57 johns Exp $
|
|
Binary file
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
# ----------------------------------------------------------------
|
|
2
|
+
# Common Functions.
|
|
3
|
+
# ----------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
# Reset the rotation of the camera to the aligned X, Y and Z axes.
|
|
6
|
+
proc reset_rotation {rotations} {
|
|
7
|
+
# Reset all axes to 0.
|
|
8
|
+
rotate x to 0
|
|
9
|
+
|
|
10
|
+
# rotations is a string, we want a list to iterate through.
|
|
11
|
+
set rot_list [split "$rotations" " "]
|
|
12
|
+
|
|
13
|
+
# Iterate through.
|
|
14
|
+
foreach rotation_str $rot_list {
|
|
15
|
+
# Split again to get axes, angle.
|
|
16
|
+
set rotation [split "$rotation_str" ","]
|
|
17
|
+
set axis [lindex $rotation 0]
|
|
18
|
+
set angle [lindex $rotation 1]
|
|
19
|
+
|
|
20
|
+
# What we rotate depends on our axes.
|
|
21
|
+
if {$axis == 0} {
|
|
22
|
+
rotate x by [expr -$angle]
|
|
23
|
+
} elseif {$axis == 1} {
|
|
24
|
+
rotate y by $angle
|
|
25
|
+
} elseif {$axis == 2} {
|
|
26
|
+
rotate z by $angle
|
|
27
|
+
} else {
|
|
28
|
+
puts "Unknown axis $axis"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Rotate a molecule by a list of rotations.
|
|
34
|
+
proc rotate_molecule {molecule translations rotations} {
|
|
35
|
+
# Split our translations string into a list.
|
|
36
|
+
set trans_list [split $translations ","]
|
|
37
|
+
|
|
38
|
+
# Now we get an atom selection encompassing our molecule.
|
|
39
|
+
set sel [atomselect $molecule all]
|
|
40
|
+
|
|
41
|
+
# Now move our atoms.
|
|
42
|
+
$sel moveby $trans_list
|
|
43
|
+
|
|
44
|
+
# rotations is a string, we want a list to iterate through.
|
|
45
|
+
set rot_list [split $rotations ":"]
|
|
46
|
+
|
|
47
|
+
# Iterate through.
|
|
48
|
+
foreach rotation_str $rot_list {
|
|
49
|
+
# Split again to get axes, angle.
|
|
50
|
+
set rotation [split $rotation_str ","]
|
|
51
|
+
set axis [lindex $rotation 0]
|
|
52
|
+
set angle [lindex $rotation 1]
|
|
53
|
+
|
|
54
|
+
# What we rotate depends on our axes.
|
|
55
|
+
if {$axis == 0} {
|
|
56
|
+
$sel move [transaxis x [expr -$angle]]
|
|
57
|
+
} elseif {$axis == 1} {
|
|
58
|
+
$sel move [transaxis y $angle]
|
|
59
|
+
} elseif {$axis == 2} {
|
|
60
|
+
$sel move [transaxis z $angle]
|
|
61
|
+
} else {
|
|
62
|
+
puts "Unknown axis $axis"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
# Now we move our molecule back so it's still centered in the scene.
|
|
67
|
+
$sel moveby "[expr -[lindex $trans_list 0]] [expr -[lindex $trans_list 1]] [expr -[lindex $trans_list 2]]"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# Taken from the VMD docs.
|
|
71
|
+
proc vmd_draw_arrow {mol start end} {
|
|
72
|
+
# an arrow is made of a cylinder and a cone
|
|
73
|
+
#set middle [vecadd $start [vecscale 0.9 [vecsub $end $start]]]
|
|
74
|
+
set middle [vecadd $start [vecscale 0.85 [vecsub $end $start]]]
|
|
75
|
+
#graphics $mol cylinder $start $middle radius 0.15 filled yes
|
|
76
|
+
graphics $mol cylinder $start $middle radius 0.20 filled yes
|
|
77
|
+
#graphics $mol cone $middle $end radius 0.25
|
|
78
|
+
graphics $mol cone $middle $end radius 0.40 resolution 12
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Also taken from the VMD docs http://www.ks.uiuc.edu/Research/vmd/vmd-1.8.4/ug/node181.html#14132
|
|
82
|
+
# Find the geometric center of our atoms.
|
|
83
|
+
proc geom_center {selection} {
|
|
84
|
+
# Init our total to 0 0 0.
|
|
85
|
+
set total_coords [veczero]
|
|
86
|
+
|
|
87
|
+
# Iterate through all our coordinates and add to our total.
|
|
88
|
+
foreach coord [$selection get {x y z}] {
|
|
89
|
+
set total_coords [vecadd $total_coords $coord]
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
# And now get our average (we do total_coords * (1 / num_coords) which is the same as total_coords / num_coords).
|
|
93
|
+
return [vecscale [expr 1.0 /[$selection num]] $total_coords]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
# Move our atoms to be centerd around the geometric center.
|
|
97
|
+
proc reset_center {selection} {
|
|
98
|
+
# First get our center.
|
|
99
|
+
set center_coords [geom_center $selection]
|
|
100
|
+
|
|
101
|
+
# Now move.
|
|
102
|
+
$selection moveby {-[lindex center_coords 0] -[lindex center_coords 1] -[lindex center_coords 2]}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
# Render the current scene. Rotations is our alignemnt rotations string. The four arguments are filenames to render each of the 4 angles to.
|
|
106
|
+
proc render_images {rotations x0y0z0 x90y0z0 x0y90z0 x45y45z45} {
|
|
107
|
+
|
|
108
|
+
reset_rotation $rotations
|
|
109
|
+
#rotate x to 0
|
|
110
|
+
render Tachyon $x0y0z0
|
|
111
|
+
|
|
112
|
+
reset_rotation $rotations
|
|
113
|
+
#rotate x to 0
|
|
114
|
+
rotate x by 90
|
|
115
|
+
render Tachyon $x90y0z0
|
|
116
|
+
|
|
117
|
+
reset_rotation $rotations
|
|
118
|
+
#rotate x to 0
|
|
119
|
+
rotate y by 90
|
|
120
|
+
render Tachyon $x0y90z0
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
reset_rotation $rotations
|
|
124
|
+
#rotate x to 0
|
|
125
|
+
rotate x by 45
|
|
126
|
+
rotate y by 45
|
|
127
|
+
rotate z by 45
|
|
128
|
+
render Tachyon $x45y45z45
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
# Global flags that control our molecule style.
|
|
134
|
+
# The colors of orbitals.
|
|
135
|
+
set ORBITAL_PRIMARY_COLOR 0
|
|
136
|
+
set ORBITAL_SECONDARY_COLOR 1
|
|
137
|
+
set ORBITAL_MATERIAL Translucent
|
|
138
|
+
|
|
139
|
+
# The radius of atoms in CPK
|
|
140
|
+
set SPHERE_SCALE 1.0
|
|
141
|
+
# The thickness of bonds in CPK.
|
|
142
|
+
set BOND_THICKNESS 0.3
|
|
143
|
+
|
|
144
|
+
# Switch to a visual style based on a string.
|
|
145
|
+
proc use_style {style} {
|
|
146
|
+
if {$style == "pastel"} {
|
|
147
|
+
use_pastel_style
|
|
148
|
+
} elseif {$style == "light-pastel"} {
|
|
149
|
+
use_light_pastel_style
|
|
150
|
+
} elseif {$style == "dark-pastel"} {
|
|
151
|
+
use_dark_pastel_style
|
|
152
|
+
} elseif {$style == "sharp"} {
|
|
153
|
+
use_sharp_style
|
|
154
|
+
} elseif {$style == "gaussian"} {
|
|
155
|
+
use_gaussian_style
|
|
156
|
+
} elseif {$style == "vesta"} {
|
|
157
|
+
use_vesta_style
|
|
158
|
+
} else {
|
|
159
|
+
error "Unknown rendering style $style"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
# Set default atom colourings, based on https://sciencenotes.org/molecule-atom-colors-cpk-colors/ (but some have been modified).
|
|
164
|
+
proc use_default_atom_colours {} {
|
|
165
|
+
# Set carbon colour to grey.
|
|
166
|
+
color Element C 2
|
|
167
|
+
|
|
168
|
+
# B to pink
|
|
169
|
+
color Element B 9
|
|
170
|
+
color change rgb 9 1.00 0.709803922 0.709803922
|
|
171
|
+
|
|
172
|
+
# Mg to green-yellow
|
|
173
|
+
color Element Mg 18
|
|
174
|
+
color change rgb 18 0.5412 1.00 0.00
|
|
175
|
+
|
|
176
|
+
# Al to metallic-pink
|
|
177
|
+
color Element Al 27
|
|
178
|
+
color change rgb 27 0.749 0.651 0.651
|
|
179
|
+
|
|
180
|
+
# Si to light-yellow
|
|
181
|
+
color Element Si 17
|
|
182
|
+
color change rgb 17 0.941176471 0.784313725 0.62745098
|
|
183
|
+
|
|
184
|
+
# P to orange
|
|
185
|
+
color Element P 31
|
|
186
|
+
color change rgb 31 1.00 0.501960784 0.00
|
|
187
|
+
|
|
188
|
+
# S to yellow
|
|
189
|
+
color Element S 4
|
|
190
|
+
color change rgb 4 1.00 1.00 0.188235294
|
|
191
|
+
|
|
192
|
+
# Various metals to silver.
|
|
193
|
+
# Color code 14 is the default.
|
|
194
|
+
#color Element Ti 14
|
|
195
|
+
color change rgb 14 0.749019608 0.760784314 0.780392157
|
|
196
|
+
|
|
197
|
+
# O to red
|
|
198
|
+
color Element O 1
|
|
199
|
+
color change rgb 1 1.00 0.050980392 0.050980392
|
|
200
|
+
|
|
201
|
+
# N to blue
|
|
202
|
+
color Element N 23
|
|
203
|
+
#color change rgb 23 0.04 0.21 1.00
|
|
204
|
+
color change rgb 23 0.188235294 0.31372549 0.97254902
|
|
205
|
+
|
|
206
|
+
# F to green.
|
|
207
|
+
color Element F 12
|
|
208
|
+
color change rgb 12 0.564705882 0.878431373 0.31372549
|
|
209
|
+
|
|
210
|
+
# Cl to green.
|
|
211
|
+
color Element Cl 7
|
|
212
|
+
color change rgb 7 0.121568627 0.941176471 0.121568627
|
|
213
|
+
|
|
214
|
+
# Br to red.
|
|
215
|
+
color Element Br 29
|
|
216
|
+
color change rgb 29 0.650980392 0.160784314 0.160784314
|
|
217
|
+
|
|
218
|
+
# I to purple.
|
|
219
|
+
color Element I 11
|
|
220
|
+
color change rgb 11 0.580392157 0.0 0.580392157
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
# Set styles used by all pastel styles.
|
|
224
|
+
proc use_common_pastel_style {} {
|
|
225
|
+
# Orbitals are transparent
|
|
226
|
+
global ORBITAL_MATERIAL
|
|
227
|
+
set ORBITAL_MATERIAL Translucent
|
|
228
|
+
|
|
229
|
+
# Set our custom 'Translucent' material.
|
|
230
|
+
material change Ambient Translucent 0.10
|
|
231
|
+
material change Diffuse Translucent 0.64
|
|
232
|
+
material change Specular Translucent 0.00
|
|
233
|
+
material change Shininess Translucent 0.00
|
|
234
|
+
material change Mirror Translucent 0.00
|
|
235
|
+
material change Opacity Translucent 0.62
|
|
236
|
+
material change Outline Translucent 0.00
|
|
237
|
+
material change OutlineWidth Translucent 0.00
|
|
238
|
+
material change TransMode Translucent 1
|
|
239
|
+
|
|
240
|
+
# Use default bond thicknes.
|
|
241
|
+
global BOND_THICKNESS SPHERE_SCALE
|
|
242
|
+
set BOND_THICKNESS 0.3
|
|
243
|
+
set SPHERE_SCALE 1.0
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
# Use the 'pastel' visual style.
|
|
247
|
+
proc use_pastel_style {} {
|
|
248
|
+
# Set common styles.
|
|
249
|
+
use_default_atom_colours
|
|
250
|
+
use_common_pastel_style
|
|
251
|
+
|
|
252
|
+
# Orbitals should use red and blue.
|
|
253
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
254
|
+
set ORBITAL_PRIMARY_COLOR 24
|
|
255
|
+
set ORBITAL_SECONDARY_COLOR 30
|
|
256
|
+
|
|
257
|
+
# Make red and blue lighter.
|
|
258
|
+
#color change rgb 24 0.00 0.72 1.00
|
|
259
|
+
color change rgb 24 0.29 0.29 1.00
|
|
260
|
+
color change rgb 30 1.00 0.30 0.30
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
# Use the light 'pastel' visual style.
|
|
264
|
+
proc use_light_pastel_style {} {
|
|
265
|
+
# Set common styles.
|
|
266
|
+
use_default_atom_colours
|
|
267
|
+
use_common_pastel_style
|
|
268
|
+
|
|
269
|
+
# Orbitals should use red and blue.
|
|
270
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
271
|
+
set ORBITAL_PRIMARY_COLOR 24
|
|
272
|
+
set ORBITAL_SECONDARY_COLOR 30
|
|
273
|
+
|
|
274
|
+
# Make red and blue lighter.
|
|
275
|
+
#color change rgb 24 0.29 0.29 1.00
|
|
276
|
+
color change rgb 24 0.00 0.72 1.00
|
|
277
|
+
color change rgb 30 1.00 0.30 0.30
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
# Use the dark 'pastel' visual style.
|
|
281
|
+
proc use_dark_pastel_style {} {
|
|
282
|
+
# Set common styles.
|
|
283
|
+
use_default_atom_colours
|
|
284
|
+
use_common_pastel_style
|
|
285
|
+
|
|
286
|
+
# Orbitals should use red and blue.
|
|
287
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
288
|
+
set ORBITAL_PRIMARY_COLOR 24
|
|
289
|
+
set ORBITAL_SECONDARY_COLOR 30
|
|
290
|
+
|
|
291
|
+
# Make red and blue lighter.
|
|
292
|
+
color change rgb 24 0.05 0.05 1.00
|
|
293
|
+
color change rgb 30 1.00 0.05 0.05
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
# Use the 'sharp' style
|
|
297
|
+
proc use_sharp_style {} {
|
|
298
|
+
# Set common styles.
|
|
299
|
+
use_default_atom_colours
|
|
300
|
+
|
|
301
|
+
# Orbitals should use red and blue.
|
|
302
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
303
|
+
set ORBITAL_PRIMARY_COLOR 0
|
|
304
|
+
set ORBITAL_SECONDARY_COLOR 1
|
|
305
|
+
|
|
306
|
+
# Orbitals are transparent
|
|
307
|
+
global ORBITAL_MATERIAL
|
|
308
|
+
set ORBITAL_MATERIAL Translucent
|
|
309
|
+
|
|
310
|
+
# Set our custom 'Translucent' material.
|
|
311
|
+
material change Ambient Translucent 0.04
|
|
312
|
+
material change Diffuse Translucent 0.70
|
|
313
|
+
material change Specular Translucent 1.00
|
|
314
|
+
material change Shininess Translucent 1.00
|
|
315
|
+
material change Mirror Translucent 0.00
|
|
316
|
+
material change Opacity Translucent 0.30
|
|
317
|
+
material change Outline Translucent 0.00
|
|
318
|
+
material change OutlineWidth Translucent 0.00
|
|
319
|
+
material change TransMode Translucent 1
|
|
320
|
+
|
|
321
|
+
# Use default bond thicknes.
|
|
322
|
+
global BOND_THICKNESS SPHERE_SCALE
|
|
323
|
+
set BOND_THICKNESS 0.3
|
|
324
|
+
set SPHERE_SCALE 1.0
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
# Set the visual style to Gaussian-like.
|
|
328
|
+
proc use_gaussian_style {} {
|
|
329
|
+
# Set common styles.
|
|
330
|
+
use_default_atom_colours
|
|
331
|
+
|
|
332
|
+
# Make grey lighter (for carbon).
|
|
333
|
+
color change rgb 2 0.630000 0.630000 0.630000
|
|
334
|
+
|
|
335
|
+
# Orbitals should use red and green.
|
|
336
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
337
|
+
set ORBITAL_PRIMARY_COLOR 19
|
|
338
|
+
set ORBITAL_SECONDARY_COLOR 30
|
|
339
|
+
|
|
340
|
+
# Orbitals are opaque
|
|
341
|
+
global ORBITAL_MATERIAL
|
|
342
|
+
set ORBITAL_MATERIAL Opaque
|
|
343
|
+
|
|
344
|
+
# Make red and green darker.
|
|
345
|
+
color change rgb 19 0.000000 0.500000 0.000000
|
|
346
|
+
color change rgb 30 0.580000 0.000000 0.000000
|
|
347
|
+
|
|
348
|
+
# Use thinner bonds.
|
|
349
|
+
global BOND_THICKNESS SPHERE_SCALE
|
|
350
|
+
set BOND_THICKNESS 0.2
|
|
351
|
+
set SPHERE_SCALE 1.0
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
# Set the visual style to VESTA-like.
|
|
355
|
+
proc use_vesta_style {} {
|
|
356
|
+
# Set carbon colour to ochre.
|
|
357
|
+
# We use red2 rather than ochre because ochre is VMD's default for most atoms. This way we only change C's colour rather than all other elements.
|
|
358
|
+
color Element C 29
|
|
359
|
+
color change rgb 29 0.490196 0.286275 0.160784
|
|
360
|
+
|
|
361
|
+
# Modify the real ochre so other atoms are more distinct from carbon.
|
|
362
|
+
color change rgb 14 0.35 0.35 0.35
|
|
363
|
+
|
|
364
|
+
# N to iceblue
|
|
365
|
+
color Element N 15
|
|
366
|
+
color change rgb 15 0.690196 0.725490 0.901961
|
|
367
|
+
|
|
368
|
+
# H to pink
|
|
369
|
+
color Element H 9
|
|
370
|
+
color change rgb 9 1.000000 0.800000 0.800000
|
|
371
|
+
|
|
372
|
+
# O to red
|
|
373
|
+
color Element O 30
|
|
374
|
+
color change rgb 30 0.99997 0.01328 0.00000
|
|
375
|
+
|
|
376
|
+
# P to lilac
|
|
377
|
+
color Element P 13
|
|
378
|
+
color change rgb 13 0.75557 0.61256 0.76425
|
|
379
|
+
|
|
380
|
+
# S to yellow
|
|
381
|
+
color Element S 4
|
|
382
|
+
|
|
383
|
+
# The reflectance is different for atoms in vesta and is difficult to approximate, but we give it a go.
|
|
384
|
+
material change Ambient Opaque 0.10
|
|
385
|
+
material change Diffuse Opaque 0.65
|
|
386
|
+
#material change Specular Opaque 0.26
|
|
387
|
+
material change Specular Opaque 0.52
|
|
388
|
+
material change Shininess Opaque 0.51
|
|
389
|
+
material change Mirror Opaque 0.00
|
|
390
|
+
material change Opacity Opaque 1.00
|
|
391
|
+
material change Outline Opaque 0.00
|
|
392
|
+
material change OutlineWidth Opaque 0.00
|
|
393
|
+
material change TransMode Opaque 0
|
|
394
|
+
|
|
395
|
+
# Set our orbital colours to yellow and blue (they are opposites of each other?).
|
|
396
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
397
|
+
set ORBITAL_PRIMARY_COLOR 21
|
|
398
|
+
set ORBITAL_SECONDARY_COLOR 4
|
|
399
|
+
color change rgb 21 0.000000 1.000000 1.000000
|
|
400
|
+
|
|
401
|
+
# Orbitals are transparent
|
|
402
|
+
global ORBITAL_MATERIAL
|
|
403
|
+
set ORBITAL_MATERIAL Translucent
|
|
404
|
+
|
|
405
|
+
# Set our custom 'Translucent' material.
|
|
406
|
+
material change Ambient Translucent 0.10
|
|
407
|
+
#material change Diffuse Translucent 0.70
|
|
408
|
+
material change Diffuse Translucent 0.64
|
|
409
|
+
material change Specular Translucent 0.00
|
|
410
|
+
material change Shininess Translucent 0.00
|
|
411
|
+
material change Mirror Translucent 0.00
|
|
412
|
+
material change Opacity Translucent 0.62
|
|
413
|
+
material change Outline Translucent 0.00
|
|
414
|
+
material change OutlineWidth Translucent 0.00
|
|
415
|
+
material change TransMode Translucent 1
|
|
416
|
+
|
|
417
|
+
# Set the size of our atoms.
|
|
418
|
+
global BOND_THICKNESS SPHERE_SCALE
|
|
419
|
+
set BOND_THICKNESS 0.4
|
|
420
|
+
set SPHERE_SCALE 0.75
|
|
421
|
+
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
# Set the standard display options for the body of a molecule.
|
|
425
|
+
proc standard_molecule_style {representation molecule} {
|
|
426
|
+
# Change how our molecule looks from sticks (the default) to ball and stick.
|
|
427
|
+
molecule modstyle $representation $molecule CPK
|
|
428
|
+
|
|
429
|
+
# Use the more detailed Element colouring method rather than default name.
|
|
430
|
+
mol modcolor $representation $molecule Element
|
|
431
|
+
|
|
432
|
+
# Set connecting line thickness
|
|
433
|
+
global BOND_THICKNESS SPHERE_SCALE
|
|
434
|
+
mol modstyle $representation $molecule CPK $SPHERE_SCALE $BOND_THICKNESS 30.000000 30.000000
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
proc standard_orbital_style {representation molecule primary_secondary isovalue} {
|
|
438
|
+
# First decide which colour we're going to use.
|
|
439
|
+
global ORBITAL_PRIMARY_COLOR ORBITAL_SECONDARY_COLOR
|
|
440
|
+
set orbital_color 0
|
|
441
|
+
if {$primary_secondary == 0} {
|
|
442
|
+
set orbital_color $ORBITAL_PRIMARY_COLOR
|
|
443
|
+
} else {
|
|
444
|
+
set orbital_color $ORBITAL_SECONDARY_COLOR
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
# Switch the representation to the isosurface mode (which shows orbitals).
|
|
448
|
+
molecule modstyle $representation $molecule isosurface $isovalue 0 0 0 1 1
|
|
449
|
+
|
|
450
|
+
# Change to our given color.
|
|
451
|
+
molecule modcolor $representation $molecule ColorID $orbital_color
|
|
452
|
+
|
|
453
|
+
# Set to target material
|
|
454
|
+
global ORBITAL_MATERIAL
|
|
455
|
+
molecule modmaterial $representation $molecule $ORBITAL_MATERIAL
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
# ----------------------------------------------------------------
|
|
459
|
+
# VMD Options.
|
|
460
|
+
# ----------------------------------------------------------------
|
|
461
|
+
# General options that control the look and feel of our images.
|
|
462
|
+
|
|
463
|
+
# Set background colour to white.
|
|
464
|
+
color Display Background 8
|
|
465
|
+
|
|
466
|
+
#display projection orthographic
|
|
467
|
+
axes location off
|
|
468
|
+
|