// ############################## START FUNC ############################################ // Input is basically the 2 distances and one angle for each combination of two features // and the mass point of the molecule. The two groups must also be identified as type1 // and type2 (feature types). These 4 parameters is given by the two first in the input. // matrix1 ,matrix2 and grupper define how to interprete angles, distances and features. // This is done by intervals and groups, orginally taken from the file intervalspec.txt. function place_bits(feature_sorts, all_matrix, matrix1 ,matrix2 , grupper, gearing) { var number_of_features=feature_sorts.length; // The first step is to place the values from all_matrix in recognizable variables // Three variables, limit, ng and nf, is also better developed to an explicit form. var anglematrix=all_matrix[0]; var dist1matrix=all_matrix[1]; var dist2matrix=all_matrix[2]; var aintervals=matrix1.length; var dintervals=matrix2.length; var limit=gearing[0]; var ng=gearing[1]; var sortstring=""; var slutmatrix=new Array(0); var utmatrix=new Array(0); var tupp0=new Array(0); var tupp1=new Array(0); var tupp2=new Array(0); var tupp3=new Array(0); var tupp4=new Array(0); var au=new Array(0); var n=0; var m=0; var p=0; var temp=""; var ranking=0; var vvv=""; var nymark=""; var utvector=new Array(0); all_matrix=false; //releasing memory IN CASE OF GLOBAL SCOPE slutmatrix=def_matrix(number_of_features ,number_of_features, 4, ""); for(n=0;n