OpenStructure
Loading...
Searching...
No Matches
molck.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-2020 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_MOLCK_HH
20#define OST_MOL_ALG_MOLCK_HH
21
22#include <string>
25
26namespace {
27 inline std::string BoolToString(bool b)
28 {
29 return b ? "True" : "False";
30 }
31}
32
33namespace ost { namespace mol{ namespace alg {
34
35struct MolckSettings;
36
38
44 bool colored;
47
48 MolckSettings(bool init_rm_unk_atoms=true,
49 bool init_rm_non_std=false,
50 bool init_rm_hyd_atoms=true,
51 bool init_rm_oxt_atoms=false,
52 bool init_rm_zero_occ_atoms=false,
53 bool init_colored=false,
54 bool init_map_nonstd_res=true,
55 bool init_assign_elem=true):
56 rm_unk_atoms(init_rm_unk_atoms), // Remove unknown and atoms not following the nomenclature
57 rm_non_std(init_rm_non_std), // Remove all residues not one of the 20 standard amino acids
58 rm_hyd_atoms(init_rm_hyd_atoms), // Remove hydrogen atoms
59 rm_oxt_atoms(init_rm_oxt_atoms), // Remove terminal oxygens
60 rm_zero_occ_atoms(init_rm_zero_occ_atoms), // Remove atoms with zero occupancy
61 colored(init_colored), // Whether the output should be colored
62 map_nonstd_res(init_map_nonstd_res), // Map non standard residues back to standard ones (e.g.: MSE->MET,SEP->SER,etc.)
63 assign_elem(init_assign_elem){} // Clean up element column
64
65 public:
66 std::string ToString(){
67 std::string rep = "MolckSettings(rm_unk_atoms=" + BoolToString(rm_unk_atoms) +
68 ", rm_non_std=" + BoolToString(rm_non_std) +
69 ", rm_hyd_atoms=" + BoolToString(rm_hyd_atoms) +
70 ", rm_oxt_atoms=" + BoolToString(rm_oxt_atoms) +
71 ", rm_zero_occ_atoms=" + BoolToString(rm_zero_occ_atoms) +
72 ", colored=" + BoolToString(colored) +
73 ", map_nonstd_res=" + BoolToString(map_nonstd_res) +
74 ", assign_elem=" + BoolToString(assign_elem) +
75 ")";
76 return rep;
77 }
78
79};
80
83 bool reprocess=true);
84
87 bool rm_unk_atoms,
88 bool rm_non_std,
89 bool rm_hyd_atoms,
90 bool rm_oxt_atoms,
91 bool rm_zero_occ_atoms,
92 bool colored=true,
93 bool reprocess=true);
94
97
100 const MolckSettings& settings,
101 bool prune = true);
102
103
104}}} // namespace
105
106#endif
Protein or molecule.
boost::shared_ptr< CompoundLib > CompoundLibPtr
void RemoveAtoms(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib, bool rm_unk_atoms, bool rm_non_std, bool rm_hyd_atoms, bool rm_oxt_atoms, bool rm_zero_occ_atoms, bool colored=true, bool reprocess=true)
void MapNonStandardResidues(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib, bool reprocess=true)
void Molck(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib, const MolckSettings &settings, bool prune=true)
void CleanUpElementColumn(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib)
Definition base.dox:1
std::string ToString()
Definition molck.hh:66
MolckSettings(bool init_rm_unk_atoms=true, bool init_rm_non_std=false, bool init_rm_hyd_atoms=true, bool init_rm_oxt_atoms=false, bool init_rm_zero_occ_atoms=false, bool init_colored=false, bool init_map_nonstd_res=true, bool init_assign_elem=true)
Definition molck.hh:48