// $Id: Symmetry.java,v 1.2 2007/02/13 19:08:41 Sasha Buzko Exp $ // // Copyright (c) 2000-2002 San Diego Supercomputer Center (SDSC), // a facility operated jointly by the University of California, // San Diego (UCSD) and General Atomics, San Diego, California, USA. // // Users and possessors of this source code are hereby granted a // nonexclusive, royalty-free copyright and design patent license to // use this code in individual software. License is not granted for // commercial resale, in whole or in part, without prior written // permission from SDSC. This source is provided "AS IS" without express // or implied warranty of any kind. // // For further information, please see: http://mbt.sdsc.edu // // History: // $Log: Symmetry.java,v $ // Revision 1.2 2007/02/13 19:08:41 Sasha Buzko // *** empty log message *** // // Revision 1.1 2006/05/20 17:02:07 Sasha Buzko // Updated version // // Revision 1.1 2006/04/30 20:14:05 Sasha Buzko // New version of the app // // Revision 1.1 2006/04/15 19:42:27 Sasha Buzko // Initial commit // // Revision 1.1 2005/11/13 04:35:26 Administrator // *** empty log message *** // // Revision 1.2 2003/04/23 17:40:51 moreland // Removed StructureComponentID/scid and replaced it with a "structure" field // in the StructureComponent base class. // Changed "getType" method to "getStructureComponentType" to return dynamic // SC type (ie: class name). // // Revision 1.1 2002/12/16 06:29:07 moreland // New class to support Structure replication through symmetry operations. // // Revision 1.2 2002/10/24 17:54:01 moreland // Provides implementation for the improved Structure API/implementation. // // Revision 1.1.1.1 2002/07/16 18:00:18 moreland // Imported sources // // Revision 1.0 2002/06/10 23:38:39 moreland // package edu.sdsc.mbt; /** * Implements a StructureComponent container for Symmetry data. *

* See the "PROGRAMMING NOTE" section of the StructureComponent class. *

* @see edu.sdsc.mbt.StructureComponent * @see edu.sdsc.mbt.Structure * @see edu.sdsc.mbt.StructureComponentIterator *

* @author John L. Moreland */ public class Symmetry extends StructureComponent implements java.lang.Cloneable, java.io.Serializable { // // Constructor // /** * Creates a new Symmetry object. */ public Symmetry( ) { } // // StructureComponent methods // /** * Copy all of the field values from the parameter object into "this". */ public void copy( StructureComponent structureComponent ) { structure = structureComponent.structure; Symmetry symmetry = (Symmetry) structureComponent; count = symmetry.count; for ( int i=0; i * This name is used by the StructureComponentRegistry class to enable * dynamic registration and discovery of new StructureComponent * sub-classes/types. The name is also used to create a unique integer * indentifier for each type in order to make run-time type comparisons * fast. */ private static String className = null; public static String getClassName() { if ( className == null ) className = ((new Throwable()).getStackTrace())[0].getClassName(); return className; } /** * This method returns the fully qualified name of this class. */ public String getStructureComponentType( ) { return className; } // // Symmetry fields // /** * The symmetry space group name. * For example, "C 2", "I 2" */ public String name = null; // _symmetry.space_group_name_H-M /** * The count of the number of symmetry copies. * For example, 6 */ public int count = 0; /** * The symmetry matricies expressed as an array of 4x4 3D transforms. * For example, * [1.0, 0.0, 0.0, 0.0] * [0.0, 1.0, 0.0, 0.0] * [0.0, 0.0, 1.0, 0.0] * [0.0, 0.0, 0.0, 1.0] * The 1st array index is the matrix number. * The 2nd array index is the row number. * The 3rd array index is the column number. */ public double matrix[][][] = null; private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { out.defaultWriteObject(); } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { in.defaultReadObject(); } public boolean isVisible(){ return true; } }