test_class.file: descriptor/qsarbond/src/test/java/org/openscience/cdk/qsar/descriptors/bond/AtomicNumberDifferenceDescriptorTest.java
test_class.identifier: AtomicNumberDifferenceDescriptorTest
test_class.superclass: extends BondDescriptorTest
test_case.body: @Test
      public void testDescriptor1() throws InvalidSmilesException {
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol1 = sp.parseSmiles("CC");
          double value = ((DoubleResult) descriptor.calculate(mol1.getBond(0), mol1).getValue()).doubleValue();
          Assert.assertEquals(0, value, 0.0000);
      }
test_case.class_method_signature: AtomicNumberDifferenceDescriptorTest.testDescriptor1()
test_case.full_signature: @Test public void testDescriptor1()
test_case.identifier: testDescriptor1
test_case.invocations: getInstance parseSmiles doubleValue getValue calculate getBond assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDescriptor1()
focal_class.declarator: factory = null
focal_class.modifier: private static
focal_class.original_string: private static IsotopeFactory factory = null;
focal_class.type: IsotopeFactory
focal_class.var_name: factory
focal_class.declarator: NAMES = {"MNDiff"}
focal_class.modifier: private final static
focal_class.original_string: private final static String[] NAMES = {"MNDiff"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarbond/src/main/java/org/openscience/cdk/qsar/descriptors/bond/AtomicNumberDifferenceDescriptor.java
focal_class.identifier: AtomicNumberDifferenceDescriptor
focal_class.interfaces: implements IBondDescriptor
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.AtomicNumberDifferenceDescriptor()
focal_class.full_signature: public  AtomicNumberDifferenceDescriptor()
focal_class.identifier: AtomicNumberDifferenceDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  AtomicNumberDifferenceDescriptor()
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.ensureIsotopeFactory()
focal_class.full_signature: private void ensureIsotopeFactory()
focal_class.identifier: ensureIsotopeFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void ensureIsotopeFactory()
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.getSpecification()
focal_class.full_signature: @Override public DescriptorSpecification getSpecification()
focal_class.identifier: getSpecification
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DescriptorSpecification
focal_class.signature: DescriptorSpecification getSpecification()
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.setParameters(Object[] params)
focal_class.full_signature: @Override public void setParameters(Object[] params)
focal_class.identifier: setParameters
focal_class.modifiers: @Override public
focal_class.parameters: (Object[] params)
focal_class.return: void
focal_class.signature: void setParameters(Object[] params)
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.getParameters()
focal_class.full_signature: @Override public Object[] getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] getParameters()
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.getDescriptorNames()
focal_class.full_signature: @Override public String[] getDescriptorNames()
focal_class.identifier: getDescriptorNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getDescriptorNames()
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.calculate(IBond bond, IAtomContainer ac)
focal_class.full_signature: @Override public DescriptorValue calculate(IBond bond, IAtomContainer ac)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IBond bond, IAtomContainer ac)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IBond bond, IAtomContainer ac)
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.getParameterNames()
focal_class.full_signature: @Override public String[] getParameterNames()
focal_class.identifier: getParameterNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getParameterNames()
focal_class.class_method_signature: AtomicNumberDifferenceDescriptor.getParameterType(String name)
focal_class.full_signature: @Override public Object getParameterType(String name)
focal_class.identifier: getParameterType
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: Object
focal_class.signature: Object getParameterType(String name)
focal_class.superclass: extends AbstractBondDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IBond bond, IAtomContainer ac) {
          ensureIsotopeFactory();
          if (bond.getAtomCount() != 2) {
              return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                      Double.NaN), NAMES, new CDKException("Only 2-center bonds are considered"));
          }
  
          IAtom[] atoms = BondManipulator.getAtomArray(bond);
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(
                  Math.abs(factory.getElement(atoms[0].getSymbol()).getAtomicNumber()
                                   - factory.getElement(atoms[1].getSymbol()).getAtomicNumber())), NAMES);
      }
focal_method.class_method_signature: AtomicNumberDifferenceDescriptor.calculate(IBond bond, IAtomContainer ac)
focal_method.full_signature: @Override public DescriptorValue calculate(IBond bond, IAtomContainer ac)
focal_method.identifier: calculate
focal_method.invocations: ensureIsotopeFactory getAtomCount getSpecification getParameterNames getParameters getAtomArray getSpecification getParameterNames getParameters abs getAtomicNumber getElement getSymbol getAtomicNumber getElement getSymbol
focal_method.modifiers: @Override public
focal_method.parameters: (IBond bond, IAtomContainer ac)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IBond bond, IAtomContainer ac)