Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOPAC Support #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 182 additions & 0 deletions profiles/MOPAC_TEST/ethanol.cosmo
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
EPS=999.0 COSWRT RSOLV=1.4 XYZ AM1 EXTERNAL=POA1.rm1 NSPA=92 VDW(;H=1.416;C=2.0
06;N=1.829;O=1.7936;F=1.7346;S=2.124;P=2.124;CL=2.065;BR=2.183;I=2.3364) GNORM=0
.1 RELSCF=0.1

FINAL HEAT OF FORMATION = -60.66430 KCAL/MOL = -253.81945 KJ/MOL
TOTAL ENERGY = -653.12963 EV
DIELECTRIC ENERGY = -0.14207 EV
COSMO AREA = 94.26 SQUARE ANGSTROMS
COSMO VOLUME = 77.39 CUBIC ANGSTROMS
TOTAL COSMO CHARGE = -0.00118

For more information, see: HTTP://OpenMOPAC.net/Manual/COSWRT.html

ATOMIC DATA
NR. ELEM. COORDINATES RADIUS COSMO-CHARGE AREA SIGMA
1 6 -0.009678 0.002732 -0.003552 2.006000 0.002814 11.321301 0.000249
2 6 1.515342 0.017653 -0.024357 2.006000 -0.003116 6.346116 -0.000491
3 8 2.013053 1.322391 0.020637 1.793600 0.165490 17.560011 0.009424
4 1 -0.418431 0.556032 0.853709 1.416000 -0.009174 9.499533 -0.000966
5 1 -0.397624 -1.023319 0.061536 1.416000 -0.016043 9.604387 -0.001670
6 1 -0.444307 0.450946 -0.908673 1.416000 -0.017067 9.431287 -0.001810
7 1 1.944928 -0.472122 0.876887 1.416000 -0.022158 10.048510 -0.002205
8 1 1.908639 -0.545151 -0.902800 1.416000 -0.021571 10.349708 -0.002084
9 1 1.687030 1.792599 -0.754532 1.416000 -0.080352 10.100212 -0.007955

