This package is a python library with tools for the Molecular Simulation - Software Gromos.

Overview

Welcome to PyGromosTools

CI codecov Language grade: Python DOI Documentation

General

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.

Content


  • GROMOS wrappers

    • GromosXX wrapper: for simulation execution
    • GromosPP wrapper: for GROMOS++ program usage
  • File handling of all GROMOS file types for automated creation/modification/analysis :

    • coordinate files CNF:

      • read and analyse CNF files
      • generate CNF files from RDKit
      • generate CNF files from SDF
      cnf = Cnf(input_value="file_name")
      print(cnf.GENBOX)
    • topology files:

      • create topologies from a forcefield
        • GROMOS 2016H66 / 54A7
        • OpenForceField
        • SerenityForceField
      • modify topologies
        • add new atoms
        • modify force parameters
      top = Top(input_value="file_path")
      top.add_new_SOLUTEATOM(ATNM=42)
      print(top)
    • simulation parameter files IMD

      • a wide option of templates provided
      • modify IMD files to fit your simulation
      imd = Imd(input_value="file_path")
      imd.INITIALISE.TEMPI = 137
      print(imd)
      
    • trajectories (tre, trc, trg, ...)

      • analyse trajectories with Pandas data frames
      • standard analysis like RSMD, RDF, ... for trc
      • auto saving of results for later use as hdf5
      • ene_ana like tools for tre
      • easy to add costume analysis tools
      trc = Trc(input_value="file_path")
      print(trc.rmsd().mean())
    • replica exchange files: repdat.dat

    • classes for single blocks of each of these files.

  • Automation and file management system gromos_system

    • offers clean file management for simulations
    • offers a high level of automation
    • equiped with simulation queuing system
    • includes many force fields
    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 :

    • Different Types of Simulation modules, like MD, SD or Emin.
    • Can be executed locally or on a cluster
    • easy to automatize and combine with analysis routines

    Run on a local machine:

    from pygromos.files.gromos_system import Gromos_System
    from pygromos.hpc_queuing.submission_systems.local import LOCAL as subSystem
    from pygromos.simulations.modules.preset_simulation_modules import emin
    
    #define 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, jobID = emin(in_gromos_system=grom_system, project_dir=root_dir,
                            step_name=step_name, submission_system=subSystem())
        

    Run on LSF-Cluster:

    from pygromos.files.gromos_system import Gromos_System
    from pygromos.hpc_queuing.submission_systems.lsf import LSF as subSystem
    from pygromos.simulations.modules.preset_simulation_modules import emin
    
    #define 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, project_dir=root_dir,
                          step_name=step_name, submission_system=sub_system)
      
  • Other utilities:

    • Bash wrappers for GROMOS
    • Amino acid library

General Information

Specifications

  • Python >=3.7:

  • requires: numpy, scipy, pandas, rdkit

  • optional: openforcefield for OpenForceField and Serenityff functions

SETUP

see INSTALL.md file for more informations

Copyright

Copyright (c) 2020, Benjamin Ries, Marc Lehner, Salome Rieder

Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.3.

