/usr/include/libmsym/msym.h is in libavogadro-dev 1.2.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | //
// msym.h
// libmsym
//
// Created by Marcus Johansson on 30/01/15.
// Copyright (c) 2015 Marcus Johansson.
//
// Distributed under the MIT License ( See LICENSE file or copy at http://opensource.org/licenses/MIT )
//
#ifndef __MSYM_H
#define __MSYM_H
#ifdef __cplusplus
extern "C" {
#endif
#include "msym_error.h"
typedef struct _msym_context * msym_context;
typedef enum _msym_geometry {
GEOMETRY_UNKNOWN = -1,
SPHERICAL,
LINEAR,
PLANAR_REGULAR,
PLANAR_IRREGULAR,
POLYHEDRAL_PROLATE,
POLYHEDRAL_OBLATE,
ASSYMETRIC
} msym_geometry_t;
typedef enum _msym_symmetry_operation_type {
IDENTITY = 0,
PROPER_ROTATION = 1,
IMPROPER_ROTATION = 2,
REFLECTION = 3,
INVERSION = 4
} msym_symmetry_operation_type_t;
typedef enum _msym_basis_type {
ATOMIC_ORBITAL,
MASS_WEIGHTED_COORDINATES
} msym_basis_type_t;
typedef struct _msym_symmetry_operation {
msym_symmetry_operation_type_t type;
int order; // Order of proper/improper rotation
int power; // Power (e.g. C2^2 = I)
double v[3]; // Proper/improper rotation vector or reflection plane normal
int cla; // Class of symmetry operation (point group dependant)
} msym_symmetry_operation_t;
typedef enum _msym_point_group_type {
POINT_GROUP_Ci,
POINT_GROUP_Cs,
POINT_GROUP_Cn,
POINT_GROUP_Cnh,
POINT_GROUP_Cnv,
POINT_GROUP_Dn,
POINT_GROUP_Dnh,
POINT_GROUP_Dnd,
POINT_GROUP_S2n,
POINT_GROUP_T,
POINT_GROUP_Td,
POINT_GROUP_Th,
POINT_GROUP_O,
POINT_GROUP_Oh,
POINT_GROUP_I,
POINT_GROUP_Ih,
POINT_GROUP_K,
POINT_GROUP_Kh
} msym_point_group_type_t;
typedef struct _msym_subgroup {
msym_point_group_type_t type;
int n;
int sopsl;
msym_symmetry_operation_t *primary;
msym_symmetry_operation_t **sops;
struct _msym_subgroup *subgroup[2];
char name[6];
} msym_subgroup_t;
typedef struct _msym_thresholds {
double zero; // For determining if something is zero (e.g. vectors close to center of mass)
double geometry; // For translating inertial tensor eigenvalues to geometric structures
double angle; // For determining angles, (e.g. if vectors are parallel)
double equivalence; // Equivalence test threshold
double eigfact; // Jacobi eigenvalue algorithm threshold
double permutation; // Equality test when determining permutation for symmetry operation
double orthogonalization; // For orthogonalizing orbital subspaces
} msym_thresholds_t;
typedef struct _msym_orbital {
int n; // Principal
int l; // Azimuthal
int m; // Liniear combination of magnetic quantum number (e.g. 2pz = 0, 2px = 1, 2py = -1)
char name[8]; // Name
} msym_orbital_t;
typedef struct _msym_displacement {
double v[3];
} msym_displacement_t;
typedef struct _msym_subspace {
msym_basis_type_t type; // Type
double *space; // double[d][basisl] with coefficients of orbitals
union {
msym_orbital_t **o; // Atomic orbital basis
msym_displacement_t **q; // Mass weighted coordinates vibration basis NYI
} basis; // Basis functions
struct _msym_subspace *subspace; // Subspaces
int d; // Dimension of subspace
int basisl; // Length of basis vectors
int irrep; // Irreducable representation
int subspacel; // Number of subspaces
} msym_subspace_t;
typedef struct _msym_element {
msym_orbital_t **ao; // Pointers into block allocated list of atomic orbitals
double m; // Mass
double v[3]; // Position
int n; // Nuclear charge
int aol; // Number of atomic orbitals
char name[4]; // Name
} msym_element_t;
typedef struct _msym_equivalence_set {
msym_element_t **elements; // Pointers to elements
double err; // Maximum error when detecting this equivalence set
int length; // Number of elements
} msym_equivalence_set_t ;
msym_context msymCreateContext();
msym_error_t msymReleaseContext(msym_context ctx);
msym_error_t msymSetThresholds(msym_context ctx, msym_thresholds_t *thresholds);
msym_error_t msymGetThresholds(msym_context ctx, msym_thresholds_t **thresholds);
msym_error_t msymSetElements(msym_context ctx, int length, msym_element_t *elements);
msym_error_t msymGetElements(msym_context ctx, int *length, msym_element_t **elements);
msym_error_t msymSetPointGroup(msym_context ctx, char *name);
msym_error_t msymGetPointGroup(msym_context ctx, int l, char *buf);
msym_error_t msymGetSubgroups(msym_context ctx, int *l, msym_subgroup_t **subgroups);
msym_error_t msymSelectSubgroup(msym_context ctx, msym_subgroup_t *subgroup);
msym_error_t msymGetSymmetryOperations(msym_context ctx, int *sopsl, msym_symmetry_operation_t **sops);
msym_error_t msymGetEquivalenceSets(msym_context ctx, int *l, msym_equivalence_set_t **es);
msym_error_t msymFindEquivalenceSets(msym_context ctx);
msym_error_t msymFindEquivalenceSetPermutations(msym_context ctx);
msym_error_t msymFindSymmetry(msym_context ctx);
msym_error_t msymSymmetrizeMolecule(msym_context context, double *err);
msym_error_t msymApplyTranslation(msym_context ctx, msym_element_t *element, double v[3]);
#ifdef __cplusplus //VLA invalid in C++
msym_error_t msymSymmetrizeOrbitals(msym_context ctx, int l, void *c);
msym_error_t msymGetOrbitalSubspaces(msym_context ctx, int l, void *c);
#else
msym_error_t msymSymmetrizeOrbitals(msym_context ctx, int l, double (*c)[]);
msym_error_t msymGetOrbitalSubspaces(msym_context ctx, int l, double (*c)[]);
#endif
msym_error_t msymGenerateElements(msym_context ctx, int length, msym_element_t *elements);
msym_error_t msymGenerateOrbitalSubspaces(msym_context ctx);
msym_error_t msymAlignAxes(msym_context ctx);
msym_error_t msymGetCenterOfMass(msym_context ctx, double v[3]);
msym_error_t msymGetRadius(msym_context ctx, double *radius);
msym_error_t msymGetGeometry(msym_context ctx, msym_geometry_t *geometry);
msym_error_t msymGetPrincipalMoments(msym_context ctx, double eigval[3]);
msym_error_t msymGetPrincipalAxes(msym_context ctx, double eigvec[3][3]);
msym_error_t msymGetAlignmentAxes(msym_context ctx, double primary[3], double secondary[3]);
msym_error_t msymSetAlignmentAxes(msym_context ctx, double primary[3], double secondary[3]);
msym_error_t msymGetAlignmentTransform(msym_context ctx, double transform[3][3]);
msym_error_t msymSetAlignmentTransform(msym_context ctx, double transform[3][3]);
//Testing only, crap implementation
msym_error_t msymSetOrbitalsMB(msym_context ctx);
#ifdef __cplusplus
}
#endif
#endif /* defined(__MSYM_H) */
|