// ############################## START FUNC ############################################ function mega1(molecule) { transfer(3); var f_exchange=read(1,10000,1,2); transfer_and_mod(1, f_exchange); var rmatrix=read(1,100,1,100); var grupper=new Array(0); var matrix1=new Array(0); var matrix2=new Array(0); var n=0; var limit=rmatrix[0][0]; var aintervals=parseInt(rmatrix[2][0]); var dintervals=parseInt(rmatrix[aintervals+4][0]); var ng=parseInt(rmatrix[dintervals+aintervals+7][0]); var nf=parseInt(rmatrix[dintervals+aintervals+7][0]); ng=12; var maxg=0; var startrow=dintervals+aintervals+8; var endrow=dintervals+aintervals+8+nf; var bitstrings_all=new Array(0); var featured_ligands_all=new Array(0); var molecule_counter=0; var frame_1=""; var frame_2=""; var frame_3=""; // In this loop, the vector in which many variables corresponds to features, get // its highest index according to the number of the highest feature number. If // the feature numbers are defined by the program from feature names, this is simple. for(n=startrow;n matrix1; & angles -> matrix2 // So matrix1[row][0] will be the lower limit for the angle defined on row=row, // matrix1[row][1] the upper limit for the same angle. matrix1=read(4,3+aintervals,1,2); matrix2=read(aintervals+6,5+aintervals+dintervals,1,2); // The map must contain a file list named file_list.txt. With this list, the molecule // files will be found and exhaustively performed. The list will be opened immedately // with the base document. transfer(2); var listed_files = read(1,1000000,1,1); bitstrings_all=new Array(listed_files.length); featured_ligands_all=new Array(listed_files.length); molecule_counter=0; if(molecule) listed_files[0]=molecule; frame_1="bitstrings/"+listed_files[0]+".txt"; frame_2="featurecollection/"+listed_files[0]+".txt"; frame_3="basic_molecules/"+listed_files[0]+".txt"; load_frames(frame_1,frame_2,frame_3); var gear_commands = new Array(3); gear_commands[0]=limit; gear_commands[1]=ng; gear_commands[2]=nf; gear_commands[3]=molecule_counter; // Some time must be given for loading of the frames. 100 milliseconds is enough. // Here is much information copied for each loop, but it is just to keem every // function 'isolated' and well defined. if(!molecule) window.setTimeout(function(){mega2(bitstrings_all,featured_ligands_all,f_exchange,matrix1,matrix2,grupper,listed_files,gear_commands);},100); if(molecule) window.setTimeout(function(){single_molecule_continue(featured_ligands_all,f_exchange,matrix1,matrix2,grupper,molecule,gear_commands,"");},100); parent.right.hidden.location="empty.htm"; parent.right.hidden.location.reload(); } // ############################### end func ############################################