-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
372 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
rm -f active.out | ||
echo start AL sample | ||
mpiexec -np 2 --oversubscribe abics_mlref input.toml | ||
echo start parallel_run 1 | ||
sh parallel_run.sh | ||
sleep 5 | ||
|
||
echo start AL final | ||
mpiexec -np 2 --oversubscribe abics_mlref input.toml | ||
sleep 5 | ||
|
||
#train | ||
echo start training | ||
abics_train input.toml | ||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
mpiexec -np 2 --oversubscribe abics_sampling input.toml | ||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Al2 Mg O4 | ||
1.0 | ||
8.1135997772 0.0000000000 0.0000000000 | ||
0.0000000000 8.1135997772 0.0000000000 | ||
0.0000000000 0.0000000000 8.1135997772 | ||
O Al Mg | ||
32 16 8 | ||
Direct | ||
0.237399980 0.237399980 0.237399980 | ||
0.762599945 0.762599945 0.762599945 | ||
0.512599945 0.012600004 0.737399936 | ||
0.487399966 0.987399936 0.262599975 | ||
0.012600004 0.737399936 0.512599945 | ||
0.987399936 0.262599975 0.487399966 | ||
0.737399936 0.512599945 0.012600004 | ||
0.262599975 0.487399966 0.987399936 | ||
0.987399936 0.487399966 0.262599975 | ||
0.012600004 0.512599945 0.737399936 | ||
0.487399966 0.262599975 0.987399936 | ||
0.512599945 0.737399936 0.012600004 | ||
0.262599975 0.987399936 0.487399966 | ||
0.737399936 0.012600004 0.512599945 | ||
0.237399980 0.737399936 0.737399936 | ||
0.762599945 0.262599975 0.262599975 | ||
0.512599945 0.512599945 0.237399980 | ||
0.487399966 0.487399966 0.762599945 | ||
0.012600004 0.237399980 0.012600004 | ||
0.987399936 0.762599945 0.987399936 | ||
0.987399936 0.987399936 0.762599945 | ||
0.012600004 0.012600004 0.237399980 | ||
0.487399966 0.762599945 0.487399966 | ||
0.512599945 0.237399980 0.512599945 | ||
0.737399936 0.237399980 0.737399936 | ||
0.262599975 0.762599945 0.262599975 | ||
0.237399980 0.512599945 0.512599945 | ||
0.762599945 0.487399966 0.487399966 | ||
0.762599945 0.987399936 0.987399936 | ||
0.237399980 0.012600004 0.012600004 | ||
0.737399936 0.737399936 0.237399980 | ||
0.262599975 0.262599975 0.762599945 | ||
0.000000000 0.000000000 0.000000000 | ||
0.749999940 0.249999985 0.499999970 | ||
0.249999985 0.749999940 0.499999970 | ||
0.249999985 0.499999970 0.749999940 | ||
0.749999940 0.499999970 0.249999985 | ||
0.499999970 0.749999940 0.249999985 | ||
0.499999970 0.249999985 0.749999940 | ||
0.000000000 0.499999970 0.499999970 | ||
0.749999940 0.749999940 0.000000000 | ||
0.249999985 0.249999985 0.000000000 | ||
0.249999985 0.000000000 0.249999985 | ||
0.749999940 0.000000000 0.749999940 | ||
0.499999970 0.000000000 0.499999970 | ||
0.000000000 0.749999940 0.749999940 | ||
0.000000000 0.249999985 0.249999985 | ||
0.499999970 0.499999970 0.000000000 | ||
0.374999970 0.374999970 0.374999970 | ||
0.624999940 0.624999940 0.624999940 | ||
0.374999970 0.874999940 0.874999940 | ||
0.624999940 0.124999993 0.124999993 | ||
0.874999940 0.874999940 0.374999970 | ||
0.124999993 0.124999993 0.624999940 | ||
0.874999940 0.374999970 0.874999940 | ||
0.124999993 0.624999940 0.124999993 |
60 changes: 60 additions & 0 deletions
60
tests/integration/active_learn_nequip/allegro_train_input/train/input.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
root: results/spinel | ||
run_name: run | ||
seed: 123 | ||
dataset_seed: 456 | ||
|
||
# network | ||
num_basis: 8 | ||
BesselBasis_trainable: true | ||
PolynomialCutoff_p: 6 | ||
l_max: 1 | ||
r_max: 8.0 | ||
parity: o3_full | ||
num_layers: 2 | ||
# num_features: 16 | ||
|
||
env_embed_multiplicity: 16 | ||
embed_initial_edge: true | ||
two_body_latent_mlp_latent_dimensions: [32, 64] | ||
two_body_latent_mlp_nonlinearity: silu | ||
latent_mlp_latent_dimensions: [64, 64] | ||
latent_mlp_nonlinearity: silu | ||
latent_mlp_initialization: uniform | ||
latent_resnet: true | ||
env_embed_mlp_latent_dimensions: [] | ||
env_embed_mlp_nonlinearity: null | ||
env_embed_mlp_initialization: uniform | ||
edge_eng_mlp_latent_dimensions: [16] | ||
edge_eng_mlp_nonlinearity: null | ||
edge_eng_mlp_initialization: uniform | ||
|
||
model_builders: | ||
- allegro.model.Allegro | ||
- PerSpeciesRescale | ||
- RescaleEnergyEtc | ||
|
||
|
||
dataset: ase | ||
dataset_file_name: structure.xyz | ||
chemical_symbols: | ||
- Mg | ||
- Al | ||
|
||
# logging | ||
wandb: false | ||
# verbose: debug | ||
|
||
# training | ||
n_train: 80% | ||
n_val: 20% | ||
batch_size: 5 | ||
train_val_split: random | ||
#shuffle: true | ||
metrics_key: validation_loss | ||
use_ema: true | ||
ema_decay: 0.99 | ||
ema_use_num_updates: true | ||
max_epochs: 100 | ||
learning_rate: 0.01 | ||
# loss function | ||
loss_coeffs: total_energy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
[sampling] | ||
nreplicas = 2 | ||
nprocs_per_replica = 1 | ||
kTstart = 1200.0 | ||
kTend = 1500.0 | ||
nsteps = 320 # Number of steps for sampling | ||
RXtrial_frequency = 16 | ||
sample_frequency = 4 | ||
print_frequency = 4 | ||
reload = false | ||
seed = 12345 | ||
|
||
[sampling.solver] | ||
type = 'nequip' | ||
base_input_dir = './baseinput_allegro' | ||
perturb = 0.0 | ||
# run_scheme = 'subprocess' | ||
ignore_species = ["O"] | ||
seed = 31415 | ||
|
||
[mlref] | ||
nreplicas = 2 | ||
ndata = 20 | ||
|
||
[mlref.solver] | ||
type = 'user' | ||
function = 'mock.calc_energy' | ||
perturb = 0.05 | ||
|
||
[train] | ||
type = 'nequip' | ||
base_input_dir = './allegro_train_input' | ||
exe_command = [ | ||
'', | ||
'nequip-train' | ||
] | ||
ignore_species = ["O"] | ||
vac_map = [] | ||
restart = false | ||
|
||
[config] | ||
unitcell = [[8.1135997772, 0.0000000000, 0.0000000000], | ||
[0.0000000000, 8.1135997772, 0.0000000000], | ||
[0.0000000000, 0.0000000000, 8.1135997772]] | ||
supercell = [1,1,1] | ||
|
||
[[config.base_structure]] | ||
type = "O" | ||
coords = [ | ||
[0.237399980, 0.237399980, 0.237399980], | ||
[0.762599945, 0.762599945, 0.762599945], | ||
[0.512599945, 0.012600004, 0.737399936], | ||
[0.487399966, 0.987399936, 0.262599975], | ||
[0.012600004, 0.737399936, 0.512599945], | ||
[0.987399936, 0.262599975, 0.487399966], | ||
[0.737399936, 0.512599945, 0.012600004], | ||
[0.262599975, 0.487399966, 0.987399936], | ||
[0.987399936, 0.487399966, 0.262599975], | ||
[0.012600004, 0.512599945, 0.737399936], | ||
[0.487399966, 0.262599975, 0.987399936], | ||
[0.512599945, 0.737399936, 0.012600004], | ||
[0.262599975, 0.987399936, 0.487399966], | ||
[0.737399936, 0.012600004, 0.512599945], | ||
[0.237399980, 0.737399936, 0.737399936], | ||
[0.762599945, 0.262599975, 0.262599975], | ||
[0.512599945, 0.512599945, 0.237399980], | ||
[0.487399966, 0.487399966, 0.762599945], | ||
[0.012600004, 0.237399980, 0.012600004], | ||
[0.987399936, 0.762599945, 0.987399936], | ||
[0.987399936, 0.987399936, 0.762599945], | ||
[0.012600004, 0.012600004, 0.237399980], | ||
[0.487399966, 0.762599945, 0.487399966], | ||
[0.512599945, 0.237399980, 0.512599945], | ||
[0.737399936, 0.237399980, 0.737399936], | ||
[0.262599975, 0.762599945, 0.262599975], | ||
[0.237399980, 0.512599945, 0.512599945], | ||
[0.762599945, 0.487399966, 0.487399966], | ||
[0.762599945, 0.987399936, 0.987399936], | ||
[0.237399980, 0.012600004, 0.012600004], | ||
[0.737399936, 0.737399936, 0.237399980], | ||
[0.262599975, 0.262599975, 0.762599945], | ||
] | ||
|
||
[[config.defect_structure]] | ||
coords = [ | ||
[0.000000000, 0.000000000, 0.000000000], | ||
[0.749999940, 0.249999985, 0.499999970], | ||
[0.249999985, 0.749999940, 0.499999970], | ||
[0.249999985, 0.499999970, 0.749999940], | ||
[0.749999940, 0.499999970, 0.249999985], | ||
[0.499999970, 0.749999940, 0.249999985], | ||
[0.499999970, 0.249999985, 0.749999940], | ||
[0.000000000, 0.499999970, 0.499999970], | ||
[0.749999940, 0.749999940, 0.000000000], | ||
[0.249999985, 0.249999985, 0.000000000], | ||
[0.249999985, 0.000000000, 0.249999985], | ||
[0.749999940, 0.000000000, 0.749999940], | ||
[0.499999970, 0.000000000, 0.499999970], | ||
[0.000000000, 0.749999940, 0.749999940], | ||
[0.000000000, 0.249999985, 0.249999985], | ||
[0.499999970, 0.499999970, 0.000000000], | ||
[0.374999970, 0.374999970, 0.374999970], | ||
[0.624999940, 0.624999940, 0.624999940], | ||
[0.374999970, 0.874999940, 0.874999940], | ||
[0.624999940, 0.124999993, 0.124999993], | ||
[0.874999940, 0.874999940, 0.374999970], | ||
[0.124999993, 0.124999993, 0.624999940], | ||
[0.874999940, 0.374999970, 0.874999940], | ||
[0.124999993, 0.624999940, 0.124999993], | ||
] | ||
[[config.defect_structure.groups]] | ||
name = 'Al' | ||
# species = ['Al'] # default | ||
# coords = [[[0,0,0]]] # default | ||
num = 16 #432 #16000 | ||
[[config.defect_structure.groups]] | ||
name = 'Mg' | ||
# species = ['Mg'] # default | ||
# coords = [[[0,0,0]]] # default | ||
num = 8 #216 #8000 | ||
|
||
|
||
[observer] | ||
reference_structure = "MgAl2O4.vasp" | ||
ignored_species = ["Al", "O"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
# This script installs pytorch, nequip, and allegro | ||
# into python3 environment | ||
|
||
set -ue | ||
|
||
echo "python3 points to the following:" | ||
which python3 | ||
|
||
echo | ||
|
||
python3 -m pip install torch | ||
python3 -m pip install nequip | ||
python3 -m pip install git+https://github.com/mir-group/allegro.git |
Oops, something went wrong.