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)
This repository contnains sample problems with test cases using Cormen-Lib

Cormen Lib Sample Problems Description This repository contnains sample problems with test cases using Cormen-Lib. These problems were made for the pu

Cormen Lib 3 Jun 30, 2022
Photostudio是一款能进行自动化检测网页存活并实时给网页拍照的工具,通过调用Fofa/Zoomeye/360qua/shodan等 Api快速准确查询资产并进行网页截图,从而实施进一步的信息筛查。

Photostudio-红队快速爬取网页快照工具 一、简介: 正如其名:这是一款能进行自动化检测,实时给网页拍照的工具 信息收集要求所收集到的信息要真实可靠。 当然,这个原则是信息收集工作的最基本的要求。为达到这样的要求,信息收集者就必须对收集到的信息反复核实,不断检验,力求把误差减少到最低限度。我

s7ck Team 41 Dec 11, 2022
🏃💨 For when you need to fill out feedback in the last minute.

BMSCE Auto Feedback For when you need to fill out feedback in the last minute. 🏃 💨 Setup Clone the repository Run pip install selenium Set the RATIN

Shaan Subbaiah 10 May 23, 2022
Yet another python home automation project. Because a smart light is more than just on or off

Automate home Yet another home automation project because a smart light is more than just on or off. Overview When talking about home automation there

Maja Massarini 62 Oct 10, 2022
This repository contains a testing script for nmigen-boards that tries to build blinky for all the platforms provided by nmigen-boards.

Introduction This repository contains a testing script for nmigen-boards that tries to build blinky for all the platforms provided by nmigen-boards.

S.J.R. van Schaik 4 Jul 23, 2022
A simple serverless create api test repository. Please Ignore.

serverless-create-api-test A simple serverless create api test repository. Please Ignore. Things to remember: Setup workflow Change Name in workflow e

Sarvesh Bhatnagar 1 Jan 18, 2022
✅ Python web automation and testing. 🚀 Fast, easy, reliable. 💠

Build fast, reliable, end-to-end tests. SeleniumBase is a Python framework for web automation, end-to-end testing, and more. Tests are run with "pytes

SeleniumBase 3k Jan 04, 2023
buX Course Enrollment Automation

buX automation BRACU - buX course enrollment automation Features: Automatically enroll into multiple courses at a time. Find courses just entering cou

Mohammad Shakib 1 Oct 06, 2022
tidevice can be used to communicate with iPhone device

tidevice can be used to communicate with iPhone device

Alibaba 1.8k Jan 08, 2023
Testing Calculations in Python, using OOP (Object-Oriented Programming)

Testing Calculations in Python, using OOP (Object-Oriented Programming) Create environment with venv python3 -m venv venv Activate environment . venv

William Koller 1 Nov 11, 2021
To automate the generation and validation tests of COSE/CBOR Codes and it's base45/2D Code representations

To automate the generation and validation tests of COSE/CBOR Codes and it's base45/2D Code representations, a lot of data has to be collected to ensure the variance of the tests. This respository was

160 Jul 25, 2022
Connexion-faker - Auto-generate mocks from your Connexion API using OpenAPI

Connexion Faker Get Started Install With poetry: poetry add connexion-faker # a

Erle Carrara 6 Dec 19, 2022
Show surprise when tests are passing

pytest-pikachu pytest-pikachu prints ascii art of Surprised Pikachu when all tests pass. Installation $ pip install pytest-pikachu Usage Pass the --p

Charlie Hornsby 13 Apr 15, 2022
WIP SAT benchmarking tooling, written with only my personal use in mind.

SAT Benchmarking Some early work in progress tooling for running benchmarks and keeping track of the results when working on SAT solvers and related t

Jannis Harder 1 Dec 26, 2021
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
Data-Driven Tests for Python Unittest

DDT (Data-Driven Tests) allows you to multiply one test case by running it with different test data, and make it appear as multiple test cases. Instal

424 Nov 28, 2022
Screenplay pattern base for Python automated UI test suites.

ScreenPy TITLE CARD: "ScreenPy" TITLE DISAPPEARS.

Perry Goy 39 Nov 15, 2022
Automação de Processos (obtenção de informações com o Selenium), atualização de Planilha e Envio de E-mail.

Automação de Processo: Código para acompanhar o valor de algumas ações na B3. O código entra no Google Drive, puxa os valores das ações (pré estabelec

Hemili Beatriz 1 Jan 08, 2022
Mock smart contracts for writing Ethereum test suites

Mock smart contracts for writing Ethereum test suites This package contains comm

Trading Strategy 222 Jan 04, 2023
Testing - Instrumenting Sanic framework with Opentelemetry

sanic-otel-splunk Testing - Instrumenting Sanic framework with Opentelemetry Test with python 3.8.10, sanic 20.12.2 Step to instrument pip install -r

Donler 1 Nov 26, 2021