Comments
  • Release3

    Release3

    Release 3 PR

    Content

    -All the developments of the recent months

    • Solvation
    • rework subSys
    • Improved Gromos_System
    • Bug fixes
    • More Gromos++ Wrappers

    TODOS

    • [x] Gromos-Day
    • [x] Solvation
    • [x] Project-Release 3
    • [x] Final clean-up
    Done 
    opened by MTLehner 21
  • GromosBinaryDetectionChangedLocation

    GromosBinaryDetectionChangedLocation

    This is a slight modification to @pultars nice binary directoy changes. Mainly I changed the location of the test and moved it from the gromos system to the Gromos classes in a way, the test can not be circumvented, except explicitly stated. :)

    • [x] Ready to go
    enhancement in progress 
    opened by RiesBen 19
  • PyGromosToolsDay

    PyGromosToolsDay

    Presentation for the PyGromosToolsDay

    Content and Discussions

    1. Current State and Features
    2. Overview over new tools
    3. Release 3
      1. Bug fixes
      2. Restructuring
      3. new features
    4. Final Discussions
    documentation enhancement in progress 
    opened by MTLehner 17
  • Trajectory update trc

    Trajectory update trc

    Description

    Update of TRC using mdtraj.

    Todos

    Notable points that this PR has either accomplished or will accomplish.

    • [x] Write Tests - in progress
    • [x] Include more mdtraj functionality
    • [x] Create dummy topology
    • [x] Refactoring
    • [x] Example notebook visualization
    • [x] Change Cnf to also use nglview
    • [x] Make future promisable
    • [x] Test with gromosSystem
    • [x] Write TRC
    • [x] Load h5 and hdf5
    enhancement feature in progress 
    opened by katzberger 16
  • Minor moving bug fixes

    Minor moving bug fixes

    This branch contains my expirience with Euler and the submission system

    This pull request grew a bit beyond! So it's time to merge !

    Features:

    • minor bug fixes for submission system
    • visualization
    • doc update
    • more testing
    • [x] Ready To Go
    opened by RiesBen 15
  • WIP: Ptp generation

    WIP: Ptp generation

    Description

    This merge should help

    Todos

    Notable points that this PR has either accomplished or will accomplish.

    • [x] add PTP - PERTPROPERDIH Block
    • [x] add functions for ptp generation

    Status

    • [ ] Ready to go
    opened by RiesBen 12
  • ff rework

    ff rework

    Description

    Rework of the forcefield structure in PyGromos

    Introducing a generic_forcfield and all other forcefield have this class as super. This makes code more readable and unifies the structure.

    feature in progress cleaning 
    opened by MTLehner 10
  • examples: TI

    examples: TI

    In the TI example notebook examples/example_TI_gromos_simulation.ipynb, the file /examples/example_files/TI_Calculation/TI_input/M030_6KET.disres is specified, but this file isn't in the repository. This leads to the following error:

    ---------------------------------------------------------------------------
    OSError                                   Traceback (most recent call last)
    <ipython-input-13-14f2d2d90c97> in <module>
          6 grom_system = Gromos_System(in_cnf_path=cnf_path, in_top_path=top_path,
          7                             in_disres_path=disres_path,
    ----> 8                             system_name=sys_name, work_folder=input_dir)
          9 
         10 
    
    /cluster/work/igc/wsalome/anaconda3/envs/pygromos/lib/python3.7/site-packages/PyGromos-0+untagged.176.g9b9886d-py3.7.egg/pygromos/files/gromos_system/gromos_system.py in __init__(self, work_folder, system_name, in_smiles, in_top_path, in_cnf_path, in_imd_path, in_disres_path, in_ptp_path, in_posres_path, in_refpos_path, in_gromosXX_bin_dir, in_gromosPP_bin_dir, rdkitMol, readIn, Forcefield, auto_convert, adapt_imd_automatically, verbose)
        136                         "refpos": in_refpos_path,
        137                         }
    --> 138         self.parse_attribute_files(file_mapping, readIn=readIn, verbose=verbose)
        139 
        140         ##System Information:
    
    /cluster/work/igc/wsalome/anaconda3/envs/pygromos/lib/python3.7/site-packages/PyGromos-0+untagged.176.g9b9886d-py3.7.egg/pygromos/files/gromos_system/gromos_system.py in parse_attribute_files(self, file_mapping, readIn, verbose)
        523         [check_file_paths.append(x) for k, x in file_mapping.items() if (not x is None)]
        524         if (len(check_file_paths) > 0):
    --> 525             bash.check_path_dependencies(check_file_paths, verbose=verbose)
        526 
        527         # SET Attribute-FILES
    
    /cluster/work/igc/wsalome/anaconda3/envs/pygromos/lib/python3.7/site-packages/PyGromos-0+untagged.176.g9b9886d-py3.7.egg/pygromos/utils/bash.py in check_path_dependencies(check_required_paths, check_warn_paths, verbose)
        123         print("\n==================\nAUTSCH\n==================\n")
        124         missing_str = "\n\t".join(map(str, missing))
    --> 125         raise IOError("COULD NOT FIND all DEPENDENCY!\n\t Could not find path to: \n\t" + str(missing_str), "\n\n")
        126     elif verbose:
        127         print("All dependencies are correct!", "\n\n")
    
    OSError: [Errno COULD NOT FIND all DEPENDENCY!
    	 Could not find path to: 
    	./example_files/TI_Calculation/TI_input/M030_6KET.disres] 
    

    @SchroederB I think you originally wrote this tutorial. Do you still have the file on one of your local branches?

    tutorial/exampes 
    opened by SalomeRonja 10
  • WIP:Pymaketop

    WIP:Pymaketop

    Description

    • restructuring forcefield class in pygromos and making a generic-ff class from which others inherit to remove code duplication and make the usage of ffs more clear.
    • adding a python version of make_top to the gromosff class to create topologies in python

    Todos

    a lot

    feature in progress 
    opened by MTLehner 9
  • Improve speed of unit tests

    Improve speed of unit tests

    Can we improve the speed of the unit test?

    A few points possible points:

    • [x] reduce size of trajectories
      • [x] trc
      • [x] tre
      • [x] trg (seem to take the longest)
    • [x] remove unnecessary dependencies from conda incubator
    • [x] TI submission
    • [x] dummy submissions
    enhancement question in progress testing 
    opened by MTLehner 9
  • Qmmm functionality and more gromos++ wrapper functions

    Qmmm functionality and more gromos++ wrapper functions

    Description

    More gromos++ functions are wrapped (sasa, filter). There was also a minor bug in the way rgyr is wrapped.

    In addition, qmmm blocks are now supported in imd files. An example notebook is provided with example files. It is also planned to support qmmm specification files and for that purpose some code has been copy/pasted in place.

    enhancement feature in progress 
    opened by pultar 8
  • changes to the RE-EDS and EDS blocks

    changes to the RE-EDS and EDS blocks

    Removed duplicate code from a fix a long time ago (RE-EDS block no longer having the ALPHALJ / ALPHAC) parameters. I also tweaked the EDS block so it is compatible with the current up to date gromosXX code. Added a comment in the electrostatics block to account for the recent work from Salomé.

    Status

    • [ ] Ready to go
    opened by candidechamp 0
  • Add CodeQL workflow for GitHub code scanning

    Add CodeQL workflow for GitHub code scanning

    Hi rinikerlab/PyGromosTools!

    This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

    With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

    This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! We tested it before opening this pull request, so all should be working :heavy_check_mark:. In fact, you might already have seen some alerts appear on this pull request!

    Where needed and if possible, we’ve adjusted the configuration to the needs of your particular repository. But of course, you should feel free to tweak it further! Check this page for detailed documentation.

    Questions? Check out the FAQ below!

    FAQ

    Click here to expand the FAQ section

    How often will the code scanning analysis run?

    By default, code scanning will trigger a scan with the CodeQL engine on the following events:

    • On every pull request — to flag up potential security problems for you to investigate before merging a PR.
    • On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s Security tab up to date.
    • Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened.

    What will this cost?

    Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.

    What types of problems does CodeQL find?

    The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the security-and-quality query suite for you.

    How do I upgrade my CodeQL engine?

    No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.

    The analysis doesn’t seem to be working

    If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.

    How do I disable LGTM.com?

    If you have LGTM’s automatic pull request analysis enabled, then you can follow these steps to disable the LGTM pull request analysis. You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com (more info here).

    Which source code hosting platforms does code scanning support?

    GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.

    How do I know this PR is legitimate?

    This PR is filed by the official LGTM.com GitHub App, in line with the deprecation timeline that was announced on the official GitHub Blog. The proposed GitHub Action workflow uses the official open source GitHub CodeQL Action. If you have any other questions or concerns, please join the discussion here in the official GitHub community!

    I have another question / how do I get in touch?

    Please join the discussion here to ask further questions and send us suggestions!

    opened by lgtm-com[bot] 0
  • Consistent indices in PyGromos

    Consistent indices in PyGromos

    GROMOS starts counting from "1" in topologies (and other places). However, sometimes atom indices are 0 indexed (for example functions that use mdtraj). We should make this more consistent before too many people use functions.

    I think we should stick to GROMOS convention and start everywhere from "1".

    @MTLehner ideas?

    documentation cleaning 
    opened by pultar 0
  • replica exchange simulation submission + minor reeds tweaks

    replica exchange simulation submission + minor reeds tweaks

    I reimplemented (and re-tested) the changes in #222 (as I didn't want to have trouble with merge conflicts, although they all seemed super minor and would have been easily fixed).

    The code in here is essentially the same as in #222 with the exception of some imd related functions, where I simplified a call to str2bool (previously was put in an if, else block based on input given to function, which already happens in the function).

    To do

    • [ ] Pre-commit passed

    Status

    • [ ] Ready to go

    PS: Please don't delete the pygromos3_for_reeds branch after merge. I would like to keep this branch in parallel at all times (and probably also have a "release" for it so that there is an easily accessible version for RE-EDS users once I have implemented all I need to).

    opened by candidechamp 2
  • PyMakeTop

    PyMakeTop

    PyMakeTop

    Content

    With the new addition of the mtb files a python version of make_top should be possible. The resnames are already stored in a dict after the mtb parsing.

    TODOs

    • [ ] Option to just call the resname and get back a top
      • [ ] parse all mtb blocks to top blocks
      • [ ] add solvent
    • [ ] Option to pass a rdkit molecule (matching to a resname) and get a gromos topology
      • [ ] all of the above
      • [ ] mtb -> rdkit mol or smiles parser from atoms and bond blocks
    • [ ] Option to pass a rdkit molecule (any) and get a gromos topology
      • [ ] all of the above
      • [ ] fragment based matching
    enhancement feature in progress 
    opened by MTLehner 0
