The subject is odd, but our lab is studying aggregation patterns of 4-6 peptides in a large box of solvent. We would like to promote several aggregation events and we want to gradually reduce the volume to accessible to the peptides over time.
We are trying to design a CustomExternalForce that restrain the peptide atoms to a certain distance from the box center, as shown below. However, we are struggling with defining such a force that gradually varies.
Code: Select all
external = CustomExternalForce('K*max(0, r-dist)^2; r=sqrt(x*x+y*y+z*z)')
external.setName("Flat-external-force")
external.addGlobalParameter("K", 25 * (kilojoule_per_mole/nanometer**2))
external.addGlobalParameter("dist", 2 * angstroms)
system.addForce(external)
Does anyone have ideas or suggestions?
Thanks!