Skip to content

Commit

Permalink
Merged master into 2.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
olas committed Jan 9, 2012
2 parents ff14ecd + 004996c commit ed4eaed
Show file tree
Hide file tree
Showing 9 changed files with 2,898 additions and 1,936 deletions.
56 changes: 56 additions & 0 deletions features/net.bioclipse.qsar.test_feature/feature.xml.orig
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="net.bioclipse.qsar.test_feature"
label="QSAR Test Feature"
version="2.5.0.qualifier"
provider-name="The Bioclipse Project"
plugin="net.bioclipse.qsar.test">

<description>
QSAR (Quantitative Structure-Activity Relationship) functionality
for Bioclipse.
</description>

<copyright>
(C) 2006-2009 The Bioclipse Project contributors and others.
</copyright>

<license url="http://www.eclipse.org/org/documents/epl-v10.php">
This feature and the accompanying materials are made available
under the terms of the Eclipse Public License v1.0 + exception,
putting no constraints on choice of backend and/or license for
creating plugins for Bioclipse; it is totally open for both open
source plugins as well as commercial. The exception allows GPL
plugins to be written and run in any combination with EPL licensed
plugins, addressing incompatibility between the EPL and the GPL
v.2.
The Eclipse Public License accompanies this distribution, and
is available at http://www.eclipse.org/legal/epl-v10.html
</license>

<requires>
<<<<<<< HEAD
<import feature="net.bioclipse.rdf_feature" version="2.5.0.qualifier" match="greaterOrEqual"/>
<import feature="net.bioclipse.chemoinformatics_feature" version="2.5.0.qualifier" match="greaterOrEqual"/>
=======
<import feature="net.bioclipse.rdf_feature" version="2.4.0" match="greaterOrEqual"/>
<import feature="net.bioclipse.chemoinformatics_feature" version="2.4.0" match="greaterOrEqual"/>
>>>>>>> master
<import feature="net.bioclipse.qsar_feature" version="2.5.0.qualifier"/>
</requires>

<plugin
id="net.bioclipse.cdk.qsar.test"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="net.bioclipse.qsar.test"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
Expand Up @@ -24,6 +24,7 @@
import org.openscience.cdk.atomtype.CDKAtomTypeMatcher;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.exception.NoSuchAtomException;
import org.openscience.cdk.geometry.GeometryTools;
import org.openscience.cdk.graph.SpanningTree;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
Expand Down Expand Up @@ -188,22 +189,22 @@ public Map<? extends IMolecule, List<IDescriptorResult>> calculateDescriptor(
private List<IDescriptorResult> doCalculate(ICDKMolecule cdkmol,
List<DescriptorType> descriptorTypes,
IProgressMonitor monitor) throws OperationCanceledException{

//Get atomcontainer from IMolecule
IAtomContainer container=cdkmol.getAtomContainer();

//Make sure e have a Molecule, otherwise create it
if (!(container instanceof org.openscience.cdk.interfaces.IMolecule))
container = container.getBuilder().newInstance(
org.openscience.cdk.interfaces.IMolecule.class, container);

//Store results here
List<IDescriptorResult> results = new ArrayList<IDescriptorResult>();

//Preprocess atomcontainer. Return null if all is well, else String with error
//========================
String atomcontainerError=doCDKPreprocessing(container);

//Loop over all descriptors
//=========================
for (DescriptorType descType : descriptorTypes){
Expand Down Expand Up @@ -339,6 +340,7 @@ else if (obj instanceof String) {
String[] resultLabels = null;
// logger.debug("# result values: " + resultVals.length);


//Calculate descriptor
try {
DescriptorValue value = ((IMolecularDescriptor) cdkDescriptor).calculate(container);
Expand Down Expand Up @@ -416,7 +418,6 @@ else if (resultLabels.length != resultVals.length) {
*/
private String doCDKPreprocessing(IAtomContainer container) {


//Add hydrogens
try {

Expand All @@ -432,7 +433,7 @@ private String doCDKPreprocessing(IAtomContainer container) {

CDKHydrogenAdder hAdder = CDKHydrogenAdder.getInstance(container.getBuilder());
hAdder.addImplicitHydrogens(container);
AtomContainerManipulator.convertImplicitToExplicitHydrogens(container);
// AtomContainerManipulator.convertImplicitToExplicitHydrogens(container);
} catch (Exception e1) {
String emsg="Error addding hydrogens : " + e1.getMessage();
logger.error(emsg);
Expand Down
30 changes: 30 additions & 0 deletions plugins/net.bioclipse.qsar.test/META-INF/MANIFEST.MF.orig
@@ -0,0 +1,30 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test Plug-in
Bundle-SymbolicName: net.bioclipse.qsar.test;singleton:=true
Bundle-Version: 2.5.0.qualifier
Bundle-Activator: net.bioclipse.qsar.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
net.bioclipse.qsar,
net.bioclipse.core,
<<<<<<< HEAD
net.bioclipse.qsar.model,
net.bioclipse.qsar.model.edit,
net.bioclipse.qsar.ui,
net.bioclipse.core.tests
=======
net.bioclipse.qsar.model;bundle-version="1.0.0",
net.bioclipse.qsar.model.edit;bundle-version="1.0.0",
net.bioclipse.qsar.ui;bundle-version="2.0.0",
net.bioclipse.core.tests;bundle-version="2.5.0"
>>>>>>> master
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.apache.log4j,
org.junit,
org.junit.runner,
org.junit.runners
Export-Package: net.bioclipse.qsar.test,
net.bioclipse.qsar.test.business
Bundle-ClassPath: .

0 comments on commit ed4eaed

Please sign in to comment.