Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConeBlock ¶
func ConeBlock(ref, test *VPlane, ati, atj *v3.Matrix, cutoff float64, angles []float64, testname ...string) bool
Test if the path between ati and the ref plane is blocked by the test plane it will scan cones at increasing angles from the ati-atj vector(from 0 to angles[0] degrees, where angles[0] should be <90) in angle[1] steps. This is a brute-force, very slow and clumsy system. But hey, I'm a chemist. I'll change it when a) there is a pure Go 3D-Voronoi library or b) I find the time to study computational geometry.
Types ¶
type AngleScan ¶
type AngleScan struct { VdwFactor float64 Offset float64 Angles []float64 //last angle, step between angles, in degrees. A full scan would be 0 to 90 Cutoff float64 //distance cutoff, if the vectors at the given angle are farther than this, the angle is ignored. Test bool //for debugging }
AngleScan contains options to perform angle scans to see if there is an angle in which 2 atoms are in direct contact (i.e. if part of the plane bisecting them is part of the Voronoi polihedra for the system).
func DefaultAngleScan ¶
func DefaultAngleScan() *AngleScan
DefaultAngleScan returns the default setting for an AngleScan
type VPSlice ¶
type VPSlice []*VPlane
VPSlice contains a slice to pointers to VPlane.
func GetPlanes ¶
get all planes between all possible pairs of atoms which are not farther away from each other than cutoff
func (VPSlice) AtomPlanes ¶
AtomPlanes returns all the planes that bisect the atom with index i, and any other atom.
func (VPSlice) Contact ¶
Determines whether vectors i and j from coords are in contact, by checking that no plane is closer to i than the plane bisecting the ij vector, along some direction with an angle smaller than 90 degrees from the direction along the ij vector. This function is safe for concurrent use.
type VPlane ¶
type VPlane struct { Atoms []int //indexes of the 2 atoms. Distance float64 //The plane is equidistant from both atoms, so there is only one distance Normal *v3.Matrix Offset *v3.Matrix NotContact bool //true if this plane is a confirmed non-contact }
The plane bisecting 2 atoms With all the info we might want from it.
func (*VPlane) DistanceInterVector ¶
DistanceInterVector obtains the distance from a point o to the plane in the direction of d. It returns -1 if the vector never intersects the plane.