HighDimensionalNNP

class hdnnpy.model.models.HighDimensionalNNP(elemental_composition, *args)[source]

Bases: chainer.link.ChainList

High dimensional neural network potential.

This is one implementation of HDNNP that is proposed by Behler et al [Ref]. It has a structure in which simple neural networks are arranged in parallel. Each neural network corresponds to one atom and inputs descriptor and outputs property per atom. Total value or property is predicted to sum them up.

Parameters:
  • elemental_composition (list [str]) – Create the same number of SubNNP instances as this. A SubNNP with the same element has the same parameters synchronized.
  • *args – Positional arguments that is passed to SubNNP.
get_by_element(element)[source]

Get all SubNNP instances that represent the same element.

Parameters:element (str) – Element symbol that you want to get.
Returns:All SubNNP instances which represent the same element in this HDNNP instance.
Return type:list [SubNNP]
predict(inputs, order)[source]

Get prediction from input data in a feed-forward way.

It accepts 0 or 2 for order.

Notes

0th-order predicted value is not total value, but per-atom value.

Parameters:
  • inputs (list [ndarray]) – Length have to equal to order + 1. Each element is correspond to 0th-order, 1st-order, …
  • order (int) – Derivative order of prediction by this model.
Returns:

Predicted values. Each elements is correspond to 0th-order, 1st-order, …

Return type:

list [Variable]

reduce_grad_to(master_nnp)[source]

Collect calculated gradient of parameters into MasterNNP for each element.

Parameters:master_nnp (MasterNNP) – MasterNNP instance where you manage parameters.
sync_param_with(master_nnp)[source]

Synchronize the parameters with MasterNNP for each element.

Parameters:master_nnp (MasterNNP) – MasterNNP instance where you manage parameters.