All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.actelion.research.chem.contrib.DiastereotopicAtomID Maven / Gradle / Ivy

There is a newer version: 2024.12.1
Show newest version
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