// ############################## START FUNC ############################################ // This function throw away duplicate rings. With another ring calculation algorithm, where all // coils from branches are combined, this would not be possible, but also that solution has its // problems and the chosen algorithm resembles the algorithms for chirality and functional groups function clear_rings(ring_list_string) { var ring_list=new Array(0); var atoms_in_ring=new Array(0); var thjalp=0; var temp=""; var firstval=0; var ring_list=ring_list_string.split("#"); // Each ring set is picked and split with respect to " ". A number om "a->b", "b->c" now represent // every ring. The first atom, a is picked by parseInt and its sinus value is added to a sum. // All first atoms (=all atoms in the ring) is taken sinus of and added to the sum. Two equal sums // indicates that the atoms that participates in those rings are identical. for(n=0;n