Structure

This submodule contains utility functions to analyse and modify atomic structure data, such as interatomic distances, centres of mass, both with and without support for periodic boundary conditions.

These functions can be used to build more sophisticated output functions, or for basic analysis of simulation results in post.

This module doesn't contain:

  • Basic definitions of atomic structures (e.g. Atoms, PeriodicCell, ...). These are defined in NQCBase.
  • Functions to generate atomic structures. These should be added to NQCDynamics.InitialConditions.
  • Analysis functions for specific systems (e.g. molecules on surfaces). These should be added to NQCDynamics.Analysis.

Method reference

NQCDynamics.Structure.minimum_distance_translationMethod
minimum_distance_translation(config::Matrix, ind1::Int, ind2::Int, simulation::AbstractSimulation)

Outputs a translation vector to move config[:,ind2] such that the closest distance between ind1 and ind2 is reached. **The search of neighbouring unit cells will expand until the cutoff. If configurations are already subject to a minimum image convention, cutoff=1 reduces unnecessary overhead. **

source
NQCDynamics.Structure.pbc_center_of_massMethod
pbc_center_of_mass(config::Matrix, ind1::Int, ind2::Int, cell::PeriodicCell, atoms::Atoms;args...)

Generates center of mass coordinates for two atoms, including a check if the copy of the second atom in any neighbouring unit cell is closer.

source
NQCDynamics.Structure.pbc_distanceMethod
pbc_distance(config::Matrix, ind1::int_or_index, ind2::int_or_index, simulation::NQCDynamics.AbstractSimulation)

Returns in Angstom, not in Bohr - Check units.

Calculates the distance between two atoms, including a check if the copy of the second atom in any neighbouring unit cell is closer. This variant is designed for trajectories where cell boundary wrapping has been used.

source