Skip to content

askforarun/lammps_to_gro

Repository files navigation

lammps_to_gro

Convert LAMMPS data files to GROMACS format - A Python tool for molecular dynamics simulation workflow integration. Transform LAMMPS data files with force field parameters into GROMACS topology (.itp/.top) and coordinate (.gro) files for seamless cross-platform MD simulations.

License: MIT Python 3.8+

Keywords: molecular dynamics, LAMMPS, GROMACS, file conversion, force field, topology, coordinates, simulation, computational chemistry, MD workflow

Convert a LAMMPS data file (with force field parameters in the * Coeffs sections) into GROMACS topology (.itp/.top) and coordinate (.gro) files.

🚀 Quick Start

# Clone the repository
git clone https://github.com/askforarun/lammps_to_gro.git
cd lammps_to_gro

# Convert LAMMPS data to GROMACS format
# (Example: 10 ethanol residues × 9 atoms each)
python lammps_to_gro.py \
  --infile your_data.lammps \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH

# Run simulation in GROMACS
gmx grompp -f md.mdp -c system.gro -p topol.top -o md.tpr
gmx mdrun -v -deffnm md

Table of Contents


What This Tool Does

Run molecular dynamics simulations in GROMACS using systems prepared in LAMMPS.

Typical workflow

  1. Prepare a LAMMPS data file (with force field parameters).
  2. Convert it to GROMACS format with this tool.
  3. Run simulation/analysis in GROMACS.

Input → Output

  • LAMMPS data file → GROMACS topology and coordinate files.

Generated files

  • sorted_<input> — sorted copy of LAMMPS data file (always generated)
  • forcefield.itp[defaults], [atomtypes] (LJ parameters)
  • <molecule>.itp[moleculetype], [atoms], [bonds], [pairs], [angles], [dihedrals]
  • topol.top#includes + [system] + [molecules]
  • system.gro — coordinates + box vectors

Atom naming in outputs

  • Atom names written to .itp and .gro are generated from the detected element symbol and numbered uniquely within each residue: C1, C2, O1, H1, H2, ...
  • Numbering restarts for each residue, so repeated residues keep the same atom-name pattern.
  • Residue names themselves are not renamed.

What You Need

Input file format

Required sections

  • Box dimensions (xlo xhi, ylo yhi, zlo zhi)
  • Masses, Atoms, Bonds, Angles, Dihedrals, Impropers (if present)
  • * Coeffs sections (Pair, Bond, Angle, Dihedral, Improper)
  • Missing any required section aborts conversion (CLI exit code 4).
  • Atom IDs in Atoms must be contiguous and 1-based (1..N).

Atoms section format

atom-ID  molecule-ID  atom-type  charge  x  y  z

Example LAMMPS data file

# LAMMPS data file for crosslinked polymer network
12.0 48.0 xlo xhi
12.0 48.0 ylo yhi
12.0 48.0 zlo zhi

Masses
1 12.0107
2 1.00794
3 15.9994

Atoms
1 1 1 -0.120 15.234 22.456 18.123
2 1 2  0.060 15.345 22.567 18.234
...

Bonds
1 1 1 2
2 1 2 3
...

Bond Coeffs
1 340.0 1.529
...

Pair Coeffs
1 0.0628 3.981
...

Force Field Mapping & Compatibility

Supported LAMMPS Force Field Styles

pair_style      lj/cut/coul/cut 9 9   # or lj/cut/coul/long 9 9 (any cutoff value)
bond_style      harmonic
angle_style      harmonic
dihedral_style  fourier     # periodic dihedrals
dihedral_style  opls        # OPLS dihedrals 
improper_style  cvff        # CVFF impropers 

LAMMPS to GROMACS Mapping

Suggested reading: https://manual.gromacs.org/documentation/current/reference-manual/topologies/topology-file-formats.html

LAMMPS Style GROMACS Function Description Default
pair_style lj/cut/coul/cut nb-func 1 Lennard-Jones + Coulomb cutoff Yes
bond_style harmonic bond-funct 1 Harmonic bonds: E = k(r - r₀)² Yes
angle_style harmonic angle-funct 1 Harmonic angles: E = k(θ - θ₀)² Yes
dihedral_style fourier dihedral-funct 1 Fourier dihedrals Yes
dihedral_style opls dihedral-funct 3 OPLS dihedrals converted to Ryckaert-Bellemans form No
improper_style cvff improper-funct 4 CVFF impropers mapped to periodic improper form (phi_s, k, n) Yes

