Todos
This commit is contained in:
parent
a3d4d8a2c6
commit
cdf9e3104f
|
@ -19,7 +19,8 @@ class State:
|
|||
return energy(self.positions())
|
||||
|
||||
def minimize(self) -> None:
|
||||
res = minimize(energy, self.positions(), method='L-BFGS-B', bounds=Bounds(0,self.size), jac='3-point')
|
||||
# report with jax gradient
|
||||
res = minimize(energy, self.positions(), method='CG', jac='3-point')
|
||||
min = res.x
|
||||
min = np.matrix(min)
|
||||
min.shape = (self.count,3)
|
||||
|
@ -75,6 +76,7 @@ def distances(P):
|
|||
XYZ = abs(XYZ)
|
||||
|
||||
# nearest image convention
|
||||
# replace with modulo
|
||||
XYZ = XYZ.at[XYZ > 0.5].add(-0.5)
|
||||
XYZ = XYZ**2
|
||||
|
||||
|
|
Loading…
Reference in New Issue