00001 //------------------------------------------------------------------------------ 00002 // This file is part of the OpenStructure project <www.openstructure.org> 00003 // 00004 // Copyright (C) 2008-2011 by the OpenStructure authors 00005 // 00006 // This library is free software; you can redistribute it and/or modify it under 00007 // the terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 3.0 of the License, or (at your option) 00009 // any later version. 00010 // This library is distributed in the hope that it will be useful, but WITHOUT 00011 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this library; if not, write to the Free Software Foundation, Inc., 00017 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 //------------------------------------------------------------------------------ 00019 00020 #ifndef OST_MM_BLOCK_MODIFIERS 00021 #define OST_MM_BLOCK_MODIFIERS 00022 00023 #include <ost/mol/residue_handle.hh> 00024 #include <ost/mol/mm/buildingblock.hh> 00025 #include <boost/shared_ptr.hpp> 00026 #include <ost/mol/xcs_editor.hh> 00027 #include <ost/io/binary_data_source.hh> 00028 #include <ost/io/binary_data_sink.hh> 00029 00030 namespace ost{ namespace mol{ namespace mm{ 00031 00032 class HydrogenConstructor; 00033 class TerminiConstructor; 00034 class BlockModifier; 00035 00036 typedef boost::shared_ptr<HydrogenConstructor> HydrogenConstructorPtr; 00037 typedef boost::shared_ptr<TerminiConstructor> TerminiConstructorPtr; 00038 typedef boost::shared_ptr<BlockModifier> BlockModifierPtr; 00039 00040 typedef enum { 00041 GromacsBlockModifiers, 00042 HeuristicBlockModifiers 00043 } BlockModifierType; 00044 00045 class HydrogenConstructor{ 00046 public: 00047 HydrogenConstructor() { } 00048 virtual ~HydrogenConstructor() { } 00049 virtual void ApplyOnBuildingBlock(BuildingBlockPtr p) = 0; 00050 virtual void ApplyOnResidue(ost::mol::ResidueHandle& res, ost::mol::XCSEditor& ed) = 0; 00051 virtual void OnSave(ost::io::BinaryDataSink& ds) = 0; 00052 virtual BlockModifierType GetBlockModifierType() = 0; 00053 }; 00054 00055 class TerminiConstructor{ 00056 public: 00057 TerminiConstructor() { } 00058 virtual ~TerminiConstructor() { } 00059 virtual void ApplyOnBuildingBlock(BuildingBlockPtr p) = 0; 00060 virtual void ApplyOnResidue(ost::mol::ResidueHandle& res, ost::mol::XCSEditor& ed) = 0; 00061 virtual void OnSave(ost::io::BinaryDataSink& ds) = 0; 00062 virtual BlockModifierType GetBlockModifierType() = 0; 00063 }; 00064 00065 class BlockModifier{ 00066 public: 00067 BlockModifier() { } 00068 virtual ~BlockModifier() { } 00069 virtual void ApplyOnBuildingBlock(BuildingBlockPtr p) = 0; 00070 virtual void ApplyOnResidue(ost::mol::ResidueHandle& res, ost::mol::XCSEditor& ed) = 0; 00071 virtual void OnSave(ost::io::BinaryDataSink& ds) = 0; 00072 virtual BlockModifierType GetBlockModifierType() = 0; 00073 }; 00074 00075 00076 }}} //ns 00077 00078 #endif