n_train_force = int(1e5) save_interval = 100 timestep = 5.0 train_traj = "training.traj" train_force_traj = "training_force.traj" max_steps = int(4e3) convergence = { "energy_rmse": 1e-16, "force_rmse": None, "max_steps": max_steps } force_coefficient = None overfit = 1e-7 hidden_layers = [10, 10] cutoff = Polynomial(5.0, gamma=5.0) num_radial_etas = 7 num_angular_etas = 11 num_zetas = 1 angular_type = "G4" trn = Trainer( convergence=convergence, force_coefficient=force_coefficient, overfit=overfit, cutoff=cutoff, hidden_layers=hidden_layers, ) trn.create_Gs(elements, num_radial_etas, num_angular_etas, num_zetas, angular_type) trjbd = TrajectoryBuilder()
calc = EMT() train_atoms = trjbd.build_atoms(system, size, temp, calc) calc = EMT() test_atoms = trjbd.build_atoms(system, size, temp, calc) steps, train_traj = trjbd.integrate_atoms(train_atoms, train_traj, n_train, save_interval) steps, test_traj = trjbd.integrate_atoms(test_atoms, test_traj, n_test, save_interval) rcs = [2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0] gamma = 5.0 cutoffs = [] for rc in rcs: cutoffs.append(Cosine(rc)) cutoffs.append(Polynomial(rc, gamma=gamma)) calcs = {} for cutoff in cutoffs: trn.cutoff = cutoff trn.create_Gs(elements, num_radial_etas, num_angular_etas, num_zetas, angular_type) label = "{}-{}".format(cutoff.__class__.__name__, cutoff.Rc) dblabel = label + "-train" calc = trn.create_calc(label=label, dblabel=dblabel) ann = Annealer( calc=calc, images=train_traj, Tmax=20, Tmin=1,