Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature decouple somd 3 #29

Open
wants to merge 51 commits into
base: feature-decouple-somd-3
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8dc92c7
Replace template_config.cfg with Pydantic config
Roy-Haolin-Du Jan 6, 2025
b654a04
test and format for removing run_somd.sh and template_config.cfg
Roy-Haolin-Du Jan 6, 2025
fb7346c
Update engine_config validation, ncycle, runtime and test passed
Roy-Haolin-Du Jan 8, 2025
ec4858f
keep partition as default
Roy-Haolin-Du Jan 8, 2025
abc0b9e
Flexibly handle SOMD configuration files and create an abstract base …
Roy-Haolin-Du Jan 9, 2025
624576e
engine_confi and test
Roy-Haolin-Du Jan 12, 2025
f0730aa
engine_confi and test
Roy-Haolin-Du Jan 12, 2025
8d7b957
only consult somd_config object, not read from files
Roy-Haolin-Du Jan 16, 2025
5c1c09f
consult engine_config to update somd.cfg with the necessary configura…
Roy-Haolin-Du Jan 20, 2025
3c760ef
refactor the lambda array and writing of somd.cfg at diff stages
Roy-Haolin-Du Jan 26, 2025
7b97261
nmoves is a required to be written into somd.cfg
Roy-Haolin-Du Jan 26, 2025
5be62d1
Pass self-set runtime and add simulation timestep attribute
Roy-Haolin-Du Jan 26, 2025
96a6b78
Tweak EngineConfig and refactor system preparation
fjclark Jan 28, 2025
c3abd46
save enginetype between loading and dump, job name at pre-stages
Roy-Haolin-Du Feb 2, 2025
7b8e4c3
pass lambda parameters
Roy-Haolin-Du Feb 3, 2025
d96c928
EnsEnsure first ensemble equilibration restraint is used for all runs
fjclark Feb 3, 2025
f832e86
Fix incorrect stage setter in Leg
fjclark Feb 3, 2025
99be80c
Move system prep config attribute descriptions to the fields
fjclark Feb 3, 2025
a8c315c
Make get_file_name a static method
fjclark Feb 3, 2025
08e0ef6
Make load function ignorant of derived classes
fjclark Feb 3, 2025
5612727
Fix order of decorators
fjclark Feb 3, 2025
76f40d4
Supply lambda values to engine config
fjclark Feb 3, 2025
d7eacda
Import dicts of engine type to config maps in __init__
fjclark Feb 3, 2025
b1d2368
Ensure lambda value information is passed to simulation configs
fjclark Feb 3, 2025
496aeff
check if need restraint at bound/free leg or not
Roy-Haolin-Du Feb 4, 2025
8c0351e
make sure write path for top,crd,mor files in somd.cfg
Roy-Haolin-Du Feb 5, 2025
484cc9d
Only restrain stage need turn on rep-lig on
Roy-Haolin-Du Feb 5, 2025
68fa305
pass timestep and nrg_freq to simulation attribute and correct crd to…
Roy-Haolin-Du Feb 6, 2025
1f63593
ruff check for removing unsed func
Roy-Haolin-Du Feb 6, 2025
a5348f0
add test for update_engine_config_option and modify engine_config tes…
Roy-Haolin-Du Feb 9, 2025
49b4e68
Delete redundant comments
Roy-Haolin-Du Feb 9, 2025
d4f4253
change for importng new SomdSystemPreparationConfig
Roy-Haolin-Du Feb 9, 2025
aa924a6
add test for the update_engine_config_option functio
Roy-Haolin-Du Feb 9, 2025
89490f8
Only bound state need restraints
Roy-Haolin-Du Feb 10, 2025
2b9bf88
self.engine_config.timestep/nrg_freq - make sure the information is s…
Roy-Haolin-Du Feb 10, 2025
19c5b98
import SomdSystemPreparationConfig instead of Systemprepconfig used b…
Roy-Haolin-Du Feb 10, 2025
b34738e
self.engine_config.timestep etc - this means the information is store…
Roy-Haolin-Du Feb 14, 2025
b231b56
Make new test files for testing
Roy-Haolin-Du Feb 14, 2025
1cdf9b3
Make new test files for testing
Roy-Haolin-Du Feb 14, 2025
6a0efab
self.engine_config.timestep etc - this means the information is store…
Roy-Haolin-Du Feb 14, 2025
2a59db6
copy restraint file into stage input and output folders
Roy-Haolin-Du Feb 14, 2025
68b1790
If read lambda from cfg file, make sure pass lambda to lambda_values
Roy-Haolin-Du Feb 14, 2025
d25f6e5
New test files
Roy-Haolin-Du Feb 14, 2025
50f3e1b
Make required stages a property of the sysprep config
fjclark Feb 19, 2025
23243d0
Move enums to configuration
fjclark Feb 19, 2025
7ac160e
In progress... store engine config info in EngineType enum
fjclark Feb 19, 2025
439d203
Merge branch 'feature-decouple-somd-3' of https://github.com/Roy-Haol…
fjclark Feb 19, 2025
d7614f3
changed the EngineType enum,removed the mapping dictionaries
Roy-Haolin-Du Feb 24, 2025
769fd70
making new test data for usage of testing
Roy-Haolin-Du Feb 24, 2025
dbdbaee
making sure somd.cfg is written in the correct place and lambda value…
Roy-Haolin-Du Feb 24, 2025
b353206
New test files for removing mapping, correct somd.cfg writen and lamb…
Roy-Haolin-Du Feb 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions a3fe/run/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ def __init__(
self.lam_vals = lambda_values
else:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the single source of information principle, the values are also in the config files.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single source of information - always read the lambda values from the engine config, so make self.lam_vals a property which reads self.engine_config e.g.

@Property
def lam_vals(self):
return self.engine_config.lambda_values

self.lam_vals = self._get_lam_vals()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify this to completely remove any reference to "somd.cfg" which should only be written by the engine config before it is used.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check why somd.cfg is appearing in the stage input directories - it shouldn't.


if self.engine_config is not None:
self.engine_config.lambda_values = self.lam_vals

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all of this logic. Do not allow the user to pass a set of lambda values - this violates the single source of information principle because then the values are also in the config. Please just create a property which gets the lambda values from the engine config.

self.equil_detection = equil_detection
self.runtime_constant = runtime_constant
self.relative_simulation_cost = relative_simulation_cost
Expand Down