QM/MM in Gromos¶
[1]:
# necessary imports are the Gromos_System and convenience functions emin and md
import pygromos
from pygromos.files.simulation_parameters.imd import Imd
from pygromos.files.qmmm.qmmm import QMMM
from pygromos.files.gromos_system.gromos_system import Gromos_System
from pygromos.simulations.modules.preset_simulation_modules import emin, md
from pygromos.data.simulation_parameters_templates import template_emin
from pygromos.simulations.hpc_queuing.submission_systems.local import LOCAL
# for file paths
import os
Support for QMMM functionality in GROMOS
input files¶
This notebook demonstrates support of PyGromosTools
for QM/MM functionality.
https://github.com/rinikerlab/PyGromosTools/blob/qmmm/examples/example_gromos_qmmm.ipynb (part of the qmmm
branch and soon to be merged to release3
)
Author: Felix Pultar
Features include:
QM/MM blocks in
imd
filesQM/MM specification files
Running QM/MM simulations
Load an imd
file containing a QMMM block¶
Simple demonstration of how to handle .imd
files.
[2]:
imd_path = os.path.abspath("example_files/QMMM_files/md.imd")
imd_file = Imd(imd_path)
imd_file.TITLE.content = "Demonstration of a Gromos imd file containing a QMMM block"
imd_file
[2]:
TITLE
Demonstration of a Gromos imd file containing a QMMM block
>>> Generated with PyGromosTools (riniker group) <<<
END
BOUNDCOND
# NTB NDFMIN
1 3
END
COMTRANSROT
# NSCM
1000
END
CONSTRAINT
# NTC
3
# NTCP NTCP0(1)
1 0.000100
# NTCS NTCS0(1)
1 0.000100
END
FORCE
# BONDS ANGLES IMPROPER DIHEDRAL ELECTROSTATIC VDW
0 1 1 1 1 1
# NEGR NRE
1 3613
END
INITIALISE
# NTIVEL NTISHK NTINHT NTINHB
1 3 0 0
# NTISHI NTIRTC NTICOM
1 0 0
# NTISTI
0
# IG TEMPI
210185 298.000000
END
MULTIBATH
# ALGORITHM
0
# NBATHS
1
# TEMP0(1 ... NBATHS) TAU(1 ... NBATHS)
298.0 0.1
# DOFSET
1
# LAST(1 ... DOFSET) COMBATH(1 ... DOFSET) IRBATH(1 ... DOFSET)
3613 1 1
END
NONBONDED
# NLRELE
1
# APPAK RCRF EPSRF NSLFEXCL
0.000000 1.400000 66.700000 1
# NSHAPE ASHAPE NA2CLC TOLA2 EPSLS
3 1.400000 2 1e-10 0.000000
# NKX NKY NKZ KCUT
10 10 10 100.000000
# NGX NGY NGZ NASORD NFDORD NALIAS NSPORD
32 32 32 3 2 3 4
# NQEVAL FACCUR NRDGRD NWRGRD
1000 1.600000 0 0
# NLRLJ SLVDNS
0 33.300000
END
PAIRLIST
# ALGORITHM NSNB RCUTP RCUTL SIZE TYPE
0 5 0.800000 1.400000 0.4 0
END
PRESSURESCALE
# COUPLE SCALE COMP TAUP VIRIAL
2 1 0.000458 0.500000 2
# SEMIANISOTROPIC COUPLINGS(X, Y, Z)
1 1 1
# PRES0(1...3,1...3)
0.06102 0.0 0.0
0.0 0.06102 0.0
0.0 0.0 0.06102
END
PRINTOUT
# NTPR NTPP
10 0
END
QMMM
# NTQMMM NTQMSW RCUTQ NTWQMMM QMLJ MMSCAL
1 5 1.400000 0 0 -1.000000
END
STEP
# NSTLIM T DT
100000 0.000000 0.002000
END
SYSTEM
# NPM NSM
1 0
END
WRITETRAJ
# NTWX NTWSE NTWV NTWF NTWE NTWG NTWB
200 0 0 0 100 0 0
END
Print out different sections of the QMMM block¶
Print out selected parameters from the QMMM
block or also the TITLE
block.
[3]:
print(imd_file.QMMM.NTQMMM) # QM/MM toggled on/off
print(imd_file.QMMM.NTQMSW) # which QM/MM engine
print(imd_file.TITLE.content)
1
5
Demonstration of a Gromos imd file containing a QMMM block
Change a block value and print again¶
Just change values of the QMMM
block like with other PyGromosTools
blocks.
[4]:
imd_file.QMMM.NTQMSW = 4 # switch to ORCA as QM software
imd_file.QMMM
[4]:
QMMM
# NTQMMM NTQMSW RCUTQ NTWQMMM QMLJ MMSCAL
1 4 1.400000 0 0 -1.000000
END
Directly manipulate a QMMM specification file¶
The QMMM object allows to directly interact with QM/MM specification files. Future releases of PyGromosTools
will also support generation of QMMM
files from coordinate files (.cnf
, .xyz
, .pdb
).
[5]:
# instantiate the file object
qmmm_file_path = os.path.abspath("example_files/QMMM_files/menthol-methanol-dmf.qmmm")
qmmm_file = QMMM(qmmm_file_path)
print(qmmm_file)
# There will be warnings if more than one QM engine is selected
TITLE
menthol-methanol-dmf, qmmm specification file
>>> Generated with PyGromosTools (riniker group) <<<
END
QMUNIT
# QLGL QEGE QCGC QIGI
0.052918 2625.5 1.0 0.1
END
QMZONE
# QMEN QMEI QMEZ QMEB
H 1 1 0
C 2 6 0
H 3 1 0
H 4 1 0
C 5 6 0
H 6 1 0
C 7 6 0
H 8 1 0
H 9 1 0
H 10 1 0
C 11 6 0
H 12 1 0
C 13 6 0
H 14 1 0
H 15 1 0
C 16 6 0
H 17 1 0
H 18 1 0
C 19 6 0
H 20 1 0
C 21 6 0
H 22 1 0
H 23 1 0
H 24 1 0
C 25 6 0
H 26 1 0
H 27 1 0
C 28 6 0
H 29 1 0
O 30 8 0
H 31 1 0
END
XTBELEMENTS
1
6
8
END
Print out and change some blocks in the QMMM specification file¶
Title block¶
The QMMM
specification file can be handled like any other GROMOS
file.
[6]:
print(qmmm_file.TITLE.content)
qmmm_file.TITLE.content = "Custom file header"
print(qmmm_file.TITLE.content)
['menthol-methanol-dmf, qmmm specification file\n']
Custom file header
QMZONE block¶
Print out the QMZONE
section that defines which atoms will be treated quantum-mechanically.
[7]:
# as in other Gromos files, the first bunch of characters are ignored and used to comment, e.g. name of the atom
# second value: index of te position (starting from 1)
# third value: element number according to the PSE
# fourth value: indicate whether bond can be broken or not, default = 0
print(qmmm_file.QMZONE)
QMZONE
# QMEN QMEI QMEZ QMEB
H 1 1 0
C 2 6 0
H 3 1 0
H 4 1 0
C 5 6 0
H 6 1 0
C 7 6 0
H 8 1 0
H 9 1 0
H 10 1 0
C 11 6 0
H 12 1 0
C 13 6 0
H 14 1 0
H 15 1 0
C 16 6 0
H 17 1 0
H 18 1 0
C 19 6 0
H 20 1 0
C 21 6 0
H 22 1 0
H 23 1 0
H 24 1 0
C 25 6 0
H 26 1 0
H 27 1 0
C 28 6 0
H 29 1 0
O 30 8 0
H 31 1 0
END
QMUNIT block¶
Print out the QMUNIT
block that defines some unit conversions between the MD engine and the QM software.
[8]:
# usually, these conversion factors are hard-coded in Gromos; left for historical reasons
# first value: QM length to Gromos length (e.g. Bohr to nm)
# second value: QM energy to Gromos energy (e.g. Hartree to kJ / mol)
# third value: Gromos charge to QM charge (the same in this case)
# fourth value: QM input units to Gromos input units (e.g. Angstrom to nm)
print(qmmm_file.QMUNIT)
QMUNIT
# QLGL QEGE QCGC QIGI
0.052918 2625.5 1.0 0.1
END
XTBELEMENTS block¶
Print and update the XTBELEMENTS
block
[9]:
print(qmmm_file.XTBELEMENTS)
print(qmmm_file.XTBELEMENTS.content)
XTBELEMENTS
1
6
8
END
[['1'], ['6'], ['8']]
[10]:
# replace element numbers manually with the first ten elements of the PSE
xtbelements_new = [[str(i) for j in range(1)] for i in range(1,11)]
print(xtbelements_new)
qmmm_file.XTBELEMENTS.content = xtbelements_new
[['1'], ['2'], ['3'], ['4'], ['5'], ['6'], ['7'], ['8'], ['9'], ['10']]
[11]:
# show the updated section in the file
qmmm_file.XTBELEMENTS
[11]:
XTBELEMENTS
1
2
3
4
5
6
7
8
9
10
END
A helper function that returns all QM engines specified in the QM/MM specification file¶
There is also a sanity check in the constructor of QMMM
to see if you did not accidentally add more than one QM engine.
[12]:
print(qmmm_file.get_qm_engines())
['XTB']
Store your QMMM specification file with all your other simulation files in a Gromos_System
object¶
[13]:
# that's what we want to simulate
system_name = "menthol-methanol-dmf"
# that's where we want to simulate it at
work_folder = f"example_files/{system_name}"
# create a Gromos_System object from scratch
system = Gromos_System(work_folder, system_name)
# specify prepared topology, configuration, QMMM specification file, and input file
system.top = f"example_files/QMMM_files/{system_name}-all-atom_54a7.top"
system.cnf = f"example_files/QMMM_files/{system_name}-all-atom-init_54a7.cnf"
system.qmmm = qmmm_file
system.imd = imd_file
# clean up
system.rebase_files()
# all your simulation files now live in the work folder
system
[13]:
GROMOS SYSTEM: menthol-methanol-dmf
################################################################################
WORKDIR: example_files/menthol-methanol-dmf
LAST CHECKPOINT: None
GromosXX_bin: None
GromosPP_bin: None
FILES:
imd: /home/mlehner/PyGromosTools/docs/sphinx_project/Examples/example_files/menthol-methanol-dmf/menthol-methanol-dmf.imd
top: /home/mlehner/PyGromosTools/docs/sphinx_project/Examples/example_files/menthol-methanol-dmf/menthol-methanol-dmf.top
cnf: /home/mlehner/PyGromosTools/docs/sphinx_project/Examples/example_files/menthol-methanol-dmf/menthol-methanol-dmf.cnf
qmmm: /home/mlehner/PyGromosTools/docs/sphinx_project/Examples/example_files/menthol-methanol-dmf/menthol-methanol-dmf.qmmm
FUTURE PROMISE: False
SYSTEM:
Solute: ['0RHW', 'TUU2', 'TUU3', 'TUU4', 'TUU5', 'TUU6', 'TUU7', 'TUU8', 'TUU9', 'TUU10', 'TUU11', 'TUU12', 'TUU13', 'TUU14', 'TUU15', 'TUU16', 'TUU17', 'TUU18', 'TUU19', 'TUU20', 'TUU21', 'TUU22', 'TUU23', 'TUU24', 'TUU25', 'TUU26', 'TUU27', 'TUU28', 'TUU29', 'TUU30', 'TUU31', 'TUU32', 'TUU33', 'TUU34', 'TUU35', 'TUU36', 'TUU37', 'TUU38', 'TUU39', 'TUU40', 'TUU41', 'TUU42', 'TUU43', 'TUU44', 'TUU45', 'TUU46', 'TUU47', 'TUU48', 'TUU49', 'TUU50', 'TUU51', 'TUU52', 'TUU53', 'TUU54', 'TUU55', 'TUU56', 'TUU57', 'TUU58', 'TUU59', 'TUU60', 'TUU61', 'TUU62', 'TUU63', 'TUU64', 'TUU65', 'TUU66', 'TUU67', 'TUU68', 'TUU69', 'TUU70', 'TUU71', 'TUU72', 'TUU73', 'TUU74', 'TUU75', 'TUU76', 'TUU77', 'TUU78', 'TUU79', 'TUU80', 'TUU81', 'TUU82', 'TUU83', 'TUU84', 'TUU85', 'TUU86', 'TUU87', 'TUU88', 'TUU89', 'TUU90', 'TUU91', 'TUU92', 'TUU93', 'TUU94', 'TUU95', 'TUU96', 'TUU97', 'TUU98', 'TUU99', 'TUU100', 'TUU101', 'TUU102', 'TUU103', 'TUU104', 'TUU105', 'TUU106', 'TUU107', 'TUU108', 'TUU109', 'TUU110', 'TUU111', 'TUU112', 'TUU113', 'TUU114', 'TUU115', 'TUU116', 'TUU117', 'TUU118', 'TUU119', 'TUU120', 'TUU121', 'TUU122', 'TUU123', 'TUU124', 'TUU125', 'TUU126', 'TUU127', 'TUU128', 'TUU129', 'TUU130', 'TUU131', 'TUU132', 'TUU133', 'TUU134', 'TUU135', 'TUU136', 'TUU137', 'TUU138', 'TUU139', 'TUU140', 'TUU141', 'TUU142', 'TUU143', 'TUU144', 'TUU145', 'TUU146', 'TUU147', 'TUU148', 'TUU149', 'TUU150', 'TUU151', 'TUU152', 'TUU153', 'TUU154', 'TUU155', 'TUU156', 'TUU157', 'TUU158', 'TUU159', 'TUU160', 'TUU161', 'TUU162', 'TUU163', 'TUU164', 'TUU165', 'TUU166', 'TUU167', 'TUU168', 'TUU169', 'TUU170', 'TUU171', 'TUU172', 'TUU173', 'TUU174', 'TUU175', 'TUU176', 'TUU177', 'TUU178', 'TUU179', 'TUU180', 'TUU181', 'TUU182', 'TUU183', 'TUU184', 'TUU185', 'TUU186', 'TUU187', 'TUU188', 'TUU189', 'TUU190', 'TUU191', 'TUU192', 'TUU193', 'TUU194', 'TUU195', 'TUU196', 'TUU197', 'TUU198', 'TUU199', 'TUU200', 'TUU201', 'ERI202', 'ERI203', 'ERI204', 'ERI205', 'ERI206', 'ERI207', 'ERI208', 'ERI209', 'ERI210', 'ERI211', 'ERI212', 'ERI213', 'ERI214', 'ERI215', 'ERI216', 'ERI217', 'ERI218', 'ERI219', 'ERI220', 'ERI221', 'ERI222', 'ERI223', 'ERI224', 'ERI225', 'ERI226', 'ERI227', 'ERI228', 'ERI229', 'ERI230', 'ERI231', 'ERI232', 'ERI233', 'ERI234', 'ERI235', 'ERI236', 'ERI237', 'ERI238', 'ERI239', 'ERI240', 'ERI241', 'ERI242', 'ERI243', 'ERI244', 'ERI245', 'ERI246', 'ERI247', 'ERI248', 'ERI249', 'ERI250', 'ERI251', 'ERI252', 'ERI253', 'ERI254', 'ERI255', 'ERI256', 'ERI257', 'ERI258', 'ERI259', 'ERI260', 'ERI261'] resID: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261] natoms: 1951
SOLVENT: [] nmolecules: 0 natoms: 0
[14]:
# the imd file has been adapted (force groups, multibath, etc.)
system.imd
[14]:
TITLE
Demonstration of a Gromos imd file containing a QMMM block
>>> Generated with PyGromosTools (riniker group) <<<
END
BOUNDCOND
# NTB NDFMIN
1 3
END
COMTRANSROT
# NSCM
1000
END
CONSTRAINT
# NTC
3
# NTCP NTCP0(1)
1 0.000100
# NTCS NTCS0(1)
1 0.000100
END
FORCE
# BONDS ANGLES IMPROPER DIHEDRAL ELECTROSTATIC VDW
0 1 1 1 1 1
# NEGR NRE
1 1951
END
INITIALISE
# NTIVEL NTISHK NTINHT NTINHB
1 3 0 0
# NTISHI NTIRTC NTICOM
1 0 0
# NTISTI
0
# IG TEMPI
210185 298.000000
END
MULTIBATH
# ALGORITHM
0
# NBATHS
1
# TEMP0(1 ... NBATHS) TAU(1 ... NBATHS)
298.0 0.1
# DOFSET
1
# LAST(1 ... DOFSET) COMBATH(1 ... DOFSET) IRBATH(1 ... DOFSET)
1951 1 1
END
NONBONDED
# NLRELE
1
# APPAK RCRF EPSRF NSLFEXCL
0.000000 1.400000 66.700000 1
# NSHAPE ASHAPE NA2CLC TOLA2 EPSLS
3 1.400000 2 1e-10 0.000000
# NKX NKY NKZ KCUT
10 10 10 100.000000
# NGX NGY NGZ NASORD NFDORD NALIAS NSPORD
32 32 32 3 2 3 4
# NQEVAL FACCUR NRDGRD NWRGRD
1000 1.600000 0 0
# NLRLJ SLVDNS
0 33.300000
END
PAIRLIST
# ALGORITHM NSNB RCUTP RCUTL SIZE TYPE
0 5 0.800000 1.400000 0.4 0
END
PRESSURESCALE
# COUPLE SCALE COMP TAUP VIRIAL
2 1 0.000458 0.500000 2
# SEMIANISOTROPIC COUPLINGS(X, Y, Z)
1 1 1
# PRES0(1...3,1...3)
0.06102 0.0 0.0
0.0 0.06102 0.0
0.0 0.0 0.06102
END
PRINTOUT
# NTPR NTPP
10 0
END
QMMM
# NTQMMM NTQMSW RCUTQ NTWQMMM QMLJ MMSCAL
1 4 1.400000 0 0 -1.000000
END
STEP
# NSTLIM T DT
100000 0.000000 0.002000
END
SYSTEM
# NPM NSM
1 0
END
WRITETRAJ
# NTWX NTWSE NTWV NTWF NTWE NTWG NTWB
200 0 0 0 100 0 0
END
Run QM/MM Simulations¶
QM/MM calculations are possible with a special in-house build of GROMOS
.
[15]:
# binaries (not yet QM/MM)
gromosPP = None
gromosXX = None
# folders and title
system_name = "menthol-methanol-dmf"
work_folder = f"example_files/{system_name}"
# files
in_cnf_path = f"example_files/QMMM_files/menthol-methanol-dmf-all-atom-init_54a7.cnf"
in_top_path = f"example_files/QMMM_files/menthol-methanol-dmf-all-atom_54a7.top"
# system
system = Gromos_System(
work_folder,
system_name,
in_top_path=in_top_path,
in_cnf_path=in_cnf_path,
in_gromosPP_bin_dir=gromosPP,
in_gromosXX_bin_dir=gromosXX
)
system
[15]:
GROMOS SYSTEM: menthol-methanol-dmf
################################################################################
WORKDIR: example_files/menthol-methanol-dmf
LAST CHECKPOINT: None
GromosXX_bin: None
GromosPP_bin: None
FILES:
imd: None
top: example_files/QMMM_files/menthol-methanol-dmf-all-atom_54a7.top
cnf: example_files/QMMM_files/menthol-methanol-dmf-all-atom-init_54a7.cnf
FUTURE PROMISE: False
SYSTEM:
Solute: ['0RHW', 'TUU2', 'TUU3', 'TUU4', 'TUU5', 'TUU6', 'TUU7', 'TUU8', 'TUU9', 'TUU10', 'TUU11', 'TUU12', 'TUU13', 'TUU14', 'TUU15', 'TUU16', 'TUU17', 'TUU18', 'TUU19', 'TUU20', 'TUU21', 'TUU22', 'TUU23', 'TUU24', 'TUU25', 'TUU26', 'TUU27', 'TUU28', 'TUU29', 'TUU30', 'TUU31', 'TUU32', 'TUU33', 'TUU34', 'TUU35', 'TUU36', 'TUU37', 'TUU38', 'TUU39', 'TUU40', 'TUU41', 'TUU42', 'TUU43', 'TUU44', 'TUU45', 'TUU46', 'TUU47', 'TUU48', 'TUU49', 'TUU50', 'TUU51', 'TUU52', 'TUU53', 'TUU54', 'TUU55', 'TUU56', 'TUU57', 'TUU58', 'TUU59', 'TUU60', 'TUU61', 'TUU62', 'TUU63', 'TUU64', 'TUU65', 'TUU66', 'TUU67', 'TUU68', 'TUU69', 'TUU70', 'TUU71', 'TUU72', 'TUU73', 'TUU74', 'TUU75', 'TUU76', 'TUU77', 'TUU78', 'TUU79', 'TUU80', 'TUU81', 'TUU82', 'TUU83', 'TUU84', 'TUU85', 'TUU86', 'TUU87', 'TUU88', 'TUU89', 'TUU90', 'TUU91', 'TUU92', 'TUU93', 'TUU94', 'TUU95', 'TUU96', 'TUU97', 'TUU98', 'TUU99', 'TUU100', 'TUU101', 'TUU102', 'TUU103', 'TUU104', 'TUU105', 'TUU106', 'TUU107', 'TUU108', 'TUU109', 'TUU110', 'TUU111', 'TUU112', 'TUU113', 'TUU114', 'TUU115', 'TUU116', 'TUU117', 'TUU118', 'TUU119', 'TUU120', 'TUU121', 'TUU122', 'TUU123', 'TUU124', 'TUU125', 'TUU126', 'TUU127', 'TUU128', 'TUU129', 'TUU130', 'TUU131', 'TUU132', 'TUU133', 'TUU134', 'TUU135', 'TUU136', 'TUU137', 'TUU138', 'TUU139', 'TUU140', 'TUU141', 'TUU142', 'TUU143', 'TUU144', 'TUU145', 'TUU146', 'TUU147', 'TUU148', 'TUU149', 'TUU150', 'TUU151', 'TUU152', 'TUU153', 'TUU154', 'TUU155', 'TUU156', 'TUU157', 'TUU158', 'TUU159', 'TUU160', 'TUU161', 'TUU162', 'TUU163', 'TUU164', 'TUU165', 'TUU166', 'TUU167', 'TUU168', 'TUU169', 'TUU170', 'TUU171', 'TUU172', 'TUU173', 'TUU174', 'TUU175', 'TUU176', 'TUU177', 'TUU178', 'TUU179', 'TUU180', 'TUU181', 'TUU182', 'TUU183', 'TUU184', 'TUU185', 'TUU186', 'TUU187', 'TUU188', 'TUU189', 'TUU190', 'TUU191', 'TUU192', 'TUU193', 'TUU194', 'TUU195', 'TUU196', 'TUU197', 'TUU198', 'TUU199', 'TUU200', 'TUU201', 'ERI202', 'ERI203', 'ERI204', 'ERI205', 'ERI206', 'ERI207', 'ERI208', 'ERI209', 'ERI210', 'ERI211', 'ERI212', 'ERI213', 'ERI214', 'ERI215', 'ERI216', 'ERI217', 'ERI218', 'ERI219', 'ERI220', 'ERI221', 'ERI222', 'ERI223', 'ERI224', 'ERI225', 'ERI226', 'ERI227', 'ERI228', 'ERI229', 'ERI230', 'ERI231', 'ERI232', 'ERI233', 'ERI234', 'ERI235', 'ERI236', 'ERI237', 'ERI238', 'ERI239', 'ERI240', 'ERI241', 'ERI242', 'ERI243', 'ERI244', 'ERI245', 'ERI246', 'ERI247', 'ERI248', 'ERI249', 'ERI250', 'ERI251', 'ERI252', 'ERI253', 'ERI254', 'ERI255', 'ERI256', 'ERI257', 'ERI258', 'ERI259', 'ERI260', 'ERI261'] resID: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261] natoms: 1951
SOLVENT: [] nmolecules: 0 natoms: 0
[16]:
system.cnf.view
[17]:
# create a local submission system and specify the number of cores
submit = LOCAL(nomp=8)
# energy minimize the system
minimized_system = emin(system, submission_system=submit)
################################################################################
emin
################################################################################
/home/mlehner/PyGromosTools/pygromos/files/gromos_system/gromos_system.py:869: UserWarning: Did not change file path as its only promised None
warnings.warn("Did not change file path as its only promised " + str(file_obj.path))
/home/mlehner/PyGromosTools/pygromos/simulations/modules/general_simulation_modules.py:114: UserWarning: Template_imd_path was used: /home/mlehner/PyGromosTools/pygromos/data/simulation_parameters_templates/emin.imd
warnings.warn("Template_imd_path was used: " + _template_imd_path)
Traceback (most recent call last):
File "/home/mlehner/PyGromosTools/pygromos/simulations/modules/general_simulation_modules.py", line 130, in simulation
gromos_system.rebase_files()
File "/home/mlehner/PyGromosTools/pygromos/files/gromos_system/gromos_system.py", line 880, in rebase_files
self.write_files()
File "/home/mlehner/PyGromosTools/pygromos/files/gromos_system/gromos_system.py", line 1120, in write_files
file_obj.write(file_obj.path)
File "/home/mlehner/PyGromosTools/pygromos/files/_basics/_general_gromos_file.py", line 306, in write
self._write_to_file(out_path=out_path, content_str=str(self))
File "/home/mlehner/PyGromosTools/pygromos/files/_basics/_general_gromos_file.py", line 324, in _write_to_file
raise IOError("Could not find directory to write to: " + str(os.path.dirname(out_path)))
OSError: Could not find directory to write to: example_files/menthol-methanol-dmf/emin/input
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mlehner/PyGromosTools/pygromos/simulations/modules/general_simulation_modules.py", line 136, in simulation
raise Exception("Could not prepare the gromos System\n\t" + "\n\t".join(map(str, err.args)))
Exception: Could not prepare the gromos System
Could not find directory to write to: example_files/menthol-methanol-dmf/emin/input
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
~/PyGromosTools/pygromos/simulations/modules/general_simulation_modules.py in simulation(in_gromos_simulation_system, override_project_dir, step_name, in_imd_path, submission_system, simulation_runs, equilibration_runs, previous_simulation_run, force_simulation, initialize_first_run, reinitialize_every_run, analysis_script, analysis_control_dict, _no_double_submit_check, _work_dir, verbose, verbose_lvl, _template_imd_path)
129 # Write out, all non promised files
--> 130 gromos_system.rebase_files()
131
~/PyGromosTools/pygromos/files/gromos_system/gromos_system.py in rebase_files(self)
879 self._update_all_file_paths()
--> 880 self.write_files()
881
~/PyGromosTools/pygromos/files/gromos_system/gromos_system.py in write_files(self, cnf, imd, top, ptp, disres, posres, refpos, qmmm, mol, all, verbose)
1119 print("Write out: " + str(file_name) + "\t" + file_obj.path)
-> 1120 file_obj.write(file_obj.path)
1121 else:
~/PyGromosTools/pygromos/files/_basics/_general_gromos_file.py in write(self, out_path)
305 """
--> 306 self._write_to_file(out_path=out_path, content_str=str(self))
307 self.path = os.path.abspath(out_path)
~/PyGromosTools/pygromos/files/_basics/_general_gromos_file.py in _write_to_file(self, out_path, content_str)
323 else:
--> 324 raise IOError("Could not find directory to write to: " + str(os.path.dirname(out_path)))
325 else:
OSError: Could not find directory to write to: example_files/menthol-methanol-dmf/emin/input
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
~/PyGromosTools/pygromos/simulations/modules/general_simulation_modules.py in simulation(in_gromos_simulation_system, override_project_dir, step_name, in_imd_path, submission_system, simulation_runs, equilibration_runs, previous_simulation_run, force_simulation, initialize_first_run, reinitialize_every_run, analysis_script, analysis_control_dict, _no_double_submit_check, _work_dir, verbose, verbose_lvl, _template_imd_path)
135 except Exception as err:
--> 136 raise Exception("Could not prepare the gromos System\n\t" + "\n\t".join(map(str, err.args)))
137 # do
Exception: Could not prepare the gromos System
Could not find directory to write to: example_files/menthol-methanol-dmf/emin/input
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
/tmp/ipykernel_5617/178837208.py in <module>
3
4 # energy minimize the system
----> 5 minimized_system = emin(system, submission_system=submit)
~/PyGromosTools/pygromos/simulations/modules/preset_simulation_modules.py in emin(in_gromos_system, step_name, override_project_dir, in_imd_path, submission_system, simulation_runs, equilibration_runs, previous_simulation_run, _template_imd_path, _no_double_submit_check, initialize_first_run, analysis_script, verbose)
42 template_emin_control_dict["concat"]["cat_trg"] = False
43
---> 44 return simulation(
45 in_gromos_simulation_system=in_gromos_system,
46 override_project_dir=override_project_dir,
~/PyGromosTools/pygromos/simulations/modules/general_simulation_modules.py in simulation(in_gromos_simulation_system, override_project_dir, step_name, in_imd_path, submission_system, simulation_runs, equilibration_runs, previous_simulation_run, force_simulation, initialize_first_run, reinitialize_every_run, analysis_script, analysis_control_dict, _no_double_submit_check, _work_dir, verbose, verbose_lvl, _template_imd_path)
196 except Exception as err:
197 traceback.print_exception(*sys.exc_info())
--> 198 raise Exception("Could not prepare the command block\n\t" + "\n\t".join(map(str, err.args)))
199
200 # schedule
Exception: Could not prepare the command block
Could not prepare the gromos System
Could not find directory to write to: example_files/menthol-methanol-dmf/emin/input
[18]:
# new imd file for equilibration
in_imd_path = f"example_files/QMMM_files/menthol-methanol-dmf-eq.imd"
minimized_system.imd = in_imd_path
minimized_system.imd.STEP.NSTLIM = 1000
minimized_system.imd.STEP.DT = 0.002 # 2.0 fs
minimized_system
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5617/2801463477.py in <module>
1 # new imd file for equilibration
2 in_imd_path = f"example_files/QMMM_files/menthol-methanol-dmf-eq.imd"
----> 3 minimized_system.imd = in_imd_path
4 minimized_system.imd.STEP.NSTLIM = 1000
5 minimized_system.imd.STEP.DT = 0.002 # 2.0 fs
NameError: name 'minimized_system' is not defined
[19]:
# equilibrate the system
equilibrated_system = md(minimized_system, step_name="eq", submission_system=submit)
equilibrated_system
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5617/2240818067.py in <module>
1 # equilibrate the system
----> 2 equilibrated_system = md(minimized_system, step_name="eq", submission_system=submit)
3 equilibrated_system
NameError: name 'minimized_system' is not defined
[20]:
# load your favorite GCC version (required for your special GROMOS QM/MM build)
os.environ["PATH"] += "/opt/gcc-8.2.0/bin" #Change here!
os.environ["LD_LIBRARY_PATH"] = "/opt/gcc-8.2.0/lib:/home/fpultar/opt/gcc-8.2.0/lib64" #Change here!
os.environ
[20]:
environ{'LESSOPEN': '| /usr/bin/lesspipe %s',
'CONDA_PROMPT_MODIFIER': '(pygro2) ',
'USER': 'mlehner',
'CXXFLAGS': '-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'OBJCOPY': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-objcopy',
'GIT_ASKPASS': '/home/mlehner/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5/extensions/git/dist/askpass.sh',
'GCC_RANLIB': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-ranlib',
'SIZE': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-size',
'LD_LIBRARY_PATH': '/opt/gcc-8.2.0/lib:/home/fpultar/opt/gcc-8.2.0/lib64',
'SHLVL': '2',
'DEBUG_CXXFLAGS': '-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'HOME': '/home/mlehner',
'CONDA_SHLVL': '2',
'OLDPWD': '/home/mlehner/PyGromosTools',
'CC_FOR_BUILD': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-cc',
'MOTD_SHOWN': 'update-motd',
'VSCODE_IPC_HOOK_CLI': '/mnt/wslg/runtime-dir/vscode-ipc-ad5795fd-9611-48d5-9f9c-4aba7a89ba48.sock',
'TERM_PROGRAM_VERSION': '1.66.0',
'CONDA_TOOLCHAIN_BUILD': 'x86_64-conda-linux-gnu',
'F90': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gfortran',
'VSCODE_GIT_ASKPASS_MAIN': '/home/mlehner/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5/extensions/git/dist/askpass-main.js',
'LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/mlehner/anaconda3/envs/pygro2/lib -Wl,-rpath-link,/home/mlehner/anaconda3/envs/pygro2/lib -L/home/mlehner/anaconda3/envs/pygro2/lib',
'FC': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gfortran',
'STRINGS': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-strings',
'VSCODE_GIT_ASKPASS_NODE': '/home/mlehner/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5/node',
'MAKEFLAGS': '',
'CPP': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-cpp',
'COLORTERM': 'truecolor',
'_CE_M': '',
'WSL_DISTRO_NAME': 'Ubuntu-20.04',
'F77': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gfortran',
'F95': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-f95',
'MAKE_TERMERR': '/dev/pts/5',
'ELFEDIT': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-elfedit',
'STRIP': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-strip',
'WAYLAND_DISPLAY': 'wayland-0',
'GCC': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc',
'LOGNAME': 'mlehner',
'_': '/usr/bin/make',
'WSL_INTEROP': '/run/WSL/11_interop',
'PULSE_SERVER': '/mnt/wslg/PulseServer',
'NAME': 'MarcSurface',
'AR': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ar',
'READELF': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-readelf',
'AS': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-as',
'GXX': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-g++',
'TERM': 'xterm-color',
'FC_FOR_BUILD': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gfortran',
'CXXFILT': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-c++filt',
'AMBERHOME': '/home/mlehner/anaconda3/envs/pygro2',
'_CE_CONDA': '',
'BUILD': 'x86_64-conda-linux-gnu',
'PATH': '/usr/local/cuda-11.4/bin:/home/mlehner/.vscode-server/bin/e18005f0f1b33c29e81d732535d8c0e47cafb0b5/bin/remote-cli:/usr/local/cuda-11.4/bin:/home/mlehner/anaconda3/envs/pygro2/bin:/home/mlehner/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/bin:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.2/libnvvp:/mnt/c/Python39/Scripts:/mnt/c/Python39:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/nodejs:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files (x86)/Yarn/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2020.3.1:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Program Files/Wolfram Research/WolframScript:/mnt/c/Users/thier/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/thier/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/thier/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/thier/AppData/Roaming/npm:/mnt/c/Users/thier/AppData/Local/Yarn/bin:/mnt/c/ProgramData/Anaconda3:/mnt/c/ProgramData/Anaconda3/Scripts:/snap/bin:/home/mlehner/gromacs-2020.4/build/bin:/usr/local/gromacs/bin/GMXRC:/home/mlehner/gromosXX/gromosXX/BUILD/program:/home/mlehner/gromosPlsPls/gromos++/BUILD/programs:/home/mlehner/gromacs-2020.4/build/bin:/usr/local/gromacs/bin/GMXRC:/home/mlehner/gromosXX/gromosXX/BUILD/program:/home/mlehner/gromosPlsPls/gromos++/BUILD/programs/opt/gcc-8.2.0/bin',
'CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'XDG_RUNTIME_DIR': '/mnt/wslg/runtime-dir',
'PERL5LIB': '/home/mlehner/anaconda3/envs/pygro2/lib/perl/mm_pbsa',
'build_alias': 'x86_64-conda-linux-gnu',
'MAKELEVEL': '1',
'DISPLAY': ':0',
'GCC_AR': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-ar',
'CONDA_PREFIX_1': '/home/mlehner/anaconda3',
'DEBUG_CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'LANG': 'C.UTF-8',
'_CONDA_PYTHON_SYSCONFIGDATA_NAME': '_sysconfigdata_x86_64_conda_cos6_linux_gnu',
'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
'VSCODE_GIT_IPC_HANDLE': '/mnt/wslg/runtime-dir/vscode-git-c2fb3e520e.sock',
'TERM_PROGRAM': 'vscode',
'CPPFLAGS': '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'GSETTINGS_SCHEMA_DIR': '/home/mlehner/anaconda3/envs/pygro2/share/glib-2.0/schemas',
'CONDA_PYTHON_EXE': '/home/mlehner/anaconda3/bin/python',
'SHELL': '/bin/bash',
'DEBUG_FFLAGS': '-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe',
'CMAKE_ARGS': '-DCMAKE_AR=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ar -DCMAKE_CXX_COMPILER_AR=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_C_COMPILER_AR=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_RANLIB=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_C_COMPILER_RANLIB=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_LINKER=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ld -DCMAKE_STRIP=/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-strip',
'HOST': 'x86_64-conda-linux-gnu',
'CXX': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-c++',
'MAKE_TERMOUT': '/dev/pts/5',
'DEBUG_CPPFLAGS': '-D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'LESSCLOSE': '/usr/bin/lesspipe %s %s',
'CONDA_DEFAULT_ENV': 'pygro2',
'DEBUG_FORTRANFLAGS': '-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe',
'GCC_NM': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gcc-nm',
'ADDR2LINE': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-addr2line',
'GFORTRAN': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gfortran',
'CONDA_BUILD_SYSROOT': '/home/mlehner/anaconda3/envs/pygro2/x86_64-conda-linux-gnu/sysroot',
'VSCODE_GIT_ASKPASS_EXTRA_ARGS': '',
'LD_GOLD': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ld.gold',
'PWD': '/home/mlehner/PyGromosTools/docs/sphinx_project',
'CONDA_EXE': '/home/mlehner/anaconda3/bin/conda',
'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop',
'LD': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ld',
'FFLAGS': '-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'GPROF': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-gprof',
'RANLIB': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-ranlib',
'CONDA_TOOLCHAIN_HOST': 'x86_64-conda-linux-gnu',
'CC': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-cc',
'MFLAGS': '',
'GSETTINGS_SCHEMA_DIR_CONDA_BACKUP': '',
'FORTRANFLAGS': '-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mlehner/anaconda3/envs/pygro2/include',
'host_alias': 'x86_64-conda-linux-gnu',
'CONDA_PREFIX': '/home/mlehner/anaconda3/envs/pygro2',
'CXX_FOR_BUILD': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-c++',
'HOSTTYPE': 'x86_64',
'CUDA_PATH': '/home/mlehner/anaconda3/envs/pygro2',
'WSLENV': 'VSCODE_WSL_EXT_LOCATION/up',
'NM': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-nm',
'CMAKE_PREFIX_PATH': '/home/mlehner/anaconda3/envs/pygro2:/home/mlehner/anaconda3/envs/pygro2/x86_64-conda-linux-gnu/sysroot/usr',
'OBJDUMP': '/home/mlehner/anaconda3/envs/pygro2/bin/x86_64-conda-linux-gnu-objdump',
'DOCUTILSCONFIG': '/home/mlehner/PyGromosTools/docs/sphinx_project/docutils.conf',
'RDBASE': '/home/mlehner/anaconda3/envs/pygro2/share/RDKit',
'PYDEVD_USE_FRAME_EVAL': 'NO',
'JPY_PARENT_PID': '3451',
'CLICOLOR': '1',
'PAGER': 'cat',
'GIT_PAGER': 'cat',
'MPLBACKEND': 'module://matplotlib_inline.backend_inline'}
[21]:
# new imd file for QM/MM run
in_imd_path = f"example_files/QMMM_files/md.imd"
equilibrated_system.imd = in_imd_path
equilibrated_system.imd.STEP.NSTLIM = 100
equilibrated_system.imd.STEP.DT = 0.0005 # 0.5 fs
# qmmm specification file
equilibrated_system.qmmm = QMMM(f"example_files/QMMM_files/menthol-methanol-dmf.qmmm")
# now you want to switch to your special build of GROMOS :)
gromosXX = None # path to freshly compiled gromos "build-gcc-8.2.0-release/program"
equilibrated_system.gromosXX = gromosXX
# check if everying is correct
# note that the new .imd file and .qmmm file still live in the old location
# while the .cnf file and .top file result from a previous simulation (equilibration)
equilibrated_system
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5617/2075562488.py in <module>
1 # new imd file for QM/MM run
2 in_imd_path = f"example_files/QMMM_files/md.imd"
----> 3 equilibrated_system.imd = in_imd_path
4 equilibrated_system.imd.STEP.NSTLIM = 100
5 equilibrated_system.imd.STEP.DT = 0.0005 # 0.5 fs
NameError: name 'equilibrated_system' is not defined
[22]:
# print the relevant QMMM block in the new imd file
equilibrated_system.imd.QMMM
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5617/2112366208.py in <module>
1 # print the relevant QMMM block in the new imd file
----> 2 equilibrated_system.imd.QMMM
NameError: name 'equilibrated_system' is not defined
[23]:
# go QM/MM!
production_system = md(equilibrated_system, submission_system=submit)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5617/3371366635.py in <module>
1 # go QM/MM!
----> 2 production_system = md(equilibrated_system, submission_system=submit)
NameError: name 'equilibrated_system' is not defined
[24]:
# visualize the last .cnf - you are done!
production_system.cnf.view
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_5617/748386431.py in <module>
1 # visualize the last .cnf - you are done!
----> 2 production_system.cnf.view
NameError: name 'production_system' is not defined
[ ]: