Troubleshooting¶
Solutions for common errors when building systems, running simulations, or installing PRISM.
Build Errors¶
GROMACS Not Found¶
Cause: GROMACS is not installed, or its environment is not sourced in the current shell.
Solution:
# Source the GROMACS environment
source /path/to/gromacs/bin/GMXRC
# Verify it works
gmx --version
# Add to your shell profile for permanent access
echo 'source /path/to/gromacs/bin/GMXRC' >> ~/.bashrc
If GROMACS is installed but PRISM still cannot find it, specify the path explicitly:
Force Field Not Found¶
Cause: The protein force field you requested is not installed in your GROMACS data directory.
Solution:
# List force fields available in your GROMACS installation
prism --list-forcefields
# Install additional force fields (copies PRISM-bundled FFs to GROMACS)
prism --install-forcefields
# Or use a force field that GROMACS ships with
prism protein.pdb ligand.mol2 -o output --forcefield amber99sb
Ligand Parameterization Failed¶
Cause: The chosen force field generator could not assign parameters to your ligand. This usually happens with unusual functional groups or incorrect input geometry.
Solution:
-
Check your ligand file -- ensure it has correct bond orders, 3D coordinates, and explicit hydrogens.
-
Try a different force field:
-
Verify ligand format: GAFF/GAFF2 require MOL2 with Tripos atom types. OpenFF works best with SDF.
-
Check for missing hydrogens:
Charge Assignment Failed¶
Cause: The semi-empirical charge calculation did not converge, often due to unusual chemistry, radicals, or very large ligands.
Solution:
# Specify the net charge explicitly
prism protein.pdb ligand.mol2 -o output --ligand-charge -1
# Or use Gaussian RESP charges for better accuracy
prism protein.pdb ligand.mol2 -o output --gaussian hf --nproc 8 --mem 4GB
If antechamber keeps failing, switch to OpenFF which uses a different charge method:
Ion Addition Failed¶
Cause: The system does not contain enough water molecules, or GROMACS cannot identify the solvent group automatically.
Solution:
-
Increase the box size so more water is added:
-
If the issue persists, check that solvation completed successfully by inspecting the
.grofile for SOL residues.
pdb2gmx Fails with Residue Errors¶
Cause: The protein PDB contains non-standard residues (modified amino acids, ligands left in the file, or incorrect residue names).
Solution:
-
Remove non-protein atoms before running PRISM:
-
For selenomethionine, rename MSE to MET:
-
For other non-standard residues, use PDBFixer first:
from pdbfixer import PDBFixer from openmm.app import PDBFile fixer = PDBFixer(filename='protein.pdb') fixer.findMissingResidues() fixer.findMissingAtoms() fixer.addMissingAtoms() fixer.addMissingHydrogens(7.0) with open('protein_fixed.pdb', 'w') as f: PDBFile.writeFile(fixer.topology, fixer.positions, f)
Simulation Errors¶
LINCS Warnings¶
Cause: A bond constraint was violated. Usually caused by bad initial contacts, too large a time step, or an unstable starting structure.
Solution:
-
Run longer energy minimization:
-
Use a smaller time step:
-
Increase box size to reduce initial clashes:
-
Check your ligand geometry -- a ligand with distorted bond lengths will cause LINCS failures immediately. Re-optimize with RDKit or Avogadro before using.
System Blew Up¶
Cause: Atoms moved too far in a single step, causing the simulation to become numerically unstable.
Solution:
- Re-run energy minimization with stricter tolerance
- Extend equilibration time:
- Visualize the starting structure to check for overlapping atoms or ligand placed outside the protein
- Reduce temperature coupling speed by editing
nvt.mdp: settau_t = 1.0
GPU Errors¶
Cause: GROMACS was not compiled with GPU support, or CUDA drivers are missing.
Solution:
# Check GPU availability
nvidia-smi
# Check GROMACS GPU support
gmx mdrun -version | grep GPU
# If no GPU support, edit localrun.sh to remove GPU flags:
# Remove: -nb gpu -bonded gpu -pme gpu -gpu_id 0
For CPU-only runs, no changes are needed to PRISM -- just edit the generated localrun.sh script.
Out of Memory¶
Cause: The system is too large for available RAM, often during parameterization of very large ligands or very large solvated systems.
Solution:
- Reduce the box size:
--box-distance 1.0 - Use dodecahedron box shape (fewer water molecules):
--box-shape dodecahedron - Reduce the number of OpenMP threads in
localrun.sh:-ntomp 4 - On a cluster, request more memory:
#SBATCH --mem=64GB
Installation Errors¶
ImportError: No module named 'prism'¶
Cause: PRISM is not installed in the active Python environment.
Solution:
# Ensure you are in the correct conda environment
conda activate prism
# Install PRISM in development mode
cd /path/to/PRISM
pip install -e .
# Verify
python -c "import prism; print('OK')"
PDBFixer Installation Fails¶
Cause: PDBFixer depends on OpenMM, which requires conda-forge.
Solution:
ACPYPE Not Found¶
Cause: ACPYPE is required for GAFF/GAFF2 but is not installed.
Solution:
CUDA Version Mismatch¶
Cause: The GROMACS binary was compiled against a different CUDA version than what your GPU driver provides.
Solution:
- Update your GPU driver to match the CUDA version GROMACS expects
- Or recompile GROMACS with the CUDA version your driver supports:
Advanced Errors¶
PMF: Ligand Pulls Through Protein¶
Cause: The pulling direction passes through the protein body instead of pulling the ligand out of the binding pocket.
Solution:
Use the --pull-vector flag to specify two atom indices that define the correct unbinding direction (a protein atom near the pocket entrance and a ligand atom):
If you are unsure which atoms to use, PRISM's alignment module (used by default with --pmf) automatically selects an optimal pulling direction using Metropolis-Hastings sampling.
PMF: WHAM Does Not Converge¶
Cause: Insufficient overlap between adjacent umbrella sampling windows.
Solution:
-
Decrease the window spacing:
-
Increase the sampling time per window:
-
Check histogram overlap with
gmx wham -hist
MM/PBSA: gmx_MMPBSA Errors¶
Cause: Topology conversion or trajectory format issues.
Solution:
-
Ensure
gmx_MMPBSAis installed: -
Use the
--gmx2amberflag to handle topology conversion: -
If using a specific trajectory segment:
REST2: Replica Exchange Rate Too Low¶
Cause: The temperature spacing between replicas is too large, causing poor exchange acceptance.
Solution:
-
Increase the number of replicas:
-
Narrow the temperature range:
General Tips¶
-
Read the full error message. PRISM prints detailed error messages with suggested fixes -- read them before searching online.
-
Check file paths. Most "file not found" errors are caused by running PRISM from the wrong directory.
-
Try
--overwrite. If a previous run left partial output, use-fto force a clean rebuild: -
Inspect intermediate files. Look at
protein_clean.pdband the ligand.itpto catch issues early. -
Use
--export-configto see the exact parameters PRISM will use: