def setUp(self): profile = {'Mo': {'r': 0.6, 'w': 1.}} self.describer1 = BispectrumCoefficients(cutoff=4.6, twojmax=6, element_profile=profile, quadratic=False, pot_fit=True) model1 = SKLModel(describer=self.describer1, model=LinearRegression()) self.potential1 = SNAPotential(model=model1, name='test') self.describer2 = BispectrumCoefficients(cutoff=4.6, twojmax=6, element_profile=profile, quadratic=True, pot_fit=True) model2 = SKLModel(describer=self.describer2, model=LinearRegression()) self.potential2 = SNAPotential(model=model2, name='test') self.test_pool = test_datapool self.test_structures = [] self.test_energies = [] self.test_forces = [] self.test_stresses = [] for d in self.test_pool: self.test_structures.append(d['structure']) self.test_energies.append(d['outputs']['energy']) self.test_forces.append(d['outputs']['forces']) self.test_stresses.append(d['outputs']['virial_stress']) self.test_struct = self.test_pool[-1]['structure']
def setUp(self): element_profile = {"Ni": {"r": 0.5, "w": 1}} describer1 = BispectrumCoefficients(rcutfac=4.1, twojmax=8, element_profile=element_profile, quadratic=False, pot_fit=True) model1 = SKLModel(describer=describer1, model=LinearRegression()) model1.model.coef_ = coeff model1.model.intercept_ = intercept snap1 = SNAPotential(model=model1) self.ff_settings1 = snap1 describer2 = BispectrumCoefficients(rcutfac=4.1, twojmax=8, element_profile=element_profile, quadratic=True, pot_fit=True) model2 = SKLModel(describer=describer2, model=LinearRegression()) model2.model.coef_ = coeff model2.model.intercept_ = intercept snap2 = SNAPotential(model=model2) self.ff_settings2 = snap2 self.struct = Structure.from_spacegroup("Fm-3m", Lattice.cubic(3.506), ["Ni"], [[0, 0, 0]])
def setUp(self): profile = {"Mo": {"r": 0.6, "w": 1.0}} self.describer1 = BispectrumCoefficients(rcutfac=4.6, twojmax=6, element_profile=profile, quadratic=False, pot_fit=True) model1 = SKLModel(describer=self.describer1, model=LinearRegression()) self.potential1 = SNAPotential(model=model1, name="test") self.describer2 = BispectrumCoefficients(rcutfac=4.6, twojmax=6, element_profile=profile, quadratic=True, pot_fit=True) model2 = SKLModel(describer=self.describer2, model=LinearRegression()) self.potential2 = SNAPotential(model=model2, name="test") self.test_pool = test_datapool self.test_structures = [] self.test_energies = [] self.test_forces = [] self.test_stresses = [] for d in self.test_pool: self.test_structures.append(d["structure"]) self.test_energies.append(d["outputs"]["energy"]) self.test_forces.append(d["outputs"]["forces"]) self.test_stresses.append(d["outputs"]["virial_stress"]) self.test_struct = self.test_pool[-1]["structure"]
def setUp(self): element_profile = {'Ni': {'r': 0.5, 'w': 1}} describer = BispectrumCoefficients(cutoff=4.1, twojmax=8, element_profile=element_profile, pot_fit=True) model = SKLModel(describer=describer, model=LinearRegression()) model.model.coef_ = coeff model.model.intercept_ = intercept snap = SNAPotential(model=model) self.ff_settings = snap
def setUp(self): element_profile = {'Ni': {'r': 0.5, 'w': 1}} describer = BispectrumCoefficients(cutoff=4.1, twojmax=8, element_profile=element_profile, pot_fit=True) model = SKLModel(describer=describer, model=LinearRegression()) model.model.coef_ = coeff model.model.intercept_ = intercept snap = SNAPotential(model=model) self.struct = Structure.from_spacegroup('Fm-3m', Lattice.cubic(3.506), ['Ni'], [[0, 0, 0]]) self.ff_settings = snap