Package org.openscience.cdk.layout
Class HydrogenPlacer
- java.lang.Object
-
- org.openscience.cdk.layout.HydrogenPlacer
-
public final class HydrogenPlacer extends Object
This is a wrapper class for some existing methods in AtomPlacer. It helps you to layout 2D and 3D coordinates for hydrogen atoms added to a molecule which already has coordinates for the rest of the atoms.IAtomContainer container = ...; HydrogenPlacer hydrogenPlacer = new HydrogenPlacer(); hydrogenPlacer.placeHydrogens2D(container, 1.5);
- Author:
- Christoph Steinbeck
- See Also:
AtomPlacer
- Source code:
- main
- Belongs to CDK module:
- sdg
- Created on:
- 2003-08-06
-
-
Constructor Summary
Constructors Constructor Description HydrogenPlacer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
placeHydrogens2D(IAtomContainer container, double bondLength)
Place all hydrogens connected to atoms which have already been laid out.void
placeHydrogens2D(IAtomContainer container, IAtom atom)
Place hydrogens connected to the given atom using the average bond length in the container.void
placeHydrogens2D(IAtomContainer container, IAtom atom, double bondLength)
Place hydrogens connected to the provided atom atom using the specified bondLength.
-
-
-
Method Detail
-
placeHydrogens2D
public void placeHydrogens2D(IAtomContainer container, double bondLength)
Place all hydrogens connected to atoms which have already been laid out.- Parameters:
container
- atom containerbondLength
- bond length to user
-
placeHydrogens2D
public void placeHydrogens2D(IAtomContainer container, IAtom atom)
Place hydrogens connected to the given atom using the average bond length in the container.- Parameters:
container
- atom container of which atom is a memberatom
- the atom of which to place connected hydrogens- Throws:
IllegalArgumentException
- if the atom does not have 2d coordinates- See Also:
placeHydrogens2D(org.openscience.cdk.interfaces.IAtomContainer, double)
-
placeHydrogens2D
public void placeHydrogens2D(IAtomContainer container, IAtom atom, double bondLength)
Place hydrogens connected to the provided atom atom using the specified bondLength.- Parameters:
container
- atom containerbondLength
- bond length to user- Throws:
IllegalArgumentException
- thrown if the atom or container was null or the atom has connected atoms which have not been placed.
-
-