### Successful build output example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Example output indicating a successful compilation of the gmx executable. ```text [100%] Linking CXX executable ../../bin/gmx [100%] Built target gmx ``` -------------------------------- ### Example output of verification command Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Example output from the verification command, showing the executable path and available options, including '-ldhis'. ```text :-) GROMACS - gmx pdb2gmx, 2024-dev-20240108-249226c0e2-local (-:) Executable: /home/ebriand/Projects/gromacs_juelich/cmake-build-relwithdebinfo_localsettings/bin/gmx Data prefix: /home/ebriand/Projects/gromacs_juelich (source tree) Working dir: /home/ebriand/Projects/__CPH_Runs/SimpleLambdadyn/structure_qihi/single_glu_qi Command line: gmx pdb2gmx -h [-[no]ldglu] [-[no]ldhis] [-[no]ldasp] [-[no]ldlys] [-[no]ldtyr] GROMACS reminds you: "Life in the streets is not easy" (Marky Mark) -[no]ldhis (no) ``` -------------------------------- ### Create build directory Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Creates a separate directory for building the code and navigates into it. ```bash mkdir build cd build ``` -------------------------------- ### Set up alias for gmx Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Sets up an alias for the gmx executable, pointing to the installed constant pH build. ```bash alias gmx=/directory/where/gromacs-constantph-installed/bin/gmx ``` -------------------------------- ### Configure the build with CMake Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Configures the build process using CMake with specific options for FMM and constant pH. ```bash cmake -DCMAKE_BUILD_TYPE=Release \ -DGMX_BUILD_OWN_FFTW=ON \ -DGMX_GPU=CUDA \ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.1 \ -DGMX_SIMD=AUTO \ -DGMX_WITH_FMM=ON \ -DGMX_CONSTANTPH=ON \ $CPHSOURCEDIR ``` -------------------------------- ### Verify gmx binary installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Verifies that the correct gmx binary is in the PATH by checking its help output for the 'ldhis' option. ```bash gmx pdb2gmx -h | grep ldhis ``` -------------------------------- ### Clone the FMM repository Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Clones the FMM repository from MPCDF GitLab. ```bash git clone https://gitlab.mpcdf.mpg.de/grubmueller/fmm.git ``` -------------------------------- ### Switch to the constant pH simulation branch Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Switches the cloned repository to the stable branch for constant pH simulations. ```bash git checkout constant_ph_stable ``` -------------------------------- ### Example Runfile Configuration Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration A sample YAML configuration file for constant pH titration simulations, outlining various parameters for simulation control, input files, system setup, and launch settings. ```yaml --- runfileVersion: 3 runcontrol: replicaNumber: 7 lambdaEquilRunDuration: 0.1 structureEquilRunDuration: 1 productionRunDuration: 2 runDir: "/lys2/" inputFiles: templateDirectory: "template_c36m" inputPdb: "lysozyme.pdb" customLdpFile: "" genionMDPTemplate: "genion.mdp.template" emMDPTemplate: "em.mdp.template" lambdaEquilMDPTemplate: "lambdaequil_coupled.mdp.template" structureEquilMDPTemplate: "structureequil_coupled.mdp.template" productionMDPTemplate: "titration_coupled.mdp.template" indexFile: "" systemParameters: boxVector: 8.0 fmmDepth: 2 velgenSeedBaseValue: 84521 waterModel: "tip3p" prepfilesAdditionalCommands: - "ln -s /home/ebriand/Projects/__CPH_FF/charmm36m-lambdadyn.ff/" ffName: "charmm36m-lambdadyn" pdb2gmxAdditionalArguments: " -ignh -ldglu -ldhis -ldasp " sodiumName: "SOD" chlorideName: "CLA" keepawayGroup: "C-alpha" distResidueToBuffer: 3.0 distProteinToBuffer: 2.0 distBufferTolerance: 0.3 ionConcentration: 0.150 titration: phValues: [-1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0] mainRunBarrier: 6.0 nstlambdaout: 250 localGromacsLaunch: gromppThreads: 4 localGromacsBinary: "/home/ebriand/Projects/gromacs_publication_builds/stable/stable_v1/bin/gmx" clusterJobLaunch: jobPrefix: "LYZ_2" clusterLoginNode: "moa1" clusterGromacsGMXRC: "/home/ebriand/Projects/gromacs_publication_builds/stable/cluster/stable_v1/bin/GMXRC" ``` -------------------------------- ### Compile the gmx executable Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Compiles the gmx executable using make, utilizing 8 threads for the build process. ```bash make -j8 gmx ``` -------------------------------- ### Initial Setup (Generally not used) Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration This command is typically not used directly for the main simulation flow but might be part of initial setup or testing. ```bash python titrate_v3.py replica -r lyzozyme_1.yaml ``` -------------------------------- ### Lambda equilibration output example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Example output from lambda equilibration, showing lambda values and velocities for residues. ```text ; residue [ 4] lambda_p = -0.0319707729 velocity = -0.1973873526 ; lambda_t = -0.0541575402 velocity = 0.0518201627 ; residue [ 5] lambda_p = 0.0274856947 velocity = 0.1474107057 ; lambda_t = 0.6484327912 velocity = 0.0308893304 ; residue [ 6] lambda_p = -0.0059586708 velocity = -0.0520664826 ; lambda_t = 0.3720209897 velocity = -0.1076164022 ; residue [ 7] lambda_p = -0.0092997942 velocity = -0.0363448523 ; lambda_t = 0.0587233007 velocity = -0.1340652406 ; residue [ 8] lambda_p = 1.1058342457 velocity = -0.1004268229 ; lambda_t = 0.2853246629 velocity = -0.1654260606 ; residue [ 9] lambda_p = -0.0331853665 velocity = 0.2384097874 ; lambda_t = 0.1017527282 velocity = -0.0818591341 ; Writing buffer checkpoint: ; collective buffer lambda 0.0000000000 (v: 0.0000000000 F_(t-1) 0.0000000000) ; closing output file... ``` -------------------------------- ### Source GMXRC script Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Sources the GMXRC script to set up the environment for the GROMACS constant pH build. ```bash source /directory/where/gromacs-constantph-installed/bin/GMXRC ``` -------------------------------- ### TI and Calibration Example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/cph_parameters Example parameters for TI (Thermodynamic Integration) and calibration-related settings. ```properties constantph-ti-axis = GLUL0002 p BufWater0001 buffer constantph-ti-delta-lambda = 0.0 0.0 constantph-disabled-buffers = all constantph-ti-delay-steps = 0 ``` -------------------------------- ### Runfile Example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/titration_script A complete runfile example in YAML format with all required parameters for a titration simulation workflow. ```yaml --- runfileVersion: 3 runcontrol: replicaNumber: 7 lambdaEquilRunDuration: 0.1 structureEquilRunDuration: 1 productionRunDuration: 2 runDir: "/lys2/" inputFiles: templateDirectory: "template_c36m" inputPdb: "lyzozyme.pdb" customLdpFile: "" genionMDPTemplate: "genion.mdp.template" emMDPTemplate: "em.mdp.template" lambdaEquilMDPTemplate: "lambdaequil_coupled.mdp.template" structureEquilMDPTemplate: "structureequil_coupled.mdp.template" productionMDPTemplate: "titration_coupled.mdp.template" systemParameters: boxVector: 8.0 fmmDepth: 2 velgenSeedBaseValue: 84521 waterModel: "tip3p" prepfilesAdditionalCommands: - "ln -s /home/ebriand/Projects/__CPH_FF/charmm36m-lambdadyn.ff/" ffName: "charmm36m-lambdadyn" pdb2gmxAdditionalArguments: " -ignh -ldglu -ldhis -ldasp " sodiumName: "SOD" chlorideName: "CLA" keepawayGroup: "C-alpha" distResidueToBuffer: 3.0 distProteinToBuffer: 2.0 distBufferTolerance: 0.3 ionConcentration: 0.150 titration: phValues: [-1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0] mainRunBarrier: 6.0 nstlambdaout: 250 localGromacsLaunch: gromppThreads: 4 localGromacsBinary: "/home/ebriand/Projects/gromacs_publication_builds/stable/stable_v1/bin/gmx" clusterJobLaunch: jobPrefix: "LYZ_2" clusterLoginNode: "moa1" daysForProdRun: 4 gsubmitCmdLineAddon: " " clusterGromacsGMXRC: "/home/ebriand/Projects/gromacs_publication_builds/stable/cluster/stable_v1/bin/GMXRC" gsubmitBinary: "/home/ebriand/Projects/git-gromacs-gsubmit-build/bin/g_submit" ``` -------------------------------- ### spdlog Build and Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures, builds, and installs the spdlog library using CMake. ```dockerfile WORKDIR /universal_build/dependencies/spdlog-1.15.0/ RUN mkdir build WORKDIR /universal_build/dependencies/spdlog-1.15.0/build/ RUN /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DCMAKE_BUILD_TYPE=Release RUN make -j`nproc` RUN make install ``` -------------------------------- ### Lambda Equilibration Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to start the lambda equilibration step, allowing protonation states to adapt. ```bash python titrate_v3.py lambdaequil -r lyzozyme_1.yaml ``` -------------------------------- ### Boost Build and Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Builds and installs Boost libraries statically, including program_options and filesystem. ```dockerfile WORKDIR /universal_build/dependencies/boost_1_87_0 RUN mkdir build RUN ./bootstrap.sh --prefix=/universal_build/prefix/ --with-libraries=program_options,filesystem RUN ./b2 install --prefix=/universal_build/prefix/ --build-dir=/universal_build/dependencies/boost_1_87_0/staticbuild --with-program_options --with-filesystem toolset=gcc-11 link=static cxxflags="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " ``` -------------------------------- ### fmt Build and Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures, builds, and installs the fmt library using CMake. ```dockerfile WORKDIR /universal_build/dependencies/fmt-11.1.3/ RUN mkdir build WORKDIR /universal_build/dependencies/fmt-11.1.3/build/ RUN /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DCMAKE_BUILD_TYPE=Release RUN make -j`nproc` RUN make install ``` -------------------------------- ### FMM MDP Parameters Example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/fmm/fmm_parameters Example of FMM configuration in a GROMACS MDP file. ```mdp coulombtype = FMM ; Replace "PME" with FMM for coulombtype fmm-override-multipole-order = 8 ; For most cases: PME-equivalent accuracy fmm-override-tree-depth = ; Depends on the system size, see below ``` -------------------------------- ### lmfit Build and Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures, builds, and installs the lmfit library using CMake. ```dockerfile WORKDIR /universal_build/dependencies/lmfit/ RUN mkdir build WORKDIR /universal_build/dependencies/lmfit/build/ RUN /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DCMAKE_BUILD_TYPE=Release RUN make -j`nproc` RUN make install ``` -------------------------------- ### OpenBLAS Build and Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Builds and installs OpenBLAS with specific compiler flags and target architecture. ```dockerfile WORKDIR /universal_build/dependencies/OpenBLAS-0.3.29 RUN make -j`nproc` CC=`which gcc-11` CXX=`which g++-11` FC=`which gfortran-11` TARGET=HASWELL CFLAGS="-march=haswell -fPIC -static-libgcc" CXXFLAGS="-march=haswell -fPIC -static-libgcc -static-libstdc++" FCFLAGS="-march=haswell -fPIC -static-libgcc -static-libgfortran" PREFIX=/universal_build/prefix RUN make PREFIX=/universal_build/prefix install ``` -------------------------------- ### Verify installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph-postprocessing/analysis_tool Run the LambdaAnalysis tool without arguments to check if it's installed correctly. ```bash ./LambdaAnalysis ``` -------------------------------- ### Armadillo Build Directory Setup Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Sets up the build directory for the Armadillo library. ```dockerfile WORKDIR /universal_build/dependencies/armadillo-14.2.2/ RUN mkdir build WORKDIR /universal_build/dependencies/armadillo-14.2.2/build/ ``` -------------------------------- ### Microstate Titration Command Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph-postprocessing/analysis_tool Example command to run microstate titration analysis. ```bash ./LambdaAnalysis titration \ --runfile /home/user/titrations/a99_snase_fmm_2.yaml \ --microstate 1 \ --output microstate_a99_snase_fmm_2_MI.csv ``` -------------------------------- ### Build and Install Vc Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures and builds the Vc library with specific compiler flags and target architecture. ```dockerfile WORKDIR /universal_build/dependencies/Vc-1.4.5/ RUN mkdir build WORKDIR /universal_build/dependencies/Vc-1.4.5/build/ RUN /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DCMAKE_Fortran_FLAGS=" -march=broadwell -fPIC -static-libgcc -static-libgfortran " -DCMAKE_Fortran_COMPILER=/home/ebriand/local/gcc-11/bin/gfortran -DCORE=BROADWELL -DUSE_THREAD=OFF -DCMAKE_SYSTEM_PROCESSOR=broadwell -DBUILD_TESTING=OFF -DTARGET=BROADWELL -DCMAKE_BUILD_TYPE=Release -DTARGET_ARCHITECTURE="broadwell" -DCMAKE_BUILD_TYPE=Release RUN make -j`nproc` RUN make install ``` -------------------------------- ### Build and Install ensmallen Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures and builds the ensmallen library with static libraries enabled and OpenMP support. ```dockerfile WORKDIR /universal_build/dependencies/ensmallen-2.22.1 RUN mkdir build WORKDIR /universal_build/dependencies/ensmallen-2.22.1/build RUN /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DUSE_OPENMP=ON -DCMAKE_BUILD_TYPE=Release RUN make -j`nproc` RUN make install ``` -------------------------------- ### SLURM Example Implementation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/titration_script A Python function demonstrating a basic SLURM-based implementation using SSH for job submission. ```python def launchOnCluster(clusterOpts, repDirectory, tprname, jobname, runname, lambdaoutname, nonLambda=False, continueJob=False): # Replace template tokens in SLURM script slurm_jobfile = slurm_template.replace('$$$JOBNAME$$$', clusterOpts["jobPrefix"] + "_" + jobname) slurm_jobfile = slurm_jobfile.replace('$$$GMXSRC_CLUSTER_BUILD$$$', clusterOpts["clusterGromacsGMXRC"]) # ... additional replacements ... # Write job script and submit via SSH jobfilename = "jobfile_{:05d}.sh".format(random.randrange(50000)) with open(jobfilename, "w") as f: f.write(slurm_jobfile) command = "ssh {0}@{1} bash -l -c '\"cd {2}; sbatch {3} \"'".format( username, clusterOpts["clusterLoginNode"], repDirectory, jobfilename) os.system(command) ``` -------------------------------- ### File Preparation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to initialize the titration directory structure by copying template files. ```bash python titrate_v3.py prepfiles -r lyzozyme_1.yaml ``` -------------------------------- ### Set the source directory environment variable Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/install_guide Defines the environment variable CPHSOURCEDIR to point to the source code directory. ```bash export CPHSOURCEDIR=/directory/with/the/source/ ``` -------------------------------- ### Ion Placement and Energy Minimization (Cluster) Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to solvate systems, place ions, and perform energy minimization on a cluster. ```bash python titrate_v3.py replica_cluster -r lyzozyme_1.yaml ``` -------------------------------- ### CMake Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Downloads and installs CMake version 3.31.5. ```dockerfile WORKDIR /universal_build/ RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.5/cmake-3.31.5-linux-x86_64.sh RUN chmod +x cmake-3.31.5-linux-x86_64.sh RUN ./cmake-3.31.5-linux-x86_64.sh --skip-license --include-subdir --prefix=/universal_build/ ``` -------------------------------- ### Topology Preparation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to generate topology files and initial protein structure using pdb2gmx. ```bash python titrate_v3.py prereplica -r lyzozyme_1.yaml ``` -------------------------------- ### Create Simulation Directory Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to create the main simulation directory as specified by the `runDir` parameter in the runfile. ```bash mkdir lysozyme_1 ``` -------------------------------- ### Production Runs Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Commands for the production run step, similar to previous steps. ```bash python titrate_v3.py prod -r lyzozyme_1.yaml ``` ```bash python titrate_v3.py check_prod -r lyzozyme_1.yaml ``` ```bash python titrate_v3.py continue_prod -r lyzozyme_1.yaml ``` ```bash python titrate_v3.py restart_prod -r lyzozyme_1.yaml ``` -------------------------------- ### Restart Lambda Equilibration Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to restart lambda equilibration jobs if necessary. ```bash python titrate_v3.py restart_lambdaequil -r lyzozyme_1.yaml ``` -------------------------------- ### Example lambda_forms section Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/lambda_cph_topology An example of a [ lambda_forms ] section containing a site and forms definitions. ```gromacs_topology [ lambda_forms ] ; Contains autogenerated lambda form for CPH-MD. ; Protonable residue database comment: charmm36m_coupled ; Protonable residue database version: 1 #include "./charmm36m-lambdadyn.ff/cph_lambdasites_bonded.itp" #include "./charmm36m-lambdadyn.ff/cph_lambdasites_charge.itp" #include "./charmm36m-lambdadyn.ff/cph_lambdasites_lj.itp" #include "./charmm36m-lambdadyn.ff/cph_lambdasites_misc.itp" ; site form lambda_site GLUL_0007 lambda_form GLUL_0007 GLUL_0007_deprot lambda_form GLUL_0007 GLUL_0007_prot_1 lambda_form GLUL_0007 GLUL_0007_prot_2 ; site molname molnr idx_first idx_last site_from_continuous_atom_range GLUL_0007 Protein_chain_A 1 102 118 ; site form altq_set alt_q_from_alt_q_set GLUL_0007 GLUL_0007_deprot GLUL_deprot_qset alt_q_from_alt_q_set GLUL_0007 GLUL_0007_prot_1 GLUL_prot_1_qset alt_q_from_alt_q_set GLUL_0007 GLUL_0007_prot_2 GLUL_prot_2_qset ``` -------------------------------- ### Solvate the System Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Standard command to solvate the simulation system. ```bash gmx solvate -cs spc216.gro -cp box.gro -p topol.top -o solv.gro ``` -------------------------------- ### Check Replica Status Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to monitor the progress of replica simulations. ```bash python titrate_v3.py check_replica -r lyzozyme_1.yaml ``` -------------------------------- ### Restart Failed Replica Simulations (Local) Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to restart failed replica simulations on the local machine. ```bash # for local launch python titrate_v3.py restart_replica -r lyzozyme_1.yaml ``` -------------------------------- ### Continue Structure Equilibration Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to continue structure equilibration from the last checkpoint, useful for long simulations. ```bash python titrate_v3.py continue_structureequil -r lyzozyme_1.yaml ``` -------------------------------- ### Replica Number Example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/titration_script Example snippet showing the replicaNumber parameter within the runcontrol section. ```yaml runcontrol: replicaNumber: 7 ``` -------------------------------- ### Restart Failed Replica Simulations (Cluster) Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to restart failed replica simulations on a cluster. ```bash # Or alternatively, for cluster launch python titrate_v3.py restart_replica_cluster -r lyzozyme_1.yaml ``` -------------------------------- ### System Package Updates and Installation Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Updates package lists, upgrades existing packages, and installs essential build tools and libraries. ```dockerfile RUN sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list RUN apt-get update RUN apt-get -y upgrade RUN apt-get install -y build-essential RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata RUN apt-get install -y software-properties-common RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test RUN apt-get install -y curl git htop man unzip nano wget g++-11 gcc-11 gfortran-11 zlib1g-dev patchelf ``` -------------------------------- ### Example output from equil_lambda.dat (comments) Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto The initial lines of the output file contain comments summarizing the simulation settings and internal diagnostics. ```text ; Propagator: ProtTautPropagator ; num residue: 10 | num buffer 10 ; dt_ 0.00200 | mass 60.00 ; target temp 300.0 ; Using unified output lambda as protonation state: 0 ; Charge constraint: SHAKE ; Interpolation Force Manager: ProtTaut Dynamics interpolation manager ; Interpolation Force Manager: Coupled residue-buffer mode = 1 ; Buffer Manager: 10 buffers total, 10 enabled, 0 directly controlled, 0 disabled ; Collective lambda mass 10.000 max charge 13.0000 min charge -3.0000 ; Coupled buffer formulation: 1 ; Collective buffer manager: ProtTaut buffer collective buffer manager ; Bias: prot-taut double well - PFC? 1 ; fixed pH: 7.40 ``` -------------------------------- ### Syntax Verification Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to check the runfile configuration for syntax errors. ```bash python titrate_v3.py check_runfile -r lyzozyme_1.yaml ``` -------------------------------- ### Dihedral restraints section example Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/lambda_cph_topology Example of the [dihedral_restraints] section in a topology file, showing parameters for GLUL and ASPL residues. ```gromacs [ dihedral_restraints ] ; res i j k l phi0 deltaPhi Krestr GLUL CG CD OE1 HE1 180.0 50.0 30.0 GLUL CG CD OE2 HE2 180.0 50.0 30.0 ; res i j k l phi0 deltaPhi Krestr ASPL CB CG OD1 HD1 180.0 50.0 30.0 ASPL CB CG OD2 HD2 180.0 50.0 30.0 ``` -------------------------------- ### Example `[ constant_ph ]` section Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/lambda_cph_topology An example configuration for the `[ constant_ph ]` section, including necessary includes and definitions for protonable residue types and their pKa values. ```ini [ constant_ph ] ; Contains autogenerated protonable residue definition for CPH-MD. ; Protonable residue database comment: charmm36m_coupled ; Protonable residue database version: 1 #include "./charmm36m-lambdadyn.ff/cph_ffcomp.itp" #include "./charmm36m-lambdadyn.ff/cph_misc.itp" ; -- Common constants -- pka_per_residue_type GlutamicAcid none 4.0990 4.0990 pka_per_residue_type Histidine none 6.5300 6.9200 pka_per_residue_type AsparticAcid none 3.6990 3.6990 ; -- Protonable sites -- ; name l_mode restype site form1 form2 [form3 ... formN] protonable_residue GLUL0007 tl GlutamicAcid GLUL_0007 GLUL_0007_deprot GLUL_0007_prot_1 GLUL_0007_prot_2 init_lambda_tl GLUL0007 0.00 0.00 ffcomp_tl_from_common GLUL0007 GLUL_QOnly_c ; pka_override GLUL0007 none 4.099 4.099 ``` -------------------------------- ### Grompp Preprocessing Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Command to preprocess the simulation input files for the production run. ```bash gmx grompp -f production_lambda.mdp -c equil_structure.gro -r equil_structure.gro \ -o production.tpr -p topol.top -t equil_structure.cpt ``` -------------------------------- ### Generate ions with genion Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Generates ions using genion with specific constant pH options for buffer site placement. ```bash gmx genion -s genion.tpr -o solvions.gro \ -p topol.top -pname SOD -nname CLA \ -conc 0.150 -neutral \ -cphcoupled -rminprotld 2.0 -rminld 3.0 -rtolld 0.3 ``` -------------------------------- ### Example .dat trajectory output Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph/raw_dat_output_format Shows an example of the .dat trajectory file, including comment lines and a data line, illustrating the space-separated fields. ```text ; [ time ] [ RorB ] [ site ] [ l_p ] [ l_t ] [ v_p ] [ v_t ] [ f_p ] [ f_t ] [ dhdl_p ] [ dhdl_t ] [ ffcomp_p ] [ ffcomp_t ] [ bias_p ] [ bias_t ] [ constr_p ] [ constr_buff ] [ f_buff ] [ therm ] [ inhib ] ; Restarting from checkpoint ; Starting internal state is: ; residue [ 0] lambda_p = 1.0757195950 velocity = -0.0104046911 last_force = -205.1779327393 ; lambda_t = 0.7902489305 velocity = 0.0634180531 last_force = 9.1901779175 ; Reading buffer checkpoint: ; collective buffer lambda 0.0000000000 (v: 0.0000000000 F_(t-1) 0.0000000000) 0.000 r 0 1.075687 0.790344 -0.012844 0.047467 -205.095459 9.176412 107.917526 57.379688 212.144714 56.451721 -100.868263 8.248445 0.000000 0.000000 0.000000 0 0 0.000 b 0 -0.075687 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 823710461516290818310144.000000 0.000000 0.000000 0.000000 0.000000 0 0 ``` -------------------------------- ### Generate tpr file for energy minimization Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Generates a tpr file for energy minimization using the em.mdp settings file, the solvions.gro configuration, and the topol.top topology. ```bash gmx grompp -f em.mdp -c solvions.gro -o em.tpr -p topol.top ``` -------------------------------- ### Build and Install oneTBB Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures and builds the oneTBB library with shared libraries enabled. ```dockerfile WORKDIR /universal_build/dependencies/oneTBB-2022.0.0 RUN mkdir build WORKDIR /universal_build/dependencies/oneTBB-2022.0.0/build RUN /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DTBB_TEST=ON -DCMAKE_BUILD_TYPE=Release RUN make -j`nproc` RUN make install ``` -------------------------------- ### Run energy minimization Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Executes the energy minimization process using the generated em.tpr file. ```bash gmx mdrun -deffnm em -v ``` -------------------------------- ### Base Ubuntu Image and User Setup Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Sets the base image to Ubuntu 20.04, switches to root user, and creates a working directory. ```dockerfile FROM ubuntu:20.04 as base USER 0 WORKDIR / RUN mkdir /universal_build WORKDIR /universal_build ``` -------------------------------- ### Build and Install GROMACS Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/docker/LambdaAnalysis_v3/Dockerfile Configures and builds GROMACS with static libraries and specific compiler flags. ```dockerfile RUN LD_LIBRARY_PATH=/universal_build/prefix/lib:/universal_build/prefix/lib64:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/x86_64-linux-gnu/ /universal_build/cmake-3.31.5-linux-x86_64/bin/cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/universal_build/prefix/ -DCMAKE_INSTALL_PREFIX=/universal_build/prefix/ -DCMAKE_CXX_FLAGS="-march=broadwell -fPIC -pthread -ldl -lgfortran -static-libgcc -static-libstdc++ " -DCMAKE_C_FLAGS="-march=broadwell -pthread -ldl -lgfortran -fPIC -static-libgcc " -DCMAKE_C_COMPILER=`which gcc-11` -DCMAKE_CXX_COMPILER=`which g++-11` -DSTATIC_LIB=ON -DOPENBLAS_PROVIDES_LAPACK=ON -DALLOW_FLEXIBLAS_LINUX=OFF -DARMA_LIBS="/universal_build/prefix/lib/libopenblas.a;/usr/lib/gcc/x86_64-linux-gnu/11/libgfortran.a;/usr/lib/gcc/x86_64-linux-gnu/11/libquadmath.a" -DCMAKE_BUILD_TYPE=Release RUN LD_LIBRARY_PATH=/universal_build/prefix/lib:/universal_build/prefix/lib64:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/x86_64-linux-gnu/ make -j`nproc` RUN make install ``` -------------------------------- ### Check glibc version Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/cph-postprocessing/analysis_tool Command to check the installed glibc version on the system. ```bash ldd --version ``` -------------------------------- ### Check Lambda Equilibration Status Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-titration Command to check the completion status of replicas during lambda equilibration. ```bash python titrate_v3.py check_lambdaequil -r lyzozyme_1.yaml ``` -------------------------------- ### Titration plot function Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/Titration_lyzozyme_example.ipynb Defines a function to create a titration plot for a given site. ```python def make_titration_plot(ax, site): ``` -------------------------------- ### Calculate FractionTransition Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/files/Titration_lyzozyme_example.ipynb This code snippet calculates the 'FractionTransition' column by dividing 'frameProtMiddleForDynBias' by 'frameCount'. ```python df["FractionTransition"] = df["frameProtMiddleForDynBias"] / (df["frameCount"]) ``` -------------------------------- ### Directory structure for undoing changes Source: https://grubmueller.pages.mpcdf.de/docs-gromacs-fmm-constantph/docs/tutorials/cph-lysozyme-tuto Executing each step in a separate directory allows for easier undoing of changes by deleting and copying directories. ```bash mkdir topology_creation; cd topology_creation gmx pdb2gmx ... cd .. cp -r topology_creation solvation cd solvation gmx solvate ... ... ```