|
NSC is an implementation of the DCLM variant of the Shrake's and Rupley's algorithm for surface calculation.
Please refer to the article:
The subroutine NSC makes use of variant 2 described in the reference. By selecting the necessary output via flags, the requirements for cpu-time and computer memory can be adapted to the actual needs.
int NSC( double * , /* a atom coordinates xyz0, xyz1, ... */ double * , /* b atom radii r0, r1, r2, ... */ int , /* c number of atoms */ int , /* d number of dots per fully accessible sphere */ int , /* e flag : dots, volume and/or area per atom */ double * , /* 1 output: overall area */ double ** , /* 2 output: pointer to list of areas per atom */ double * , /* 3 output: overall volume */ double ** , /* 4 output: pointer to list of surface dots x0, y0, z0, ... */ int * /* 5 output: number of surface dots */ );
Items "a-e" are input data and refer to user-defined sections of memory (arrays or single numbers).
Items "a", "b", and "c":
PLEASE TAKE INTO ACCOUNT THAT THE RADII GIVEN HERE ARE DIRECTLY USED FOR SURFACE CALCULATION. NSC does not increment with a probe radius !!
The points are distributed in accordance with the icosahedron-based or the dodecahedron-based method as described in the reference in section (B). This selection is the most even triangulation of a unit sphere known to the author.
flag = FLAG_VOLUME | FLAG_ATOM_AREA | FLAG_DOTS
The routine calculates the area, volume and the dot surface. The program allocates arrays for the atomwise areas and for the surface dots. The addresses are returned in the pointers to pointers to double.
This variant is not recommended because normally the dot surface is needed for low point density (e.g.42) at which area and volume are inaccurate. The sign "|" is used as binary AND !
flag = FLAG_VOLUME | FLAG_ATOM_AREA
In this case the large arrays for storing the surface dots are not allocated. A large point number of the fully accessible sphere can be selected. Good accuracy is already achieved with 600-700 points per sphere (accuracy of about 1.5 square Angstrem per atomic sphere).
Output pointers 4 and 5 may be NULL.
flag = FLAG_DOTS
Only the dot surface is produced in addition to the overall area.
Output pointers 2 and 3 may be NULL.
The output pointer 1 cannot be set to NULL in any circumstances. The overall area value is returned in every mode.
Items
#include "nsc.h"
int routine_calling_NSC(int n_atom, double *coordinates, double *radii) {
.....
for (i=0; i < n_atom; i++) {
}
.....
/* do something with areas, volume and surface dots */
.....
return 0;
}