#include "area.h"

/*************************************************************/
/* initialise data 
*/
void load_cov_radius()
{

	/* set covalent radius */
	radius[COV][C4] = 0.77;
	radius[COV][C4H] = 0.77;
	radius[COV][C4HH] = 0.77;
	radius[COV][C4HHH] = 0.77;
	radius[COV][C3] = 0.77;
	radius[COV][C3H] = 0.77;
	radius[COV][C3HH] = 0.77;
	radius[COV][O1] = 0.66;	
	radius[COV][O2H] = 0.66;
	radius[COV][O1O2H] = 0.66;
	radius[COV][N4] = 0.70;
	radius[COV][N4H] = 0.70;
	radius[COV][N4HH] = 0.70;
	radius[COV][N4HHH] = 0.70;
	radius[COV][N3] = 0.70;
	radius[COV][N3H] = 0.70;
	radius[COV][N3HH] = 0.70;
	radius[COV][S2] = 1.04;
	radius[COV][S2H] = 1.04;
	radius[COV][P4] = 1.10;
	radius[COV][O1N3HH] = 0.68;
	radius[COV][Z2ION] = 0.74;
	radius[COV][FE] = 0.70;
	radius[COV][C4D] = 0.77;
	radius[COV][C4DD] = 0.77;
	radius[COV][C4DDD] = 0.77;

}	/* load_cov_radius */


/*************************************************************/
/* load in values for vanderwaals radius 
*/
void load_van_radius()
{

	if (radType == CHOTH_RAD) {
		radius[VAN][C4] = 0.00;
		radius[VAN][C4H] = 1.87;
		radius[VAN][C4HH] = 1.87;
		radius[VAN][C4HHH] = 1.87;
		radius[VAN][C3] = 1.76;
		radius[VAN][C3H] = 1.76;
		radius[VAN][C3HH] = 1.76;
		radius[VAN][O1] = 1.40;
		radius[VAN][O2H] = 1.40;
		radius[VAN][O1O2H] = 1.40;
		radius[VAN][N4] = 1.50;
		radius[VAN][N4H] = 1.50;
		radius[VAN][N4HH] = 1.50;
		radius[VAN][N4HHH] = 1.50;
		radius[VAN][N3] = 1.65;
		radius[VAN][N3H] = 1.65;
		radius[VAN][N3HH] = 1.65;
		radius[VAN][S2] = 1.85;
		radius[VAN][S2H] = 1.85;
		radius[VAN][P4] = 0.00;
		radius[VAN][O1N3HH] = 1.40;
		radius[VAN][Z2ION] = 1.70;
		radius[VAN][FE] = 1.70;
		radius[VAN][C4D] = 1.86;
		radius[VAN][C4DD] = 1.86;
		radius[VAN][C4DDD] = 1.86;
	}
	else if (radType == EIS_RAD) {
		radius[VAN][C4] = 0.00;
		radius[VAN][C4H] = 1.90;
		radius[VAN][C4HH] = 1.90;
		radius[VAN][C4HHH] = 1.90;
		radius[VAN][C3] = 1.90;
		radius[VAN][C3H] = 1.90;
		radius[VAN][C3HH] = 1.90;
		radius[VAN][O1] = 1.40;
		radius[VAN][O2H] = 1.40;
		radius[VAN][O1O2H] = 1.40;
		radius[VAN][N4] = 1.70;
		radius[VAN][N4H] = 1.70;
		radius[VAN][N4HH] = 1.70;
		radius[VAN][N4HHH] = 1.70;
		radius[VAN][N3] = 1.70;
		radius[VAN][N3H] = 1.70;
		radius[VAN][N3HH] = 1.70;
		radius[VAN][S2] = 1.80;
		radius[VAN][S2H] = 1.80;
		radius[VAN][P4] = 0.00;
		radius[VAN][O1N3HH] = 1.40;
		radius[VAN][Z2ION] = 1.70;
		radius[VAN][FE] = 1.70;
		radius[VAN][C4D] = 1.89;
		radius[VAN][C4DD] = 1.89;
		radius[VAN][C4DDD] = 1.89;
	}
	else if (radType == RICH_RAD) {
		radius[VAN][C4] = 2.00;
		radius[VAN][C4H] = 2.00;
		radius[VAN][C4HH] = 2.00;
		radius[VAN][C4HHH] = 2.00;
		radius[VAN][C3] = 1.70;
		radius[VAN][C3H] = 1.70;
		radius[VAN][C3HH] = 1.70;
		radius[VAN][O1] = 1.40;
		radius[VAN][O2H] = 1.60;
		radius[VAN][O1O2H] = 1.50;
		radius[VAN][N4] = 0.00;
		radius[VAN][N4H] = 2.00;
		radius[VAN][N4HH] = 2.00;
		radius[VAN][N4HHH] = 2.00;
		radius[VAN][N3] = 1.50;
		radius[VAN][N3H] = 1.70;
		radius[VAN][N3HH] = 1.80;
		radius[VAN][S2] = 1.85;
		radius[VAN][S2H] = 2.00;
		radius[VAN][P4] = 0.00;
		radius[VAN][O1N3HH] = 1.60;
		radius[VAN][Z2ION] = 0.64;
		radius[VAN][FE] = 0.64;
		radius[VAN][C4D] = 1.99;
		radius[VAN][C4DD] = 1.99;
		radius[VAN][C4DDD] = 1.99;
	}
	else if (radType == SHRAKE_RAD) {
		radius[VAN][C4] = 0.00;
		radius[VAN][C4H] = 2.00;
		radius[VAN][C4HH] = 2.00;
		radius[VAN][C4HHH] = 2.00;
		radius[VAN][C3] = 1.50;
		radius[VAN][C3H] = 1.85;
		radius[VAN][C3HH] = 1.85;
		radius[VAN][O1] = 1.40;
		radius[VAN][O2H] = 1.40;
		radius[VAN][O1O2H] = 1.40;
		radius[VAN][N4] = 1.50;
		radius[VAN][N4H] = 1.50;
		radius[VAN][N4HH] = 1.50;
		radius[VAN][N4HHH] = 1.50;
		radius[VAN][N3] = 1.50;
		radius[VAN][N3H] = 1.50;
		radius[VAN][N3HH] = 1.50;
		radius[VAN][S2] = 1.85;
		radius[VAN][S2H] = 1.85;
		radius[VAN][P4] = 0.00;
		radius[VAN][O1N3HH] = 1.40;
		radius[VAN][Z2ION] = 0.74;
		radius[VAN][FE] = 1.70;
		radius[VAN][C4D] = 1.99;
		radius[VAN][C4DD] = 1.99;
		radius[VAN][C4DDD] = 1.99;
	}
	else {
		printf("ERROR: illegal option for vanderwaals radius type\n");
		printf("       see vadar.parms file\n");
		exit(-1);
	}

}	/* load_van_radius */


/*************************************************************/
/* initialise data 
*/
void load_tables()
{

	load_cov_radius();
	load_van_radius();

}	/* load_tables */
