// ############################## START FUNC ############################################ // This function replace all atom_ID:s with respective atom weight/100 - so that // it will be sorted correctly in JavaScript function substitute(comb1, atom_sorts) { var number_of_atoms = atom_sorts.length; var n=0; var saml2=""; var temp=""; var temp2=""; var dump=""; var tupp = new Array(0); // Each path will be fallowed by: // (1) the atom-ID of the start atom, which is checked for chirality and conformation, and // (2) the atom-ID of the first neighbour atom. This will look like this, EXAMPLE: // "0.06 0.08 &5 0.08 0.06 &1 0.06 0.08 &5 0.08 0.06 &1 0.06 0.06 &1 /1//7/#" // In this case atom no. 1 was on the list of possible chiral atoms. Atom no. 7 is one // of its direct neighbour atoms leading out to the fallowing branch above. So the part // "0.06 0.08 &5 0.08" in the beginning of the excerpt is in reality redundant. Theese // values is the atom sorts for the 1:st and 7:th atom. "&5" denote that atom no. 1 (NOT no.7) // is an atom with four non hydrogen neighbours. for(n=0;n"); temp=tupp.join("//"); comb1[n]=comb1[n]+" /"+temp+"/"; } saml2=comb1.join("##"); comb1=saml2.split("->"); saml2=comb1.join(" "); for(n=0;n