/*************************************************************************** pdbfragment.cpp - description ------------------- begin : Mon Jan 27 18:25:08 2003 copyright : (C) 2002 by Cavalli Andrea email : cavalli@bioc.unizh.ch **************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include using namespace Almost; PDBFragment::PDBFragment(const PDBFragment & fragment){ name_ = fragment.name_; fragSeq_ = fragment.fragSeq_; iCode_ = fragment.iCode_; for(size_t i=0;i PDBFragment::fingerprint() const { set res; for(int i=0;iname); } return res; } string PDBFragment::fingerprint_string() const { string res; set tmp; for(int i=0;iname); } int count = 0; set::iterator iter = tmp.begin(),end = tmp.end(); while(iter!=end){ res += *iter; if(count!=tmp.size()-1) res += "-"; ++count; ++iter; } return res; } string PDBFragment::fingerprint_heavy_string() const { string res; set tmp; for(int i=0;iname[0]!='H') tmp.insert(atom[i]->name); } int count = 0; set::iterator iter = tmp.begin(),end = tmp.end(); while(iter!=end){ res += *iter; if(count!=tmp.size()-1) res += "-"; ++count; ++iter; } return res; }