Skip to content

Commit

Permalink
Create setup_options.py
Browse files Browse the repository at this point in the history
Added File and Class to move default configuration settings from openmmdl setup
  • Loading branch information
talagayev authored Aug 9, 2024
1 parent 5856890 commit 93953ce
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions openmmdl/openmmdl_setup/setup_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@


class SimulationOptionsConfigurator:
def __init__(self, session):
self.session = session

def configure_default_options(self):
"""Select default options based on the file format and force field."""
implicitWater = False
self.session["restart_checkpoint"] = False
self.session["mdtraj_output"] = "mdtraj_pdb_dcd"
self.session["mdtraj_removal"] = "False"
self.session["mda_output"] = "mda_pdb_dcd"
self.session["mda_selection"] = "mda_prot_lig_all"
self.session["openmmdl_analysis"] = "No"
self.session["analysis_selection"] = "analysis_all"
self.session["binding_mode"] = "40"
self.session["min_transition"] = "1"
self.session["rmsd_diff"] = "No"
self.session["pml_generation"] = "True"
self.session["stable_water"] = "Yes"
self.session["wc_distance"] = "1.0"

if self.session["fileType"] == "pdb" and self.session["waterModel"] == "implicit":
implicitWater = True

self.session["ensemble"] = "nvt" if implicitWater else "npt"
self.session["platform"] = "CUDA"
self.session["precision"] = "mixed"
self.session["cutoff"] = "2.0" if implicitWater else "1.0"
self.session["ewaldTol"] = "0.0005"
self.session["constraintTol"] = "0.000001"
self.session["hmr"] = True
self.session["hmrMass"] = "1.5"
self.session["dt"] = "0.002"
self.session["sim_length"] = "30"
self.session["equilibration"] = "equilibration"
self.session["temperature"] = "300"
self.session["friction"] = "1.0"
self.session["pressure"] = "1.0"
self.session["barostatInterval"] = "25"
self.session["nonbondedMethod"] = "CutoffNonPeriodic" if implicitWater else "PME"
self.session["writeDCD"] = True
self.session["dcdFilename"] = "trajectory.dcd"
self.session["dcdFrames"] = "1000"
self.session["pdbInterval_ns"] = "10"
self.session["writeData"] = True
self.session["dataFilename"] = "log.txt"
self.session["dataInterval"] = "1000"
self.session["dataFields"] = [
"step",
"speed",
"progress",
"potentialEnergy",
"temperature",
]
self.session["writeCheckpoint"] = True
self.session["checkpointFilename"] = "checkpoint.chk"
self.session["checkpointInterval_ns"] = "0.02"
self.session["writeSimulationXml"] = False
self.session["systemXmlFilename"] = "system.xml"
self.session["integratorXmlFilename"] = "integrator.xml"
self.session["writeFinalState"] = False
self.session["finalStateFileType"] = "stateXML"
self.session["finalStateFilename"] = "final_state.xml"
self.session["constraints"] = "hbonds"
self.session["rmsd"] = "True"
self.session["md_postprocessing"] = "True"

0 comments on commit 93953ce

Please sign in to comment.