Releases(v3.0)
  • v3.0(Apr 6, 2022)

    Release 3

    Major changes

    • QM/MM support
    • Solvation free energy approach
    • rework of the submission systems
    • rework of the forcfield system
    • rework of the trajectory classes
    • addition of a logo
    • addition of pre-commit and code-standards

    Minor changes

    • Simplification and cleanup of gromos_system class
    • mtb file class support
    • more GROMOS++ wrappers
    • rework of the python classes for GROMOS
    • better typing
    • more documentation
    • better example notebooks
    • and of course some more bug fixes

    Acknowledgments

    Benjamin Ries, Marc Lehner, Salome Rieder, Felix Pultar, Paul Katzberger, Candide Champion, Robin Wolf

    Source code(tar.gz)
    Source code(zip)
  • v2.1(May 28, 2021)

  • v2.0(May 28, 2021)

  • v1.0.0(Mar 19, 2021)

    This release is used by the reeds repository. It is not further developed please and definetly not perfect. Please use the main branch if you want to have the newest features of PyGromosTools.

    We generate this release for backwards compatibility with the reeds repository.

    Source code(tar.gz)
    Source code(zip)
Network automation lab using nornir, scrapli, and containerlab with Arista EOS

nornir-scrapli-eos-lab Network automation lab using nornir, scrapli, and containerlab with Arista EOS. Objectives Deploy base configs to 4xArista devi

