Skip to content

[WIP] Integration and test of RSS code #84

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

Merged
merged 40 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0e1bdbc
Merge branch 'JaGeo:main' into main
YuanbinLiu Jun 12, 2024
8a5745a
Update common jobs and utils, and add new RSS jobs
YuanbinLiu Jun 12, 2024
12d88b5
Revert "Merge branch 'JaGeo:main' into main"
YuanbinLiu Jun 12, 2024
df14cd9
Reapply "Merge branch 'JaGeo:main' into main"
YuanbinLiu Jun 12, 2024
406cc82
Revert "add YL to contributors"
YuanbinLiu Jun 12, 2024
c4b7144
added boltzhist code. WIP docstrings still need creating
MorrowChem Jun 13, 2024
9498e76
added docstrings, updated to numpy style
MorrowChem Jun 13, 2024
4718fb7
added airss installation to README
MorrowChem Jun 13, 2024
05ae5f7
removed airss installation from README, will be managed by conda
MorrowChem Jun 13, 2024
bcdf0a4
Merging the RSS code
YuanbinLiu Jun 21, 2024
c267c94
resolve conflict
YuanbinLiu Jul 24, 2024
f5efad2
Merge remote-tracking branch 'origin/main' into rss
YuanbinLiu Jul 24, 2024
11a7305
Resolved merge conflicts
YuanbinLiu Jul 24, 2024
d4fb6df
passed unit tests
YuanbinLiu Jul 29, 2024
baae101
add testing files
YuanbinLiu Jul 29, 2024
dac446b
merging rss code
YuanbinLiu Jul 29, 2024
4a69c6a
Remove redundant test files
YuanbinLiu Jul 29, 2024
a34fd0c
fix linting errors
YuanbinLiu Jul 30, 2024
0978476
adopt logging package
YuanbinLiu Jul 30, 2024
0efee39
fix lint errors
YuanbinLiu Jul 31, 2024
1e27fe3
fix conflicts between two workflows
YuanbinLiu Jul 31, 2024
874889a
minor revisions
YuanbinLiu Aug 1, 2024
4869604
add dgl version for installation
YuanbinLiu Aug 1, 2024
1002e1f
show installed packages
YuanbinLiu Aug 1, 2024
8371824
torch==2.2.1 for pytest
YuanbinLiu Aug 1, 2024
e04a09f
torch==2.2.1 for pytest
YuanbinLiu Aug 1, 2024
8f3c3be
torch==2.2.1 for pytest
YuanbinLiu Aug 1, 2024
cacc9b2
torchdata==0.7.1
YuanbinLiu Aug 1, 2024
daff41f
delete duplicate unit tests
YuanbinLiu Aug 1, 2024
193695c
set up installation of torchdata
YuanbinLiu Aug 1, 2024
5fdb278
modify regularization test
YuanbinLiu Aug 1, 2024
7ed1787
Add buildcell to path on github
YuanbinLiu Aug 1, 2024
67e538e
species_list is needed for the analysis plots for GAP
QuantumChemist Aug 2, 2024
091af95
species_list is needed for the analysis plots for GAP
QuantumChemist Aug 2, 2024
5d3d163
added comment
QuantumChemist Aug 2, 2024
26c609e
added checks for checking if sigma regularization is active
QuantumChemist Aug 2, 2024
26ca71b
add docstrings
QuantumChemist Aug 2, 2024
094d2d7
ignore airss
QuantumChemist Aug 2, 2024
4a09114
reduce the GAP unit test run time where accuracy isn't needed
QuantumChemist Aug 2, 2024
ba5f891
update
YuanbinLiu Aug 6, 2024
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
5 changes: 5 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ jobs:
python -m pip install .[strict]
python -m pip cache purge
python -m pip install ase==3.23.0
- name: Print installed package versions
run: |
pip show torch torchdata
- name: Install Buildcell
run: |
curl -O https://www.mtg.msm.cam.ac.uk/files/airss-0.9.3.tgz; tar -xf airss-0.9.3.tgz; rm airss-0.9.3.tgz; cd airss; make ; make install ; make neat; cd ..
- name: Add Buildcell to PATH
run: echo "$GITHUB_WORKSPACE/airss/bin" >> $GITHUB_PATH
- name: Install Julia
run: curl -fsSL https://install.julialang.org | sh -s -- -y
- name: Set up Julia environment (Needed for ACEpotentials.jl interface)
Expand Down
18 changes: 6 additions & 12 deletions autoplex/auto/phonons/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ class CompleteDFTvsMLBenchmarkWorkflow(Maker):
Default=10.
ml_models: list[str]
list of the ML models to be used. Default is GAP.
mlip_hyper: list[dict]
list with basic MLIP hyperparameters for each model.
Default are basic GAP hyperparameters {"two_body": True, "three_body": False, "soap": True}.
hyper_para_loop: bool
making it easier to loop through several hyperparameter sets.
atomwise_regularization_list: list
Expand Down Expand Up @@ -145,7 +142,6 @@ class CompleteDFTvsMLBenchmarkWorkflow(Maker):
rattle_mc_n_iter: int = 10
w_angle: list[float] | None = None
ml_models: list[str] = field(default_factory=lambda: ["GAP"])
mlip_hyper: list[dict] | None = None
hyper_para_loop: bool = False
atomwise_regularization_list: list | None = None
soap_delta_list: list | None = None
Expand All @@ -160,6 +156,7 @@ def make(
f_max: float = 40.0,
pre_xyz_files: list[str] | None = None,
pre_database_dir: str | None = None,
preprocessing_data=False,
atomwise_regularization_parameter: float = 0.1,
f_min: float = 0.01, # unit: eV Å-1
atom_wise_regularization: bool = True,
Expand Down Expand Up @@ -209,8 +206,6 @@ def make(
fit_input = {}
hyper_list: list[dict[Any, Any]] = []
bm_outputs = []
if self.mlip_hyper is None:
self.mlip_hyper = [{"two_body": True, "three_body": False, "soap": True}]

for structure, mp_id in zip(structure_list, mp_ids):
if self.add_dft_random_struct:
Expand Down Expand Up @@ -258,12 +253,12 @@ def make(
{"IsolatedAtom": {"iso_atoms_dir": [isoatoms.output["dirs"]]}}
)

for ml_model, ml_hyper in zip(self.ml_models, self.mlip_hyper):
print("pre_database_dir:", pre_database_dir)
for ml_model in self.ml_models:
add_data_fit = MLIPFitMaker(
mlip_type=ml_model,
mlip_hyper=ml_hyper,
).make(
species_list=isoatoms.output["species"],
# species_list=isoatoms.output["species"],
isolated_atoms_energies=isoatoms.output["energies"],
fit_input=fit_input,
split_ratio=split_ratio,
Expand All @@ -274,6 +269,7 @@ def make(
f_min=f_min,
atom_wise_regularization=atom_wise_regularization,
auto_delta=auto_delta,
preprocessing_data=preprocessing_data,
**fit_kwargs,
)
flows.append(add_data_fit)
Expand Down Expand Up @@ -341,9 +337,7 @@ def make(
"n_sparse": n_sparse,
"delta": delta,
}
loop_data_fit = MLIPFitMaker(
mlip_type=ml_model, mlip_hyper=ml_hyper
).make(
loop_data_fit = MLIPFitMaker(mlip_type=ml_model).make(
species_list=isoatoms.output["species"],
isolated_atoms_energies=isoatoms.output["energies"],
fit_input=fit_input,
Expand Down
Loading