~ubuntu-branches/ubuntu/trusty/cdk/trusty-proposed

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/tools/DataFeatures.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2008-04-09 21:17:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080409211753-46lmjw5z8mx5pd8d
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $RCSfile: $
 
2
 * $Author: egonw $
 
3
 * $Date: 2006-05-09 21:32:32 +0200 (Tue, 09 May 2006) $  
 
4
 * $Revision: 6204 $
 
5
 *
 
6
 * Copyright (C) 2006-2007  Egon Willighagen <egonw@users.sf.net>
 
7
 *
 
8
 * Contact: cdk-devel@lists.sourceforge.net
 
9
 *
 
10
 * This program is free software; you can redistribute it and/or
 
11
 * modify it under the terms of the GNU Lesser General Public License
 
12
 * as published by the Free Software Foundation; either version 2.1
 
13
 * of the License, or (at your option) any later version.
 
14
 * All we ask is that proper credit is given for our work, which includes
 
15
 * - but is not limited to - adding the above copyright notice to the beginning
 
16
 * of your source code files, and to any copyright notice that you may distribute
 
17
 * with programs based on this work.
 
18
 *
 
19
 * This program is distributed in the hope that it will be useful,
 
20
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
21
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
22
 * GNU Lesser General Public License for more details.
 
23
 *
 
24
 * You should have received a copy of the GNU Lesser General Public License
 
25
 * along with this program; if not, write to the Free Software
 
26
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
27
 *
 
28
 */
 
29
package org.openscience.cdk.tools;
 
30
 
 
31
/**
 
32
 * Class with constants for possible data features defined in the
 
33
 * a Data Feature Ontology. Actual integers are random
 
34
 * and should <b>not</b> be used directly.
 
35
 * 
 
36
 * <p>To test wether a IChemFormat supports a certain feature, the
 
37
 * following code can be used:
 
38
 * <pre>
 
39
 * int features = new XYZFormat().getSupportedDataFeatures();
 
40
 * boolean has3DCoords = (features & HAS_3D_COORDINATES) == HAS_3D_COORDINATES;
 
41
 * </pre>
 
42
 * 
 
43
 * <p>This list of constants matches the latest <a href="http://qsar.sourceforge.net/ontologies/data-features/index.xhtml"
 
44
 * >Blue Obelisk Data Features Ontology</a>.
 
45
 * 
 
46
 * @author     Egon Willighagen <ewilligh@uni-koeln.de>
 
47
 * @cdk.module core
 
48
 **/
 
49
public class DataFeatures {
 
50
 
 
51
    public final static int NONE = 0;
 
52
    
 
53
    // The int allows for up to 750 different properties. Should
 
54
    // be enough for now.
 
55
    
 
56
    // COORDINATE SYSTEMS
 
57
 
 
58
    /** @cdk.dictref bodf:coordinates2D */
 
59
    public final static int HAS_2D_COORDINATES = 1<<0;
 
60
    /** @cdk.dictref bodf:coordinates3D */
 
61
    public final static int HAS_3D_COORDINATES = 1<<1;
 
62
    /** @cdk.dictref bodf:fractionalUnitCellCoordinatesCoordinates */
 
63
    public final static int HAS_FRACTIONAL_CRYSTAL_COORDINATES = 1<<2;
 
64
    
 
65
    // ATOMIC FEATURES
 
66
    //                      HAS_ATOMS ??
 
67
 
 
68
    /** @cdk.dictref bodf:hasAtomElementSymbol */
 
69
    public final static int HAS_ATOM_ELEMENT_SYMBOL = 1<<3;
 
70
    /** @cdk.dictref bodf:partialAtomicCharges */
 
71
    public final static int HAS_ATOM_PARTIAL_CHARGES = 1<<4;
 
72
    /** @cdk.dictref bodf:formalAtomicCharges */
 
73
    public final static int HAS_ATOM_FORMAL_CHARGES = 1<<5;
 
74
    /** FIXME: NOT YET IN BODF !!! **/
 
75
    public final static int HAS_ATOM_HYBRIDIZATIONS = 1<<6;
 
76
    /** @cdk.dictref bodf:massNumbers */
 
77
    public final static int HAS_ATOM_MASS_NUMBERS = 1<<7;
 
78
    /** @cdk.dictref bodf:isotopeNumbers */
 
79
    public final static int HAS_ATOM_ISOTOPE_NUMBERS = 1<<8;
 
80
    
 
81
    // GRAPH FEATURES
 
82
    
 
83
    /** @cdk.dictref bodf:graphRepresentation */
 
84
    public final static int HAS_GRAPH_REPRESENTATION = 1<<9;
 
85
    /** @cdk.dictref bodf:dietzRepresentation */
 
86
    public final static int HAS_DIETZ_REPRESENTATION = 1<<10;
 
87
    
 
88
    // MODEL FEATURES
 
89
    
 
90
    /** FIXME: NOT YET IN BODF !!! **/
 
91
    public final static int HAS_UNITCELL_PARAMETERS = 1<<11;
 
92
    /** FIXME: NOT YET IN BODF !!! **/
 
93
        public final static int HAS_REACTIONS = 1<<12;
 
94
        
 
95
}
 
96