Real-space covariance representation of atomic environments

Module contents for quippy.real_space_covariance:

Classes

RealSpaceCovariance(…) 24-point quaternion grid from centers of the cells of a truncated-cubic tetracontaoctachoron (48-cell), coverage angle alpha=62.8 degrees.

Functions

random_quaternion()
Returns:
overlap_func(x,[am_data])
Parameters:
centre_on_atom_1(at)
Parameters:
doverlap_func(x,[am_data])
Parameters:
rotmat_quaternion(q)
Parameters:
drotmat_dquaternion(q)
Parameters:
class quippy.real_space_covariance.RealSpaceCovariance(n, n_grid_minim, sigma_alpha, sigma_beta, sigma_covariance, sigma_error, cutoff_in, transition_width, covariance_tol)

Bases: quippy.oo_fortran.FortranDerivedType

24-point quaternion grid from centers of the cells of a truncated-cubic tetracontaoctachoron (48-cell), coverage angle alpha=62.8 degrees. See http://charles.karney.info/orientation

Parameters:
n : input int
n_grid_minim : input int
sigma_alpha : input float
sigma_beta : input float
sigma_covariance : input float
sigma_error : input float
cutoff_in : input float
transition_width : input float
covariance_tol : input float

References

Routine is wrapper around Fortran routine __init__initialise defined in file src/Utils/real_space_covariance.f95. Class is wrapper around Fortran type RealSpaceCovariance defined in file src/Utils/real_space_covariance.f95.

Methods

align(*args, **kwargs) Wrapper around Fortran interface align containing multiple routines:
covariance(…) realspacecovariance_covariance(at1,at2,q,[distance,force_covariance,force_difference,do_align])
is_same_fortran_object(other) Test if self and other point to the same Fortan object.
predict(test) realspacecovariance_predict(test)
predict_2(test) realspacecovariance_predict_2(test)
predict_3(test,crystal,k) realspacecovariance_predict_3(test,crystal,k)
set_n(n) realspacecovariance_set_n(n)
shallow_copy() Return a shallow copy of self.
shallow_copy_from(other) Transform self into a shallow copy of other.
teach(do_optimise,use_qr) realspacecovariance_teach(do_optimise,use_qr)
align(*args, **kwargs)

Wrapper around Fortran interface align containing multiple routines:

align(tag1, tag2, qs[, overlap])

Align two sets of configurations, identified by the tags tag1 and tag2

Parameters:
  • tag1 (input int) –
  • tag2 (input int) –
  • qs (input rank-2 array('d') with bounds (qp_n0,qp_n1)) –
  • overlap (in/output rank-0 array(float,'d'), optional) –
Returns:

ret_q – rank-1 array(‘d’) with bounds (4)

Routine is wrapper around Fortran routine realspacecovariance_align_data_sets defined in file src/Utils/real_space_covariance.f95.

align(at1, at2, qs[, overlap])

Find the quaterion corresponding to the rotation which maximise the overlap between the atomic densities of at1 and at2, starting minimisations at each quaterion in the (4,n) array qs

Parameters:
  • at1 (Atoms object) –
  • at2 (Atoms object) –
  • qs (input rank-2 array('d') with bounds (qp_n0,qp_n1)) –
  • overlap (in/output rank-0 array(float,'d'), optional) –
Returns:

ret_q – rank-1 array(‘d’) with bounds (4)

Routine is wrapper around Fortran routine realspacecovariance_align_pair defined in file src/Utils/real_space_covariance.f95.

align(at, tag, qs[, overlap])

Align the configuration at with the set of configurations in this.data which have tag equal to tag. Objective function is sum of overlaps. A single minimisation is performed, starting from quaterions in qs.

Parameters:
  • at (Atoms object) –
  • tag (input int) –
  • qs (input rank-2 array('d') with bounds (qp_n0,qp_n1)) –
  • overlap (in/output rank-0 array(float,'d'), optional) –
Returns:

ret_q – rank-1 array(‘d’) with bounds (4)

Routine is wrapper around Fortran routine realspacecovariance_align_with_data_set defined in file src/Utils/real_space_covariance.f95.