SEGMENT DATA: NPS= 155
NR. ATOM ELEM. COORDINATES (X, Y, Z) COSMO-CHARGE AREA SIGMA POTENTIAL
1 1 6 -0.080052 -0.676266 -1.864194 0.000265 0.363292 0.000730 0.021114
2 1 6 -1.708031 -0.448836 -0.932118 -0.000238 0.489226 -0.000487 0.020710
3 1 6 -1.604233 -0.693297 0.947273 -0.000302 0.532820 -0.000567 0.015063
4 1 6 -0.077973 -1.281938 1.501582 0.000207 0.338918 0.000610 0.007930
5 1 6 -1.557775 1.230153 0.122049 -0.000178 0.379156 -0.000469 0.014044
6 1 6 0.241324 -1.183681 -1.554570 0.001508 1.113429 0.001354 0.018009
7 1 6 -1.389106 -0.926100 -1.082329 -0.000266 0.395644 -0.000672 0.021818
8 1 6 -0.164224 2.062531 -0.043168 0.000925 0.702298 0.001317 0.003639
9 1 6 -0.864824 1.775580 0.141144 0.000087 0.360706 0.000242 0.008163
10 1 6 -0.387900 -0.933488 -1.736895 0.000077 0.238955 0.000324 0.019843
11 1 6 -1.012077 -0.749470 -1.537313 -0.000105 0.256326 -0.000410 0.022399
12 1 6 -1.897172 -0.538024 -0.269910 -0.000124 0.594284 -0.000209 0.017723
13 1 6 -1.903393 -0.491444 0.436529 -0.000043 0.286756 -0.000151 0.015266
14 1 6 -1.001689 -0.773034 1.510634 -0.000061 0.621492 -0.000098 0.010510
15 1 6 -0.140674 -1.012049 1.721874 0.000112 0.144236 0.000775 0.004053
16 1 6 -1.491943 1.286929 -0.276559 -0.000225 0.341293 -0.000659 0.016852
17 1 6 -1.913013 0.272655 -0.515420 -0.000204 0.492325 -0.000414 0.018236
18 1 6 -1.911637 0.640007 0.018106 -0.000002 0.331315 -0.000006 0.014678
19 1 6 -1.879503 0.399190 0.507538 -0.000171 0.366634 -0.000467 0.013933
20 1 6 -1.752439 -0.170329 0.927334 -0.000192 0.492356 -0.000390 0.013718
21 1 6 -0.090389 -0.354214 1.939010 0.000166 0.259963 0.000638 -0.001022
22 1 6 0.385757 -0.820033 1.756683 0.001375 0.913231 0.001506 -0.000640
23 1 6 -0.703323 -1.232962 -1.388699 -0.000055 0.370115 -0.000148 0.020738
24 1 6 -0.782380 1.806114 -0.311363 0.000015 0.415925 0.000036 0.013909
25 1 6 -2.014034 0.003884 0.077633 0.000116 0.315111 0.000367 0.014487
26 1 6 -0.510041 -0.893635 1.719874 0.000128 0.205496 0.000623 0.006090
27 2 6 2.378676 -1.742792 -0.014019 -0.002290 0.743990 -0.003077 0.022031
28 2 6 3.419979 0.056819 -0.293685 0.003815 0.843656 0.004522 -0.038601
29 2 6 1.290213 0.650001 1.883750 0.003185 0.729198 0.004367 -0.044671
30 2 6 1.539066 -1.954324 -0.325880 -0.000812 0.424052 -0.001915 0.023401
31 2 6 2.998163 -1.273665 -0.182593 -0.001154 0.385124 -0.002996 0.013543
32 2 6 3.358280 -0.464543 -0.505209 -0.000958 0.426129 -0.002248 -0.007042
33 2 6 1.676557 -1.884620 0.486019 -0.000878 0.324840 -0.002702 0.022511
34 2 6 1.889571 -1.934770 0.244037 -0.000307 0.183526 -0.001673 0.022183
35 2 6 3.399449 -0.169374 0.634275 0.000247 0.201698 0.001226 -0.030909
36 2 6 3.494517 -0.278552 0.114094 -0.000147 0.374445 -0.000391 -0.024719
37 2 6 1.241218 0.478433 -1.993561 -0.002265 0.609967 -0.003713 0.044162
38 2 6 1.097102 -1.935743 0.065318 -0.000624 0.669896 -0.000932 0.021068
39 2 6 3.246730 -0.915199 0.163498 -0.000929 0.429594 -0.002161 0.001920
40 3 8 2.713235 2.260614 1.379491 0.005818 0.501452 0.011603 -0.108971
41 3 8 3.756157 1.727790 -0.098697 0.005395 0.501452 0.010758 -0.089154
42 3 8 0.766630 2.360175 0.840755 0.008676 1.021915 0.008490 -0.058494
43 3 8 2.563817 3.027248 -0.063765 0.001085 0.299048 0.003627 -0.044139
44 3 8 1.953284 3.086373 0.086593 0.001771 0.601462 0.002944 -0.035461
45 3 8 1.413323 2.924119 0.560816 0.002431 0.376443 0.006457 -0.054259
46 3 8 2.859349 2.710204 -0.656034 0.000351 0.381911 0.000918 -0.024210
47 3 8 3.087030 2.744373 -0.183180 0.002738 0.418148 0.006549 -0.058298
48 3 8 3.520372 2.283511 -0.125105 0.003968 0.413576 0.009594 -0.078998
49 3 8 2.628907 2.950683 0.452367 0.003171 0.386691 0.008201 -0.073334
50 3 8 2.706202 2.695048 0.943870 0.005391 0.494115 0.010910 -0.095946
51 3 8 3.291081 2.135664 0.980967 0.006713 0.534075 0.012569 -0.107499
52 3 8 3.644593 1.897609 0.494137 0.004603 0.376443 0.012227 -0.102146
53 3 8 3.571866 1.698458 -0.782904 0.004441 0.493497 0.008998 -0.060359
54 3 8 3.121898 1.814726 -1.251168 0.000781 0.449263 0.001738 -0.018218
55 3 8 0.833555 2.627383 0.203995 0.002412 0.598388 0.004031 -0.022441
56 3 8 1.576850 2.625956 1.172786 0.005213 0.456981 0.011407 -0.087773
57 3 8 2.113663 2.438083 1.421391 0.004709 0.376443 0.012510 -0.103148
58 3 8 1.793881 1.393444 1.791905 0.008846 0.645908 0.013695 -0.095697
59 3 8 2.363570 1.852579 1.697849 0.004199 0.336483 0.012478 -0.108420
60 3 8 3.035533 1.599504 1.467960 0.005336 0.416403 0.012815 -0.109132
61 3 8 3.225544 0.803556 1.216929 0.009398 0.791537 0.011873 -0.091700
62 3 8 3.615855 0.914191 0.714468 0.004590 0.386691 0.011871 -0.095234
63 3 8 3.783397 1.246391 0.298320 0.004108 0.336483 0.012210 -0.097238
64 3 8 3.744880 1.110188 -0.394991 0.003847 0.339309 0.011339 -0.078526
65 3 8 3.531637 0.641600 -0.602922 0.004362 0.463183 0.009417 -0.061374
66 3 8 3.019159 0.943328 -1.391981 0.003004 0.903112 0.003326 -0.014082
67 3 8 1.181731 2.274348 1.293305 0.002732 0.191032 0.014303 -0.086057
68 3 8 1.134378 1.723690 1.579306 0.009458 0.849599 0.011132 -0.083502
69 3 8 3.321451 2.251228 -0.780837 0.001852 0.329863 0.005613 -0.044640
70 3 8 3.240380 2.572298 0.405869 0.003502 0.334365 0.010473 -0.088434
71 3 8 2.038422 2.933391 0.808697 0.003296 0.334365 0.009858 -0.078154
72 3 8 2.468839 1.089480 1.725197 0.009820 0.812884 0.012081 -0.094790
73 3 8 3.626105 0.626916 0.216201 0.007056 0.528722 0.013345 -0.083853
74 3 8 3.527703 1.501316 0.964471 0.004439 0.334365 0.013275 -0.107209
75 3 8 3.452080 1.130808 -1.032690 0.002587 0.293787 0.008807 -0.047703
76 3 8 1.704995 2.112109 1.601285 0.003392 0.250620 0.013536 -0.101462
77 4 1 -1.315628 0.051408 1.799707 -0.001095 0.717546 -0.001526 0.011188
78 4 1 -1.597917 1.251458 1.214613 -0.000828 0.558353 -0.001482 0.011494
79 4 1 -0.549781 1.180020 2.118004 -0.001157 0.645423 -0.001792 -0.000831
80 4 1 0.180970 0.171577 2.114773 0.000154 0.754516 0.000203 -0.007468
81 4 1 -0.409483 1.977966 0.845473 -0.000088 0.927001 -0.000095 -0.005999
82 4 1 -1.289260 0.899759 1.916048 -0.001330 0.744941 -0.001785 0.008857
83 4 1 -0.615790 0.385397 2.245466 -0.000887 0.504459 -0.001758 0.003487
84 4 1 -0.692476 -0.189694 2.003484 -0.000345 0.340585 -0.001014 0.006161
85 4 1 -1.749058 0.453093 1.276150 -0.001091 0.650118 -0.001678 0.013729
86 4 1 -0.949064 1.674496 1.541113 -0.001264 0.651016 -0.001941 0.003387
87 4 1 0.301079 0.958477 2.009136 0.000106 1.087039 0.000098 -0.019171
88 4 1 -1.706321 1.079170 0.697186 -0.000547 0.358940 -0.001523 0.013757
89 4 1 0.008312 1.708927 1.557433 0.000025 0.985360 0.000025 -0.019372
90 4 1 -1.204768 1.703900 0.710279 -0.000828 0.574237 -0.001443 0.008959
91 5 1 -1.234021 -1.597846 1.049167 -0.000911 0.586295 -0.001553 0.019016
92 5 1 0.174774 -2.069440 0.825947 -0.001418 1.190132 -0.001192 0.019069
93 5 1 -1.180014 -2.177545 -0.184807 -0.001358 0.736115 -0.001845 0.024069
94 5 1 -1.767518 -1.211077 -0.002839 -0.000819 0.412094 -0.001988 0.021987
95 5 1 0.160195 -2.043063 -0.780734 -0.000951 0.986396 -0.000964 0.022456
96 5 1 -1.005258 -1.557892 -1.076082 -0.000549 0.390574 -0.001406 0.023472
97 5 1 -0.935590 -2.203355 0.630011 -0.001579 0.744941 -0.002120 0.022147
98 5 1 -1.629195 -1.686856 0.280642 -0.001032 0.553568 -0.001864 0.022295
99 5 1 -1.547630 -1.208955 0.807670 -0.000667 0.340225 -0.001960 0.019402
100 5 1 -0.442895 -1.706084 1.266781 -0.001259 0.801400 -0.001571 0.016523
101 5 1 -0.399915 -2.433574 -0.065867 -0.001235 0.602292 -0.002050 0.023684
102 5 1 -1.503268 -1.519182 -0.621265 -0.001291 0.632262 -0.002042 0.023837
103 5 1 -0.609133 -1.980764 -0.922357 -0.001500 0.707219 -0.002122 0.024083
104 5 1 0.408761 -2.158414 0.070555 -0.001475 0.920874 -0.001602 0.022399
105 6 1 -1.369500 1.501036 -0.928962 -0.001032 0.688893 -0.001498 0.023556
106 6 1 -1.626075 0.364796 -1.683951 -0.000895 0.558353 -0.001602 0.026176
107 6 1 -0.568585 1.234881 -2.081301 -0.001344 0.736115 -0.001826 0.034511
108 6 1 -0.432368 -0.216932 -2.124630 -0.000921 0.792142 -0.001163 0.027362
109 6 1 -1.360203 1.146678 -1.734594 -0.001330 0.721797 -0.001843 0.028340
110 6 1 -0.444228 1.716334 -1.546300 -0.002686 1.029317 -0.002610 0.035618
111 6 1 -0.555537 1.894660 -0.905292 -0.000828 0.746194 -0.001110 0.026135
112 6 1 -1.781390 0.853702 -1.008061 -0.001178 0.645283 -0.001826 0.023427
113 6 1 -0.970551 0.452951 -2.223252 -0.001249 0.698653 -0.001787 0.029593
114 6 1 -1.749350 0.073262 -1.224397 -0.000602 0.354105 -0.001701 0.023909
115 6 1 0.195380 0.609657 -2.136447 -0.003990 1.867214 -0.002137 0.037656
116 6 1 -1.243249 -0.259557 -1.804428 -0.001012 0.593221 -0.001705 0.025819
117 7 1 2.790785 -1.605807 0.942765 -0.001532 0.607354 -0.002522 0.014497
118 7 1 1.409591 -1.619094 1.508182 -0.002676 1.167163 -0.002293 0.016132
119 7 1 2.750330 -0.740443 2.010196 -0.001655 0.690769 -0.002396 -0.001480
120 7 1 3.308409 -0.266210 1.050801 -0.001091 0.639595 -0.001706 -0.022031
121 7 1 1.424218 -0.091128 2.150578 -0.001086 0.996069 -0.001091 -0.012391
122 7 1 2.520313 -1.476829 1.692087 -0.001972 0.744941 -0.002648 0.011446
123 7 1 3.201807 -0.956320 1.313767 -0.001465 0.554656 -0.002642 0.000817
124 7 1 3.098733 -1.215837 0.664124 -0.001195 0.347647 -0.003436 0.009155
125 7 1 2.015860 -1.848763 0.978809 -0.002820 0.814175 -0.003463 0.020655
126 7 1 1.980858 -0.928304 2.216911 -0.001671 0.651016 -0.002567 0.004591
127 7 1 2.919796 0.039331 1.703250 -0.001125 0.934170 -0.001205 -0.028576
128 7 1 2.213147 0.108432 2.120946 -0.001738 0.916296 -0.001897 -0.023197
129 7 1 1.160148 -0.962917 1.908731 -0.002131 0.984659 -0.002164 0.007089
130 8 1 2.782174 -1.631177 -0.831220 -0.001622 0.755742 -0.002146 0.019813
131 8 1 3.065260 -0.583362 -1.718781 -0.000938 0.558353 -0.001680 0.015029
132 8 1 2.003597 -1.436946 -1.998583 -0.001237 0.668567 -0.001850 0.024819
133 8 1 1.286864 -1.849762 -1.085046 -0.001182 0.719749 -0.001642 0.024344
134 8 1 1.946128 0.117674 -2.127016 -0.003857 1.233716 -0.003126 0.033722
135 8 1 2.763276 -1.369368 -1.674369 -0.001521 0.744941 -0.002041 0.020510
136 8 1 2.085396 -1.889569 -1.310666 -0.001083 0.553183 -0.001958 0.023816
137 8 1 2.095765 -1.899746 -0.708115 -0.001022 0.356634 -0.002865 0.024532
138 8 1 3.229690 -0.985760 -0.995384 -0.001624 0.667255 -0.002433 0.011663
139 8 1 2.373534 -0.729500 -2.227543 -0.001139 0.651016 -0.001750 0.024223
140 8 1 1.220209 -1.501247 -1.673185 -0.001445 0.763165 -0.001893 0.025520
141 8 1 3.200763 -0.111962 -1.300310 -0.000855 0.560098 -0.001526 0.001501
142 8 1 1.221919 -0.663512 -2.123580 -0.002225 1.399321 -0.001590 0.028779
143 8 1 2.719946 0.068025 -1.883185 -0.001822 0.717967 -0.002537 0.018838
144 9 1 2.074263 1.994301 -2.101537 -0.003707 0.557507 -0.006650 0.053747
145 9 1 0.914888 2.642806 -1.582783 -0.005390 0.759934 -0.007092 0.058615
146 9 1 2.289511 3.002162 -1.177651 -0.004005 0.645720 -0.006202 0.026835
147 9 1 1.232768 3.050053 -0.395225 -0.002928 0.493701 -0.005932 0.017828
148 9 1 0.991876 1.963692 -1.966091 -0.010976 1.127814 -0.009732 0.067655
149 9 1 1.435949 1.267969 -2.068919 -0.011591 1.256030 -0.009229 0.064304
150 9 1 2.006995 3.131021 -0.632316 -0.003517 0.508024 -0.006922 0.013712
151 9 1 1.778419 2.737955 -1.804773 -0.006284 0.793251 -0.007922 0.052346
152 9 1 0.520302 2.532580 -0.787612 -0.014789 1.657318 -0.008924 0.044402
153 9 1 2.482585 1.427757 -1.851548 -0.007457 0.945965 -0.007883 0.038150
154 9 1 1.407560 3.141434 -1.082548 -0.003864 0.553568 -0.006981 0.040196
155 9 1 2.656129 2.430363 -1.516997 -0.005843 0.801379 -0.007291 0.027346
Empty file.
13 changes: 13 additions & 0 deletions profiles/to_sigma.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def get_seg_DataFrame(COSMO_contents):
# GAMESS: same unit (Bohr in GAMESS/COSab) as Dmol3 but format is different
sdata = re.search(r"\(X, Y, Z\)[\sa-zA-Z0-9\(\)\./\*]+\n([\s0-9\-\n.]+)(=+)", COSMO_contents, re.DOTALL).group(1).rstrip()
table_assign = ['n','atom','x / a.u.','y / a.u.','z / a.u.','charge / e','area / A^2','charge/area / e/A^2','potential']
elif "OpenMOPAC.net" in COSMO_contents:
# MOPAC: unit in ANGSTROMS
sdata = re.search(r"\(X, Y, Z\)[\sa-zA-Z0-9\(\)/\*\-]+\n([\s0-9\-\n.]+)", COSMO_contents, re.DOTALL).group(1).rstrip()
table_assign = ['n','atom','elem', 'x / a.u.','y / a.u.','z / a.u.','charge / e','area / A^2','charge/area / e/A^2','potential']

