00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: secondaryStructureProcessor.h,v 1.10.18.1 2007/03/25 21:25:30 oliver Exp $ 00005 // 00006 00007 #ifndef BALL_SECONDARY_STRUCTURE_PROCESSOR_H 00008 #define BALL_SECONDARY_STRUCTURE_PROCESSOR_H 00009 00010 #ifndef BALL_COMMON_H 00011 #include <BALL/common.h> 00012 #endif 00013 00014 #ifndef BALL_CONCEPT_COMPOSITE_H 00015 # include <BALL/CONCEPT/composite.h> 00016 #endif 00017 00018 #include <vector> 00019 00020 namespace BALL 00021 { 00022 class SecondaryStructure; 00023 00035 class BALL_EXPORT SecondaryStructureProcessor 00036 : public UnaryProcessor<Composite> 00037 { 00038 public: 00039 00042 00043 SecondaryStructureProcessor(); 00045 00048 00049 virtual Processor::Result operator() (Composite& composite); 00051 00052 protected: 00053 00055 void compute_(); 00056 00057 // helper function for finish() 00058 char setSecondaryStructureType_(SecondaryStructure* ss, char type); 00059 00060 bool testString_(const String& s, Size offset, Size offset_2); 00061 bool testString2_(const String& s, Size offset); 00062 bool testString3_(const String& s, Size offset, char x); 00063 00064 void insertTurn_(int turn, int position); 00065 void changeAllXToY_(char X, char Y, String& target); 00066 00067 // matrix to save the possible HBondPairs 00068 std::vector<std::vector<Position> > HBonds_; 00069 00070 //vector to save the bridges 00071 std::vector<std::vector<int> > posbridges_; 00072 00073 String sheet_; 00074 String fiveturn_; 00075 String fourturn_; 00076 String threeturn_; 00077 String summary_; 00078 }; 00079 00080 } //namespace BALL 00081 00082 #endif // BALL_STRUCTURE_SECONDARYSTRUCTUREPROCESSOR_H