Changes to YANK for explicit solvent hydration tests. General Notes: - Instead of overhauling all of YANK to treat explicit solvent differently from a complex, the solvent water was treated as the receptor and the solvated molecule was the "ligand." - The restraints.py file did not have to be called since the periodic flag was detected correctly. - Some changes are comment out in the document and not used in production. These were small tests or debug statements that are not applicable to what is shown here, and will not be noted. - Although the line comparisons are between the SVN rev 1122, the revision of yank that was tested with a version more in tune with 1120. This section contains the general summary of the changes made to each file. A line-by-line changelog is below and contains more detailed explanations. **************************************************** ***************** yank.py changes ****************** **************************************************** - Any time a reduced potential was needed on a "state" object, the box vectors were also passed. - Had to reverse input sequence on the complex creation from receptor/ligand to ligand/receptor as thats how my topology file was built - The ThermodynamicState was defined with the complex system to ensure that the box vectors would get passed in correctly to do periodic effects. - Since only solvation free energy was done, the vacuum_ligand and the solvent_simulation steps were omitted - As the dispersion correction forces are not working properly, they were removed from the Nonbonded Interactions similar to how was done in the validation tests of alchemy.py - Chose the nonbondedMethod to be PME, and a cutoff of 9A, disabled the implicitSolvent option **************************************************** ************ thermodynamics.py changes ************* **************************************************** - There is some kind of bug involving the "nm**3" unit from the "unit" module. I have had issues where the system will not recognize the unit as a cubic length, and treats it as its own class. This means, when the reduced potential is calculated, the units do not come back in energy and instead show up as a collection of variables that the system cannot interpret, causing a crash. I wrote a temporary workaround to this that converts the nm**3 to an A**3, which the unit module interprets correctly as a cubic length. - Near as I can tell, the nm**3 unit is being called into memory twice and so the program handles each call as incompatible. My evidence for this is when the unit module is called on its own, nm**3 is treated as a cubic length. When debugging in the program, the nm**3 unit is not compatible; creating a new variable with the nm**3 unit is also incompatible with any other cubic length, although it is compatible with other nm**3. The last evidence I have for this is that nm**2 and nm are recognized as compatible square and normal lengths. Beyond this, I cannot find why this is behaving as such, so I wrote the temporary fix. **************************************************** **************** alchemy.py changes **************** **************************************************** - Created an alchemical state list with many more intermediates to make better resolution, unable to properly test due to hardware (and OpeMM software?) limitations. - Added in my own nonbonded potential. Depending on the simulation, either original soft-core or the liner basis were used. **************************************************** **************** analyze.py changes **************** **************************************************** - Prevented the PDB trajectory write out to save time and space, remove comment to revert - Since only the "complex" phase was carried out, only that phase is analyzed. The end result is then the free energy of DEsolvation because of how the alchemical states were defined, but that is a simple negative sign. ==================================================== ==================================================== The following changes are line-by line and provide explicit details as to what was done. This is not direct copying of the code, but the location of the change and the reason behind it. Legend: Line {Original Copy Line # in SVN rev 1122}/{Modified copy line number} [{Class Name}][{Function Name}]: {What was done} Example: Line 493/502 [Yank][__init__]: Commented a pdb debug statement **************************************************** *********** yank.py line-by-line changes *********** **************************************************** Line 334/336 [Yank][__init__]: Box vectors passed to the "reduced_potential" call of the "state" object Line 337/340 [Yank][__init__]: Box vectors passed to the "reduced_potential" call of the "state" object Line 354/359 [Yank][__init__]: Box vectors passed to the "reduced_potential" call of the "state" object Line 337/340 [Yank][__init__]: Box vectors passed to the "reduced_potential" call of the "state" object Line 480/488 [Yank][__init__]: Reversed combination of ligand and receptor from "receptor + ligand" to "ligand + receptor" to be in line with my complex.crd file Line 509/522 [Yank][__init__]: Redid the numbering sequence for which atoms were part of receptor/ligand to be inline with the complex.crd file Line 570/596 [Yank][run]: Created the ThermodynamicState with a system defined so the Barostat is added correctly, but more importantly, the box vectors are passed in to make sure the system is periodic. Line 577/604 [Yank][run]: vacuum_ligand and solvent_simulation sections commented out as they are not needed for this simulation set. Line 614/643 [Yank][run]: Initialized the standard_state_correction variable to be in line with run_mpi. If this is not done, the system is periodic, and mpi is not used, the variable is called before being set. Line 628/659 [Yank][run]: Since dispersion correction forces were not working correctly, this Nonbonded term was disable in the same way that is seen in alchemy.py and simulations run without it To save space and prevent redundancy, all changes listed above for the [Yank][run] command were also changed on the [Yank][run_mpi] command, only the line numbers differ. Line 1133/1175 [N/A][__main__]: Changed from NoCutoff nonbondedMethod to PME Line 1134/1176 [N/A][__main__]: Set a 9A cutoff Line 1134/1177 [N/A][__main__]: Commented out the implicitSolvent line Line 1139/1184 [N/A][__main__]: Created the ligand and the receptor systems without the implictSolvent flag, and with the nonbondedMethod and Cutoff instead Line 1145/1190 [N/A]{__main__]: Created the complex system with the same parameters as the ligand and receptor systems **************************************************** ****** thermodynamics.py line-by-line changes ****** **************************************************** Line 294/298 [ThermodynamicState][reduced_potential]: Wrote a small check for the nm**3 unit to workaround a bug where nm**3 is not treated as a cubic length for an unknown reason (suspected being called into memory multiple times) Line 390/394 [ThermodynamicState][reduced_potential_multiple]: Wrote a small check for the nm**3 unit to workaround a bug where nm**3 is not treated as a cubic length for an unknown reason (suspected being called into memory multiple times) **************************************************** ********** alchemy.py line-by-line changes ********* **************************************************** Line 242/249 [AbsoluteAlchemicalFactory][massComplexProtocolExplicit]: Protocol for a large list of alchemical intermediates. Line 322/404 [AbsoluteAlchemicalFactory][_alchemicallyModifiyLennardJones]: Added in my own potential energy, used as needed. **************************************************** ********** analyze.py line-by-line changes ********* **************************************************** Line 921/975 [N/A][__main__]: Only phase no "complex" Line 966/1020 [N/A][__main__]: Disabled trajectory PDB writing when its not needed Line 1006/1060 [N/A][__main__]: Since there is no longer a vacuum or a solvent phase, disabled the DeltaF/H calculations for those phases