To turn off forces, force_coefficient=None or force_coefficient=0.?
In the documentation here, lets make sure that "force_coefficient=None" is the way to turn off force training and not "force_coefficient=0".
Comments (6)
-
reporter -
reporter -
assigned issue to
- marked as bug
-
assigned issue to
-
repo owner Good catch that it is only a bug on multiple cores. That should make it easier to troubleshoot.
-
repo owner This bug is in your commit lines @akhorshi. See below; I think line 119 is the culprit, where it sends data to fortran.
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/aap/Dropbox/repositories/Amp/amp/amp/model/__main__.py", line 119, in <module> fingerprintprimes,) File "/home/aap/Dropbox/repositories/Amp/amp/amp/model/__init__.py", line 996, in ravel_data fingerprintprimes) File "/home/aap/Dropbox/repositories/Amp/amp/amp/model/__init__.py", line 966, in ravel_neighborlists_and_fingerprintprimes for key, derafp in fingerprintprimes[hash].iteritems(): TypeError: 'NoneType' object has no attribute '__getitem__'
But I think we should have a larger conversation about this. I think we have some duplicate code that should be removed. I think (or at least suspect) that we can move the whole
if model.fortran
clauses frommodel/__main__.py
, and that can be handled inmodel.LossFunction.get_loss
as it is now for fortran-mode on a single core. That is, from the worker's perspective, it is running in serial (cores=1) mode, even though from the master's perspective is is running in parallel. Does that make sense? Probably easier to look at it in person.What I'm not clear about is why/if this changed when we made it so you can turn off force training by the None keyword.
-
repo owner -
assigned issue to
-
assigned issue to
-
repo owner - changed status to resolved
I think I figured this out in commit b44ccbe. There are still a couple of lingering issues that I marked with FIXME's though.
- Log in to comment
If you run this code, calculator number 3 and 4 will crash