calc.c File Reference

#include "../headers/calc.h"

Go to the source code of this file.

Functions

float dist (float x1, float y1, float z1, float x2, float y2, float z2)
float ddist (float x1, float y1, float z1, float x2, float y2, float z2)


Function Documentation

float ddist ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

## FONCTION: float ddist(float x1, float y1, float z1, float x2, float y2, float z2)

## SPECIFICATION: Calculate the square of the euclidian distance between two points in space p1(x1, y1, z2) and p2(x2, y2, z2)

## PARAMETRES: @ float x1, y1, z1: The first point's coordinates. @ float x2, y2, z2: The second point's coordinates.

## RETURN: float: the squared euclidian distance between the two points.

Definition at line 100 of file calc.c.

Referenced by get_surrounding_atoms_idx(), and set_ASA().

00101 {
00102         float xdif = x1 - x2 ;
00103         float ydif = y1 - y2 ;
00104         float zdif = z1 - z2 ;
00105 
00106         return (xdif*xdif) + (ydif*ydif) + (zdif*zdif) ;
00107 }

float dist ( float  x1,
float  y1,
float  z1,
float  x2,
float  y2,
float  z2 
)

## FONCTION: float dist(float x1, float y1, float z1, float x2, float y2, float z2)

## SPECIFICATION: Calculate euclidian distance between two points in space p1(x1, y1, z2) and p2(x2, y2, z2)

## PARAMETRES: @ float x1, y1, z1: The first point's coordinates. @ float x2, y2, z2: The second point's coordinates.

## RETURN: float: the distance between p1(x1, y1, z2) and p2(x2, y2, z2)

Definition at line 75 of file calc.c.

Referenced by check_pockets(), count_atm_prop_vert_neigh(), count_pocket_lig_vert_ovlp(), count_vert_neigh(), desc_pocket(), extract_wanted_vertices(), get_mol_atm_neigh(), get_mol_ctd_atm_neigh(), get_mol_vert_neigh(), get_vert_apolar_density(), get_wanted_atom_ids(), pck_final_clust(), pck_ml_clust(), pck_ml_clust_test(), print_vvertices(), refinePockets(), set_descriptors(), set_pocket_contacted_lig_name(), testVvertice(), and updateIds().

00076 {
00077         float xdif = x1 - x2 ;
00078         float ydif = y1 - y2 ;
00079         float zdif = z1 - z2 ;
00080 
00081         return sqrt((xdif*xdif) + (ydif*ydif) + (zdif*zdif)) ;
00082 }


Generated on Mon Jun 7 16:44:23 2010 for fpocket by  doxygen 1.5.6