001/* 002 * PDB web development code 003 * 004 * This code may be freely distributed and modified under the 005 * terms of the GNU Lesser General Public Licence. This should 006 * be distributed with the code. If you do not have a copy, 007 * see: 008 * 009 * http://www.gnu.org/copyleft/lesser.html 010 * 011 * Copyright for this code is held jointly by the individual 012 * authors. These should be listed in @author doc comments. 013 * 014 * 015 * Created on Aug 5, 2009 016 * Created by ap3 017 * 018 */ 019package org.biojava.nbio.structure.secstruc; 020 021/** 022 * Container that represents a hidrogen bond. It contains the energy of the bond 023 * in cal/mol and the partner index. 024 * 025 * @author Andreas Prlic 026 * @author Aleix Lafita 027 * 028 */ 029public class HBond { 030 031 private double energy; 032 private int partner; 033 034 public HBond() { 035 energy = 0; 036 partner = 0; 037 } 038 039 public HBond(HBond o) { 040 this.energy = o.energy; 041 this.partner = o.partner; 042 } 043 044 @Override 045 public HBond clone() { 046 return new HBond(this); 047 } 048 049 @Override 050 public String toString() { 051 return partner + " | " + (energy / 1000.0); 052 } 053 054 public double getEnergy() { 055 return energy; 056 } 057 058 public void setEnergy(double energy) { 059 this.energy = energy; 060 } 061 062 public int getPartner() { 063 return partner; 064 } 065 066 public void setPartner(int partner) { 067 this.partner = partner; 068 } 069 070}