Skip to content

Commit 1572145

Browse files
normalize string inputs from settings
longer term could fix this with a validate...
1 parent 6338f90 commit 1572145

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

openfe/setup/methods/openmm/equil_rbfe_methods.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -676,21 +676,21 @@ def run(self, dry=False, verbose=True) -> bool:
676676
# 5. Create OpenMM system + topology + initial positions for "A" system
677677
# a. Get nonbond method
678678
nonbonded_method = {
679-
'PME': app.PME,
680-
'NoCutoff': app.NoCutoff,
681-
'CutoffNonPeriodic': app.CutoffNonPeriodic,
682-
'CutoffPeriodic': app.CutoffPeriodic,
683-
'Ewald': app.Ewald
684-
}[self._settings.system_settings.nonbonded_method]
679+
'pme': app.PME,
680+
'nocutoff': app.NoCutoff,
681+
'cutoffnonperiodic': app.CutoffNonPeriodic,
682+
'cutoffperiodic': app.CutoffPeriodic,
683+
'ewald': app.Ewald
684+
}[self._settings.system_settings.nonbonded_method.lower()]
685685

686686
# b. Get the constraint method
687687
constraints = {
688-
'HBonds': app.HBonds,
689-
'None': None,
690-
None: None,
691-
'AllBonds': app.AllBonds,
692-
'HAngles': app.HAngles
693-
}[self._settings.system_settings.constraints]
688+
'hbonds': app.HBonds,
689+
'none': None,
690+
'allbonds': app.AllBonds,
691+
'hangles': app.HAngles
692+
# vvv can be None so string it
693+
}[str(self._settings.system_settings.constraints).lower()]
694694

695695
# c. create the stateA System
696696
stateA_system = omm_forcefield_stateA.createSystem(

0 commit comments

Comments
 (0)