// $Id: Conformation.java,v 1.1 2006/05/20 17:02:06 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: Conformation.java,v $ // Revision 1.1 2006/05/20 17:02:06 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:28 Sasha Buzko // Initial commit // // Revision 1.1 2005/11/13 04:35:27 Administrator // *** empty log message *** // // Revision 1.5 2003/04/25 00:57:02 moreland // Changed TYPE_UNDEFINED string value so it is more intuitive. // // Revision 1.4 2003/04/24 17:12:55 moreland // Added an "undefined" conformation type string in order to support // secondary structure conformation fragment assignments in the Chain class. // // Revision 1.3 2003/04/23 17:22:06 moreland // Removed unused constructor. // // Revision 1.2 2002/12/16 06:24:41 moreland // Changed code to support differentiation of Conformation into Coil, Helix, // Strand, and Turn sub-class types (at Eliot Clingman's suggestion). // // Revision 1.1 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 an abstract StructureComponent container for conformation * (secondary structure) data. *
* See the "PROGRAMMING NOTE" section of the StructureComponent class. *
* @see edu.sdsc.mbt.Atom * @see edu.sdsc.mbt.Structure * @see edu.sdsc.mbt.StructureComponent * @see edu.sdsc.mbt.StructureComponentIterator * @see edu.sdsc.mbt.util.AminoAcidInfo *
* @author John L. Moreland */ public abstract class Conformation extends StructureComponent implements java.lang.Cloneable, java.io.Serializable { /** * If a residue conformation / chain fragment type is not defined, use this value. * That is, assign this value when secondary structure has not been assigned. */ public static final String TYPE_UNDEFINED = "UNDEFINED_CONFORMATION"; // // StructureComponent methods // /** * Copy all of the field values from the parameter object into "this". */ public void copy( StructureComponent structureComponent ) { Conformation conformation = (Conformation) structureComponent; name = conformation.name; start_compound = conformation.start_compound; start_chain = conformation.start_chain; start_residue = conformation.start_residue; end_compound = conformation.end_compound; end_chain = conformation.end_chain; end_residue = conformation.end_residue; } /** * Clone this object. */ public Object clone( ) throws CloneNotSupportedException { return super.clone( ); } /** * This method returns the fully qualified name of this class. *
* 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; } // // Conformation fields // /** * For example, "helix_BA", "turn_1A" */ public String name = null; /** * For example, "ALA", "GLU", "LYS", etc. */ public String start_compound = null; /** * This value corresponds to the start Atom.chain_id value. * For example, "A", "B", "D", etc. */ public String start_chain = null; /** * This value corresponds to the Atom.residue_id value. * For example, 22, 27, etc. */ public int start_residue = -1; /** * For example, "ALA", "GLU", "LYS", etc. */ public String end_compound = null; /** * This value corresponds to the end Atom.chain_id value. * For example, "A", "B", "D", etc. */ public String end_chain = null; /** * This value corresponds to the end Atom.residue_id value. * For example, 27, 137, etc. */ public int end_residue = -1; 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(); } }