Permalink
Browse files

Added the P.ane atom type: 5-coordinate neutral P

Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
1 parent d0e0bf2 commit 90371fd74808b28d8a819e4c8bf9fd3788a15678 @egonw egonw committed with rajarshi Jul 12, 2011
@@ -975,6 +975,12 @@ private IAtomType perceivePhosphors(IAtomContainer atomContainer, IAtom atom)
IAtomType type = getAtomType("P.ate");
if (isAcceptable(atom, atomContainer, type)) return type;
}
+ } else if (neighborcount == 5) {
+ if (atom.getFormalCharge() == null ||
+ atom.getFormalCharge().intValue() == 0) {
+ IAtomType type = getAtomType("P.ane");
+ if (isAcceptable(atom, atomContainer, type)) return type;
+ }
}
return null;
}
@@ -1120,6 +1120,15 @@
<at:hybridization rdf:resource="&at;planar"/>
</at:AtomType>
+ <at:AtomType rdf:ID="P.ane">
+ <at:formalCharge>0</at:formalCharge>
+ <at:hasElement rdf:resource="&elem;P"/>
+ <at:formalNeighbourCount>5</at:formalNeighbourCount>
+ <at:lonePairCount>0</at:lonePairCount>
+ <at:piBondCount>0</at:piBondCount>
+ <at:hybridization rdf:resource="&at;sp3d1"/>
+ </at:AtomType>
+
<at:AtomType rdf:ID="P.ide">
<at:formalCharge>0</at:formalCharge>
<at:hasElement rdf:resource="&elem;P"/>
@@ -3476,6 +3476,44 @@ public void testPhosphide() throws Exception {
assertAtomTypes(testedAtomTypes, expectedTypes, mol);
}
+ @Test
+ public void testPentaMethylPhosphane() throws Exception {
+ IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance();
+ IMolecule mol = builder.newInstance(IMolecule.class);
+ IAtom a1 = builder.newInstance(IAtom.class,"P");
+ a1.setFormalCharge(0);
+ mol.addAtom(a1);
+ IAtom a2 = builder.newInstance(IAtom.class,"C");
+ a2.setFormalCharge(0);
+ mol.addAtom(a2);
+ IAtom a3 = builder.newInstance(IAtom.class,"C");
+ a3.setFormalCharge(0);
+ mol.addAtom(a3);
+ IAtom a4 = builder.newInstance(IAtom.class,"C");
+ a4.setFormalCharge(0);
+ mol.addAtom(a4);
+ IAtom a5 = builder.newInstance(IAtom.class,"C");
+ a5.setFormalCharge(0);
+ mol.addAtom(a5);
+ IAtom a6 = builder.newInstance(IAtom.class,"C");
+ a6.setFormalCharge(0);
+ mol.addAtom(a6);
+ IBond b1 = builder.newInstance(IBond.class,a1, a2, IBond.Order.SINGLE);
+ mol.addBond(b1);
+ IBond b2 = builder.newInstance(IBond.class,a1, a3, IBond.Order.SINGLE);
+ mol.addBond(b2);
+ IBond b3 = builder.newInstance(IBond.class,a1, a4, IBond.Order.SINGLE);
+ mol.addBond(b3);
+ IBond b4 = builder.newInstance(IBond.class,a1, a5, IBond.Order.SINGLE);
+ mol.addBond(b4);
+ IBond b5 = builder.newInstance(IBond.class,a1, a6, IBond.Order.SINGLE);
+ mol.addBond(b5);
+
+ String[] expectedTypes = {
+ "P.ane", "C.sp3", "C.sp3", "C.sp3", "C.sp3", "C.sp3"
+ };
+ assertAtomTypes(testedAtomTypes, expectedTypes, mol);
+ }
@Test public void countTestedAtomTypes() {
super.countTestedAtomTypes(testedAtomTypes);

0 comments on commit 90371fd

Please sign in to comment.