/*************************************************************************** select.cpp - description ------------------- begin : Thu Jul 3 01:42:38 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 #include #include #include Almost::NameSelection::NameSelection(const Molecules & molecules, string regexp){ molecules_ = &molecules; if(regexp.find("%T")==0){ //do type pattern regexp =string(regexp.begin()+2,regexp.end()); for(int i=0;i a = molecules.fragment_atoms(i); for(int q=0;q::iterator iter = ns.result().begin(), end = ns.result().end(); int nrem = 0; while(iter!=end){ molecules.remove_atom(*iter-nrem); ++iter; ++nrem; } }