scale parameters in a gromacs topology to implement solute or partial tempering
Usage: plumed partial_tempering [--gromacs4] scale < processed.top where scale is the Hamiltonian scaling factor and processed.top is a post-processed topology file (i.e. produced with grompp -pp) where each "hot" atom has a "_" appended to the atom type, e.g.: 1 amber99_43_ 1 RC5 O5' 1 -0.6223 16 ; qtot -0.6223 Notice that the section that should be edited is the [atoms] section for all the molecules that you wish to affect (typically only for the solute, but you may also want to change solvent parameters). Also remember to first produce the processed.top file with grompp -pp. Editing a normal topol.top file will not work, because it does not contain all the parameters. The processed.top file should not have any "#include" statement. # produce a processed topology grompp -pp # choose the "hot" atoms vi processed.top # generate the actual topology plumed partial_tempering $scale < processed.top > topol$i.top WARNING: It's not very robust and there might be force-field dependent issues! A few tests are strongly suggested. WARNING: This script only works if the awk command in your system corresponds to GNU awk. mawk, that is the default on Ubuntu 19, does not work correctly. 1. Compare partial_tempering with scale=1.0 to non-scaled force field. E.g. grompp -o topol-unscaled.tpr grompp -pp vi processed.top # choose the "hot" atoms appending "_". You can choose whatever. plumed partial_tempering 1.0 < processed.top > topol-scaled.top # scale with factor 1 grompp -p topol-scaled.top -o topol-scaled.tpr # Then do a rerun on a trajectory mdrun -s topol-unscaled.tpr -rerun rerun.trr mdrun -s topol-scaled.tpr -rerun rerun.trr # and compare the resuling energy files. they should be identical 2. Compare partial_tempering with scale=0.5 to non-scaled force field. Repeat the same procedure but using "plumed partial_tempering 0.5". Choose all the atoms in all the relevant [atoms] sections (e.g. solute, solvent and ions). In the two resulting energy files you should see: long range electrostatics, LJ, and dihedral energy is *half* in the scaled case all other terms (bonds/bends) are identical.