1 /* Copyright (C) 2003-2015 Egon Willighagen <egonw@users.sf.net> 2 * 3 * Contact: cdk-devel@lists.sourceforge.net 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public License 7 * as published by the Free Software Foundation; either version 2.1 8 * of the License, or (at your option) any later version. 9 * All we ask is that proper credit is given for our work, which includes 10 * - but is not limited to - adding the above copyright notice to the beginning 11 * of your source code files, and to any copyright notice that you may distribute 12 * with programs based on this work. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 22 */ 23 package org.openscience.cdk; 24 25 import org.openscience.cdk.interfaces.IAtom; 26 import org.openscience.cdk.interfaces.IPseudoAtom; 27 28 /** 29 * Atom that represents part of an residue in an enzyme, like Arg255. 30 * 31 * @see PseudoAtom 32 * @cdk.module pdb 33 * @cdk.githash 34 */ 35 public class EnzymeResidueLocator extends PseudoAtom { 36 37 /** 38 * Determines if a de-serialized object is compatible with this class. 39 * 40 * This value must only be changed if and only if the new version 41 * of this class is incompatible with the old version. See Sun docs 42 * for <a href=http://java.sun.com/products/jdk/1.1/docs/guide 43 * /serialization/spec/version.doc.html>details</a>. 44 */ 45 private static final long serialVersionUID = -4267555433142927412L; 46 47 /** 48 * Constructs an EnzymeResidueLocator from a String containing the locator. 49 * 50 * @param label The String describing the residue and its location. 51 */ EnzymeResidueLocator(String label)52 public EnzymeResidueLocator(String label) { 53 super(label); 54 } 55 56 /** 57 * Constructs an EnzymeResidueLocator from an existing Atom. 58 * 59 * @param atom Atom that should be converted into a EnzymeResidueLocator. 60 */ EnzymeResidueLocator(IAtom atom)61 public EnzymeResidueLocator(IAtom atom) { 62 super(atom); 63 if (atom instanceof IPseudoAtom) { 64 this.setLabel(((IPseudoAtom) atom).getLabel()); 65 } 66 } 67 } 68