Combination Rules & 1-4 Scaling

Choose a preset with --comb-rule:

Preset comb-rule fudgeLJ fudgeQQ Typical match
amber (default) 2 0.5 0.8333 LAMMPS pair_modify mix arithmetic + special_bonds ... coul 0.8333
opls 2 0.5 0.5 LAMMPS pair_modify mix arithmetic + special_bonds ... coul 0.5

Notes:

  • Both presets use arithmetic LJ mixing (comb-rule 2): σ_ij = (σ_i + σ_j)/2, ε_ij = sqrt(ε_i * ε_j).
  • fudgeLJ is 0.5 for both presets (matches special_bonds lj 0.0 0.0 0.5).
  • Only fudgeQQ changes between presets.

Platform Compatibility

Validated on: Linux (Ubuntu, CentOS, Red Hat, Debian), macOS (Intel/Apple Silicon), Windows 10/11 (native Python or WSL2).


Command Reference & Options

All CLI Options

python lammps_to_gro.py --help

Core Options

Option Description Default
--infile Input LAMMPS data file Required
--molecule Molecule name for .itp MOL
--system System name for topology SYSTEM
--comb-rule Nonbonded preset for [ defaults ] (amber2, 0.5, 0.8333; opls2, 0.5, 0.5) amber
--gro-out Output coordinate file system.gro
--forcefield-out Output forcefield file forcefield.itp
--itp-out Output molecule topology <molecule>.itp
--topol-out Output topology file topol.top

Output Control

Option Description Default
--quiet Suppress info messages False

Residue Assignment (Required)

Option Description Example
--residue-sizes Number of atoms in each residue 73 73 31
--residue-names Residue names for blocks RES1 RES2 RES3
--residue-counts Repeat count for each size/name block 1 2 5
--repeat Repeat the full residue block pattern; requires an exact multiple of the pattern size Flag (no value)

Residue Assignment Modes

  • Non-repeat mode (default): Expanded residue blocks are consumed once; sum(size_i * count_i) must equal n_atoms
  • Repeat mode (--repeat): Pattern repeats only in full cycles; n_atoms must be an exact multiple of the full pattern size

Each value in --residue-sizes is the atom count for one residue instance. It is not the total atom count across all residues of that type.

Examples

  • --residue-sizes 73 73 31 --residue-counts 1 1 1 --residue-names ASP BEN ETH → Atoms 1-73 → ASP, 74-146 → BEN, 147-177 → ETH (non-repeat)
  • --residue-sizes 21 12 9 --residue-counts 1 2 5 --residue-names ASP BEN ETH → 1 ASP residue, 2 BEN residues, 5 ETH residues (non-repeat)
  • --residue-sizes 50 --residue-counts 1 --residue-names MON --repeat → Pattern (50 atoms per MON residue) repeats for all atoms when n_atoms is a multiple of 50

What It Generates

  • sorted_<input> — sorted copy of LAMMPS data file (always generated)
  • forcefield.itp[defaults], [atomtypes] (LJ parameters)
  • <molecule>.itp[moleculetype], [atoms], [bonds], [pairs], [angles], [dihedrals]
  • topol.top#includes + [system] + [molecules]
  • system.gro — coordinates + box vectors

Unit Conversions

Lengths and energies are converted from LAMMPS (real units) to GROMACS SI-based units:

  • Length: Å → nm (× 0.1)
  • Energy: kcal/mol → kJ/mol (× 4.184)
  • Bond force constant: kcal/mol/Ų → kJ/mol/nm² (× 4.184 × 100 × 2)
  • Angle force constant: kcal/mol/rad² → kJ/mol/rad² (× 4.184 × 2)

Requirements & Installation

System Requirements

  • Python 3.8+
  • Optional: networkx (for --pairs-method networkx)
  • Optional: GROMACS (running converted files) and LAMMPS (creating inputs)

Installation

git clone <repository-url>
cd lammps_to_gro
python lammps_to_gro.py --help

Optional dependency:

pip install networkx