covariance(at1, at2, q[, distance, force_covariance, force_difference, do_align])

realspacecovariance_covariance(at1,at2,q,[distance,force_covariance,force_difference,do_align])

Parameters:
at1 : Atoms object
at2 : Atoms object
q : in/output rank-1 array(‘d’) with bounds (4)
distance : in/output rank-0 array(float,’d’), optional
force_covariance : in/output rank-0 array(float,’d’), optional
force_difference : in/output rank-0 array(float,’d’), optional
do_align : input int, optional
Returns:
ret_covariance : float

References

Routine is wrapper around Fortran routine covariance defined in file src/Utils/real_space_covariance.f95.

predict(test)

realspacecovariance_predict(test)

Parameters:
test : Atoms object
force : rank-1 array(‘d’) with bounds (3)
error : float

References

Routine is wrapper around Fortran routine predict defined in file src/Utils/real_space_covariance.f95.

predict_2(test)

realspacecovariance_predict_2(test)

Parameters:
test : Atoms object
force : rank-1 array(‘d’) with bounds (3)
error : float

References

Routine is wrapper around Fortran routine predict_2 defined in file src/Utils/real_space_covariance.f95.

predict_3(test, crystal, k)

realspacecovariance_predict_3(test,crystal,k)

Parameters:
test : Atoms object
crystal : Atoms object
k : input int
force : rank-1 array(‘d’) with bounds (3)
error : float

References

Routine is wrapper around Fortran routine predict_3 defined in file src/Utils/real_space_covariance.f95.

set_n(n)

realspacecovariance_set_n(n)

Parameters:
n : input int

References

Routine is wrapper around Fortran routine set_n defined in file src/Utils/real_space_covariance.f95.

teach(do_optimise, use_qr)

realspacecovariance_teach(do_optimise,use_qr)

Parameters:
do_optimise : input int
use_qr : input int

References

Routine is wrapper around Fortran routine teach defined in file src/Utils/real_space_covariance.f95.

quippy.real_space_covariance.random_quaternion()
Returns:
ret_random_quaternion : rank-1 array(‘d’) with bounds (4)

References

Routine is wrapper around Fortran routine random_quaternion defined in file src/Utils/real_space_covariance.f95.

quippy.real_space_covariance.overlap_func(x[, am_data])
Parameters:
x : input rank-1 array(‘d’) with bounds (qp_n0)
am_data : input rank-2 array(‘S’) with bounds (qp_n1,(1)), optional
Returns:
ret_overlap_func : float

References

Routine is wrapper around Fortran routine overlap_func defined in file src/Utils/real_space_covariance.f95.

quippy.real_space_covariance.centre_on_atom_1(at)
Parameters:
at : Atoms object

References

Routine is wrapper around Fortran routine centre_on_atom_1 defined in file src/Utils/real_space_covariance.f95.

quippy.real_space_covariance.doverlap_func(x[, am_data])
Parameters:
x : input rank-1 array(‘d’) with bounds (qp_n0)
am_data : input rank-2 array(‘S’) with bounds (qp_n1,(1)), optional
Returns:
ret_doverlap_func : rank-1 array(‘d’) with bounds (size(qp_x))

References

Routine is wrapper around Fortran routine doverlap_func defined in file src/Utils/real_space_covariance.f95.

quippy.real_space_covariance.rotmat_quaternion(q)
Parameters:
q : input rank-1 array(‘d’) with bounds (4)
Returns:
ret_rotmat_quaternion : rank-2 array(‘d’) with bounds (3,3)

References

Routine is wrapper around Fortran routine rotmat_quaternion defined in file src/Utils/real_space_covariance.f95.

quippy.real_space_covariance.drotmat_dquaternion(q)
Parameters:
q : input rank-1 array(‘d’) with bounds (4)
Returns:
ret_drotmat_dquaternion : rank-3 array(‘d’) with bounds (3,3,4)

References

Routine is wrapper around Fortran routine drotmat_dquaternion defined in file src/Utils/real_space_covariance.f95.