quantity.property_prediction.init_dipole_moment#
- init_dipole_moment(displacement_fn, model=None, graph_from_neighbor_list=None, partial_charge_feature=1, reference_position_fn=None, features_key='features')[source]#
Computes the dipole moment from partial charges of a molecule.
- Parameters:
displacement_fn (
Callable) – Function to compute displacement between reference point and particle positions.model (
PropertyPredictor) – Model to predict the partial charges.graph_from_neighbor_list (
Callable) – Function to create molecular graph from neighbor list.partial_charge_feature (
int) – Number of the per-atom feature corresponding to the partial charge.reference_position_fn (
Callable) – Function to compute the reference position for the dipole moment. If None, the origin of the box is used.features_key (
str) – Key to the pre-computed features if no model is provided.
- Returns:
Returns a function to compute dipole moment snapshots.