test_class.file: descriptor/qsarmolecular/src/test/java/org/openscience/cdk/qsar/descriptors/molecular/MannholdLogPDescriptorTest.java
test_class.identifier: MannholdLogPDescriptorTest
test_class.superclass: extends MolecularDescriptorTest
test_case.body: @Test
      public void testChloroform() {
          IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
          IAtomContainer chloroform = builder.newInstance(IAtomContainer.class);
          chloroform.addAtom(builder.newInstance(IAtom.class, "C"));
          for (int i = 0; i < 3; i++) {
              chloroform.addAtom(builder.newInstance(IAtom.class, "Cl"));
              chloroform.addBond(0, (i + 1), IBond.Order.SINGLE);
          }
          IDescriptorResult result = descriptor.calculate(chloroform).getValue();
          Assert.assertTrue(result instanceof DoubleResult);
          Assert.assertEquals(1.24, ((DoubleResult) result).doubleValue(), 0.01);
      }
test_case.class_method_signature: MannholdLogPDescriptorTest.testChloroform()
test_case.full_signature: @Test public void testChloroform()
test_case.identifier: testChloroform
test_case.invocations: getInstance newInstance addAtom newInstance addAtom newInstance addBond getValue calculate assertTrue assertEquals doubleValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testChloroform()
focal_class.declarator: NAMES = {"MLogP"}
focal_class.modifier: private static final
focal_class.original_string: private static final String[] NAMES = {"MLogP"};
focal_class.type: String[]
focal_class.var_name: NAMES
focal_class.file: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/MannholdLogPDescriptor.java
focal_class.identifier: MannholdLogPDescriptor
focal_class.interfaces: implements IMolecularDescriptor
focal_class.class_method_signature: MannholdLogPDescriptor.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: MannholdLogPDescriptor.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: MannholdLogPDescriptor.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: MannholdLogPDescriptor.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: MannholdLogPDescriptor.getDummyDescriptorValue(Exception e)
focal_class.full_signature: private DescriptorValue getDummyDescriptorValue(Exception e)
focal_class.identifier: getDummyDescriptorValue
focal_class.modifiers: private
focal_class.parameters: (Exception e)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue getDummyDescriptorValue(Exception e)
focal_class.class_method_signature: MannholdLogPDescriptor.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: MannholdLogPDescriptor.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: MannholdLogPDescriptor.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: MannholdLogPDescriptor.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) {
          IAtomContainer ac = null;
          try {
              ac = (IAtomContainer) atomContainer.clone();
          } catch (CloneNotSupportedException e) {
              return getDummyDescriptorValue(e);
          }
  
          int carbonCount = 0;
          int heteroCount = 0;
          for (IAtom atom : ac.atoms()) {
              if (atom.getAtomicNumber() != IElement.H) {
                  if (atom.getAtomicNumber() == IElement.C) {
                      carbonCount++;
                  } else {
                      heteroCount++;
                  }
              }
          }
          double mLogP = 1.46 + 0.11 * carbonCount - 0.11 * heteroCount;
  
          return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new DoubleResult(mLogP),
                  getDescriptorNames());
      }
focal_method.class_method_signature: MannholdLogPDescriptor.calculate(IAtomContainer atomContainer)
focal_method.full_signature: @Override public DescriptorValue calculate(IAtomContainer atomContainer)
focal_method.identifier: calculate
focal_method.invocations: clone getDummyDescriptorValue atoms getAtomicNumber getAtomicNumber 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)