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)
Useful additions to Django's default TestCase

django-test-plus Useful additions to Django's default TestCase from REVSYS Rationale Let's face it, writing tests isn't always fun. Part of the reason

REVSYS 546 Dec 22, 2022
Show, Edit and Tell: A Framework for Editing Image Captions, CVPR 2020

Show, Edit and Tell: A Framework for Editing Image Captions | arXiv This contains the source code for Show, Edit and Tell: A Framework for Editing Ima

Fawaz Sammani 76 Nov 25, 2022
A web scraping using Selenium Webdriver

Savee - Images Downloader Project using Selenium Webdriver to download images from someone's profile on https:www.savee.it website. Usage The project

Caio Eduardo Lobo 1 Dec 17, 2021
Selects tests affected by changed files. Continous test runner when used with pytest-watch.

This is a pytest plug-in which automatically selects and re-executes only tests affected by recent changes. How is this possible in dynamic language l

Tibor Arpas 614 Dec 30, 2022
Subprocesses for Humans 2.0.

Delegator.py — Subprocesses for Humans 2.0 Delegator.py is a simple library for dealing with subprocesses, inspired by both envoy and pexpect (in fact

Amit Tripathi 1.6k Jan 04, 2023
Fully functioning price detector built with selenium and python

Fully functioning price detector built with selenium and python

mark sikaundi 4 Mar 30, 2022
Webscreener is a tool for mass web domains pentesting.

Webscreener is a tool for mass web domains pentesting. It is used to take snapshots for domains that is generated by a tool like knockpy or Sublist3r. It cuts out most of the pentesting time by scree

Seekurity 3 Jun 07, 2021
HTTP traffic mocking and testing made easy in Python

pook Versatile, expressive and hackable utility library for HTTP traffic mocking and expectations made easy in Python. Heavily inspired by gock. To ge

Tom 305 Dec 23, 2022
Code coverage measurement for Python

Coverage.py Code coverage testing for Python. Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and

Ned Batchelder 2.3k Jan 04, 2023
py.test fixture for benchmarking code

Overview docs tests package A pytest fixture for benchmarking code. It will group the tests into rounds that are calibrated to the chosen timer. See c

Ionel Cristian Mărieș 1k Jan 03, 2023
A small faсade for the standard python mocker library to make it user-friendly

unittest-mocker Inspired by the pytest-mock, but written from scratch for using with unittest and convenient tool - patch_class Installation pip insta

Vertliba V.V. 6 Jun 10, 2022
Selenium Page Object Model with Python

Page-object-model (POM) is a pattern that you can apply it to develop efficient automation framework.

Mohammad Ifran Uddin 1 Nov 29, 2021
Minimal example of how to use pytest with automated 'devops' style automated test runs

Pytest python example with automated testing This is a minimal viable example of pytest with an automated run of tests for every push/merge into the m

Karma Computing 2 Jan 02, 2022
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. An example o

pytest-dev 9.6k Jan 02, 2023
Cloint India Pvt. Ltd's (ClointFusion) Pythonic RPA (Automation) Platform

Welcome to , Made in India with ❤️ Description Cloint India Pvt. Ltd - Python functions for Robotic Process Automation shortly RPA. What is ClointFusi

Cloint India Pvt. Ltd 31 Apr 12, 2022
Public repo for automation scripts

Script_Quickies Public repo for automation scripts Dependencies Chrome webdriver .exe (make sure it matches the version of chrome you are using) Selen

CHR-onicles 1 Nov 04, 2021
AllPairs is an open source test combinations generator written in Python

AllPairs is an open source test combinations generator written in Python

Robson Agapito Correa 5 Mar 05, 2022
Generic automation framework for acceptance testing and RPA

Robot Framework Introduction Installation Example Usage Documentation Support and contact Contributing License Introduction Robot Framework is a gener

Robot Framework 7.7k Jan 07, 2023
Voip Open Linear Testing Suite

VOLTS Voip Open Linear Tester Suite Functional tests for VoIP systems based on voip_patrol and docker 10'000 ft. view System is designed to run simple

Igor Olhovskiy 17 Dec 30, 2022