OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
biounit.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2023 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_MOL_ALG_BIOUNIT_HH
20 #define OST_MOL_ALG_BIOUNIT_HH
21 
22 #include <ost/mol/entity_handle.hh>
23 #include <ost/io/mmcif_info.hh>
24 
25 namespace ost { namespace mol { namespace alg {
26 
27 struct BUInfo {
28 
29  BUInfo() { };
30 
32 
33  void ToStream(std::ostream& stream) const;
34 
35  static BUInfo FromStream(std::istream& stream);
36 
37  String ToString() const;
38 
39  static BUInfo FromString(const String& s);
40 
41  const std::vector<std::vector<String> >& GetAUChains() const;
42 
43  const std::vector<std::vector<geom::Mat4> >& GetTransformations() const;
44 
45  void _InitTransforms() const;
46 
47  std::vector<String> au_chains;
48  std::vector<int> chain_intvl;
49  std::vector<std::vector<geom::Mat4> > operations;
50  std::vector<int> op_intvl;
51 
52 private:
53  mutable std::vector<std::vector<String> > au_chains_;
54  mutable std::vector<std::vector<geom::Mat4> > transforms_;
55 };
56 
58  const ost::io::MMCifInfoBioUnit& bu);
59 
60 
62  const BUInfo& bu_info);
63 
64 }}} // ns
65 
66 #endif // OST_MOL_ALG_BIOUNIT_HH
std::string String
Definition: base.hh:54
std::vector< int > op_intvl
Definition: biounit.hh:50
std::vector< std::vector< geom::Mat4 > > operations
Definition: biounit.hh:49
ost::mol::EntityHandle CreateBU(const ost::mol::EntityHandle &asu, const ost::io::MMCifInfoBioUnit &bu)
Protein or molecule.
std::vector< String > au_chains
Definition: biounit.hh:47
static BUInfo FromString(const String &s)
void ToStream(std::ostream &stream) const
void _InitTransforms() const
String ToString() const
std::vector< int > chain_intvl
Definition: biounit.hh:48
const std::vector< std::vector< geom::Mat4 > > & GetTransformations() const
static BUInfo FromStream(std::istream &stream)
const std::vector< std::vector< String > > & GetAUChains() const