alchemy with multiple SUBSYS bug

Noam Bernstein no... at bollweevil.gdbg.org
Tue Nov 27 14:35:47 UTC 2012


Hi - I think I've found a small bug in the alchemy code, and I'm not sure
how
best to fix it. For example for
     FORCE_EVAL%MIXED%MIXING_TYPE LINEAR_COMBINATION,
there are two calls to mixed_map_forces(), the first with overwrite=.true.,
the
second with overwrite=.false.  However, if the first FORCE_ENV has some of
the atoms missing (e.g. alchemy), the atoms that are missing never have
their forces overwritten.  Presumably those forces should be set to 0 before
the forces from the second FORCE_ENV are added.

Was there some particular reason that the mixed forces aren't all just
initialized to 0,
and instead the overwrite argument is used?  Because I don't see a reliable
way of
fixing this problem without either some tedious bookkeeping to find
all atoms that map to nothing in the overwrite=.true. case, or just setting
all the forces to 0 before the calls to mixed_map_forces().  I'd be happy
to submit a patch, but if there's some reason it's not a good idea to set
all the forces to 0, I'd like to understand that.

           Noam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20121127/46c6ef34/attachment.htm>


More information about the CP2K-user mailing list