Vireak Ouk 13 Jul 07, 2022
Rerun pytest when your code changes

A simple watcher for pytest Overview pytest-watcher is a tool to automatically rerun pytest when your code changes. It looks for the following events:

Olzhas Arystanov 74 Dec 29, 2022
Automatic SQL injection and database takeover tool

sqlmap sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of

sqlmapproject 25.7k Jan 04, 2023
WEB PENETRATION TESTING TOOL 💥

N-WEB ADVANCE WEB PENETRATION TESTING TOOL Features 🎭 Admin Panel Finder Admin Scanner Dork Generator Advance Dork Finder Extract Links No Redirect H

56 Dec 23, 2022
No longer maintained, please migrate to model_bakery

Model Mommy: Smart fixtures for better tests IMPORTANT: Model Mommy is no longer maintained and was replaced by Model Bakery. Please, consider migrati

Bernardo Fontes 917 Oct 04, 2022
Simple frontend TypeScript testing utility

TSFTest Simple frontend TypeScript testing utility. Installation Install webpack in your project directory: npm install --save-dev webpack webpack-cli

2 Nov 09, 2021
Sixpack is a language-agnostic a/b-testing framework

Sixpack Sixpack is a framework to enable A/B testing across multiple programming languages. It does this by exposing a simple API for client libraries

