test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/VAdjMaDescriptorTest.java
test_class.identifier: VAdjMaDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testLinear() throws Exception {
          SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
          IAtomContainer mol = sp.parseSmiles("CCCCCCCCCC");
          org.hamcrest.MatcherAssert.assertThat(((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), closeTo(4.17, 0.001));
      }
test_case.class_method_signature: VAdjMaDescriptorTest.testLinear()
test_case.full_signature: @Test public void testLinear()
test_case.identifier: testLinear
test_case.invocations: getInstance parseSmiles assertThat doubleValue getValue calculate closeTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLinear()
focal_class.declarator: NAMES = {"VAdjMat"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES = {"VAdjMat"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/VAdjMaDescriptor.java
focal_class.identifier: VAdjMaDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: VAdjMaDescriptor.VAdjMaDescriptor()
focal_class.full_signature: public  VAdjMaDescriptor()
focal_class.identifier: VAdjMaDescriptor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  VAdjMaDescriptor()
focal_class.class_method_signature: VAdjMaDescriptor.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: VAdjMaDescriptor.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: VAdjMaDescriptor.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: VAdjMaDescriptor.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: VAdjMaDescriptor.calculate(IAtomContainer atomContainer)
focal_class.full_signature: @Override public DescriptorValue calculate(IAtomContainer atomContainer)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(IAtomContainer atomContainer)
focal_class.class_method_signature: VAdjMaDescriptor.getDescriptorResultType()
focal_class.full_signature: @Override public IDescriptorResult getDescriptorResultType()
focal_class.identifier: getDescriptorResultType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IDescriptorResult
focal_class.signature: IDescriptorResult getDescriptorResultType()
focal_class.class_method_signature: VAdjMaDescriptor.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: VAdjMaDescriptor.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 AbstractMolecularDescriptor
focal_method.body: @Override
      public DescriptorValue calculate(IAtomContainer atomContainer) {
  
          int n = 0; // count all heavy atom - heavy atom bonds
          for (IBond bond : atomContainer.bonds()) {
              if (bond.getBegin().getAtomicNumber() != 1 && bond.getEnd().getAtomicNumber() != 1) {
                  n++;
              }
          }
  
          double vadjMa = 0;
          if (n > 0) {
              vadjMa += (Math.log(n) / Math.log(2)) + 1;
          }
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(vadjMa),
                  getDescriptorNames());
      }
focal_method.class_method_signature: VAdjMaDescriptor.calculate(IAtomContainer atomContainer)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer atomContainer)
focal_method.identifier: calculate
focal_method.invocations: bonds getAtomicNumber getBegin getAtomicNumber getEnd log log getSpecification getParameterNames getParameters getDescriptorNames
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer atomContainer)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(IAtomContainer atomContainer)