GroMorG
A python tool to automate the calculation of MD simulations of small organic molecules using gromacs.
Online documentation is available at https://gromorg.readthedocs.io/
Features
- Link first principles & molecular mechanics calculations using PyQchem
- Get parameters from SwissParam (https://www.swissparam.ch) automatically from molecular structure
- Clean run without intermediate files
- Add solvent molecules to the system
- Extract structures from the trajectory (including surrounding solvent molecules)
Requirements
- PyQchem (https://github.com/abelcarreras/PyQchem)
- Gromacs 2025+ (gmxapi) (http://www.gromacs.org)
- Openbabel v3.x (python API) (http://openbabel.org)
- MDtraj (https://www.mdtraj.org)
Basic example
from gromorg import GromOrg
import matplotlib.pyplot as plt
from pyqchem.structure import Structure
# Define moleule as PyQchem Structure
structure = Structure(coordinates=[[ 0.6695, 0.0000, 0.0000],
[-0.6695, 0.0000, 0.0000],
[ 1.2321, 0.9289, 0.0000],
[ 1.2321,-0.9289, 0.0000],
[-1.2321, 0.9289, 0.0000],
[-1.2321,-0.9289, 0.0000]],
symbols=['C', 'C', 'H', 'H', 'H', 'H'])
# Define Gromacs parameters
gmx_params = {
'integrator': 'md-vv', # Verlet integrator
'nsteps': 5000, # 0.001 * 5000 = 50 ps
'dt': 0.001, # time step, in ps
# Temperature coupling is on
'tcoupl': 'nose-hoover', # Nose-Hoover thermostat
'tau_t': 0.3, # time constant, in ps
'ref_t': 300, # reference temperature, one for each group, in K
# Bond parameters
'gen_vel': 'yes', # assign velocities from Maxwell distributio
'gen_temp': 300, # temperature for Maxwell distribution
'gen_seed': -1, # generate a random seed
}
# Define simulation
calc = GromOrg(structure,
params=gmx_params, # MDP parms
box=[10, 10, 10], # a, b, c in angstrom
angles=[90, 90, 90], # alpha, beta, gamma in degree
supercell=[3, 3, 3],
delete_scratch=True, # delete temp files when finished
silent=False) # print MD log info in screen
# Run simulation and get trajectory (MDTraj) and energy
trajectory, energy = calc.run_md(whole=True)
# plot energies
plt.plot(energy['potential'], label='potential')
plt.plot(energy['kinetic'], label='kinetic')
plt.plot(energy['total'], label='total')
plt.legend()
plt.show()
# Store trajectory
trajectory.save('trajectory.gro')
Contact info
Abel Carreras
abelcarreras83@gmail.com
Donostia International Physics Center (DIPC)
Donostia-San Sebastian, Euskadi (Spain)
Metadata
Release files for gromorg 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gromorg-0.3.2.tar.gz | 14.4 kB | With provenance | Details for gromorg-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gromorg-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for gromorg-0.3.2-py3-none-any.whl |
Total release size: 30.4 kB
Release files / gromorg-0.3.2.tar.gz
| Download URL | gromorg-0.3.2.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ab8125f1a3f190135edac882476e1a5ae4887bf451b2fafb412b36541820802
|
|
BLAKE2b-256 checksum How to use checksums |
e53421f13486ccff15ff6e44453492958aa2133c8f869b883794b1a23d2cbe4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logRelease files / gromorg-0.3.2-py3-none-any.whl
| Download URL | gromorg-0.3.2-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfa1368f589d281dbf13be3fb192a17cd0640d18e769f33a8727d92cdcef2afd
|
|
BLAKE2b-256 checksum How to use checksums |
86dbd61a6dc238b770e736ea5d914eebfe82e3768f06e0d6d01f192ba73358d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logSecurity for gromorg 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gromorg-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.