Skip to content

Commit

Permalink
Merge pull request #139 from choderalab/feature/script-feature-tests
Browse files Browse the repository at this point in the history
New features for scripts, and refactoring of ions and MC sampling code
  • Loading branch information
Bas Rustenburg authored Apr 3, 2019
2 parents 008b3a3 + 2db0b3f commit 403678f
Show file tree
Hide file tree
Showing 52 changed files with 122,956 additions and 1,325 deletions.
2 changes: 1 addition & 1 deletion devtools/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ requirements:
- hdf4 >4.2.11 # Pinned because of issue with netcdf4
- openmmtools >=0.9.3,<=0.16.0
- ambermini >=15.0.4
- parmed <=2.7.3 -
- parmed <=2.7.3
- joblib
- lxml
- pymbar
Expand Down
5 changes: 3 additions & 2 deletions examples/cli-examples/prepare_calibration.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
"_comment2": "If PME left out, nocutoff is used.",
"PME": {
"_comment": "Ewald + periodic system settings",
"ewald_error_tolerance": 1.0e-5,
"ewald_error_tolerance": 1.0e-4,
"switching_distance_nm": 0.85,
"nonbonded_cutoff_nm": 1.0,
"barostat_interval": 25,
"pressure_atm": 1.0
"pressure_atm": 1.0,
"dispersion_correction": true
},
"temperature_k": 300.0,
"salt_concentration_molar": 0.150
Expand Down
71 changes: 71 additions & 0 deletions examples/cli-examples/prepare_importance_sampling.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"_comment": "This script generates a necessary checkpoint file to start a regular constant-pH simulation.",
"input": {
"_comment": "Simulation requires an mmCIF file and a ffxml residue. Please specify the input directory under dir.",
"dir": "{name}-output",
"structure": "{name}-water.cif"
},
"output": {
"dir": "{name}-simulation",
"basename": "{name}"
},
"forcefield": {
"_comment1": "Standard, included xml files. Don't forget -obc2 files if using implicit.",
"default": [
"amber10-constph.xml",
"gaff.xml",
"tip3p.xml"
],
"_comment2": "Custom generated xml file (needs to be in input dir.",
"user": [
"{name}.xml"
]
},
"format_vars": {
"_comment1": "These variables are filled into file names for input and output when you use {} style syntax.",
"name": "1D"
},
"system": {
"_comment1": "Systemwide settings, such as temperature, and long range method",
"_comment2": "If PME left out, nocutoff is used.",
"PME": {
"_comment": "Ewald + periodic system settings",
"ewald_error_tolerance": 1.0e-5,
"switching_distance_nm": 0.85,
"nonbonded_cutoff_nm": 1.0,
"barostat_interval": 25,
"pressure_atm": 1.0
},
"temperature_k": 300.0,
"salt_concentration_molar": 0.150
},
"integrator": {
"timestep_fs": 2.0,
"constraint_tolerance": 1.0e-7,
"collision_rate_per_ps": 1.0
},
"preprocessing": {
"minimization_tolerance_kjmol": 1e-5,
"minimization_max_iterations": 30,
"num_thermalization_steps": 10
},
"importance": {
"_comment": "Add this block if you wish to use importance sampling. Specify the fixed state as a list of integers for each titratable residue.",
"titration_states": [
4
]
},
"reference_free_energies": {
"_comment": "This block contains reference free energies obtained by calibration for each residue and each state. Keys should be residue names, and results a list of free energy values for each state.",
"FD3": [
3.0,
1.0,
4.0,
1.0,
5.0,
9.0,
2.0,
7.0
]
}
}
5 changes: 3 additions & 2 deletions examples/cli-examples/prepare_simulation.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
"switching_distance_nm": 0.85,
"nonbonded_cutoff_nm": 1.0,
"barostat_interval": 25,
"pressure_atm": 1.0
"pressure_atm": 1.0,
"dispersion_correction": true
},
"temperature_k": 300.0,
"salt_concentration_molar": 0.150
},
"integrator": {
"timestep_fs": 2.0,
"constraint_tolerance": 1e-7,
"constraint_tolerance": 1.0e-7,
"collision_rate_per_ps": 1.0
},
"preprocessing": {
Expand Down
66 changes: 66 additions & 0 deletions examples/cli-examples/prepare_simulation_counterion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"_comment": "This script generates a necessary checkpoint file to start a regular constant-pH simulation.",
"input": {
"_comment": "Simulation requires an mmCIF file and a ffxml residue. Please specify the input directory under dir.",
"dir": "{name}-output",
"structure": "{name}-water.cif"
},
"output": {
"dir": "{name}-simulation",
"basename": "{name}"
},
"forcefield": {
"_comment1": "Standard, included xml files. Don't forget -obc2 files if using implicit.",
"default": [
"amber10-constph.xml",
"gaff.xml",
"tip3p.xml"
],
"_comment2": "Custom generated xml file (needs to be in input dir.",
"user": [
"{name}.xml"
]
},
"format_vars": {
"_comment1": "These variables are filled into file names for input and output when you use {} style syntax.",
"name": "1D"
},
"system": {
"_comment1": "Systemwide settings, such as temperature, and long range method",
"_comment2": "If PME left out, nocutoff is used.",
"PME": {
"_comment": "Ewald + periodic system settings",
"ewald_error_tolerance": 1.0e-5,
"switching_distance_nm": 0.85,
"nonbonded_cutoff_nm": 1.0,
"barostat_interval": 25,
"pressure_atm": 1.0
},
"temperature_k": 300.0,
"salt_concentration_molar": 0.150,
"neutral_charge_rule": 2
},
"integrator": {
"timestep_fs": 2.0,
"constraint_tolerance": 1.0e-7,
"collision_rate_per_ps": 1.0
},
"preprocessing": {
"minimization_tolerance_kjmol": 1e-5,
"minimization_max_iterations": 30,
"num_thermalization_steps": 10
},
"reference_free_energies": {
"_comment": "This block contains reference free energies obtained by calibration for each residue and each state. Keys should be residue names, and results a list of free energy values for each state.",
"FD3": [
3.0,
1.0,
4.0,
1.0,
5.0,
9.0,
2.0,
7.0
]
}
}
69 changes: 69 additions & 0 deletions examples/cli-examples/prepare_systematic_importance_sampling.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"_comment": "This script generates a necessary checkpoint file to start a regular constant-pH simulation.",
"input": {
"_comment": "Simulation requires an mmCIF file and a ffxml residue. Please specify the input directory under dir.",
"dir": "{name}-output",
"structure": "{name}-water.cif"
},
"output": {
"dir": "{name}-simulation",
"basename": "{name}"
},
"forcefield": {
"_comment1": "Standard, included xml files. Don't forget -obc2 files if using implicit.",
"default": [
"amber10-constph.xml",
"gaff.xml",
"tip3p.xml"
],
"_comment2": "Custom generated xml file (needs to be in input dir.",
"user": [
"{name}.xml"
]
},
"format_vars": {
"_comment1": "These variables are filled into file names for input and output when you use {} style syntax.",
"name": "1D"
},
"system": {
"_comment1": "Systemwide settings, such as temperature, and long range method",
"_comment2": "If PME left out, nocutoff is used.",
"PME": {
"_comment": "Ewald + periodic system settings",
"ewald_error_tolerance": 1.0e-5,
"switching_distance_nm": 0.85,
"nonbonded_cutoff_nm": 1.0,
"barostat_interval": 25,
"pressure_atm": 1.0
},
"temperature_k": 300.0,
"salt_concentration_molar": 0.150
},
"integrator": {
"timestep_fs": 2.0,
"constraint_tolerance": 1.0e-7,
"collision_rate_per_ps": 1.0
},
"preprocessing": {
"minimization_tolerance_kjmol": 1.0e-5,
"minimization_max_iterations": 30,
"num_thermalization_steps": 10
},
"importance": {
"_comment": "Add this block if you wish to use importance sampling. Specify the fixed state as a list of integers for each titratable residue.",
"systematic": true
},
"reference_free_energies": {
"_comment": "This block contains reference free energies obtained by calibration for each residue and each state. Keys should be residue names, and results a list of free energy values for each state.",
"FD3": [
3.0,
1.0,
4.0,
1.0,
5.0,
9.0,
2.0,
7.0
]
}
}
1 change: 0 additions & 1 deletion examples/cli-examples/run_calibration-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"total_update_attempts": 3,
"perturbations_per_ncmc_trial": 3,
"propagations_per_ncmc_step": 1,
"counter-ion": false,
"timeout_sec": 21599
},
"reporters": {
Expand Down
1 change: 0 additions & 1 deletion examples/cli-examples/run_equilibrium-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"total_update_attempts": 3,
"perturbations_per_ncmc_trial": 3,
"propagations_per_ncmc_step": 1,
"counter-ion": false,
"timeout_sec": 21599
},
"reporters": {
Expand Down
8 changes: 7 additions & 1 deletion protons/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
from .topology import Topology
from .calibration import SAMSCalibrationEngine
from .simulation import ConstantPHSimulation
from .driver import ForceFieldProtonDrive, AmberProtonDrive, NCMCProtonDrive, TautomerForceFieldProtonDrive, TautomerNCMCProtonDrive
from .driver import (
ForceFieldProtonDrive,
AmberProtonDrive,
NCMCProtonDrive,
TautomerForceFieldProtonDrive,
TautomerNCMCProtonDrive,
)
from .proposals import UniformProposal, DoubleProposal, CategoricalProposal
from .integrators import GBAOABIntegrator
from .modeller import Modeller
Expand Down
Loading

0 comments on commit 403678f

Please sign in to comment.