Skip to content

Commit

Permalink
change fold setting to false for all converters. added fold setting t…
Browse files Browse the repository at this point in the history
…o cp2k and ase converters.
  • Loading branch information
ChiCheng45 committed Mar 21, 2024
1 parent 9b27a8c commit b59b0ae
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions MDANSE/Src/MDANSE/Framework/Converters/ASE.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ class ASE(Converter):
"mini": 0,
},
)
settings["fold"] = (
"BooleanConfigurator",
{"default": False, "label": "Fold coordinates into box"},
)
settings["output_file"] = (
"OutputTrajectoryConfigurator",
{
Expand Down Expand Up @@ -156,6 +160,8 @@ def run_step(self, index):
realConf = PeriodicRealConfiguration(
self._trajectory.chemical_system, coords, unitCell
)
if self._configuration["fold"]["value"]:
realConf.fold_coordinates()
else:
realConf = RealConfiguration(
self._trajectory.chemical_system,
Expand Down
7 changes: 6 additions & 1 deletion MDANSE/Src/MDANSE/Framework/Converters/CP2K.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ class CP2K(Converter):
"dependencies": {"input_file": "pos_file"},
},
)
settings["fold"] = (
"BooleanConfigurator",
{"default": False, "label": "Fold coordinates into box"},
)
settings["output_file"] = (
"OutputTrajectoryConfigurator",
{
Expand Down Expand Up @@ -232,7 +236,8 @@ def run_step(self, index):
self._trajectory.chemical_system, coords, unitcell, **variables
)

realConf.fold_coordinates()
if self._configuration["fold"]["value"]:
realConf.fold_coordinates()

self._trajectory.chemical_system.configuration = realConf

Expand Down
2 changes: 1 addition & 1 deletion MDANSE/Src/MDANSE/Framework/Converters/DFTB.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DFTB(Forcite):
)
settings["fold"] = (
"BooleanConfigurator",
{"default": True, "label": "Fold coordinates in to box"},
{"default": False, "label": "Fold coordinates into box"},
)
settings["output_file"] = (
"OutputTrajectoryConfigurator",
Expand Down
2 changes: 1 addition & 1 deletion MDANSE/Src/MDANSE/Framework/Converters/Discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Discover(Converter):
)
settings["fold"] = (
"BooleanConfigurator",
{"default": True, "label": "Fold coordinates into box"},
{"default": False, "label": "Fold coordinates into box"},
)
settings["output_file"] = (
"OutputTrajectoryConfigurator",
Expand Down

0 comments on commit b59b0ae

Please sign in to comment.