OpenStructure
Loading...
Searching...
No Matches
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
23#include <ost/io/mmcif_info.hh>
24
25namespace ost { namespace mol { namespace alg {
26
27struct BUInfo {
28
29 BUInfo() { };
30
32
33 void ToStream(std::ostream& stream) const;
34
35 static BUInfo FromStream(std::istream& stream);
36
38
39 static BUInfo FromString(const String& s);
40
41 static BUInfo AUCopy(const std::vector<String>& au_chains);
42
43 const std::vector<std::vector<String> >& GetAUChains() const;
44
45 const std::vector<std::vector<geom::Mat4> >& GetTransformations() const;
46
47 const std::vector<std::vector<std::vector<String> > >& GetBUChains() const;
48
49 void _InitTransforms() const;
50
51 std::vector<String> au_chains;
52 std::vector<int> chain_intvl;
53 std::vector<std::vector<geom::Mat4> > operations;
54 std::vector<int> op_intvl;
55
56private:
57 mutable std::vector<std::vector<String> > au_chains_;
58 mutable std::vector<std::vector<geom::Mat4> > transforms_;
59 mutable std::vector<std::vector<std::vector<String> > > bu_chains_;
60};
61
64
65
67 const BUInfo& bu_info);
68
69}}} // ns
70
71#endif // OST_MOL_ALG_BIOUNIT_HH
Protein or molecule.
std::string String
Definition base.hh:54
ost::mol::EntityHandle CreateBU(const ost::mol::EntityHandle &asu, const ost::io::MMCifInfoBioUnit &bu)
Definition base.dox:1
const std::vector< std::vector< geom::Mat4 > > & GetTransformations() const
const std::vector< std::vector< std::vector< String > > > & GetBUChains() const
std::vector< String > au_chains
Definition biounit.hh:51
BUInfo(const ost::io::MMCifInfoBioUnit &bu)
static BUInfo AUCopy(const std::vector< String > &au_chains)
std::vector< int > chain_intvl
Definition biounit.hh:52
void ToStream(std::ostream &stream) const
std::vector< std::vector< geom::Mat4 > > operations
Definition biounit.hh:53
std::vector< int > op_intvl
Definition biounit.hh:54
const std::vector< std::vector< String > > & GetAUChains() const
String ToString() const
void _InitTransforms() const
static BUInfo FromStream(std::istream &stream)
static BUInfo FromString(const String &s)