1.7k Dec 24, 2022
Fail tests that take too long to run

GitHub | PyPI | Issues pytest-fail-slow is a pytest plugin for making tests fail that take too long to run. It adds a --fail-slow DURATION command-lin

John T. Wodder II 4 Nov 27, 2022
Pytest-rich - Pytest + rich integration (proof of concept)

pytest-rich Leverage rich for richer test session output. This plugin is not pub

Bruno Oliveira 170 Dec 02, 2022
1st Solution to QQ Browser 2021 AIAC Track 2

1st Solution to QQ Browser 2021 AIAC Track 2 This repository is the winning solution to QQ Browser 2021 AI Algorithm Competition Track 2 Automated Hyp

DAIR Lab 24 Sep 10, 2022
This is a pytest plugin, that enables you to test your code that relies on a running MongoDB database

This is a pytest plugin, that enables you to test your code that relies on a running MongoDB database. It allows you to specify fixtures for MongoDB process and client.

Clearcode 19 Oct 21, 2022
Python selenium script to bypass simaster.ugm.ac.id weak captcha.

Python selenium script to bypass simaster.ugm.ac.id weak "captcha".

Hafidh R K 1 Feb 01, 2022
Based on the selenium automatic test framework of python, the program crawls the score information of the educational administration system of a unive

whpu_spider 该程序基于python的selenium自动化测试框架,对某高校的教务系统的成绩信息实时爬取,在检测到成绩更新之后,会通过电子邮件的方式,将更新的成绩以文本的方式发送给用户,可以使得用户在不必手动登录教务系统网站时,实时获取成绩更新的信息。 该程序仅供学习交流,不可用于恶意攻

1 Dec 30, 2021
Python drivers for YeeNet firmware

yeenet-router-driver-python Python drivers for YeeNet firmware This repo is under heavy development. Many or all of these scripts are not likely to wo

Jason Paximadas 1 Dec 26, 2021
A small automated test structure using python to test *.cpp codes

Get Started Insert C++ Codes Add Test Code Run Test Samples Check Coverages Insert C++ Codes you can easily add c++ files in /inputs directory there i

Alireza Zahiri 2 Aug 03, 2022
Flexible test automation for Python

Nox - Flexible test automation for Python nox is a command-line tool that automates testing in multiple Python environments, similar to tox. Unlike to

Stargirl Flowers 941 Jan 03, 2023
Android automation project with pytest+appium

Android automation project with pytest+appium

1 Oct 28, 2021
:game_die: Pytest plugin to randomly order tests and control random.seed

pytest-randomly Pytest plugin to randomly order tests and control random.seed. Features All of these features are on by default but can be disabled wi

pytest-dev 471 Dec 30, 2022
A library to make concurrent selenium tests that automatically download and setup webdrivers

AutoParaSelenium A library to make parallel selenium tests that automatically download and setup webdrivers Usage Installation pip install autoparasel

Ronak Badhe 8 Mar 13, 2022