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:
Source code:
main
Belongs to CDK module:
sdg
Created on:
2003-08-06
  • Constructor Details

    • HydrogenPlacer

      public HydrogenPlacer()
  • Method Details

    • placeHydrogens2D

      public void placeHydrogens2D(IAtomContainer container, double bondLength)
      Place all hydrogens connected to atoms which have already been laid out.
      Parameters:
      container - atom container
      bondLength - 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 member
      atom - the atom of which to place connected hydrogens
      Throws:
      IllegalArgumentException - if the atom does not have 2d coordinates
      See Also:
    • 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 container
      bondLength - 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.