Skip to main content

An automated GROMACS force field converter tool

Project description

gmx_ffconv

A semi-automated force field converter for GROMACS

Usage:

usage: gmx_ffconv ffmap [-h] -itp1 ITP1 -itp2 ITP2 -name NAME [--duplicate]
[--all_mappings] [--validate]

optional arguments: -h, --help show this help message and exit
-itp1 ITP1 First ITP file (path), corresponding to force field used in .gro file
-itp2 ITP2 Second ITP file (path)
-name NAME Name of the molecule, does not need to match itp files
--duplicate Skip graph matching, create a mapping where everything is
kept in same order. Useful for proteins, solvent,ions
--all_mappings Obtain all mappings, not recommended
--validate Carry out conversion in both directions

usage: gmx_ffconv groconv [-h] -name NAME [NAME ...] -nmol NMOL [NMOL ...]
-coordfile COORDFILE [-mapping_dir MAPPING_DIR]
-output OUTPUT [--validate]

optional arguments:
-h, --help show this help message and exit
-name NAME [NAME ...] Molecule names separated by spaces
-nmol NMOL [NMOL ...] Molecule counts separated by spaces
-coordfile COORDFILE Input .gro file
-mapping_dir MAPPING_DIR Directory containing mapping CSV files
-output OUTPUT Output .gro file name
--validate Generate back-converted structure

Installation instructions:

The easiest way to install gmx_ffconv is to clone the github, cd in gmx_ffconv and running pip install . Note, it is considered good practice to perform this in a virtual environment.

Possible issues:

If the installation contains a message about installing an UNKNOWN package, please update your pip version.

Example:

The files are provided in “Tutorial” in folder Example1

Example 1: Small membrane

A membrane containing 24 DOPE,24 DPPC,24 CHL, 6 K+, 6 Cl- and 2709 TIP3P molecules was generated by CHARMM-GUI’s Membrane builder using CHARMM36m. The target force field is AMBER (Lipid21) . The water model is kept as TIP3, and the ions are standard for the water model.

First, mappings for each molecule must be found. These commands can be run at the same time by the use of &.

DPPC

gmx_ffconv ffmap -itp1 toppar_CHARMM/DPPC.itp -itp2 toppar_AMBER/PPPC.itp -name DPPC

Cholesterol

gmx_ffconv ffmap -itp1 toppar_CHARMM/CHL1.itp -itp2 toppar_AMBER/CHL.itp -name CHL

DOPE

gmx_ffconv ffmap -itp1 toppar_CHARMM/DOPE.itp -itp2 toppar_AMBER/OOPE.itp -name DOPE

TIP3

gmx_ffconv ffmap -itp1 toppar_CHARMM/TIP3.itp -itp2 None -name TIP3P --duplicate

Potassium

gmx_ffconv ffmap -itp1 toppar_CHARMM/POT.itp -itp2 None -name POT --duplicate

Chloride

gmx_ffconv ffmap -itp1 toppar_CHARMM/CLA.itp -itp2 None -name CLA --duplicate

These should have generated multiple mapping files, a mapping file per molecule type named mapping_{NAME}.csv.

Now, that all mappings are obtained, the new coordinate file can be obtained via groconv

gmx_ffconv groconv -coordfile CHARMM_MEMB.gro -name DOPE DPPC CHL POT CLA TIP3P -nmol 24 24 24 6 6 2709 -output AMBER_MEMB_from_CHARMM.gro

We can now compare the AMBER_MEMB_from_CHARMM.gro to AMBER_MEMB_FF.gro, which will match in energy values if the conversion has been successful. This file is provided in the AMBER_REF folder with the necessary files.

If you find my tool useful, please cite:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gmx_ffconv-1.0.1.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gmx_ffconv-1.0.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file gmx_ffconv-1.0.1.tar.gz.

File metadata

  • Download URL: gmx_ffconv-1.0.1.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gmx_ffconv-1.0.1.tar.gz
Algorithm Hash digest
SHA256 aa057c33a8dbbb43970671952f2d03ab931530e9f417941e588c463cd072721d
MD5 ea3eaf2d79f440f0f972debe8a798414
BLAKE2b-256 8a0d06e166ed0c7d9f511e3d3c1627c13702ffa565b359d76f52485efe1e7e57

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmx_ffconv-1.0.1.tar.gz:

Publisher: publish.yml on Jassu1998/gmx_ffconv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gmx_ffconv-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gmx_ffconv-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for gmx_ffconv-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93263be9367c84a93d2c6194618145433c3a63b155447339d30568ed28488a9b
MD5 e9b614ce206f336307460ccaec76d842
BLAKE2b-256 4ba2c2a9f3cc2f3b3467d2d706f787e709f0bbd16909f7cdeb3a41527358e194

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmx_ffconv-1.0.1-py3-none-any.whl:

Publisher: publish.yml on Jassu1998/gmx_ffconv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page