Move unified L-J initialization to definition
This commit is contained in:
@ -6,14 +6,4 @@ from lammps.mliap.mliap_unified_lj import MLIAPUnifiedLJ
|
||||
|
||||
if __name__ == '__main__':
|
||||
unified = MLIAPUnifiedLJ()
|
||||
unified.element_types = ["Ar"]
|
||||
unified.ndescriptors = 1
|
||||
unified.nparams = 3
|
||||
# Mimicking the LJ pair-style:
|
||||
# pair_style lj/cut 2.5
|
||||
# pair_coeff * * 1 1
|
||||
unified.epsilon = 1.0
|
||||
unified.sigma = 1.0
|
||||
unified.rcutfac = 1.25
|
||||
|
||||
unified.pickle('mliap_unified_lj_Ar.pkl')
|
||||
|
||||
@ -7,6 +7,15 @@ class MLIAPUnifiedLJ(MLIAPUnified):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.element_types = ["Ar"]
|
||||
self.ndescriptors = 1
|
||||
self.nparams = 3
|
||||
# Mimicking the LJ pair-style:
|
||||
# pair_style lj/cut 2.5
|
||||
# pair_coeff * * 1 1
|
||||
self.epsilon = 1.0
|
||||
self.sigma = 1.0
|
||||
self.rcutfac = 1.25
|
||||
|
||||
def compute_gradients(self, data):
|
||||
"""Test compute_gradients."""
|
||||
|
||||
Reference in New Issue
Block a user