Open jchodera opened 10 years ago
Here is a proposed interface:
Suppose our objective is to compute the solvation free energy of one molecule in another type of molecule.
from yank import splash
yank = Splash(system, positions, thermodynamic_state, solute_atoms, store_filename)
# You can set the number of iterations this way.
yank.niterations = 1000 # set number of replica-exchange iterations
yank.nsteps_per_iteration = 500 # number of timesteps per iteration
# Or you can set the desired precision
#yank.niterations = 'auto'
#yank.desired_precision = 0.1 * units.kilocalories_per_mole
# Run the simulation.
yank.run()
# Get free energies out for original system.
[DeltaG, dDeltaG] = yank.computeSolvationFreeEnergy() # in units of kT
# Or for a modified system with perturbed parameters but same atom indices.
[DeltaG, dDeltaG] = yank.computeSolvationFreeEnergy(perturbed_system) # in units of kT
# To resume a Yank object from a file.
yank = Splash(store_filename=netcdf_filename)
# We can do normal computations (run, computeSolvationFreeEnergy, etc)
Here, we have the following variables
system
- OpenMM system describing solute in desired solventpositions
- simtk.unit.Quantity
describing positions for solvated solute, or list of multiple copies of positionsthermodynamic_state
- specified thermodynamic parameters (temperature, pressure, etc.)solute_atoms
- list
of atoms describing the soluteWe will need to make sure that we support decoupling for alchemical modifications.
Hasn't this been implemented by @andrrizzi solvation simulation setup procedure?
I think this idea was about creating a Yank
subclass calling Splash
to easily perform solvation calculations through the API. The YAML procedure uses the normal Yank
class. I'm not sure what are the plans for this now. I actually like it a lot, but I probably it's not necessary for yank 1.0.
Moving to YANK 2.0
Lee-Ping would like to be able to compute arbitrary solvation free energies for a molecule in another type of molecule.