Closed SimonEnsemble closed 6 years ago
framework.box.c_to_f * molecule.pos
is computed multiple times inside the loop over atoms of the molecule.
So maybe this should be outside of the for loop over framework atoms.
xf_molecule_atom = framework.box.c_to_f * molecule.pos[:, i]
and then work with it later.
dxf[j] += sign(dxf[j]) * repfactors[j]
is the sign right here? If dxf[j]
is less than negative repfactors[j] / 2
, it should be shifted to the right, so we should add repfactors[j]
, not make it further to the left?
I think
r_squared
follows fromdx
asr_squared = sum(dx .* dx)
, no? i.e., no need to computex_k
or domolecule.pos[:,i] - x_k
. Is that right?