Skip to content

Commit

Permalink
Updae change log and docs. Revert unneeded changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
shinkle-lanl committed Dec 11, 2023
1 parent 38c287f commit 192c3ad
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
0.0.2a2
=======

New Features:
-------------

- New FuzzyHistogrammer node for transforming scalar feature into a fuzzy/soft
histogram array

- New PeriodicPairIndexerMemory node which removes the need to recompute
pairs for each model evaluation in some instances, leading to speed improvements

- New KDTreePairs and KDTreePairsMemory nodes for computing pairs using linearly-
scaling KD Tree algorithm.

Improvements
------------

- ASE database loader added to read any ASE file or list of ASE files.

Bug Fixes:
----------
- Function 'gemerate_database_info' renamed to 'generate_database_info.'

- Fixed issue with class Predictor arising when multiple names for the same output node are provided.

- Fixed issue with MolPairSummer when the batch size and the feature size are both one.

0.0.2a1
=======

Expand Down
20 changes: 18 additions & 2 deletions docs/source/examples/periodic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ to within the unit cell. Because the nearest images (27 replicates of the cell a
search radius 1) are numerous, periodic pair finding is noticeably more costly in terms of
memory and time than open boundary conditions. The less skewed your cells are, as well as
are the larger cells are compared to the cutoff distance required,
the fewer images needed to be searched in finding pairs.
the fewer images needed to be searched in finding pairs.


Dynamic Pair Finder
Expand All @@ -42,7 +42,23 @@ the systems one by one. The upshot of this is that less memory is required.
However, the cost is that each system is evaluated independently in serial,
and as such the pair finding can be a rather slow operation. This algorithm is
more likely to show benefits when the number of atoms in a training system is highly
variable.
variable.

For systems with orthorhombic cells and an interaction radius not greater than any of the
cell side lengths, the :class:`~hippynn.graphs.nodes.pairs.KDTreePairs` can be used
alternatively. It should exhibit reduced computation times, especially for large systems.

Pair Finder Memory
------------------
When using a trained model to run MD or for any application where atom positions
change only slightly between subsquent model calls,
:class:`~hippynn.graphs.nodes.pairs.PeriodicPairIndexerMemory` and
:class:`~hippynn.graphs.nodes.pairs.KDTreePairsMemory` can be used to reduce run
time by reusing pair information. Current pair indices are stored in memory and
reused so long as no atom has moved more than `skin`/2, where `skin` is an additional
parameter set by the user. Increasing the value of `skin` will increase the number of
pair distances computed at each step, but decrease the number of times new pairs must
be computed. Skin should be set to zero while training for fastest results.

Caching Pre-computed Pairs
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion hippynn/graphs/nodes/base/definition_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AutoKw:
_auto_module_class = NotImplemented

def auto_module(self):
kw = self.module_kwargs or {} # Default to empty dictionary if False
kw = self.module_kwargs or {} # Default to empty dictionary if Falsey
return self._auto_module_class(**kw)


Expand Down
2 changes: 1 addition & 1 deletion hippynn/graphs/nodes/indexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def acquire_encoding_padding(search_nodes, species_set, purpose=None):

return encoder, pidxer

class FuzzyHistogramer(AutoKw, SingleNode):
class FuzzyHistogrammer(AutoKw, SingleNode):
"""
Node for transforming a scalar feature into a vectorized feature via
the fuzzy/soft histogram method.
Expand Down
1 change: 1 addition & 0 deletions hippynn/layers/pairs/periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class PeriodicPairIndexer(_PairIndexer):
Finds pairs in general periodic conditions.
"""
def forward(self, coordinates, nonblank, real_atoms, inv_real_atoms, cells):

original_coordinates = coordinates

with torch.no_grad():
Expand Down

0 comments on commit 192c3ad

Please sign in to comment.