Gemmi C++ API
Loading...
Searching...
No Matches
to_pdb.hpp
Go to the documentation of this file.
1// Copyright 2017 Global Phasing Ltd.
2//
3// Writing PDB file format (Structure -> pdb file).
4
5#ifndef GEMMI_TO_PDB_HPP_
6#define GEMMI_TO_PDB_HPP_
7
8#include "model.hpp"
9#include <ostream>
10
11namespace gemmi {
12
14 bool minimal_file = false; // disable many records not listed below (HEADER, TITLE, ...)
15 bool atom_records = true; // write atomic models (set to false for headers only)
16 bool seqres_records = true; // write SEQRES
17 bool ssbond_records = true; // write SSBOND
18 bool link_records = true; // write LINK
19 bool cispep_records = true; // write CISPEP
20 bool cryst1_record = true; // write CRYST1
21 bool ter_records = true; // write TER records
22 bool conect_records = false; // write CONECT - matters only if add_conect() was used
23 bool end_record = true; // write END
24 bool numbered_ter = true; // TER record gets own serial number
25 bool ter_ignores_type = false; // put TER after last atom in Chain (even if it's water)
26 bool use_linkr = false; // use non-standard Refmac LINKR record instead of LINK
27 bool preserve_serial = false; // use serial numbers from Atom.serial
28 // end of snippet for mol.rst
29
32 opt.minimal_file = true;
33 opt.seqres_records = false;
34 opt.ssbond_records = false;
35 opt.link_records = false;
36 opt.cispep_records = false;
37 opt.end_record = false;
38 return opt;
39 }
42 opt.atom_records = false;
43 opt.end_record = false;
44 return opt;
45 }
46};
47
48GEMMI_DLL void write_pdb(const Structure& st, std::ostream& os,
52
53// deprecated
54inline void write_minimal_pdb(const Structure& st, std::ostream& os) {
56}
57// deprecated
58inline std::string make_pdb_headers(const Structure& st) {
60}
61
62} // namespace gemmi
63
64#endif
#define GEMMI_DLL
Definition fail.hpp:53
GEMMI_DLL std::string make_pdb_string(const Structure &st, PdbWriteOptions opt=PdbWriteOptions())
std::string make_pdb_headers(const Structure &st)
Definition to_pdb.hpp:58
void write_minimal_pdb(const Structure &st, std::ostream &os)
Definition to_pdb.hpp:54
GEMMI_DLL void write_pdb(const Structure &st, std::ostream &os, PdbWriteOptions opt=PdbWriteOptions())
static PdbWriteOptions headers_only()
Definition to_pdb.hpp:40
static PdbWriteOptions minimal()
Definition to_pdb.hpp:30