# Example: MM/MM with constrained ion-water cluster in periodic water box¶

Download IonWaterHybridSolvationPlumed.run

#!/bin/sh

##########################################################################
# A molecular dynamics simulation of MgCl2 dissolved in a small periodic water box.
# The setup mimics a multi-scale (QM/MM) simulation,
# but with both sides described by the UFF force field.
#
# In an actual QM/MM simulation it is crucial that
# the QM and MM water molecules do not diffuse into one another.
# We accomplish this by constraining the water molecules according to the FIRES procedure
# (doi: 10.1021/ct300091w).
# The constraint f({r_O}) is a function of the set of distances of
# all oxygen atoms to the central ion.
# {r_O}={r_QM}+{r_MM}
# f({r_O}) = min({r_MM}) - max({r_QM}).
# This function is constrained to be greater than zero using a half-harmonic potential.
# U(f)=kappa*(f)**2 for f<0
# U(f)=0            for f>=0
#
# The min() and max() functions are continuous functions that
# approximate respectively the minimum and the maximum out of a set of values.
# The parameter beta determines the continuity of the function.
# Choosing a beta value further from 1
# (larger and smaller for the min() and max() functions respectively)
# results in a better match between the actual
# and approximate minimum/maximum values, but also in a less continuous function.
##########################################################################

