choderalab / yank

An open, extensible Python framework for GPU-accelerated alchemical free energy calculations.
http://getyank.org
MIT License
177 stars 70 forks source link

Create Yank class for solvation free energies #48

Open jchodera opened 10 years ago

jchodera commented 10 years ago

Lee-Ping would like to be able to compute arbitrary solvation free energies for a molecule in another type of molecule.

jchodera commented 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

We will need to make sure that we support decoupling for alchemical modifications.

Lnaden commented 7 years ago

Hasn't this been implemented by @andrrizzi solvation simulation setup procedure?

andrrizzi commented 7 years ago

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.

Lnaden commented 7 years ago

Moving to YANK 2.0