NuriKit
v0.1.0b2
Toggle main menu visibility
Loading...
Searching...
No Matches
include
nuri
fmt
mol2.h
Go to the documentation of this file.
1
//
2
// Project NuriKit - Copyright 2023 SNU Compbio Lab.
3
// SPDX-License-Identifier: Apache-2.0
4
//
5
6
#ifndef NURI_FMT_MOL2_H_
7
#define NURI_FMT_MOL2_H_
8
10
#include <string>
11
#include <vector>
12
13
#include <absl/base/attributes.h>
15
16
#include "
nuri/core/molecule.h
"
17
#include "
nuri/fmt/base.h
"
18
19
namespace
nuri
{
26
extern
Molecule
read_mol2
(
const
std::vector<std::string> &mol2);
27
28
class
Mol2Reader
final:
public
DefaultReaderImpl
<read_mol2> {
29
public
:
30
using
DefaultReaderImpl
<
read_mol2
>
::DefaultReaderImpl
;
31
32
bool
getnext
(std::vector<std::string> &block)
override
;
33
34
bool
bond_valid
()
const override
{
return
true
; }
35
36
private
:
37
bool
read_mol_header_ =
false
;
38
};
39
40
class
Mol2ReaderFactory
:
public
DefaultReaderFactoryImpl
<Mol2Reader> {
41
private
:
42
static
const
bool
kRegistered ABSL_ATTRIBUTE_UNUSED;
43
};
44
45
extern
bool
write_mol2
(std::string &out,
const
Molecule
&mol,
int
conf = -1,
46
bool
write_sub =
true
);
47
}
// namespace nuri
48
49
#endif
/* NURI_FMT_MOL2_H_ */
base.h
nuri::DefaultReaderFactoryImpl
Definition
base.h:238
nuri::DefaultReaderImpl< read_mol2 >::DefaultReaderImpl
DefaultReaderImpl()=default
nuri::Mol2ReaderFactory
Definition
mol2.h:40
nuri::Mol2Reader
Definition
mol2.h:28
nuri::Mol2Reader::bond_valid
bool bond_valid() const override
Test whether the reader implementation can provide valid bond information.
Definition
mol2.h:34
nuri::Mol2Reader::getnext
bool getnext(std::vector< std::string > &block) override
Advance the reader to the next molecule.
nuri::Molecule
Read-only molecule class.
Definition
molecule.h:943
molecule.h
nuri
Definition
crdgen.h:16
nuri::read_mol2
Molecule read_mol2(const std::vector< std::string > &mol2)
Read a single Mol2 string and return a molecule.
nuri::write_mol2
bool write_mol2(std::string &out, const Molecule &mol, int conf=-1, bool write_sub=true)
Generated by
1.17.0