Localized Orbital Scaling Correction (LOSC) C library
localization.h File Reference

The C interface for LOSC localization. More...

#include <c_losc/matrix.h>
#include <stddef.h>

Go to the source code of this file.

Classes

struct  LoscLocalizerBase
 The C interface for LOSC localizer base. More...
 
struct  LoscLocalizerV2
 The C interface for LOSC localizer version 2. More...
 

Macros

#define losc_localizer_v2_free(ptr)   _losc_localizer_v2_free(&(ptr))
 Free a LoscLoscLocalizerV2. More...
 

Typedefs

typedef struct LoscLocalizerBase LoscLocalizerBase
 The C interface for LOSC localizer base. More...
 
typedef struct LoscLocalizerV2 LoscLocalizerV2
 The C interface for LOSC localizer version 2. More...
 

Functions

LoscLocalizerV2losc_localizer_v2_create (const losc_matrix *C_lo_basis, const losc_matrix *H_ao, const losc_matrix *D_ao[3])
 Constructor of LoscLoscLocalizerV2. More...
 

Detailed Description

The C interface for LOSC localization.

Macro Definition Documentation

#define losc_localizer_v2_free (   ptr)    _losc_localizer_v2_free(&(ptr))

Free a LoscLoscLocalizerV2.

Parameters
[in,out]ptra pointer with type LoscLocalizerV2 *. At exit, ptr is set to null.

Typedef Documentation

The C interface for LOSC localizer base.

Note
This struct exports all the functions for LOSC localization base class. This struct servers as helper class to avoid code duplication for the implementation of C interface. There is no need for C users to create a such struct in practice.

The C interface for LOSC localizer version 2.

LOSC localization version 2 is defined in Eq. 7 in the LOSC2 paper (J. Phys. Chem. Lett. 2020, 11, 4, 1528–1535).

See also
losc_localizer_v2_create(): create a LoscLocalizerV2.
losc_localizer_v2_create(): free a LoscLocalizerV2.

Function Documentation

LoscLocalizerV2* losc_localizer_v2_create ( const losc_matrix *  C_lo_basis,
const losc_matrix *  H_ao,
const losc_matrix *  D_ao[3] 
)

Constructor of LoscLoscLocalizerV2.

Parameters
[in]C_lo_basisLO basis coefficient matrix under AO with dimension [nbasis, nlo].
[in]H_aoHamiltonian matrix under AO used in localization with dimension [nbasis, nbasis].
[in]D_aodipole matrix under AO in x, y and z order with dimension [nbasis, nbasis].
Returns
create a LoscLoscLocalizerV1 struct and return the pointer.