- Clone the repository:
git clone https://github.com/Eclipter/base2backbone.git
cd base2backbone- Install Conda. See Conda Installation
- Download PyNAMod:
git clone https://github.com/intbio/PyNAMod.git pynamod
cd pynamod- Create a new environment with PyNAMod dependencies:
/opt/miniconda/bin/conda env create \
--name base2backbone \
--file pynamod/environment.yml- Install the project dependencies:
/opt/miniconda/bin/conda env update \
--name base2backbone \
--file environment.yml
/opt/miniconda/bin/conda run \
-n base2backbone \
pip install \
-e ./pynamod \
-e .[test] \
--no-deps- Make sure to set up the environment. See Setup
- Train and test the model:
python scripts/train.py- Analyze the results if necessary
python scripts/analyze.py- Export the best model to ONNX:
python scripts/export.py --run-id torsions/1/baseline- Make sure to set up the environment. See Setup
- Predict the backbone (alternatives are listed below):
-
CLI (for a single structure):
base2backbone \ --input input.pdb \ --output output.pdb
Input format may be PDB or mmCIF. Output may be PDB or mmCIF independently. Both are inferred from the filename extension.
By default 5'-terminal phosphate atoms (
P,OP1,OP2) are not predicted. Pass--generate-5-prime-phosphateto include them. -
CLI (for a trajectory):
-
Single multi-model file output:
base2backbone \ --input topology.pdb \ --trajectory traj.xtc \ --output output_traj.pdb
Input format may be PDB or mmCIF. Output may be PDB or mmCIF independently. Both are inferred from the filename extension.
-
Example (one PDB per frame):
base2backbone \ --input topology.pdb \ --trajectory traj.xtc \ --output-dir frames \ --output-format .cif
Input format may be PDB or mmCIF. Output may be PDB or mmCIF independently. Output format is set by the
--output-formatargument.
-
-
Python API: The library always returns an
MDAnalysis.Universe.import MDAnalysis as mda from base2backbone import predict_backbone, predict_backbone_trajectory single = predict_backbone('input.cif') traj_in = mda.Universe('topology.pdb', 'traj.xtc') traj_out = predict_backbone_trajectory(traj_in)