Installation
This guide explains how to set up CASPULE and compile LAMMPS 3 Mar 2020
with the custom bond/create/random fix used to define intersticker
crosslinks, together with the Python tools used for data analysis.
Recommended setup using the automated installer script
install_caspule_requirements.sh
Note
The bond/create/random fix is not part of vanilla LAMMPS 3 Mar 2020.
CASPULE patches it in from the
pdebuyl/lammps fbc_random branch.
Quick start (macOS + Linux)
The easiest way to install the CASPULE requirements is to download and run the installer script from the CASPULE GitHub repository.
Before running the script, install Conda if it is not already available on your machine. See the official Conda installation guide here: Installing Conda.
Then download and run the installer:
curl -O https://raw.githubusercontent.com/caspule/caspule/main/install_caspule_requirements.sh
bash install_caspule_requirements.sh
After the script finishes, the new Conda environment will be named caspule and the will be able to run examples from the CASPULE github.
What the installer does
The script performs the following steps automatically:
Creates a new Conda environment named
caspuleInstalls Packmol
Installs Python 3.11 and the Python analysis packages used by CASPULE:
numpyscipypandasmatplotlibnetworkxtqdmnumbah5py
Installs Moltemplate with
pipInstalls the Conda-forge build tools needed for LAMMPS on macOS:
cxx-compilercmake=3.31.6openmpi
Creates a local
patch_filesdirectoryDownloads the patched files:
fix_bond_create_random.cppfix_bond_create_random.h
Downloads and unpacks LAMMPS 3 Mar 2020
Copies the patched files into
src/MC/Configures and compiles LAMMPS with the required packages enabled:
MCMOLECULEUSER-MISCUSER-COLVARS
Verifies that the custom fix was compiled successfully by checking for
bond/create/randomin./lmp -h
Requirements
The installer requires:
Conda to be installed and available on your
$PATHA standard shell environment with
bash,curl,tar, andsysctlavailable
No additional manual downloads are required for the macOS script workflow.
Sanity check
At the end of the build, the installer checks that the new fix is available by running:
./lmp -h | grep bond/create/random
Expected output:
bond/create/random Create bonds (random partner selection) [MC]
Troubleshooting
“Conda: command not found” Install Conda first and make sure it is on your
$PATH.“Moltemplate not found” Confirm that
pip install moltemplatecompleted successfully inside the CASPULE Conda environment.“Package MC is not enabled” Re-run CMake with
-DPKG_MC=onand rebuild.“bond/create/random” not found in ``./lmp -h`` Confirm that the two patched files were copied into
src/MC/before the build and that LAMMPS was rebuilt afterward.“New bond exceeded bonds per atom …” Raise
extra bond per atomcount in your.datafile, and updateextra/special/per/atomin theread_datasection of your input script.