Skip to content

Commit

Permalink
sigma default
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisung Kang committed Aug 20, 2024
1 parent d5d6565 commit 1ecdf8a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libs/lib_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,10 @@ def get_criteria_prob(inputs, Epot_step, uncerts, criteria):
Prob = np.exp((-1) * (Epot_step / inputs.NumAtoms) / beta)
Prob_upper_limit = np.exp(
(-1) * ((criteria.Epotential_avg + criteria.Epotential_std) / inputs.NumAtoms) / beta)
# Prob_lower_limit = np.exp(
# (-1) * ((criteria.Epotential_avg + criteria.Epotential_std*1.8) / inputs.NumAtoms) / beta)
Prob_lower_limit = np.exp(
(-1) * ((criteria.Epotential_avg + criteria.Epotential_std*1.8) / inputs.NumAtoms) / beta)
(-1) * ((criteria.Epotential_avg - criteria.Epotential_std*2.0) / inputs.NumAtoms) / beta)

# Get relative probability of the canomical ensemble
criteria_Prob_inter = Prob / Prob_upper_limit;
Expand Down
4 changes: 4 additions & 0 deletions libs/lib_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ def __init__(self, input_file='input.in'):

self.temp_factor = 0.0

# Set the testing data
# test / train
self.npz_test = 'test'

# Usage of energy criteria
self.criteria_energy = True

##[runMD default inputs]
Expand Down
2 changes: 2 additions & 0 deletions libs/lib_npz.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def generate_npz_DFT_init(inputs, traj, workpath):

if inputs.npz_sigma:
arrays_to_save['sigma'] = np.array(sigma_train_store)
else:
arrays_to_Save['sigma'] = np.zeros_like(np.array(E_train_store))
if inputs.ensemble == 'NPTisoiso' or inputs.train_stress:
arrays_to_save['stress'] = np.array(stress_train_store)

Expand Down
2 changes: 1 addition & 1 deletion tutorial/ALmoMD_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ conda activate almomd
#[Active learning types]
calc_type : active # (active) sampling up to the number of training data needed (period) sampling during the assigned period
al_type : force_max # Uncertainty type: force_max (Maximum atomic force uncertainty)
uncert_type : absolute # Absolute or relative uncertainty
uncert_type : absolute # Absolute or relative uncertainty (absolute / relative)
output_format : trajectory.son # File format of the output file (trajectory.son / aims.out / nequip)
device : cuda # Calating core type (cpu / cuda)
Expand Down

0 comments on commit 1ecdf8a

Please sign in to comment.