Example: Two QM/MM calculations with only MM interactions across periodic boundaries¶
#!/bin/sh
#########################################################################################################
# A QMMM mechanical embedding job with an aldehyde and coordinated water molecule in the QM region
# of a 10 Angstrom diameter periodic water box.
# Interactions across the periodic boundary are computed with the MM engine.
# This is accomplished by removing the lattice vectors of the QM subsystem.
# This works well only if the QM region is both localized, and small compared to the full periodic system.
# If this is not the case (as in this example), the Hybrid engine prints a warning.
#########################################################################################################
export AMS_JOBNAME=aldehyde_in_water
$AMSBIN/ams << eor
Task SinglePoint
System
Atoms
C -3.8540000000 -4.7430000000 4.1930000000 region=QM
O 5.0000000000 5.0000000000 5.0000000000 region=QM
H -2.9700000000 -4.3340000000 4.8690000000 region=QM
C -3.2480000000 4.0540000000 3.3980000000 region=QM
N -4.1860000000 -3.5390000000 3.1270000000 region=QM
C 4.3420000000 -3.6210000000 2.4000000000 region=MM
C -3.0630000000 -3.8460000000 2.0530000000 region=QM
C -4.0540000000 -2.0160000000 3.9570000000 region=MM
H 4.1920000000 -4.7610000000 2.0560000000 region=MM
H 3.6030000000 -3.2640000000 3.1060000000 region=MM
H 4.3540000000 -2.9820000000 1.4970000000 region=MM
H -3.3300000000 -3.3830000000 1.0330000000 region=QM
C -2.8160000000 4.5910000000 1.9930000000 region=QM
H -2.2350000000 -3.2470000000 2.4770000000 region=QM
H -4.4970000000 -1.2590000000 3.2750000000 region=MM
H -3.0140000000 -1.8670000000 4.2230000000 region=MM
H -4.7110000000 -1.9550000000 4.8940000000 region=MM
H -1.7160000000 4.3100000000 1.6530000000 region=QM
H -3.4660000000 4.0530000000 1.2330000000 region=QM
H -4.0010000000 3.2280000000 3.2500000000 region=QM
H -2.3870000000 3.5920000000 3.9830000000 region=QM
O 3.3310000000 -2.0920000000 -3.3480000000 region=MM
H 2.6420000000 -1.6960000000 -2.8050000000 region=MM
H 2.7680000000 -2.4400000000 -4.0920000000 region=MM
O 2.4970000000 3.4070000000 4.2350000000 region=QM
H 2.7230000000 3.3600000000 3.3400000000 region=QM
H 3.2200000000 3.9480000000 4.6000000000 region=QM
O -4.8450000000 1.2530000000 -4.3190000000 region=MM
H 4.8230000000 1.9920000000 -3.8350000000 region=MM
H -3.8470000000 1.3370000000 -4.2870000000 region=MM
O 4.8290000000 -4.1050000000 -2.5230000000 region=MM
H 4.2920000000 -3.2710000000 -2.7480000000 region=MM
H -4.3180000000 -3.7910000000 -2.3050000000 region=MM
O 4.6310000000 1.6750000000 3.0750000000 region=MM
H -4.7880000000 0.9790000000 2.7230000000 region=MM
H 4.6910000000 1.4870000000 4.0950000000 region=MM
O 4.4520000000 2.9870000000 -2.2140000000 region=MM
H 4.7940000000 3.8850000000 -1.8770000000 region=MM
H 4.9040000000 2.4030000000 -1.5710000000 region=MM
O -1.6950000000 -3.8080000000 -4.0210000000 region=MM
H -1.5320000000 -4.6990000000 -3.6560000000 region=MM
H -2.2200000000 -3.3010000000 -3.3370000000 region=MM
O 3.9256880000 1.8438050000 1.0007690000 region=Builder
H 4.7505450000 2.3917250000 1.0006360000 region=Builder
H 3.1885790000 2.5050710000 1.0009140000 region=Builder
O -1.8537950000 1.4660200000 -4.4281840000 region=Builder
H -2.1362430000 1.0560120000 4.7158250000 region=Builder
H -1.0097300000 1.0023580000 -4.1975860000 region=Builder
O -3.0163460000 3.9057930000 -3.0151620000 region=Builder
H -2.6524150000 3.0809300000 -2.6055800000 region=Builder
H -3.5254500000 3.5879300000 -3.8028040000 region=Builder
O -1.2849470000 1.7927300000 2.6979630000 region=Builder
H -1.0521720000 2.4543220000 1.9988810000 region=Builder
H -1.0003150000 2.2173750000 3.5460570000 region=Builder
O -3.6393660000 -1.0000000000 -1.8632950000 region=Builder
H -4.1915520000 -1.5167640000 -2.5025520000 region=Builder
H -4.1609620000 -1.0084350000 -1.0215890000 region=Builder
O 1.4589160000 4.9039690000 1.0003870000 region=Builder
H 1.5667370000 -4.1116650000 1.0004840000 region=Builder
H 2.3848710000 4.5529550000 1.0000900000 region=Builder
O -1.8765380000 -2.2453370000 -1.4371840000 region=Builder
H -2.0248290000 -3.1216070000 -1.0004180000 region=Builder
H -1.0646050000 -1.8844510000 -1.0000000000 region=Builder
O 1.0014640000 2.4224160000 1.1818950000 region=Builder
H 1.0013520000 2.8116320000 2.0924520000 region=Builder
H 1.1206730000 1.4502280000 1.3276470000 region=Builder
O -3.5697620000 1.0078470000 -1.2016460000 region=Builder
H -3.6618760000 1.0034510000 -2.1875970000 region=Builder
H -3.0940120000 1.8527580000 -1.0006700000 region=Builder
O 1.0000170000 1.8383200000 -3.6507360000 region=Builder
H 1.4888510000 1.0415140000 -3.3240190000 region=Builder
H 1.0438860000 2.4817100000 -2.8992510000 region=Builder
O 1.4251920000 -2.4705610000 3.6279890000 region=Builder
H 1.1420300000 -3.0764920000 2.8977360000 region=Builder
H 1.0000100000 -2.8451270000 4.4401000000 region=Builder
O 1.9948910000 1.3032730000 3.8089230000 region=Builder
H 2.5233660000 1.0007700000 3.0280200000 region=Builder
H 1.0685050000 1.0172550000 3.6074100000 region=Builder
O 3.2927430000 -1.0000000000 1.4322740000 region=Builder
H 3.3113980000 -1.0388000000 2.4215920000 region=Builder
H 2.3302550000 -1.0271860000 1.2010140000 region=Builder
O -1.2652600000 1.8159350000 -1.9159210000 region=Builder
H -1.0000790000 1.5458080000 -1.0008730000 region=Builder
H -1.6655650000 1.0000660000 -2.3092610000 region=Builder
O 1.4908770000 -4.6121490000 -4.3451860000 region=Builder
H 1.0797520000 4.4977970000 -4.4844100000 region=Builder
H 2.2597540000 -4.7850560000 -3.7455740000 region=Builder
O -2.1838550000 4.2941710000 -1.0057250000 region=Builder
H -3.0479890000 4.7777780000 -1.0061360000 region=Builder
H -1.5803610000 4.8640330000 -1.5457760000 region=Builder
O 1.8481400000 4.1381360000 -1.5485580000 region=Builder
H 2.5175090000 3.6568520000 -1.0000020000 region=Builder
H 2.1384190000 -4.9155300000 -1.5203710000 region=Builder
O 3.1165680000 1.0041150000 -1.8740840000 region=Builder
H 3.5861110000 1.0101460000 -1.0022490000 region=Builder
H 2.6930110000 1.8972100000 -1.9339550000 region=Builder
O -1.0127710000 -1.6106290000 1.7794540000 region=Builder
H -1.0702580000 -1.0110090000 2.5654270000 region=Builder
H -1.0265750000 -1.0000010000 1.0000020000 region=Builder
End
BondOrders
1 2 1.0
1 3 1.0
1 4 1.0
4 13 1.0
4 20 1.0
4 21 1.0
5 6 1.0
5 7 1.0
5 8 1.0
6 9 1.0
6 10 1.0
6 11 1.0
7 12 1.0
7 13 1.0
7 14 1.0
8 15 1.0
8 16 1.0
8 17 1.0
13 18 1.0
13 19 1.0
22 23 1.0
22 24 1.0
25 26 1.0
25 27 1.0
28 29 1.0
28 30 1.0
31 32 1.0
31 33 1.0
34 35 1.0
34 36 1.0
37 38 1.0
37 39 1.0
40 41 1.0
40 42 1.0
43 44 1.0
43 45 1.0
46 47 1.0
46 48 1.0
49 50 1.0
49 51 1.0
52 53 1.0
52 54 1.0
55 56 1.0
55 57 1.0
58 59 1.0
58 60 1.0
61 62 1.0
61 63 1.0
64 65 1.0
64 66 1.0
67 68 1.0
67 69 1.0
70 71 1.0
70 72 1.0
73 74 1.0
73 75 1.0
76 77 1.0
76 78 1.0
79 80 1.0
79 81 1.0
82 83 1.0
82 84 1.0
85 86 1.0
85 87 1.0
88 89 1.0
88 90 1.0
91 92 1.0
91 93 1.0
94 95 1.0
94 96 1.0
97 98 1.0
97 99 1.0
End
Lattice
10.0000000000 0.0000000000 0.0000000000
0.0000000000 10.0000000000 0.0000000000
0.0000000000 0.0000000000 10.0000000000
End
End
Engine Hybrid
Energy
Term
Factor 1.0
Region QM
EngineID DFTB
PBC No
End
Term
Factor -1.0
Region QM
EngineID ForceField
PBC No
End
Term
Factor 1.0
Region *
EngineID ForceField
End
End
Engine DFTB
EndEngine
Engine ForceField
EndEngine
EndEngine
eor
# The QM subsystem is checked for continuity.
$AMSBIN/amspython << eor
import numpy
from scm.libbase import ChemicalSystem, Lattice
fn = "aldehyde_in_water.results/hybrid.rkf"
system = ChemicalSystem.from_kf(fn)
fn = "aldehyde_in_water.results/hybrid-term1-DFTB.rkf"
qm_system = ChemicalSystem.from_kf(fn)
coords = numpy.array(qm_system.coords)
# Check that there is indeed no periodic lattice
check1 = qm_system.has_lattice()
print ("The subsystem has a periodic lattice: %s (%i)" % (check1, int(check1)))
# Check that all molecules are continuous
qm_system.lattice = system.lattice
qm_system.map_atoms_continuous()
qm_system.lattice = Lattice()
check2 = (coords == qm_system.coords).all()
print ("The coordinates of the two molecules are continuous: %s (%i)" % (check2, int(check2)))
# Check that there is still a hydrogen bond
nco, water = qm_system.split_into_molecules()
ioxygen = 1
dist1 = numpy.sqrt(((water.coords[1] - nco.coords[ioxygen])**2).sum())
dist2 = numpy.sqrt(((water.coords[2] - nco.coords[ioxygen])**2).sum())
check3 = dist1 < 2.5 or dist2 < 2.5
print ("The H-bond between NCO and water is in tact: %s (%i)" % (check3, int(check3)))
eor
# Now run a 2D periodic QM/MM system
export AMS_JOBNAME=mof2d
"$AMSBIN/ams" << eor
Task SinglePoint
System
Atoms
B -15.90695753982114 -4.950500162388289 1.473207270000041
B -15.90596879982112 5.128071927611713 1.435837240000041
O -14.70428696982112 5.80499179761171 1.562447220000041
B -13.50816694982115 5.128113977611711 1.733976590000041
O -13.53827607982113 3.746755607611708 1.824753010000041
B -14.72453342982113 3.040140747611705 1.725211150000041
O -15.89989011982117 3.747120877611706 1.538296360000041
C -14.73139001982114 1.493557487611713 1.783522680000041
C -13.53736267982113 0.7818447276117129 1.937893420000041
C -13.53756710982113 -0.6012663323882885 1.944109940000041
C -14.73179446982114 -1.314000752388287 1.796160330000041
C -15.92736829982113 -0.6022311623882886 1.654426920000041
C -15.92717028982113 0.7809180076117128 1.648191270000041
B -14.72537079982115 -2.860966682388298 1.750242930000041
B -8.357438729821205 8.012916777611707 1.661952080000041
O -15.90088693982113 -3.569091732388298 1.569278270000041
C -9.704269099821218 7.252802597611714 1.741297800000041
C -9.741999549821218 5.854925357611711 1.751540230000041
C -10.95110277982113 5.183165277611714 1.776544220000041
C -12.15955697982116 5.887885637611711 1.777357830000041
C -12.12169634982114 7.285783467611713 1.774682380000041
C -10.91246847982113 7.957577577611709 1.764206160000041
H -13.05510256982119 7.839501747611709 1.776167310000041
H -8.808781769821215 5.301201927611711 1.734972680000041
H -10.97338201982119 4.098157927611708 1.782257160000041
H -12.60698429982114 -1.148241512388288 2.056434520000041
H -12.60664387982112 1.329530197611711 2.045382140000041
H -16.85741429982124 -1.149937592388288 1.541236880000041
H -16.85704970982123 1.327863227611714 1.530105920000041
B -7.143465759821195 10.10191757761169 1.619681930000041
O -8.327216509821204 9.394878587611705 1.742649880000041
H -10.89016330982117 9.042604807611706 1.760255660000041
C -12.12183895982113 -7.106152032388289 1.812975770000041
C -12.16021688982114 -5.708257212388288 1.815826570000041
C -10.95201379982118 -5.003112402388289 1.816036530000041
C -9.742645439821217 -5.674403112388287 1.791716270000041
C -9.704377499821216 -7.072252742388288 1.780585290000041
C -10.91235283982114 -7.777475712388289 1.802595030000041
B -8.357324819821205 -7.831759322388291 1.699723130000041
O -7.163969009821195 -7.15377737238829 1.513608330000041
B -5.964552699821197 -7.83003247238829 1.363823910000041
O -5.970239959821197 -9.212000172388294 1.451260260000041
B -7.143269369821194 -9.920466822388303 1.646466060000041
O -8.327088699821203 -9.214162472388294 1.773162390000041
C -7.136557079821193 -11.46761637238832 1.686495600000041
C -5.943414919821199 -12.17906917238832 1.524403830000041
C -5.943409129821196 -13.56221546238832 1.517712840000041
C -7.136579859821194 -14.27514242238832 1.672948960000041
C -8.328173989821204 -13.56372486238832 1.846337570000041
C -8.328180939821202 -12.18061010238832 1.853017650000041
B -13.50904822982113 -4.948899572388289 1.770187950000041
O -14.70518114982118 -5.626821992388289 1.602563210000041
B -0.9390653298211955 -4.947369922388287 0.2154355600000395 region=QM
C -2.257970249821194 -5.706611152388289 0.5015769100000365
C -2.270661799821194 -7.099228982388286 0.6291867500000364
C -3.447444929821182 -7.77016619238829 0.9095223100000364
C -4.647398759821192 -7.069763462388288 1.072504000000041
C -4.634753199821195 -5.677181712388286 0.9447625600000364
C -3.458085159821189 -5.006286242388286 0.6634988600000364
H -5.562073609821194 -5.127117712388287 1.068557190000041
H -1.343244589821201 -7.64924951238829 0.5060785400000364
H -3.450571139821182 -8.851155102388294 1.005717820000041
H -5.015426689821194 -14.10891765238832 1.384555850000041
H -5.015406109821195 -11.63114809238832 1.396492550000041
H -9.256876059821217 -14.11165419238832 1.969057080000041
H -9.256875619821217 -11.63386548238832 1.980906150000041
H -8.809632889821215 -5.120293462388289 1.775909400000041
H -10.88963580982115 -8.862493632388293 1.797831170000041
H -13.05502661982118 -7.66016751238829 1.813776200000041
C -4.635316099821194 5.861336937611711 0.9008448400000364
C -4.648131389821194 7.253941057611712 1.028456870000041
C -3.448500069821184 7.954567897611709 0.8641322600000364
C -2.271779419821194 7.283779617611712 0.5830236500000364
C -2.258764059821196 5.891079187611713 0.4564794300000407
C -3.458664759821186 5.190567687611711 0.6193398300000365
B -0.9397384298211955 5.131126827611711 0.1729829300000398 region=QM
O 0.2620784601788027 5.807315397611713 0.04352332000003831 region=QM
B 1.458167910178799 5.129339577611713 -0.1240892499999628 region=QM
O 1.4279428601788 3.747541367611707 -0.20781222999996 region=QM
B 0.2417071201788031 3.041521987611704 -0.1038654399999629 region=QM
O -0.9338157098211954 3.749723137611706 0.07694944000003869 region=QM
O 1.428491080178799 -3.566236742388296 -0.1746285499999602 region=QM
B 9.002586250178783 8.010096487611708 0.2867082200000404
O 7.803421590178791 7.333790307611711 0.1354306600000398
H 11.51173385017887 -3.928858602388293 1.122084050000041
H 13.62345404017882 7.83016995761171 1.146900930000041
H 3.993614250178809 -3.917850732388291 -0.1350633899999601
B 0.2422644901788028 -2.859588182388295 -0.0750615699999613 region=QM
O -13.53910395982117 -3.567137292388298 1.853734730000041
B -5.965037669821195 8.013223587611707 1.323325030000041
O -7.164213869821191 7.336053407611714 1.471185240000041
B 6.610085730178805 8.011711317611706 -0.05094589999996171
O -0.9330430098211955 -3.566532772388296 0.1123275800000372 region=QM
C 5.263072910178807 7.252261717611713 -0.1327793299999604
C 5.224640020178803 5.854428447611714 -0.14452778999996
C 4.015234170178808 5.18325432761171 -0.1695387099999603
C 2.807089210178815 5.888494097611711 -0.1694928499999604
C 2.845605860178815 7.286394627611711 -0.16609305999996
C 4.055165750178809 7.957625837611709 -0.1550392599999603
H -3.454985759821189 -3.925357522388293 0.5665618600000364
H 1.912495110178807 7.84055465761171 -0.1671562099999604
H 6.157597250178805 5.300223477611714 -0.1285959299999604
H 3.992426260178809 4.098250207611706 -0.1758390899999601
H 11.51277626017887 4.105700137611709 1.083685600000041
H 9.405619340178783 5.307027257611713 0.5813454100000364
O 8.996808030178784 9.392154157611706 0.2000783100000399
H 11.51589275017887 9.031689477611707 0.6469830000000364
H -1.344542229821201 7.833934517611708 0.4590633300000405
H -10.97468604982117 -3.918103942388294 1.821932360000041
H -3.455379159821186 4.10957106761171 0.5232924900000364
H -5.56239709982119 5.311090327611714 1.025604050000041
B 7.823866870178793 10.10057958761169 0.004087640000038544
O -5.970755389821196 9.394741637611705 1.417804210000041
O 6.640200640178805 9.394180957611706 -0.1235288199999627
H 4.077907800178806 9.042632137611706 -0.1499692499999604
H -3.451783729821185 9.035571327611706 0.9601920800000364
C 2.844902580178816 -7.105334062388288 -0.1229932799999628
C 2.807229210178815 -5.707425162388286 -0.1271329199999603
C 4.015762780178807 -5.002864932388289 -0.1282281499999604
C 5.224782750178804 -5.674748612388288 -0.1036780999999627
C 5.262364330178804 -7.072613142388289 -0.0919599299999613
C 4.054068240178804 -7.777277452388288 -0.1129393399999629
B 6.609204650178808 -7.832782802388288 -0.01309952999996146
O 7.802543650178788 -7.15579638238829 0.1766626500000398
B 9.001771820178783 -7.832854152388289 0.3241404600000407
O 8.996092080178784 -9.214437082388294 0.2302017000000399
B 7.82324535017879 -9.921745942388302 0.02932649000003854
O 6.639413980178807 -9.214745902388294 -0.09324385999996131
C 7.830172380178788 -11.46851455238833 -0.02333840999996146
C 9.023484200178784 -12.18129747238832 0.1315026700000397
C 9.023615190178782 -13.56444916238832 0.12528251000004
C 7.830456570178788 -14.27606431238832 -0.03604083999996165
C 6.638691290178808 -13.56322492238832 -0.20219309999996
C 6.638553870178803 -12.18009773238832 -0.1959015399999604
B 1.458624320178799 -4.947534082388289 -0.08334725999996132 region=QM
O 0.2626037201788029 -5.624409432388289 0.08881379000003869 region=QM
C 12.70818239017881 -5.710400872388288 1.189629570000041
C 12.69515052017885 -7.10314863238829 1.063626690000041
C 11.51835125017885 -7.77403260238829 0.7829706800000364
C 10.31878148017887 -7.073410132388289 0.6183036300000364
C 10.33165741017888 -5.680738742388289 0.7452557100000364
C 11.50833650017882 -5.009891412388289 1.026399850000041
H 9.404555730178803 -5.130563312388289 0.6202964600000365
H 13.62231062017884 -7.653332612388289 1.187915850000041
H 11.51504252017883 -8.855074422388293 0.6873809000000364
H 9.951713370178865 -14.11227014238832 0.2529184300000407
H 9.951494830178847 -11.63447328238832 0.2640112500000406
H 5.709980550178806 -14.11007254238832 -0.3295222799999596
H 5.709751430178803 -11.63229648238832 -0.3184354899999596
H 6.158071130178805 -5.121092292388289 -0.0884945199999613
H 4.076225650178804 -8.862303662388294 -0.1077697199999627
H 1.911429050178808 -7.65888453238829 -0.1229847899999628
C 10.33267428017884 5.857349147611712 0.7058889700000364
C 10.31969207017885 7.249992557611713 0.5787263000000364
C 11.51935040017882 7.950654777611709 0.7426911000000365
C 12.69623644017883 7.27993916761171 1.023164300000041
C 12.70931116017882 5.88725899761171 1.150086830000041
C 11.50943157017885 5.186685477611711 0.9873299900000364
O -0.37932634 -0.0 -3.15225896 region=QM
O -3.15225896 0.0 0.37932633 region=QM
C -0.24252991 -0.0 -2.01546005 region=QM
O 0.37932634 0.0 3.15225896 region=QM
C 0.24252991 0.0 2.01546005 region=QM
Fe 0.0 0.0 0.0 region=QM
O 3.15225896 -0.0 -0.37932633 region=QM
C 2.01546006 -0.0 -0.24252991 region=QM
C -2.01546006 0.0 0.24252991 region=QM
End
Lattice
29.93423999 0.0 0.0
0.0 25.92379999 0.0
End
BondOrders
1 16 1.0
1 52 1.0
1 137 1.0 -1 0
2 3 1.0
2 7 1.0
2 157 1.0 -1 0
3 4 1.0
4 5 1.0
4 20 1.0
5 6 1.0
6 7 1.0
6 8 1.0
8 9 1.5
8 13 1.5
9 10 1.5
9 27 1.0
10 11 1.5
10 26 1.0
11 12 1.5
11 14 1.0
12 13 1.5
12 28 1.0
13 29 1.0
14 16 1.0
14 89 1.0
15 17 1.0
15 31 1.0
15 91 1.0
17 18 1.5
17 22 1.5
18 19 1.5
18 24 1.0
19 20 1.5
19 25 1.0
20 21 1.5
21 22 1.5
21 23 1.0
22 32 1.0
30 31 1.0
30 48 1.0 0 1
30 113 1.0
33 34 1.5
33 38 1.5
33 69 1.0
34 35 1.5
34 51 1.0
35 36 1.5
35 109 1.0
36 37 1.5
36 67 1.0
37 38 1.5
37 39 1.0
38 68 1.0
39 40 1.0
39 44 1.0
40 41 1.0
41 42 1.0
41 57 1.0
42 43 1.0
43 44 1.0
43 45 1.0
45 46 1.5
45 50 1.5
46 47 1.5
46 64 1.0
47 48 1.5
47 63 1.0
48 49 1.5
49 50 1.5
49 65 1.0
50 66 1.0
51 52 1.0
51 89 1.0
53 54 1.0
53 93 1.0
53 136 1.0
54 55 1.5
54 59 1.5
55 56 1.5
55 61 1.0
56 57 1.5
56 62 1.0
57 58 1.5
58 59 1.5
58 60 1.0
59 100 1.0
70 71 1.5
70 75 1.5
70 111 1.0
71 72 1.5
71 90 1.0
72 73 1.5
72 116 1.0
73 74 1.5
73 108 1.0
74 75 1.5
74 76 1.0
75 110 1.0
76 77 1.0
76 81 1.0
77 78 1.0
78 79 1.0
78 97 1.0
79 80 1.0
80 81 1.0
82 88 1.0
82 135 1.0
83 84 1.0
83 106 1.0
83 154 1.0
84 92 1.0
85 142 1.0
86 156 1.0
87 119 1.0
88 93 1.0
90 91 1.0
90 113 1.0
92 94 1.0
92 114 1.0
94 95 1.5
94 99 1.5
95 96 1.5
95 102 1.0
96 97 1.5
96 103 1.0
97 98 1.5
98 99 1.5
98 101 1.0
99 115 1.0
104 158 1.0
105 153 1.0
106 112 1.0
107 155 1.0
112 114 1.0
112 132 1.0 0 1
117 118 1.5
117 122 1.5
117 152 1.0
118 119 1.5
118 135 1.0
119 120 1.5
120 121 1.5
120 150 1.0
121 122 1.5
121 123 1.0
122 151 1.0
123 124 1.0
123 128 1.0
124 125 1.0
125 126 1.0
125 140 1.0
126 127 1.0
127 128 1.0
127 129 1.0
129 130 1.5
129 134 1.5
130 131 1.5
130 147 1.0
131 132 1.5
131 146 1.0
132 133 1.5
133 134 1.5
133 148 1.0
134 149 1.0
135 136 1.0
137 138 1.5
137 142 1.5
138 139 1.5
138 144 1.0
139 140 1.5
139 145 1.0
140 141 1.5
141 142 1.5
141 143 1.0
153 154 1.5
153 158 1.5
154 155 1.5
155 156 1.5
156 157 1.5
157 158 1.5
159 161 2.0
160 167 2.0
162 163 2.0
164 161 1.0
164 163 1.0
164 166 1.0
164 167 1.0
165 166 2.0
End
End
Engine Hybrid
Energy
Term Factor=1.0 Region=* EngineID=ForceField-1
Term Factor=1.0 Region=QM EngineID=DFTB-1 PBC=No
Term Factor=-1.0 Region=QM EngineID=ForceField-1 PBC=No
End
Engine ForceField ForceField-1
EndEngine
Engine DFTB DFTB-1
EndEngine
EndEngine
eor
$AMSBIN/amspython << eor
import numpy
from scm.libbase import ChemicalSystem, Lattice, KFFile
fn = "mof2d.results/hybrid-term2-DFTB.rkf"
qm_system = ChemicalSystem.from_kf(fn)
coords = numpy.array(qm_system.coords)
# Check that there is indeed no periodic lattice
check1 = qm_system.has_lattice()
print ("The subsystem has a periodic lattice: %s (%i)" % (check1, int(check1)))
fn = "mof2d.results/ams.rkf"
kf = KFFile(fn)
txt = kf.read("General","termination status")
check2 = not "warnings" in txt
print ("The periodic MM system is large enough: %s (%i)" % (check2, int(check2)) )
print ()
eor