Tools Module

Command-line interface for HyresBuilder / iConRNA utilities.

Provides Typer-based CLI commands for converting CHARMM structure files (PSF + PDB) to GROMACS-compatible topology and coordinate files (.top / .gro) using OpenMM and ParmEd.

Commands

psf2top

Convert a CHARMM PSF + PDB pair to a GROMACS .top and .gro file. Loads built-in RNA and Protein force-field parameters, builds an OpenMM system, and serialises the result via ParmEd.

psftop

Equivalent to psf2top with abbreviated option names. Retained for backwards compatibility.

Usage

Run any command with --help for a full option listing:

python cli.py psf2top --help
python cli.py psftop  --help
SciKit.tools.psf2top(pdb=<typer.models.OptionInfo object>, psf=<typer.models.OptionInfo object>, outtop=<typer.models.OptionInfo object>, outgro=<typer.models.OptionInfo object>, box=<typer.models.OptionInfo object>)[source]

Convert a CHARMM PSF + PDB pair to GROMACS topology and coordinate files.

Loads the built-in HyresBuilder RNA and Protein force-field parameters, constructs a periodic OpenMM system with CutoffPeriodic non-bonded interactions and H-bond constraints, then uses ParmEd to serialise the result to a GROMACS .top topology and .gro coordinate file.

Parameters:
  • pdb (str) – Path to the input PDB file containing atomic coordinates. Default: 'conf.pdb'.

  • psf (str) – Path to the input CHARMM PSF file containing bonded topology. Default: 'conf.psf'.

  • outtop (str) – Path for the output GROMACS topology file (.top). Default: 'conf.top'.

  • outgro (str) – Path for the output GROMACS coordinate file (.gro). Default: 'conf.gro'.

  • box (float) – Side length of the cubic periodic simulation box in Angstroms. Default: 100.0.

Return type:

None

Notes

  • Non-bonded method: CutoffPeriodic.

  • Constraints: HBonds (bonds involving hydrogen are constrained).

  • Force-field files are resolved automatically via HyresBuilder.utils.load_ff() for both 'RNA' and 'Protein' residue types.

Examples

python cli.py psf2top \
    --pdb input.pdb \
    --psf input.psf \
    --outtop system.top \
    --outgro system.gro \
    --box 120.0
SciKit.tools.psftop(pdb=<typer.models.OptionInfo object>, psf=<typer.models.OptionInfo object>, top=<typer.models.OptionInfo object>, gro=<typer.models.OptionInfo object>, box=<typer.models.OptionInfo object>)[source]

Convert a CHARMM PSF + PDB pair to GROMACS topology and coordinate files.

Functionally identical to psf2top(); retained for backwards compatibility with scripts that use the shorter psftop command name. New workflows should prefer psf2top(), which uses unambiguous option names (--outtop / --outgro) to avoid confusion with the input --psf option.

Parameters:
  • pdb (str) – Path to the input PDB file containing atomic coordinates. Default: 'conf.pdb'.

  • psf (str) – Path to the input CHARMM PSF file containing bonded topology. Default: 'conf.psf'.

  • top (str) – Path for the output GROMACS topology file (.top). Default: 'conf.top'.

  • gro (str) – Path for the output GROMACS coordinate file (.gro). Default: 'conf.gro'.

  • box (float) – Side length of the cubic periodic simulation box in Angstroms. Default: 100.0.

Return type:

None

Notes

  • Non-bonded method: CutoffPeriodic.

  • Constraints: HBonds (bonds involving hydrogen are constrained).

  • Force-field files are resolved automatically via HyresBuilder.utils.load_ff() for both 'RNA' and 'Protein' residue types.

Examples

python cli.py psftop \
    --pdb input.pdb \
    --psf input.psf \
    --top system.top \
    --gro system.gro \
    --box 120.0