Closed briling closed 1 year ago
Thanks!
I assume you went for a 2 step formula for the finite differences because it was slow otherwise. If its not slow (small molecule) we should probably use a four point stencil (i.e. https://en.wikipedia.org/wiki/Five-point_stencil) for the numerical gradient.
I'm not sure it makes sense given the numerical gradient is only for this test. Why make it more complicated?
Also, in the test, myfunc is evil (evil name, evil use of mol that is not passed as argument). Otherwise the reactors look good. And tests pass.
I've changed the evil name but can't find where's the problem with mol...
The 2 step finite differences can be bad so the same test could potentially fail for a different molecule (for example).
Issue with mol is in
mymol.atom = [ (mol.atom_symbol(i), r[i]) for i in range(mol.natm)]
which takes mol from outside the function. This is also a liability.
Issue with mol is in
mymol.atom = [ (mol.atom_symbol(i), r[i]) for i in range(mol.natm)]
which takes mol from outside the function. This is also a liability.
This line is inside build_mol()
which takes mol
as the first argument
Yes, you fixed it. Lets push! GJ!
I assume you went for a 2 step formula for the finite differences because it was slow otherwise. If its not slow (small molecule) we should probably use a four point stencil (i.e. https://en.wikipedia.org/wiki/Five-point_stencil) for the numerical gradient.
Also, in the test, myfunc is evil (evil name, evil use of mol that is not passed as argument). Otherwise the reactors look good. And tests pass.