How It Works

  1. File Reading & Validation — parse header box dimensions; validate section formats (Masses, Atoms, etc.); check coefficient consistency and atom type coverage; ensure every interaction type has corresponding parameters; creates sorted_<input> copy with key sections sorted by numeric IDs (always generated). Section parsing is header-based (so internal blank lines do not truncate sections), and comment lines (# ...) are ignored during data parsing.

  2. Data Parsing — parse masses (type ID → mass), atoms (ID, mol ID, type, charge, coordinates), and all bonded interactions; convert units (Å→nm, kcal/mol→kJ/mol); validate total charge neutrality; scale force constants appropriately. Atom IDs are validated as contiguous and 1-based (1..N) before topology generation. Atom names for .itp and .gro are built from the detected element symbol (e.g., C, H, O, N, CL) and then numbered uniquely within each residue in encounter order: C1, C2, O1, H1, H2, ... . Numbering restarts for each residue, so repeated residues keep the same atom-name pattern while residue names remain unchanged. If element/type mapping is missing, the atom-name prefix falls back to the first character of the residue name, or X if unavailable. Names are kept within the GRO 5-character atom-name field.

  3. Residue Assignment — assign atoms to residues using block-based patterns from required --residue-sizes, --residue-counts, and --residue-names; generate residue numbers and local atom indices; validate residue sizes/names/counts arrays match in length; ensure total residue atoms equals system atoms (non-repeat mode) or that repeat mode uses a whole number of full pattern cycles. Each residue-size value is the number of atoms in one residue, not a combined total for all residues of that name.
    Example: --residue-sizes 73 73 31 --residue-counts 1 1 1 --residue-names ASP BEN ETH → Atoms 1-73 → ASP, 74-146 → BEN, 147-177 → ETH (non-repeat).
    Example with counts: --residue-sizes 21 12 9 --residue-counts 1 2 5 --residue-names ASP BEN ETH → 1 ASP residue, 2 BEN residues, 5 ETH residues.
    Example with repeat: --residue-sizes 50 --residue-counts 1 --residue-names MON --repeat → Pattern (50 atoms per MON residue) repeats for all atoms when the system size is a multiple of 50.

  4. Force Field Conversion — convert LAMMPS coefficients to GROMACS format; map atom types to GROMACS atomtype names; validate all atoms reference defined atom types; detect orphaned coefficient sections; warn about unused atom type definitions.

  5. 1–4 Pair Generation — generate 1-4 pairs using BFS (default) or NetworkX algorithms; identify atoms separated by exactly 3 bonds; validate all bond/angle/dihedral/improper references exist in atoms; check correct column counts for each bonded section.

  6. Output Generation — write forcefield.itp with [defaults] and [atomtypes]; write <molecule>.itp with [moleculetype], [atoms], [bonds], [pairs], [angles], [dihedrals]; write topol.top with include statements and system info; write system.gro with coordinates and box vectors.


Tutorial

This tutorial demonstrates converting three LAMMPS data files to GROMACS format using lammps_to_gro.py:

  1. multi_ethanol_data.lammps — 10 ethanol molecules
  2. mixed_data.lammps — 1 aspirin, 2 benzene, and 5 ethanol molecules
  3. mixed_abc_data_replicate.lammps — 1 aspirin, 1 benzene, and 1 ethanol replicated 8 times (illustrates the --repeat functionality, useful for large molecules with repeating residue patterns)

CLI with GROMACS Execution

First Example

python lammps_to_gro.py \
  --infile multi_ethanol_data.lammps \
  --molecule ETHANOL \
  --system POLYMER \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH

Second Example

Mixed system: 1 aspirin (21 atoms), 2 benzene residues (12 atoms each), 5 ethanol residues (9 atoms each).

python lammps_to_gro.py \
  --infile mixed_data.lammps \
  --molecule MIXED \
  --system SIMULATION \
  --residue-sizes 21 12 9 \
  --residue-counts 1 2 5 \
  --residue-names ASP BEN ETH

Third Example

python lammps_to_gro.py \
  --infile mixed_abc_data_replicate.lammps \
  --molecule COMPLEX \
  --system SIMULATION \
  --residue-sizes 21 12 9 \
  --residue-counts 1 1 1 \
  --residue-names ASP BEN ETH \
  --repeat

Run GROMACS

# prepare
gmx grompp -f md.mdp -c system.gro -p topol.top -o md.tpr -maxwarn 4
# run
gmx mdrun -v -deffnm md
# analyze
gmx energy -f md.edr -o energy.xvg

Additional CLI examples:

# minimal conversion (multi_ethanol_data.lammps)
python lammps_to_gro.py \
  --infile multi_ethanol_data.lammps \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH

# custom output filenames (mixed_data.lammps)
python lammps_to_gro.py \
  --infile mixed_data.lammps \
  --gro-out coords.gro \
  --forcefield-out ff.itp \
  --topol-out system.top \
  --molecule MIXED \
  --residue-sizes 21 12 9 \
  --residue-counts 1 2 5 \
  --residue-names ASP BEN ETH

# single residue type system (multi_ethanol_data.lammps)
python lammps_to_gro.py \
  --infile multi_ethanol_data.lammps \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH

# with explicit GROMACS function types (all defaults shown)
python lammps_to_gro.py \
  --infile multi_ethanol_data.lammps \
  --molecule ETHANOL \
  --system POLYMER \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH \
  --bond-funct 1 \
  --angle-funct 1 \
  --dihedral-funct 1 \
  --improper-funct 4 \
  --pairs-funct 1

# OPLS dihedrals with RB conversion (for OPLS-style dihedral coeffs: type k1 k2 k3 k4)
python lammps_to_gro.py \
  --infile data.benzene \
  --molecule benzene \
  --system benzene_system \
  --residue-sizes 12 \
  --residue-counts 1 \
  --residue-names BEN \
  --comb-rule opls \
  --dihedral-funct 3 \
  --improper-funct 4

# multiple identical residue blocks (mixed_data.lammps)
python lammps_to_gro.py \
  --infile mixed_data.lammps \
  --residue-sizes 21 12 9 \
  --residue-counts 1 2 5 \
  --residue-names ASP BEN ETH

# periodic polymer with repeat pattern (mixed_abc_data_replicate.lammps)
python lammps_to_gro.py \
  --infile mixed_abc_data_replicate.lammps \
  --residue-sizes 21 12 9 \
  --residue-counts 1 1 1 \
  --residue-names ASP BEN ETH \
  --repeat \
  --molecule COMPLEX

# mixed residue types with repeat (mixed_abc_data_replicate.lammps)
python lammps_to_gro.py \
  --infile mixed_abc_data_replicate.lammps \
  --residue-sizes 21 12 9 \
  --residue-counts 1 1 1 \
  --residue-names ASP BEN ETH \
  --repeat \
  --system COMPLEX

# using absolute paths (mixed_data.lammps)
python lammps_to_gro.py \
  --infile /Users/arunsrikanthsridhar/Downloads/lammps_to_gro/mixed_data.lammps \
  --molecule MIXED \
  --system SIMULATION \
  --residue-sizes 21 12 9 \
  --residue-counts 1 2 5 \
  --residue-names ASP BEN ETH \
  --gro-out /home/user/gromacs/coords.gro

# quiet mode (multi_ethanol_data.lammps)
python lammps_to_gro.py \
  --infile multi_ethanol_data.lammps \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH \
  --quiet

Python API Usage

from lammps_to_gro import build_gromacs_itps_and_gro_from_lammps

# First example: multi_ethanol_data.lammps
build_gromacs_itps_and_gro_from_lammps(
    infile="multi_ethanol_data.lammps",
    molecule_name="ETHANOL",
    system_name="POLYMER",
    residue_block_sizes=(9,),
    residue_block_counts=(10,),
    residue_block_names=("ETH",),
)

Example with repeat pattern:

from lammps_to_gro import build_gromacs_itps_and_gro_from_lammps

# Third example: mixed_abc_data_replicate.lammps with repeat
build_gromacs_itps_and_gro_from_lammps(
    infile="mixed_abc_data_replicate.lammps",
    molecule_name="COMPLEX",
    system_name="SIMULATION",
    residue_block_sizes=(21, 12, 9),
    residue_block_counts=(1, 1, 1),
    residue_block_names=("ASP", "BEN", "ETH"),
    repeat_residue_blocks=True,
)

Additional API examples:

# custom output paths (mixed_data.lammps)
build_gromacs_itps_and_gro_from_lammps(
    infile="mixed_data.lammps",
    molecule_name="MIXED",
    system_name="SIMULATION",
    residue_block_sizes=(21, 12, 9),
    residue_block_counts=(1, 2, 5),
    residue_block_names=("ASP", "BEN", "ETH"),
    gro_outfile="/path/to/output/coordinates.gro",
    forcefield_outfile="/path/to/output/forcefield.itp",
    itp_outfile="/path/to/output/molecule.itp",
    topol_outfile="/path/to/output/topology.top",
)

# advanced conversion with custom function types and pairs (mixed_data.lammps)
build_gromacs_itps_and_gro_from_lammps(
    infile="mixed_data.lammps",
    molecule_name="MIXED",
    system_name="SIMULATION",
    residue_block_sizes=(21, 12, 9),
    residue_block_counts=(1, 2, 5),
    residue_block_names=("ASP", "BEN", "ETH"),
    bond_funct=2,
    angle_funct=2,
    dihedral_funct=9,
    pairs_method="networkx",
)

# batch processing multiple systems
systems = [
    ("multi_ethanol_data.lammps", "ETHANOL", "POLYMER"),
    ("mixed_data.lammps", "MIXED", "SIMULATION"),
    ("mixed_abc_data_replicate.lammps", "COMPLEX", "SIMULATION"),
]

for data_file, mol_name, sys_name in systems:
    if data_file == "multi_ethanol_data.lammps":
        residue_sizes = (9,)
        residue_counts = (10,)
        residue_names = ("ETH",)
    elif data_file == "mixed_data.lammps":
        residue_sizes = (21, 12, 9)
        residue_counts = (1, 2, 5)
        residue_names = ("ASP", "BEN", "ETH")
    else:  # mixed_abc_data_replicate.lammps
        residue_sizes = (21, 12, 9)
        residue_counts = (1, 1, 1)
        residue_names = ("ASP", "BEN", "ETH")
    
    build_gromacs_itps_and_gro_from_lammps(
        infile=data_file,
        molecule_name=mol_name,
        system_name=sys_name,
        residue_block_sizes=residue_sizes,
        residue_block_counts=residue_counts,
        residue_block_names=residue_names,
    )
    print(f"Converted {data_file} to GROMACS format")

# batch processing with repeat patterns
polymers = [
    ("mixed_abc_data_replicate.lammps", "COMPLEX", "SIMULATION_A"),
    ("mixed_abc_data_replicate.lammps", "COMPLEX", "SIMULATION_B"),
]

for data_file, mol_name, sys_name in polymers:
    build_gromacs_itps_and_gro_from_lammps(
        infile=data_file,
        molecule_name=mol_name,
        system_name=sys_name,
        residue_block_sizes=(21, 12, 9),
        residue_block_counts=(1, 1, 1),
        residue_block_names=("ASP", "BEN", "ETH"),
        repeat_residue_blocks=True,
    )
    print(f"Converted {data_file} with repeat pattern")

Validation

The following validation uses the multi-ethanol example (multi_ethanol_data.lammps) from Example 1 above.

Energy comparison between LAMMPS (real units, kcal/mol) and GROMACS (kJ/mol converted to kcal/mol) for multi_ethanol_data.lammps.

Commands used:

# Convert LAMMPS data to GROMACS topology/coordinates
python lammps_to_gro.py \
  --infile multi_ethanol_data.lammps \
  --molecule ETHANOL \
  --system POLYMER \
  --residue-sizes 9 \
  --residue-counts 10 \
  --residue-names ETH

# LAMMPS single-point energy (input: example_lammps_input.lmp)
lmp < example_lammps_input.lmp

# GROMACS single-point energy decomposition
gmx grompp -f md.mdp -c system.gro -p topol.top -o md.tpr -maxwarn 5
gmx mdrun -v -deffnm md
echo "1 2 3 4 5 6 7 8" | gmx energy -f md.edr -o energy.xvg
Interaction LAMMPS (kcal/mol) GROMACS (kJ/mol) GROMACS (kcal/mol) Match
Bond 1.113 4.656 1.113
Angle 2.475 10.356 2.475
Dihedral 0.015 0.064 0.015
LJ -2.656 -11.111 -2.656
Coulomb -55.164 -230.80 -55.16
Total -54.22 -226.84 -54.22

Note: This comparison assumes pair_modify mix arithmetic in LAMMPS (GROMACS comb-rule 2) and matching 9 Å cutoffs in both example_lammps_input.lmp and md.mdp. Small differences are expected due to numerical precision and floating-point handling; the total potential energy matches within ~0.1%.


OPLS/Ryckaert-Bellemans Validation

Energy comparison for data.benzene with OPLS dihedrals converted to Ryckaert-Bellemans (--dihedral-funct 3, --comb-rule opls; see additional CLI examples).

Commands used:

# Convert LAMMPS data to GROMACS topology/coordinates
python lammps_to_gro.py \
  --infile data.benzene \
  --molecule benzene \
  --system benzene_system \
  --residue-sizes 12 \
  --residue-counts 1 \
  --residue-names BEN \
  --comb-rule opls \
  --dihedral-funct 3 \
  --improper-funct 4

# Keep generated system.gro for GROMACS validation.
# LAMMPS single-point energy (input: in.benzene, special_bonds ... coul 0.5)
lmp < in.benzene

# GROMACS single-point energy decomposition
gmx grompp -f md.mdp -c system.gro -p topol.top -o md.tpr -maxwarn 5
gmx mdrun -v -deffnm md
echo "1 2 3 4 5 6 7 8 9" | gmx energy -f md.edr -o energy_benzene_opls_exact.xvg
Interaction LAMMPS (kcal/mol) GROMACS (kJ/mol) GROMACS (kcal/mol) Match
Bond 0.2255 0.9753 0.2331 minor drift
Angle 0.001318 0.005856 0.001400 minor drift
RB Dihedral 0.0003246 0.0009438 0.0002256 minor drift
Improper 1.61e-05 4.86e-05 1.16e-05 minor drift
LJ (14+SR) 5.3283 22.3035 5.3307
Coulomb (14+SR) 2.7207 11.3818 2.7203
Total 8.2762 34.6675 8.2857 ≈ 0.12%

Note: For the current repo state, the benzene validation reproduces the nonbonded terms and total closely, but the small bonded components drift slightly. The likely cause is coordinate rounding in the generated system.gro file, which stores positions at 4 decimal places in nm. In practice, the total single-point energy remains close, while the tiny bonded decomposition terms are more sensitive to that precision loss.

Note: This comparison assumes special_bonds ... coul 0.5 in LAMMPS (and --comb-rule opls in conversion). Small differences are expected due to coordinate precision and floating-point handling; the total potential energy matches within ~0.2%.

OPLS → RB conversion formulas used:

C0 = K2 + (K1 + K3)/2
C1 = (-K1 + 3*K3)/2
C2 = -K2 + 4*K4
C3 = -2*K3
C4 = -4*K4
C5 = 0

Where K1-K4 are the LAMMPS OPLS coefficients (converted to kJ/mol).

Troubleshooting

Charge neutrality error — ensure charges sum to zero.
Missing required sections — add any absent Masses/Atoms/Bonds/Angles/Dihedrals and all * Coeffs.
Missing coefficient coverage — provide coeffs for every type referenced.
Atom ID validation error — ensure Atoms IDs are contiguous and 1-based (1..N) with no gaps.
Residue assignment mismatch — sizes, counts, and names must have matching lengths; expanded sizes must match the atom count in non-repeat mode; repeat mode requires a whole number of full pattern cycles.
CLI argument errors — re-run with --help.
File not found — verify --infile path.

Exit Codes Reference

Exit Meaning Common cause
0 Success Normal completion
1 Unexpected error Internal exception
2 File not found Missing input
3 Invalid input CLI/format/validation error
4 Conversion failed Runtime errors; missing sections

Open Source

MIT-licensed project. Repo: https://github.com/askforarun/lammps_to_gro
Contributions welcome via issues/PRs.

Contributing

We welcome contributions! Here's how you can help:

  • Report Bugs: Open an issue with detailed description and error messages
  • Request Features: Suggest enhancements or new force field support
  • Submit Pull Requests:
    • Fork the repository
    • Create a feature branch
    • Make your changes with tests
    • Submit a pull request
  • Improve Documentation: Help us improve the README and code comments
  • Share Your Use Cases: Let us know how you're using the tool in your research

Development Setup

git clone https://github.com/askforarun/lammps_to_gro.git
cd lammps_to_gro
# Test with example files
python lammps_to_gro.py --infile multi_ethanol_data.lammps --residue-sizes 9 --residue-counts 10 --residue-names ETH
# Run regression tests
python3 -m unittest discover -s tests -v

Citation

BibTeX

@software{lammps_to_gro,
  title = {lammps_to_gro},
  author = {Sridhar, Arun Srikanth},
  type = {software},
  doi = {10.5281/zenodo.18329896},
  url = {https://github.com/askforarun/lammps_to_gro}
}

Plain text — Sridhar, Arun Srikanth. lammps_to_gro. Zenodo, 2024. doi:10.5281/zenodo.18329896


License

MIT License (see LICENSE).

About

A python script/package to convert LAMMPS data files to GROMACS topology and coordinate files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages