Skip to content

Desperadus/StructOpt

Repository files navigation

StructOpt

structopt is a Python package and CLI to quickly clean and optimize protein structures from predicted or experimental sources (.pdb, .cif, .mmcif).

It combines:

  • PDBFixer for structure cleanup.
  • OpenMM minimization (implicit solvent by default).
  • Optional short MD refinement.
  • Optional GAFF small-molecule handling (for ligands like LIG1).

Install

Install from PyPI:

pip install structopt

If you want ligand/GAFF support, also install openmmforcefields in the same environment. Depending on your platform, it may be easier to use the provided mamba environment for that setup.

Install From Source

Sync the project environment with uv:

uv sync

To include dev tools:

uv sync --group dev

For GAFF ligand support from source, install openmmforcefields, rdkit, and AmberTools in the active environment. If your package index cannot resolve those, use mamba:

mamba env create -f environment.mamba.yml
mamba activate structopt
pip install -e .

CLI

Run the command below to see all the possible options you can have for your optimisation

uv run structopt optimize --help

Example:

uv run structopt optimize tests/data/geraniol_model_0.cif

Useful options:

uv run structopt optimize tests/data/geraniol_model_0.cif \
  --mode both \
  --ph 7.2 \
  --ligand-name LIG1 \
  --npt-steps 50000 \
  --temperature 300 \
  --pressure 1.0

If GAFF ligand parametrization cannot be inferred from the structure alone, provide an SDF:

uv run structopt optimize tests/data/geraniol_model_0.cif \
  --ligand-name LIG1 \
  --ligand-sdf path/to/ligand.sdf

Notes

  • Default cleanup adds hydrogens at pH 7.2.
  • Minimization uses explicit by default or possibly implicit solvent (gbn2 or obc2).
  • MD refinement uses short explicit-solvent NPT by default.
  • For GAFF workflows, install AmberTools in your environment.

About

Python package to help one quickly optimize structures from predictions tools like AlphaFold using OpenMM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages