occ
|
Writer class for crystallographic information files (CIF) More...
#include <cifwriter.h>
Public Member Functions | |
void | write (const std::string &filename, const occ::crystal::Crystal &crystal, const std::string &title="") |
Write a Crystal structure to a CIF file. | |
std::string | to_string (const occ::crystal::Crystal &crystal, const std::string &title="") |
Convert Crystal to CIF string representation. | |
void | set_precision (int precision) |
Set precision for coordinate output. | |
Writer class for crystallographic information files (CIF)
This class provides functionality to write Crystal objects to CIF format using the gemmi library. It's particularly useful for visualizing normalized crystal structures or exporting structure data.
|
inline |
Set precision for coordinate output.
precision | Number of decimal places for coordinates (default: 6) |
std::string occ::io::CifWriter::to_string | ( | const occ::crystal::Crystal & | crystal, |
const std::string & | title = "" |
||
) |
Convert Crystal to CIF string representation.
crystal | The Crystal object to convert |
title | Optional title for the structure (defaults to chemical formula) |
void occ::io::CifWriter::write | ( | const std::string & | filename, |
const occ::crystal::Crystal & | crystal, | ||
const std::string & | title = "" |
||
) |
Write a Crystal structure to a CIF file.
filename | Path to the output CIF file |
crystal | The Crystal object to write |
title | Optional title for the structure (defaults to chemical formula) |