int FRAG_get_number_of_atoms
Arguments:
Frag f Fragment of interestReturns the number of atoms in a fragment
int FRAG_get_number_of_bqs
Arguments:
Frag f Fragment of interestReturns the number of bqs (point charges) stored as part of the fragment structure.
int FRAG_get_number_of_exts
Arguments:
Frag f Fragment of interestReturns the number of external sites (distributed polarizabilities for the DRF scheme) stored as part of the fragment structure.
int FRAG_get_number_of_shells
Arguments:
Frag f Fragment of interestReturns the number of shells stored as part of the fragment structure.
int FRAG_get_coordinate_matrix
Arguments:
Frag f Fragment of interest
float *c array to receive the coordinatesRecover the coordinates of all atoms of a fragment, The x,y and z coordinates of each atom are stored consecutively. The bq's (if present) follow the real atoms.
int FRAG_get_partial_coordinate_matrix
Arguments:
Frag f Fragment of interest
float *c array to receive the coordinates
int *sel SelectionRecover the coordinates for a subset of all atoms of a fragment, The x,y and z coordinates of each atom are stored consecutively. The bq's (if present) follow the real atoms.
int FRAG_store_coordinate_matrix
Arguments:
Frag f Fragment of interest
float *c array to receive the coordinatesReplace the coordinates of all atoms of a fragment, The x,y and z coordinates of each atom are stored consecutively in the array c. The bq's (if present) follow the real atoms.
int FRAG_store_partial_coordinate_matrix
Arguments:
Frag f Fragment of interest
float *c Array to receive the coordinates
int *sel Atom selectionReplace a subset of the coordinates of all atoms of a fragment, The x,y and z coordinates of each atom are stored consecutively in the array c. The bq's (if present) follow the real atoms.
int FRAG_allocate_atoms
Arguments:
Frag f Fragment of interest
int n number of atoms to allocateAllocate memory for atom storage. All atoms are added with an atomic number of zero, and NULL atom names.
int FRAG_allocate_bqs
Arguments:
Frag f Fragment of interest
int n number of bqs to allocateAllocate memory for bq (point charge) storage.
int FRAG_allocate_shells
Arguments:
Frag f Fragment of interest
int n number of shells to allocateAllocate memory for shell storage.
int FRAG_get_x_coordinate_vector
Arguments:
Frag f Fragment on interest
float *c Array to hold x coordinateRecover a vector containing the x coordinates of all the atoms.
int FRAG_get_y_coordinate_vector
Arguments:
Frag f Fragment of interest
float *c Array to hold Y coordinatesRecover a vector containing the Y coordinates of all the atoms.
int FRAG_get_z_coordinate_vector
Arguments:
Frag f
float *cRecover a vector containing the Z coordinates of all the atoms.
int FRAG_put_x_coordinate_vector
Arguments:
Frag f Fragment on interest
float *c Array containing x coordinateOutput a vector containing the x coordinates of all the atoms.
int FRAG_put_y_coordinate_vector
Arguments:
Frag f Fragment on interest
float *c Array containing y coordinateOutput a vector containing the x coordinates of all the atoms.
int FRAG_put_z_coordinate_vector
Arguments:
Frag f Fragment on interest
float *c Array containing z coordinateOutput a vector containing the z coordinates of all the atoms.
int FRAG_set_title
Arguments:
Frag f Fragment of interest
char *s pointer to a string containing the titleDefine the title of a fragment object. The title is copied into memory allocated within the fragment object
int FRAG_extend
Arguments:
Frag f Fragment of interest
Frag res Result fragment
int as start cell index for first cell vector
int ae end cell index for first cell vector
int bs start cell index for second cell vector
int be end cell index for second cell vector
int cs start cell index for third cell vector
int ce end cell index for third cell vectorExtend a periodic structure to contain multiple unit cells. Note that the pointer f->natom is not changes, f->tatom contains the total number of atoms stored.
char *FRAG_get_title
Arguments:
Frag f Fragment of InterestReturn a pointer to the title string of a fragment.
FRAG_list
Arguments:
Frag f Fragment of interest
char *unit pointer to length unitProvide a listing of the coordinates of the fragment to stdout Unit will typically be one of au, angstrom or nm
int FRAG_copy
Arguments:
Frag to Destination fragment
Frag from Source fragmentCopy the entire contents of a fragment to another. This involves allocation of memory for the atoms, title etc.
int FRAG_connect
Arguments:
Frag f Fragment of interest
float scale scale parameter for bond test
float toler tolerance parameter for bond testCompute fragment connectivity using the link-cells algorithm.
Atoms are considered connected
R_ij < scale*(vdw_i + vdw_j) + tolerwhere R_ij is the internuclear distance, vdw_i is the van der Waals radius of i, and scale and toler are input parameters.
int FRAG_connect_default
Arguments:
Frag f Fragment of interestCompute fragment connectivity using the link-cells algorithm and the default connectivity parameters
Atoms are considered connected
R_ij < scale*(vdw_i + vdw_j) + tolerwhere R_ij is the internuclear distance, vdw_i is the van der Waals radius of i, and scale and toler take values from the global variables chemsh_default_connectivity_scale and chemsh__default_connectivity_toler
int FRAG_get_connections
Arguments:
Frag f Fragment of interest
int atom Atom of interest
int connections[] array to hold resultsFind the number of connections to an atom. The number of connections is returned. A return code of -1 denotes and invalid atom number.
int FRAG_add_conn
Arguments:
Frag f Fragment of interest
int i index of first atom
int j index of connected atomAdd a connectivity table entry.
int FRAG_del_conn
Arguments:
Frag f Fragment of interest
int i index of first atom
int j index of connected atomDelete a connectivity table entry.
int FRAG_reset_conn
Arguments:
Frag f Fragment of interestReset the connectivity table, deleting all entries.
float FRAG_rsq
Arguments:
Frag f Fragment of interest
int i First atom index
int j Second atom indexReturn the square of the interatomic distance. A negative value is returned if either of the atom indices are invalid.
struct vector_struct FRAG_position_vector
Arguments:
Frag f Fragment of interest
int i Index of atomReturn the position of a vector (a.u.).
struct vector_struct FRAG_centroid
Arguments:
Frag f Fragment of interestReturn the centroid of the atom coordinates (in a.u.)
int FRAG_group_centroid
Arguments:
Frag f Fragment of interest
int *grp
int grpsiz
float *centReturn the centroid of a subset of the atom coordinates (in a.u.)
float FRAG_angle
Arguments:
Frag f Fragment of interest
int i Terminal atom
int j Central atom
int k Terminal atomReturn the angle defined by three atoms
float FRAG_dihedral
Arguments:
Frag f Fragment of interest
int i First atom in sequence
int j Second atom in sequence
int k Third atom in sequence
int l Fourth atom in sequenceReturn the dihedral defined by the atom sequence (i-j-k-l)
int FRAG_write
Arguments:
Frag f Fragment of interest
FILE *fp file pointerOutput the structure (ChemShell format) to a file. Generally used to create a sequence of structures.
int FRAG_bonded
Arguments:
Frag f Fragment of interest
int i First atom
int j Second atomReturns 1 if two atoms are connected, 0 otherwise.
int FRAG_get_atom
Arguments:
Frag f
int atom sequence number of atom required
char *symbol pointer to memory location to hold symbol
float *x
float *y
float *z
int *znum atomic numberObtain information about an atomic centre.
int FRAG_get_bq
Arguments:
Frag f
int atom sequence number of bq required
float *x
float *y
float *z
float *chargeObtain information about a point charge.
int FRAG_get_shell
Arguments:
Frag f
int atom sequence number of bq required
char *symbol
float *x
float *y
float *z
float *chargeObtain information about a shell.
int FRAG_set_atom
Arguments:
Frag f
int atom
char *symbol
float x
float y
float zSet the atom type and coordinates of an atom, which must already be allocated.
int FRAG_set_bq
Arguments:
Frag f
int atom
float x
float y
float z
float chargeSet the coordinates and charge of a bq centre. The centre must have already been allocated.
int FRAG_set_shell
Arguments:
Frag f
int atom
char *symbol
float x
float y
float z
float chargeSet the coordinates and charge of a bq centre. The centre must have already been allocated.
int FRAG_delete_atom
Arguments:
Frag f
int atomDelete an atom from the fragment structure.
int FRAG_insert_atom
Arguments:
Frag f
int atom Atom number of the atom after insertion
char *symbol
float x
float y
float zAdds an atom to a molecule, and recomputes connectivity. Note this function reallocates and copies the atom list so should be used sparingly.
int FRAG_insert_shell
Arguments:
Frag f
int atom Atom number of the atom after insertion
char *symbol
float x
float y
float z
float chgAdds an shell to a molecule, and recomputes connectivity. Note this function reallocates and copies the atom list so should be used sparingly.
int FRAG_compare
Arguments:
Frag f1 First fragment
Frag f2 Second fragment
float toler tolerance for checking coordinatesCompare two fragments, returning
FRAG_shuffle
Arguments:
Frag f2
Frag f1
int nchange
int *iflagFragment reordering by input list
FRAG_merge
Arguments:
Frag f1
Frag f2
Frag f3
double tolerMerge fragments f1 and f2, result is f3, deleting overlapping atoms The atoms of f1 come first, then the non-redundant atoms of f2
FRAG_reorder
Arguments:
Frag f2
Frag f1
int iseed
int istart
int iendReordering fragment using distance to a specified atom
int FRAG_get_z
Arguments:
Frag frag
int atomReturn the atomic number of an atom
int FRAG_write_xyz
Arguments:
Frag frag
FILE *fpWrite the fragment in XYZ format
int FRAG_read_xyz
Arguments:
Frag frag
FILE *fpRead an fragment from a file (XYZ format). The fragment object must have been allocated but the space for the atoms is allocated by the function.
FRAG_images
Arguments:
Frag f
float x[3]Apply unit cell translations to bring all atoms as close as possible to the reference point x if iat == -1 all atoms are shifted
int FRAG_construct_group
Arguments:
Frag f Fragment to be manipulated
int *grplist list of members of group
int grpsiz number of members of group
int iref Reference atomApply unit cell translations to bring all atoms in a given group as close as possible to the reference atom