Source code: joelib/algo/morgan/types/SingleTieResolverImpVal.java
1 ///////////////////////////////////////////////////////////////////////////////
2 // Filename: $RCSfile: SingleTieResolverImpVal.java,v $
3 // Purpose: Helper class for resolving renumbering ties.
4 // Language: Java
5 // Compiler: JDK 1.4
6 // Authors: Joerg K. Wegner
7 // Version: $Revision: 1.3 $
8 // $Date: 2003/08/19 13:11:24 $
9 // $Author: wegner $
10 //
11 // Copyright (c) Dept. Computer Architecture, University of Tuebingen, Germany
12 //
13 // This program is free software; you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation version 2 of the License.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 ///////////////////////////////////////////////////////////////////////////////
22 package joelib.algo.morgan.types;
23
24
25 /*==========================================================================*
26 * IMPORTS
27 *========================================================================== */
28 import joelib.algo.morgan.AtomDoubleParent;
29 import joelib.algo.morgan.SingleTieResolver;
30
31 import joelib.molecule.JOEMol;
32
33
34 /*==========================================================================*
35 * CLASS DECLARATION
36 *========================================================================== */
37
38 /**
39 * Interface for resolving renumbering ties.
40 *
41 * @author wegnerj
42 * @license GPL
43 * @cvsversion $Revision: 1.3 $, $Date: 2003/08/19 13:11:24 $
44 */
45 public class SingleTieResolverImpVal implements SingleTieResolver
46 {
47 //~ Methods ////////////////////////////////////////////////////////////////
48
49 /*-------------------------------------------------------------------------*
50 * public member methods
51 *------------------------------------------------------------------------- */
52 public double getResolvingValue(AtomDoubleParent ap, JOEMol mol)
53 {
54 return (double) mol.getAtom(ap.atomIdx).getImplicitValence();
55 }
56
57 public boolean init(JOEMol mol)
58 {
59 return true;
60 }
61 }
62 ///////////////////////////////////////////////////////////////////////////////
63 // END OF FILE.
64 ///////////////////////////////////////////////////////////////////////////////