Source code: joelib/math/symmetry/SymmetryElement.java
1 ///////////////////////////////////////////////////////////////////////////////
2 // Filename: $RCSfile: SymmetryElement.java,v $
3 // Purpose: Brute force symmetry analyzer.
4 // Language: Java
5 // Compiler: JDK 1.4
6 // Authors: Joerg K. Wegner
7 // Original author: (C) 1996, 2003 S. Patchkovskii, Serguei.Patchkovskii@sympatico.ca
8 // Version: $Revision: 1.2 $
9 // $Date: 2003/08/19 13:11:27 $
10 // $Author: wegner $
11 //
12 // Copyright (c) Dept. Computer Architecture, University of Tuebingen, Germany
13 //
14 // This program is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 2 of the License, or
17 // (at your option) any later version.
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 General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 ///////////////////////////////////////////////////////////////////////////////
28 package joelib.math.symmetry;
29
30
31 /*==========================================================================*
32 * IMPORTS
33 *========================================================================== */
34 import joelib.molecule.*;
35
36
37 /*==========================================================================*
38 * CLASS DECLARATION
39 *========================================================================== */
40
41 /**
42 * SymmetryElement.
43 *
44 * @author Serguei Patchkovskii
45 * @author wegnerj
46 * @license GPL
47 * @cvsversion $Revision: 1.2 $, $Date: 2003/08/19 13:11:27 $
48 */
49 public class SymmetryElement
50 {
51 //~ Instance fields ////////////////////////////////////////////////////////
52
53 /*-------------------------------------------------------------------------*
54 * public member variables
55 *------------------------------------------------------------------------- */
56 public TransformationAtom transformAtomMethod;
57 public double[] direction = new double[SymCoordinates.DIMENSION];
58 public double[] normal = new double[SymCoordinates.DIMENSION];
59
60 /**
61 * Correspondence table for the transformation.
62 */
63 public int[] transform;
64 public double distance;
65
66 /**
67 * Larges error associated with the element.
68 */
69 public double maxdev;
70
71 /**
72 * 4 for inversion and planes, 7 for axes.
73 */
74 public int nparam;
75
76 /**
77 * Applying transformation this many times is identity.
78 */
79 public int order;
80
81 //~ Constructors ///////////////////////////////////////////////////////////
82
83 /*-------------------------------------------------------------------------*
84 * constructor
85 *------------------------------------------------------------------------- */
86
87 /**
88 * Constructor for the AtomIntInt object
89 *
90 * @param _a Description of the Parameter
91 * @param _ii Description of the Parameter
92 */
93 public SymmetryElement(int transformSize)
94 {
95 transform = new int[transformSize];
96
97 //Initialize with an impossible value
98 for (int i = 0; i < transformSize; i++)
99 {
100 transform[i] = transformSize + 1;
101 }
102 }
103
104 //~ Methods ////////////////////////////////////////////////////////////////
105
106 public void transformAtom(Symmetry invoker, SymmetryElement _el,
107 SymAtom _from, SymAtom _to) throws SymmetryException
108 {
109 transformAtomMethod.callTransformation(invoker, _el, _from, _to);
110 }
111 }
112 ///////////////////////////////////////////////////////////////////////////////
113 // END OF FILE.
114 ///////////////////////////////////////////////////////////////////////////////