public abstract class StereoElementFactory extends Object
Stereocenters
. The factory will not create
stereo elements if there is missing information (wedge/hatch bonds, undefined
coordinates) or the layout indicates unspecified configuration.
Stereocenters specified with inverse down (hatch) bond style are created if
the configuration is unambiguous and the bond does not connect to another
stereocenter.
IAtomContainer container = ...; StereoElementFactory stereo = StereoElementFactory.using2DCoordinates() .interpretProjections(Projection.Haworth); // set the elements replacing any existing elements container.setStereoElements(stereo.createAll()); // adding elements individually is also possible but existing elements are // are not removed for (IStereoElement element : stereo.createAll()) container.addStereoElement(element); // bad, there may already be elements
Stereocenters
Modifier and Type | Field and Description |
---|---|
protected GraphUtil.EdgeToBondMap |
bondMap
A bond map for fast access to bond labels between two atom indices.
|
protected IAtomContainer |
container
Native CDK structure representation.
|
protected int[][] |
graph
Adjacency list graph representation.
|
protected Set<Projection> |
projections |
Modifier | Constructor and Description |
---|---|
protected |
StereoElementFactory(IAtomContainer container,
int[][] graph,
GraphUtil.EdgeToBondMap bondMap)
Internal constructor.
|
Modifier and Type | Method and Description |
---|---|
StereoElementFactory |
checkSymmetry(boolean check) |
List<IStereoElement> |
createAll()
Creates all stereo elements found by
Stereocenters using the or
2D/3D coordinates to specify the configuration (clockwise/anticlockwise). |
StereoElementFactory |
interpretProjections(Projection... projections)
Indicate that stereochemistry drawn as a certain projection should be
interpreted.
|
static StereoElementFactory |
using2DCoordinates(IAtomContainer container)
Create a stereo element factory for creating stereo elements using 2D
coordinates and depiction labels (up/down, wedge/hatch).
|
static StereoElementFactory |
using3DCoordinates(IAtomContainer container)
Create a stereo element factory for creating stereo elements using 3D
coordinates and depiction labels (up/down, wedge/hatch).
|
protected final IAtomContainer container
protected final int[][] graph
protected final GraphUtil.EdgeToBondMap bondMap
protected final Set<Projection> projections
protected StereoElementFactory(IAtomContainer container, int[][] graph, GraphUtil.EdgeToBondMap bondMap)
container
- an atom containergraph
- adjacency list representationbondMap
- lookup bonds by atom indexpublic List<IStereoElement> createAll()
Stereocenters
using the or
2D/3D coordinates to specify the configuration (clockwise/anticlockwise).
Currently only ITetrahedralChirality
and IDoubleBondStereochemistry
elements are created..public StereoElementFactory interpretProjections(Projection... projections)
StereoElementFactory factory =
StereoElementFactory.using2DCoordinates(container)
.interpretProjections(Projection.Fischer, Projection.Haworth);
projections
- types of projectionProjection
public StereoElementFactory checkSymmetry(boolean check)
public static StereoElementFactory using2DCoordinates(IAtomContainer container)
container
- the structure to create the factory forpublic static StereoElementFactory using3DCoordinates(IAtomContainer container)
container
- the structure to create the factory forCopyright © 2022. All rights reserved.