Package org.openscience.cdk.atomtype

Examples of org.openscience.cdk.atomtype.CDKAtomTypeMatcher


                        "Cannot depict structure");
                }
          }
       
        //We update implicit Hs in any case
        CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(chemModel.getBuilder());
        for (IAtomContainer container :
            ChemModelManipulator.getAllAtomContainers(chemModel)) {
           for (IAtom atom : container.atoms()) {
               if (!(atom instanceof IPseudoAtom)) {
                   try {
                       IAtomType type = matcher.findMatchingAtomType(
                           container, atom
                       );
                       if (type != null &&
                           type.getFormalNeighbourCount() != null) {
                           int connectedAtomCount = container.getConnectedAtomsCount(atom);
View Full Code Here


     * type can be perceived.
     *
     * @param container IAtomContainer to test atom types of
     */
    public void assertAtomTypesPerceived(IAtomContainer container) throws Exception {
      CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(container.getBuilder());
      Iterator<IAtom> atoms = container.atoms().iterator();
      while (atoms.hasNext()) {
        IAtom atom = atoms.next();
        IAtomType type = matcher.findMatchingAtomType(container, atom);
        Assert.assertNotNull(
          "Could not perceive atom type for: " + atom,
          type
        );
      }
View Full Code Here

     * coordinates for the new hydrogens.
     *
     * @param container to which implicit hydrogens are added.
     */
    protected void addImplicitHydrogens(IAtomContainer container) throws Exception {
      CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(container.getBuilder());     
      for (IAtom atom : container.atoms()) {
        IAtomType type = matcher.findMatchingAtomType(container, atom);
        AtomTypeManipulator.configure(atom, type);
      }
        CDKHydrogenAdder hAdder = CDKHydrogenAdder.getInstance(container.getBuilder());
      hAdder.addImplicitHydrogens(container);
    }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.atomtype.CDKAtomTypeMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.