-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Substantial rework of occ cg outputs, renaming lots of fields in JSON…
… etc.
- Loading branch information
1 parent
686f333
commit 1cd58a0
Showing
15 changed files
with
282 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,42 @@ | ||
#pragma once | ||
#include <ankerl/unordered_dense.h> | ||
#include <fstream> | ||
#include <occ/crystal/crystal.h> | ||
#include <vector> | ||
|
||
namespace occ::io::crystalgrower { | ||
|
||
class StructureWriter { | ||
public: | ||
StructureWriter(const std::string &filename); | ||
StructureWriter(std::ostream &); | ||
|
||
void write(const occ::crystal::Crystal &, | ||
const occ::crystal::CrystalDimers &); | ||
void write_net(const occ::crystal::Crystal &, | ||
const occ::crystal::CrystalDimers &); | ||
|
||
private: | ||
std::ofstream m_owned_destination; | ||
std::ostream &m_dest; | ||
public: | ||
StructureWriter(const std::string &filename); | ||
StructureWriter(std::ostream &); | ||
|
||
void write(const occ::crystal::Crystal &, | ||
const occ::crystal::CrystalDimers &); | ||
void write_net(const occ::crystal::Crystal &, | ||
const occ::crystal::CrystalDimers &); | ||
|
||
private: | ||
std::ofstream m_owned_destination; | ||
std::ostream &m_dest; | ||
}; | ||
|
||
class NetWriter { | ||
public: | ||
NetWriter(const std::string &filename); | ||
NetWriter(std::ostream &); | ||
public: | ||
using InteractionLabels = | ||
ankerl::unordered_dense::map<std::string, std::string>; | ||
NetWriter(const std::string &filename); | ||
NetWriter(std::ostream &); | ||
|
||
void write(const occ::crystal::Crystal &, | ||
const occ::crystal::CrystalDimers &); | ||
|
||
void write(const occ::crystal::Crystal &, | ||
const occ::crystal::CrystalDimers &); | ||
inline const InteractionLabels &interaction_labels() const { | ||
return m_interaction_labels; | ||
}; | ||
|
||
private: | ||
std::ofstream m_owned_destination; | ||
std::ostream &m_dest; | ||
private: | ||
std::ofstream m_owned_destination; | ||
std::ostream &m_dest; | ||
InteractionLabels m_interaction_labels; | ||
}; | ||
} // namespace occ::io::crystalgrower |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.