$AMSBIN/ams << eor MolecularDynamics InitialVelocities Temperature 300.0 End NSteps 200 Plumed Input GROUP ATOMS=27,36,63,93,102,138,198,213,276 LABEL=qm GROUP ATOMS=3,6,9,12,15,18,21,24,30,33,39,42,45,48,51,54,57,60,66,69,72,75,78,81,84,87,90,96,99,105,108,111,114,117,120,123,126,129,132,135,141,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186,189,192,195,201,204,207,210,216,219,222,225,228,231,234,237,240,243,246,249,252,255,258,261,264,267,270,273,279,282,285,288,291,294,297,300,303,306 LABEL=mm DISTANCES GROUPA=1 GROUPB=qm MAX={BETA=0.005} LABEL=maxcv DISTANCES GROUPA=1 GROUPB=mm MIN={BETA=100.0} LABEL=mincv COMBINE ARG=mincv.min,maxcv.max COEFFICIENTS=1,-1 PERIODIC=NO LABEL=cv LOWER_WALLS ARG=cv AT=0. KAPPA=5000.0 PRINT ARG=maxcv.max,mincv.min,cv STRIDE=1 FILE=COLVAR End End Thermostat Tau 100.0 Temperature 300.0 Type Berendsen End TimeStep 0.5 Trajectory SamplingFreq 1 End End Task MolecularDynamics system Atoms Mg 5.7200350720 -2.9328800664 0.7897499036 region=qm H 1.8099054637 -4.4220924299 4.8703260963 region=mm O 7.1694504052 -8.8515558080 -4.2753237457 region=mm H -7.1267761804 -8.3665468365 -4.8452690067 region=mm H 6.7102946636 -8.0997193116 -3.7685132509 region=mm O 2.7088914434 1.0610825031 4.6923243683 region=mm H 3.3054833375 0.4921267903 5.2402434951 region=mm H 1.8233363292 0.6530077196 4.7305392172 region=mm O -1.4764148218 -6.8788850509 -2.6003412213 region=mm H -2.0005170531 -7.6500792651 -2.8620779463 region=mm H -2.1885584491 -6.3289735405 -2.1092174532 region=mm O 3.8478147995 -7.4795251060 -6.6736084141 region=mm H 4.3989126832 -6.7783144126 -7.0250045541 region=mm H 2.9555533860 -7.0654023511 -6.8252343194 region=mm O -4.7471764043 -8.6077953930 -2.2377385210 region=mm H -5.5092008380 -8.5969300931 -2.8802846966 region=mm H -5.2576468285 -8.9527935768 -1.4219979311 region=mm O -4.7772922849 -4.8474333611 -2.1581380915 region=mm H -4.8239240982 -4.7790577136 -3.1075173037 region=mm H -5.0338948567 -5.7924530112 -2.0117434690 region=mm O 2.4515102733 0.8469564304 -3.2719985082 region=mm H 2.3774951038 -0.1397894447 -3.4984484181 region=mm H 1.8468114255 0.8917317291 -2.4779777927 region=mm O -3.3840665349 -4.0437270402 4.9817876227 region=mm H -4.0089551919 -4.0145592434 5.6903827994 region=mm H -2.8889478457 -3.1965528132 5.0436088929 region=mm O 3.3018776783 -3.8565105302 0.1699379171 region=qm H 2.8411614398 -2.9527284257 0.2152811292 region=qm H 3.3278682045 -4.1059629877 -0.8090519740 region=qm O -0.3029454571 0.3223547569 3.0869293987 region=mm H 0.2531700096 0.3756415457 2.2625874250 region=mm H -0.6800920306 -0.5897179149 2.9611527639 region=mm O -5.3484100952 1.5806960236 0.2989946199 region=mm H -4.7381235203 2.3283676440 0.2109523156 region=mm H -6.1446741550 2.0700615293 0.6143220874 region=mm O -5.9927569909 -4.5445068094 0.7252872361 region=qm H -6.1165384480 -5.5153290275 0.4900339104 region=qm H -6.2159199095 -4.0455250579 -0.1412140829 region=qm O -0.9099199619 -1.8881647338 5.2995851295 region=mm H -0.2497687678 -2.4792433544 4.9371760594 region=mm H -0.3480512141 -1.3260802954 5.9009948331 region=mm O 3.6215242959 2.1814508127 1.6874751538 region=mm H 4.5165073769 2.5415115300 1.9221949954 region=mm H 3.4064165275 1.6332209215 2.4834093017 region=mm O 5.1833051040 -1.2908175195 6.4042504661 region=mm H 5.0111822889 -1.5205203085 7.3487966849 region=mm H 5.1785123947 -0.3057599544 6.5543696690 region=mm O 0.4603933279 -1.2441515414 -0.2033532097 region=mm H 0.7445254512 -0.6039397934 -0.9167026803 region=mm H -0.5688268735 -1.2243571151 -0.2572139023 region=mm O -5.4968287382 -8.9609194175 1.2499552393 region=mm H -5.1571901876 -8.8988514057 2.1941505053 region=mm H -6.4529456019 5.8448385545 1.3244900622 region=mm O -5.0649038431 -1.5925489571 5.4791046507 region=mm H -5.4190296195 -0.6625809652 5.5607319002 region=mm H -4.6322521004 -1.5417498356 4.5302003438 region=mm O 0.3677337844 -8.5810760971 5.8032571443 region=mm H -0.1086349973 5.8640829165 5.1172774803 region=mm H 0.3027415357 -7.6611857343 5.5038587712 region=mm O 1.5717316961 -8.1886314470 -4.1347530444 region=mm H 0.6160556952 -7.9037370683 -4.2849423181 region=mm H 1.5976518950 -8.8465245437 -3.3851806828 region=mm O 6.0759336250 -1.6447775457 -1.9957055354 region=qm H 5.0826000738 -1.6154040577 -2.1716448087 region=qm H 6.2225213454 -0.9240536977 -1.3190154430 region=qm O 7.0411997183 -6.3306028762 2.6673264477 region=mm H 7.2603015022 -6.4603061816 3.6331777655 region=mm H 6.8554828937 -5.4038722790 2.3804719901 region=mm O 5.4891620764 1.7626392649 5.4506129348 region=mm H 5.1390437356 2.4184645147 6.1374986521 region=mm H 5.0532883869 2.1669956638 4.6417895438 region=mm O -4.2394186994 0.8168239717 3.3776299556 region=mm H -5.1876861457 0.9406435176 3.6467381795 region=mm H -4.3280295844 0.9981858500 2.4035538318 region=mm O 1.6209849652 -6.0322658389 -1.7020131060 region=mm H 1.9033980535 -6.6148231926 -0.9312205097 region=mm H 0.6074913843 -6.2050854204 -1.6495119106 region=mm O 2.3347829393 -2.1734816277 6.0621168212 region=mm H 2.3757060915 -2.0614469403 7.0710797559 region=mm H 3.1815618956 -2.6859727964 5.8159286113 region=mm O 2.6526456824 -4.5252677481 -6.7120333812 region=mm H 2.8020328735 -4.0500353548 -5.8761570391 region=mm H 3.5420462524 -4.3070798418 -7.1561049884 region=mm O -5.1041720806 -2.2728098033 -4.3516727544 region=mm H -4.3561610138 -2.4109430620 -4.9834336502 region=mm H -5.2187295786 -1.2775902805 -4.3031347846 region=mm O -6.7183990792 -5.6026203305 5.5769211366 region=mm H -6.2276316883 -4.8397127501 6.0169261502 region=mm H -6.8644442921 -6.2360671517 6.3313904040 region=mm O -0.2997249631 -2.3248611096 -6.0652301268 region=mm H 0.4480748249 -1.7420695578 -5.7844640285 region=mm H -0.2345271923 -3.0579113415 -5.3963109343 region=mm O 4.4557229323 -4.0321409485 3.4229510135 region=qm H 4.8228557987 -3.1175556198 3.2353382785 region=qm H 3.6117875931 -4.0360335014 2.8114358246 region=qm O 0.0246131293 0.7982683816 6.6958688191 region=mm H -0.7298836601 0.7814998411 7.3663632337 region=mm H 0.8452573517 1.1002106587 7.2018710420 region=mm O 0.5132549970 -3.4758845845 2.4755554365 region=mm H 0.7192096520 -4.4568118056 2.3329907178 region=mm H -0.4531120524 -3.3351695953 2.3773299504 region=mm O 3.7669484301 -0.0561634528 -0.5323383617 region=qm H 3.3380366522 -0.6568105740 0.1454732327 region=qm H 3.3744123064 0.8333772867 -0.3424611610 region=qm O -3.0203045076 4.5213182503 -0.5452112002 region=mm H -3.2392487263 4.4060241441 -1.4939704819 region=mm H -3.1245969727 5.4811933760 -0.4039600780 region=mm O -6.7794338138 0.4373660034 -3.4123297388 region=mm H -7.3506733030 1.2324326950 -3.2821835254 region=mm H -7.0467839805 -0.1662989127 -2.6296147182 region=mm O -7.2132673344 -6.9058350093 -0.9498762639 region=mm H -7.4423414731 -7.4598580979 -1.7108459608 region=mm H -7.2921175047 -7.5034525041 -0.1967566459 region=mm O -3.4217194872 -7.0004057995 0.2176912260 region=mm H -4.4126912325 -6.9974370339 0.2326646720 region=mm H -3.2536051030 -6.8635041363 1.1841799205 region=mm O 5.5910174783 2.1763450404 -2.4932345279 region=mm H 4.6852021649 2.5693050423 -2.2779105192 region=mm H 5.3066397633 1.4214774177 -3.1080658731 region=mm O -2.4065506310 -7.2932513323 5.7623954624 region=mm H -2.7119429920 -7.7054547466 6.5983438564 region=mm H -2.6278433895 -6.2775197492 5.8969552032 region=mm O 3.6640031160 1.8922352246 -6.2296569654 region=mm H 2.8532764044 2.2115544890 -5.7709024750 region=mm H 4.3856544177 2.5355822019 -5.8712770223 region=mm O -2.3745450348 -8.5657562688 2.7265414945 region=mm H -2.1735583778 5.4660643939 2.7300346193 region=mm H -2.9009994050 -8.4965918575 3.5413436006 region=mm O 5.8804342009 4.5354240094 7.1325312387 region=mm H 5.0131973513 4.8751670246 7.4157239493 region=mm H 5.9002289371 4.7710058802 6.1556779744 region=mm O 2.7885658031 -0.8611341888 -5.9360278211 region=mm H 2.1091805613 -0.1354528711 -6.0003389022 region=mm H 3.5887596075 -0.3300691963 -5.6526108069 region=mm O -7.3714532064 -2.7223839233 -7.2784923252 region=mm H -7.1791818261 -2.2678828420 6.8553882382 region=mm H -6.4996545488 -2.5177748518 -6.7900553649 region=mm O -7.0331348372 -0.9204735428 0.6063230068 region=qm H -6.0921468583 -0.5254758737 0.4836642534 region=qm H -6.8874090945 -1.8611486055 0.3995170375 region=qm O -0.1957946562 -7.2810928977 0.5399018314 region=mm H -1.0417531010 -7.4140228543 0.0205629395 region=mm H -0.5066511890 -7.1774442433 1.4825039769 region=mm O 1.8600464739 4.3473997665 -7.1437429628 region=mm H 1.3996822124 5.0181731916 7.3159348797 region=mm H 2.3374212908 4.9612352379 -6.5405671664 region=mm O -2.6582165538 3.6810647486 6.5096614907 region=mm H -1.9090302118 3.2846493549 5.9694982028 region=mm H -2.8320470394 4.5572534342 6.1597032487 region=mm O -0.9179119719 -7.7641827452 -6.4041108369 region=mm H 0.0071023946 -7.5564900267 -6.8187063304 region=mm H -1.0509730649 -8.7349187187 -6.5113229941 region=mm O 1.7179882871 4.6867540529 1.8322922929 region=mm H 1.5287720026 4.0244442843 2.5787414767 region=mm H 1.2098413206 5.5102132633 2.1367024110 region=mm O 0.2315235157 5.3955193196 -1.3941386642 region=mm H 0.9154934397 5.3968616552 -0.6625282811 region=mm H -0.6278735028 5.3026017629 -0.9672366771 region=mm O -2.6986887017 0.3541447860 5.9851919711 region=mm H -3.1402066242 1.0834994773 5.5167535098 region=mm H -2.0336367686 0.0007013596 5.3230337832 region=mm O 7.2680955491 -7.7923878013 -7.0442418879 region=mm H -7.4069606746 -8.7072187093 -7.0814921365 region=mm H 6.3283830672 -7.7710456593 -7.4966591209 region=mm O -6.3515739115 1.6766983710 5.5666144799 region=mm H -6.9810189288 1.3458684925 6.2898485162 region=mm H -6.7899460804 2.4073839912 5.1839051961 region=mm O -2.8567695695 -5.4944242037 -4.6438699205 region=mm H -2.1548980650 -4.9062145314 -4.9951434742 region=mm H -2.5217388050 -6.4735195066 -4.8292651223 region=mm O -6.7725880456 -5.3434185943 -4.7758904121 region=mm H -6.7069455824 -4.3534970892 -4.8167677162 region=mm H -6.7009918221 -5.5232802389 -5.7915052246 region=mm O -5.9314369718 -0.0938404833 -6.7661002883 region=mm H -5.0003399758 0.1037854112 -6.5155498992 region=mm H -6.3730841010 0.7190796050 -6.4056830813 region=mm O -1.2158144042 3.0933733381 1.7465428819 region=mm H -2.0208343618 3.5624274404 1.2900489033 region=mm H -1.6275528675 2.3857289407 2.3167156253 region=mm O -1.2518029287 -5.6724338313 3.1188234197 region=mm H -0.9850206033 -5.8319014903 4.0612631213 region=mm H -2.2290327112 -5.7688269115 3.2007651071 region=mm O -4.9043214995 5.6519654141 -5.4508370598 region=mm H -4.2942510297 -8.7887223286 -4.9708446990 region=mm H -4.4193283168 4.7703067795 -5.4563625441 region=mm O -2.5247612340 0.5732653081 0.0472599717 region=mm H -3.3924069268 0.1521030415 -0.1584794862 region=mm H -2.3892053288 0.2230100537 0.9885150093 region=mm O 0.3117073158 3.2255479828 4.5437006801 region=mm H 0.3906039249 2.9422839706 5.4734024052 region=mm H 0.3838958897 2.3769700045 4.0139213002 region=mm O -2.9873643647 -0.4272529780 -4.2245927340 region=mm H -3.3997184963 0.2439643116 -3.6677294861 region=mm H -2.3084400234 0.1141270972 -4.6000318007 region=mm O -3.6653412109 2.2731181202 -6.1284820314 region=mm H -2.7056660816 2.1477099050 -6.3724225625 region=mm H -4.1288630092 2.2931913038 -7.0006965934 region=mm O 4.6410116320 -6.7264988994 0.4616167168 region=qm H 4.4101166082 -6.1645564534 -0.2934777526 region=qm H 4.6730614520 -6.0060191761 1.1335922366 region=qm O 4.3976523416 -7.8892228919 -2.5423896153 region=mm H 5.0311201352 -7.2835094543 -2.0152830256 region=mm H 3.5722763512 -7.3542989528 -2.6482867334 region=mm O 7.0792006923 0.1209931002 3.4993386680 region=mm H 6.8558318086 -0.2426661313 4.4284878799 region=mm H 7.0270810501 -0.7659916797 2.9870911033 region=mm O 6.6224221857 5.1402997862 -1.3156095086 region=mm H 6.4201527371 4.7330581484 -2.1687204168 region=mm H 6.3243291309 4.4143694297 -0.6709013361 region=mm O 5.2683337184 -3.5100535099 -5.2215001164 region=mm H 5.8186543832 -3.6850578037 -5.9995996723 region=mm H 5.6184071998 -2.7108787147 -4.7924321672 region=mm O -7.6586220330 -3.0339696605 3.7287215092 region=qm H 7.2504138494 -3.8120801294 4.3111784975 region=qm H -6.7267376092 -3.0922749899 3.3936627288 region=qm O 5.0926753309 -4.7195394906 6.3232718697 region=mm H 5.0070618688 -5.3058931194 5.5083656859 region=mm H 5.7226193237 -3.9642093025 6.0597369209 region=mm O 4.9347540809 -7.5589961366 5.0766107941 region=mm H 5.0190229119 -7.1138138521 4.1998727672 region=mm H 4.0768338888 -8.0217682098 4.9892390834 region=mm O -1.3396252121 -4.8600195445 7.1634896373 region=mm H -1.4362228840 -3.8887325443 6.7864428723 region=mm H -0.3747219308 -4.9651044260 7.3167935631 region=mm O -0.2275547923 1.9526060878 -5.5664997661 region=mm H -0.1338166809 1.7406093835 -4.5841281712 region=mm H -0.2484315595 2.9461522919 -5.5385698031 region=mm O -4.6688925072 -6.6804128275 3.4621502759 region=mm H -5.5204451119 -6.1841221817 3.2712262969 region=mm H -4.5417671440 -6.4984155373 4.3985513305 region=mm O -1.7613304313 4.8508364057 -4.1901358774 region=mm H -0.9490659842 4.6732275830 -3.6375923368 region=mm H -2.1008600242 3.9220171023 -4.3346962477 region=mm O 1.2813806306 3.6942770054 -3.7171813351 region=mm H 2.1905963115 3.2609579576 -3.8200540205 region=mm H 0.9663947506 3.5064245036 -2.7884181141 region=mm O -1.6491575074 -4.0249870766 0.4625752262 region=mm H -2.3793757109 -4.6115566902 0.1880014661 region=mm H -0.8619995170 -4.5482091047 0.1181706395 region=mm O 3.4345393490 4.4656758215 -0.8654721765 region=mm H 3.3499869346 4.8246344996 0.0656770670 region=mm H 3.9194874435 5.1825851342 -1.3432740979 region=mm O 6.0129279769 -0.1231584466 -5.7786542866 region=mm H 6.9162672527 -0.4111451674 -5.5767296519 region=mm H 6.1760997496 0.8392847423 -5.9209507268 region=mm O -3.9277443861 3.8877115252 3.4225768700 region=mm H -3.8512216972 3.1029288422 4.0808853225 region=mm H -4.9243236650 3.8119809069 3.1676946984 region=mm O -2.0152094098 -3.5752136096 -2.8775430094 region=mm H -2.8511202240 -3.1700568061 -3.2842415136 region=mm H -2.4420915432 -4.0420947596 -2.0928745724 region=mm O -4.5676885067 -5.7821342384 -7.1960812502 region=mm H -4.0359502299 -5.0251773009 -6.7947097709 region=mm H -4.3397042788 -6.5601909701 -6.6311674198 region=mm O 2.3837305449 -7.0019574341 2.8932940349 region=mm H 1.5843595021 -6.5819302317 3.2063062063 region=mm H 2.5110710808 -6.4985063424 2.0690005115 region=mm O 4.3480000521 4.6575725755 -4.8007895809 region=mm H 3.6918814150 5.3893598759 -4.6122940939 region=mm H 5.1810645873 5.1658353534 -5.0129492914 region=mm O 0.9105420244 2.0399129451 -0.2709605351 region=mm H 0.4502824090 2.6330572019 0.3791216068 region=mm H 1.7544905017 2.6157672486 -0.3305092813 region=mm O 6.3707479202 1.9225951795 0.5271756371 region=mm H 6.1104155087 1.4272322940 -0.2591354170 region=mm H 6.3108235294 1.1855175540 1.1809221336 region=mm O 4.9793112969 5.7720777956 2.5371259504 region=mm H 5.4410948138 -8.6373822889 1.8401865423 region=mm H 4.0732573198 -8.8547465508 2.6355542548 region=mm O -1.5069942574 2.1175389224 -2.6413269953 region=mm H -2.2772337306 2.2001260822 -2.0840108235 region=mm H -0.8183840708 1.8070130896 -1.9384258703 region=mm O -3.1778696685 -2.2850690637 -7.0670100441 region=mm H -2.4447728292 -1.6521612371 -6.8766103444 region=mm H -3.6202120836 -1.7154370846 7.2497112917 region=mm O 2.6192086546 -1.2244922235 2.4518195104 region=qm H 1.8351686207 -1.4137948393 1.8609661449 region=qm H 2.5964459046 -1.8062454655 3.2887419185 region=qm O -7.3321456538 2.9732498807 -5.9518392574 region=mm H -6.6099217284 3.5423516492 -5.5423303270 region=mm H 6.8861073462 3.5653655129 -6.0522063293 region=mm O 3.5659080357 4.5187085880 5.0152611102 region=mm H 3.5206873771 4.2674900037 4.0721000327 region=mm H 2.7215092257 4.1357642662 5.4053293417 region=mm O 0.0671456473 -1.3384369103 -3.1666600421 region=mm H -0.8744551748 -1.6446509153 -3.3302330139 region=mm H 0.5025521594 -2.2006073634 -2.8295670561 region=mm O -4.7331769248 -1.9735610859 -1.1710931100 region=mm H -4.1695543501 -2.8050647365 -1.1464150457 region=mm H -5.3822945516 -2.0965866117 -1.9311157594 region=mm O 2.7575468577 -3.0372722381 -2.9953973324 region=mm H 3.3068657454 -3.8611606289 -3.0419899298 region=mm H 2.3763274374 -2.9947684277 -3.9059578245 region=mm O 0.5580418210 -4.9464761608 -4.2804053084 region=mm H 0.0324857624 -4.8267051729 -3.4837664784 region=mm H 1.0961942044 -5.7302405505 -4.1506399120 region=mm O -7.2757328853 4.1642190639 3.0300970932 region=mm H 6.9121825713 4.5448659465 3.3081894379 region=mm H -7.4863485302 3.2969249860 2.5402164796 region=mm O -4.1054878322 -1.9430177652 2.0669797525 region=mm H -3.6008873069 -2.6082159778 2.6226459577 region=mm H -4.6226134371 -2.6261274449 1.5495079114 region=mm O 5.3816120650 -5.1804053954 -2.7240970290 region=mm H 5.9660533434 -4.3648474016 -2.5314171173 region=mm H 5.7143244302 -5.4848887180 -3.6381896932 region=mm O 1.3959632716 -5.2927847809 5.0843716744 region=mm H 1.7762736990 -5.4289533682 5.9772747488 region=mm Cl -5.4680212411 3.4130263189 -2.7136231556 region=mm Cl -5.9988494351 5.4081934954 5.7964537819 region=mm End BondOrders 2 306 1.0 3 4 1.0 3 5 1.0 6 7 1.0 6 8 1.0 9 10 1.0 9 11 1.0 12 13 1.0 12 14 1.0 15 16 1.0 15 17 1.0 18 19 1.0 18 20 1.0 21 22 1.0 21 23 1.0 24 25 1.0 24 26 1.0 27 28 1.0 27 29 1.0 30 31 1.0 30 32 1.0 33 34 1.0 33 35 1.0 36 37 1.0 36 38 1.0 39 40 1.0 39 41 1.0 42 43 1.0 42 44 1.0 45 46 1.0 45 47 1.0 48 49 1.0 48 50 1.0 51 52 1.0 51 53 1.0 54 55 1.0 54 56 1.0 57 58 1.0 57 59 1.0 60 61 1.0 60 62 1.0 63 64 1.0 63 65 1.0 66 67 1.0 66 68 1.0 69 70 1.0 69 71 1.0 72 73 1.0 72 74 1.0 75 76 1.0 75 77 1.0 78 79 1.0 78 80 1.0 81 82 1.0 81 83 1.0 84 85 1.0 84 86 1.0 87 88 1.0 87 89 1.0 90 91 1.0 90 92 1.0 93 94 1.0 93 95 1.0 96 97 1.0 96 98 1.0 99 100 1.0 99 101 1.0 102 103 1.0 102 104 1.0 105 106 1.0 105 107 1.0 108 109 1.0 108 110 1.0 111 112 1.0 111 113 1.0 114 115 1.0 114 116 1.0 117 118 1.0 117 119 1.0 120 121 1.0 120 122 1.0 123 124 1.0 123 125 1.0 126 127 1.0 126 128 1.0 129 130 1.0 129 131 1.0 132 133 1.0 132 134 1.0 135 136 1.0 135 137 1.0 138 139 1.0 138 140 1.0 141 142 1.0 141 143 1.0 144 145 1.0 144 146 1.0 147 148 1.0 147 149 1.0 150 151 1.0 150 152 1.0 153 154 1.0 153 155 1.0 156 157 1.0 156 158 1.0 159 160 1.0 159 161 1.0 162 163 1.0 162 164 1.0 165 166 1.0 165 167 1.0 168 169 1.0 168 170 1.0 171 172 1.0 171 173 1.0 174 175 1.0 174 176 1.0 177 178 1.0 177 179 1.0 180 181 1.0 180 182 1.0 183 184 1.0 183 185 1.0 186 187 1.0 186 188 1.0 189 190 1.0 189 191 1.0 192 193 1.0 192 194 1.0 195 196 1.0 195 197 1.0 198 199 1.0 198 200 1.0 201 202 1.0 201 203 1.0 204 205 1.0 204 206 1.0 207 208 1.0 207 209 1.0 210 211 1.0 210 212 1.0 213 214 1.0 213 215 1.0 216 217 1.0 216 218 1.0 219 220 1.0 219 221 1.0 222 223 1.0 222 224 1.0 225 226 1.0 225 227 1.0 228 229 1.0 228 230 1.0 231 232 1.0 231 233 1.0 234 235 1.0 234 236 1.0 237 238 1.0 237 239 1.0 240 241 1.0 240 242 1.0 243 244 1.0 243 245 1.0 246 247 1.0 246 248 1.0 249 250 1.0 249 251 1.0 252 253 1.0 252 254 1.0 255 256 1.0 255 257 1.0 258 259 1.0 258 260 1.0 261 262 1.0 261 263 1.0 264 265 1.0 264 266 1.0 267 268 1.0 267 269 1.0 270 271 1.0 270 272 1.0 273 274 1.0 273 275 1.0 276 277 1.0 276 278 1.0 279 280 1.0 279 281 1.0 282 283 1.0 282 284 1.0 285 286 1.0 285 287 1.0 288 289 1.0 288 290 1.0 291 292 1.0 291 293 1.0 294 295 1.0 294 296 1.0 297 298 1.0 297 299 1.0 300 301 1.0 300 302 1.0 303 304 1.0 303 305 1.0 306 307 1.0 End Lattice 15.0000000000 0.0000000000 0.0000000000 0.0000000000 15.0000000000 0.0000000000 0.0000000000 0.0000000000 15.0000000000 End End Engine Hybrid Engine ForceField ForceField1 Type UFF EndEngine Engine ForceField ForceField2 Type UFF EndEngine QMMM Embedding Mechanical mmEngineID ForceField2 qmEngineID ForceField1 qmRegion qm End GuessAttributesOnce No EndEngine RNGSeed 1 eor ########################################################################## # The constrained values are stored in the file named COLVAR. # Below we use Python to read the COLVAR file, and print the averages for max({r_QM}) and min({r_MM}). ##########################################################################$AMSBIN/amspython << eor
infile = open('COLVAR')