![]()
The aim of the module is to bring GROMOS to the Python3 World! This repository should make it easier to work with GROMOS in Python and should enable the user to write cleaner, more reliable and adaptable code.
General informations about functions can be found in our wiki and usage example for many general functions and theire relations are shown in jupyter notebooks in the examples in the example folder.
GROMOS wrappers
File handling of all GROMOS file types for automated creation/modification/analysis :
cnf = Cnf(input_value="file_name")
print(cnf.GENBOX)
top = Top(input_value="file_path")
top.add_new_SOLUTEATOM(ATNM=42)
print(top)
imd = Imd(input_value="file_path")
imd.INITIALISE.TEMPI = 137
print(imd)
trc = Trc(input_value="file_path")
print(trc.rmsd().mean())
Automation and file management system gromos_system
ff=forcefield_system(name="openforcefield")
gsys = Gromos_System(work_folder="dir", in_smiles="C1CCCCC1", auto_convert=True, Forcefield=ff)
print(gsys)
Simulation Submission and Execution :
Run on a local machine:
from pygromos.files.gromos_system import Gromos_System
from pygromos.simulations.hpc_queuing.submission_systems.local import LOCAL as subSystem
from pygromos.simulations.modules.preset_simulation_modules import emin
# define file paths (or use absolute file paths)
root_dir = "./example_files/SD_Simulation"
root_in_dir = root_dir+"/SD_input"
cnf_path = root_in_dir+"/6J29_unitedatom_optimised_geometry.cnf"
top_path = root_in_dir + "/6J29.top"
sys_name = "6J29"
# Build gromos System
grom_system = Gromos_System(in_cnf_path=cnf_path, in_top_path=top_path,
system_name=sys_name, work_folder=root_in_dir)
# Run Emin
emin_gromos_system = emin(in_gromos_system=grom_system, submission_system=subSystem())
Run on LSF-Cluster:
from pygromos.files.gromos_system import Gromos_System
from pygromos.simulations.hpc_queuing.submission_systems.lsf import LSF as subSystem
from pygromos.simulations.modules.preset_simulation_modules import emin
# define file paths (or use absolute file paths)
root_dir = "./example_files/SD_Simulation"
root_in_dir = root_dir+"/SD_input"
cnf_path = root_in_dir+"/6J29_unitedatom_optimised_geometry.cnf"
top_path = root_in_dir + "/6J29.top"
sys_name = "6J29"
# Build gromos System:
grom_system = Gromos_System(in_cnf_path=cnf_path, in_top_path=top_path,
system_name=sys_name, work_folder=root_in_dir)
# Run Emin
sub_system = subSystem(nmpi=4) # allows parallelization
emin_gromos_system, jobID = emin(in_gromos_system=grom_system, submission_system=sub_system)
Other utilities:
Quick Start - move to the root folder of this repository:
# build environment
conda env create -f conda_env.yaml
conda develop -n pygromos ${PWD}
# activate environment
conda activate pygromos
In case the conda develop
command does not work for you, you can also use python -m pip install -e .
to install PyGromosTools
in a development environment. Please make sure, that you have GROMOS (www.gromos.net) binaries around, if you want to use the MD-Package. We sadly can not provide the source code for this package, as it is currently not open-source.
If you find a bug or have an feature request, please raise an Issue on GitHub.
For more information, see INSTALL.md file for more informations.
You want to contribute? Awesome! We are happy to support you in this process. For any contribution, please check out the CODE_OF_CONDUCT.md file and the style guide in styleguide.md. There will be a small code revision for code contributions, to verify that everything is in place.
Scientific Literature using PyGromosTools:
^ contributed equally
Many thanks to Robin Wolf for the logo design!
Copyright (c) 2020, Benjamin Ries, Marc Lehner, Salome Rieder, Felix Pultar, Paul Katzberger, Candide Champion
Project based on the Computational Molecular Science Python Cookiecutter version 1.3.