Class 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 Detail

      • HydrogenPlacer

        public HydrogenPlacer()
    • 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 container
        bondLength - bond length to user
      • 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.