Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Nov 6, 2024
1 parent f6c38dc commit df7d14f
Show file tree
Hide file tree
Showing 7 changed files with 330 additions and 3 deletions.
60 changes: 60 additions & 0 deletions examples/active_learning_qe/allegro_train_input/train/input.yaml
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ ignore_species = []
[train]
type = 'aenet'
base_input_dir = './aenet_train_input'
exe_command = ['generate.x-2.0.4-ifort_serial', 'srun train.x-2.0.4-ifort_intelmpi']
ignore_species = ["O"]
vac_map = []
restart = false
[train.exe_command]
generate = 'generate.x-2.0.4-ifort_serial'
train = 'srun train.x-2.0.4-ifort_intelmpi'

[config]
unitcell = [[8.1135997772, 0.0000000000, 0.0000000000],
Expand Down
123 changes: 123 additions & 0 deletions examples/active_learning_qe/input-mlip-3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
[sampling]
nreplicas = 8
nprocs_per_replica = 1
kTstart = 600.0
kTend = 2000.0
nsteps = 6400 # Number of steps for sampling
RXtrial_frequency = 4
sample_frequency = 16
print_frequency = 1
reload = false

[sampling.solver]
type = 'mlip_3'
path= 'mlp'
base_input_dir = './baseinput'
perturb = 0.0
run_scheme = 'subprocess'
ignore_species = ["O"]

[mlref]
nreplicas = 8
ndata = 5

[mlref.solver]
type = 'qe'
base_input_dir = './baseinput_ref'
perturb = 0.05
ignore_species = []

[train]
type = 'mlip_3'
base_input_dir = './mlip-3_train_input'
ignore_species = ["O"]
vac_map = []
restart = false
[train.exe_command]
train = 'mlp'

[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"]
121 changes: 121 additions & 0 deletions examples/active_learning_qe/input-nequip.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
[sampling]
nreplicas = 8
nprocs_per_replica = 1
kTstart = 600.0
kTend = 2000.0
nsteps = 6400 # Number of steps for sampling
RXtrial_frequency = 4
sample_frequency = 16
print_frequency = 1
reload = false

[sampling.solver]
type = 'nequip'
base_input_dir = './baseinput'
perturb = 0.0
ignore_species = ["O"]

[mlref]
nreplicas = 8
ndata = 5

[mlref.solver]
type = 'qe'
base_input_dir = './baseinput_ref'
perturb = 0.05
ignore_species = []

[train]
type = 'nequip'
base_input_dir = './allegro_train_input'
ignore_species = ["O"]
vac_map = []
restart = false
[train.exe_command]
train = 'nequip-train'

[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"]
17 changes: 17 additions & 0 deletions examples/active_learning_qe/mlip-3_train_input/train/input.almtp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MTP
version = 1.1.0
potential_name = MTP1m
species_count = 3
potential_tag =
radial_basis_type = RBChebyshev
min_dist = 2.3
max_dist = 5
radial_basis_size = 8
radial_funcs_count = 2
alpha_moments_count = 8
alpha_index_basic_count = 5
alpha_index_basic = {{0, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 0}}
alpha_index_times_count = 5
alpha_index_times = {{0, 0, 1, 5}, {1, 1, 1, 6}, {2, 2, 1, 6}, {3, 3, 1, 6}, {0, 5, 1, 7}}
alpha_scalar_moments = 5
alpha_moment_mapping = {0, 4, 5, 6, 7}
4 changes: 3 additions & 1 deletion examples/active_learning_qe_lammps/input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ ignore_species = []
[train]
type = 'aenet'
base_input_dir = './aenet_train_input'
exe_command = ['generate.x-2.0.4-ifort_serial', 'srun train.x-2.0.4-ifort_intelmpi']
ignore_species = ["O"]
vac_map = []
restart = false
[train.exe_command]
generate = 'generate.x-2.0.4-ifort_serial'
train = 'srun train.x-2.0.4-ifort_intelmpi'

[config]
unitcell = [[8.1135997772, 0.0000000000, 0.0000000000],
Expand Down
4 changes: 3 additions & 1 deletion examples/active_learning_vasp/input.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ ignore_species = []
[train]
type = 'aenet'
base_input_dir = './aenet_train_input'
exe_command = ['generate.x-2.0.4-ifort_serial', 'srun train.x-2.0.4-ifort_intelmpi']
ignore_species = ["O"]
vac_map = []
restart = false
[train.exe_command]
generate = 'generate.x-2.0.4-ifort_serial'
train = 'srun train.x-2.0.4-ifort_intelmpi'

[config]
unitcell = [[8.1135997772, 0.0000000000, 0.0000000000],
Expand Down

0 comments on commit df7d14f

Please sign in to comment.