# Annotate the columns appropriately with units(!)
return pandas.read_csv(StringIO(sdata), names=table_assign, sep=r'\s+',engine= 'python')

Expand All @@ -158,6 +163,11 @@ def get_atom_DataFrame(COSMO_contents):
# GAMESS: same unit (Angstrom in GAMESS) as Dmol3 but format is different
sdata = re.search(r"EQUILIBRIUM GEOMETRY[\sa-zA-Z0-9\(\)\./\*\n]+\-+\n(\s[\s\S]+)\n\n\n", COSMO_contents, re.DOTALL).group(1)
table_assign = ['atom','charge','x / A','y / A','z / A']
elif "OpenMOPAC.net" in COSMO_contents:
# MOPAC: unit in ANGSTROMS
sdata = re.search(r"ATOMIC\sDATA\s\n[\sa-zA-Z\(\)/\.\*\-]+\n([\s0-9\-\n.]+)\n\n", COSMO_contents, re.DOTALL).group(1)
table_assign = ['atom', 'elem', 'x / A','y / A','z / A', 'r / A', 'charge', 'area', 'sigma']

# Annotate the columns appropriately with units(!)
return pandas.read_csv(StringIO(sdata), names=table_assign, sep=r'\s+',engine = 'python')

Expand All @@ -175,6 +185,9 @@ def get_area_volume(COSMO_contents):
# GAMESS: units of area and volume are same as DMol3
area = float(re.search(r"Total surface area of cavity \(A\*\*2\)\s+=(.+)\n", COSMO_contents).group(1).strip())
volume = float(re.search(r"Total volume of cavity \(A\*\*3\)\s+=(.+)\n", COSMO_contents).group(1).strip())
elif "OpenMOPAC.net" in COSMO_contents:
area = float(re.search(r"COSMO\sAREA\s+=\s+([0-9\-\n.]+)", COSMO_contents).group(1).strip())
volume = float(re.search(r"COSMO\sVOLUME\s+=\s+([0-9\-\n.]+)", COSMO_contents).group(1).strip())

return area, volume

Expand Down