TopFor is a command-line tool for generating AMBER parameters for non-standard amino acids (NSAA). It automates capping, charge calculation, and parameter file creation for use with AMBER force fields.
- Single-file mode: Process one MOL2 file at a time
- Batch mode: Process multiple MOL2 files via a text file list
- Automated pipeline: Capping, Antechamber, TLeap, PREPGEN, and PARMCHK2 steps are chained automatically
- Operating System: Linux, macOS, or Windows with WSL/Git Bash
- AMBER Tools:
antechamber,tleap,prepgen,parmchk2installed and in your PATH - Conda: Miniforge or Anaconda installed
git clone git@github.com:Heshine-G/TopFor.git
cd TopForconda create -n paramgen python=3.10 numpy pandas rdkit pymol-open-source ambertools -c conda-forge
conda activate paramgenchmod +x topforecho 'export PATH="$PATH:$(pwd)"' >> ~/.bashrc
source ~/.bashrcNote: If you clone elsewhere, replace
$(pwd)with the absolute path.
topfor -i myresidue.mol2- Create a text file (e.g.,
list.txt) with one.mol2path per line - Run:
topfor -b list.txt-i,--input→ Path to a single.mol2file-b,--batch→ Glob pattern or.txtfile containing.mol2paths
For each input file NAME.mol2, the tool creates a directory NAME/ containing:
NAME.ac,NAME.mol2→ Charged structuresNAME.lib→ TLeap libraryNAME.prepin→ PREPGEN inputNAME.mc→ MC fileNAME.frcmod,NAME_GAFF.frcmod,NAME_FF14SB.frcmod→ Parameter modification files
# Single file
topfor -i AIB.mol2
# Batch via list
echo "AIB.mol2" > list.txt
echo "FGA.mol2" >> list.txt
topfor -b list.txt-
bash: topfor: command not found
Ensure:chmod +x topfor
and your repo folder is added to PATH.
-
CRLF errors
Convert script to LF line endings:dos2unix topfor
Or in VS Code: click the CRLF indicator (bottom-right) → select LF