com.actelion.research.chem.contrib.DiastereotopicAtomID Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openchemlib Show documentation
Show all versions of openchemlib Show documentation
Open Source Chemistry Library
package com.actelion.research.chem.contrib;
import com.actelion.research.chem.*;
public class DiastereotopicAtomID {
public static String[] getAtomIds(StereoMolecule molecule) {
addMissingChirality(molecule);
int numberAtoms=molecule.getAllAtoms();
String[] ids=new String[numberAtoms];
StereoMolecule tempMolecule;
for (int iAtom=0; iAtom0 and not >1 because there could be unspecified chirality in racemate
if (tempMolecule.getStereoCenterCount()>0) {
for (int i=0; i-1) {
// molecule.changeBond(bondToChange, Molecule.cBondTypeUp);
}
}*/
}
}
}
}
private static void changeAtom(StereoMolecule molecule, int iAtom) {
molecule.setAtomCustomLabel(iAtom, molecule.getAtomLabel(iAtom)+"*");
molecule.setAtomicNo(iAtom, Molecule.getAtomicNoFromLabel("X"));
}
private static void makeRacemic(StereoMolecule molecule) {
// if we don't calculate this we have 2 epimers
molecule.ensureHelperArrays(Molecule.cHelperCIP);
// we need to make one group "AND" for chiral (to force to racemic, this means diastereotopic and not enantiotopic)
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy