Skip to content

Commit

Permalink
Added detection of a Te atom type, found in ChEMBL
Browse files Browse the repository at this point in the history
Signed-off-by: jonalv <jonathan.alvarsson@gmail.com>
Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed May 21, 2011
1 parent 1b9afc9 commit 2f74024
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java
Expand Up @@ -129,6 +129,8 @@ public IAtomType findMatchingAtomType(IAtomContainer atomContainer, IAtom atom)
type = perceiveBeryllium(atomContainer, atom);
} else if ("Se".equals(atom.getSymbol())) {
type = perceiveSelenium(atomContainer, atom);
} else if ("Te".equals(atom.getSymbol())) {
type = perceiveTellurium(atomContainer, atom);
} else if ("Ga".equals(atom.getSymbol())) {
type = perceiveGallium(atomContainer, atom);
} else if ("Ge".equals(atom.getSymbol())) {
Expand Down Expand Up @@ -174,6 +176,15 @@ private IAtomType perceiveSelenium(IAtomContainer atomContainer, IAtom atom) thr
return null;
}

private IAtomType perceiveTellurium(IAtomContainer atomContainer, IAtom atom) throws CDKException {
IBond.Order maxBondOrder = atomContainer.getMaximumBondOrder(atom);
if (!isCharged(atom) && maxBondOrder == IBond.Order.SINGLE && atomContainer.getConnectedAtomsCount(atom) <= 2) {
IAtomType type = getAtomType("Te.3");
if (isAcceptable(atom, atomContainer, type)) return type;
}
return null;
}

private IAtomType perceiveBorons(IAtomContainer atomContainer, IAtom atom)
throws CDKException {
IBond.Order maxBondOrder = atomContainer.getMaximumBondOrder(atom);
Expand Down
9 changes: 9 additions & 0 deletions src/main/org/openscience/cdk/dict/data/cdk-atom-types.owl
Expand Up @@ -1432,6 +1432,15 @@
<at:hybridization rdf:resource="&at;sp3"/>
</at:AtomType>

<at:AtomType rdf:ID="Te.3">
<at:formalCharge>0</at:formalCharge>
<at:hasElement rdf:resource="&elem;Te"/>
<at:formalNeighbourCount>2</at:formalNeighbourCount>
<at:lonePairCount>2</at:lonePairCount>
<at:piBondCount>0</at:piBondCount>
<at:hybridization rdf:resource="&at;sp3"/>
</at:AtomType>

<at:AtomType rdf:ID="Ga.3plus">
<at:formalCharge>3</at:formalCharge>
<at:hasElement rdf:resource="&elem;Ga"/>
Expand Down

0 comments on commit 2f74024

Please sign in to comment.