STORMM Source Documentation
Loading...
Searching...
No Matches
nml_scene.h
1// -*-c++-*-
2#ifndef STORMM_NML_SCENE_H
3#define STORMM_NML_SCENE_H
4
5#include "copyright.h"
6#include "Constants/behavior.h"
7#include "Parsing/parsing_enumerators.h"
8#include "Parsing/textfile.h"
9#include "Reporting/render_options.h"
10#include "Reporting/reporting_enumerators.h"
11#include "namelist_emulator.h"
12
13namespace stormm {
14namespace namelist {
15
16using constants::ExceptionResponse;
17using parse::TextFile;
18using parse::WrapTextSearch;
19using review::RenderOptions;
20using review::SurfaceRender;
21using review::LinePlotStyle;
22
31public:
32
44 SceneControls(ExceptionResponse policy_in = ExceptionResponse::DIE,
45 WrapTextSearch wrap = WrapTextSearch::NO);
46 SceneControls(const TextFile &tf, int *start_line, bool *found_nml,
47 ExceptionResponse policy_in = ExceptionResponse::DIE,
48 WrapTextSearch wrap = WrapTextSearch::NO);
50
54 SceneControls(const SceneControls &original) = default;
55 SceneControls(SceneControls &&original) = default;
56 SceneControls& operator=(const SceneControls &original) = default;
57 SceneControls& operator=(SceneControls &&original) = default;
59
61 const std::string& getLabel() const;
62
69
73 void setLabel(const std::string &label_in);
74
75private:
76
78 std::string label;
79
80 // The following member variables control the rendering weights and cartoon representations of
81 // molecules and other objects in the scene.
82 double receptor_line_width;
84 double ligand_line_width;
86 double receptor_light_atom_size;
87 double receptor_heavy_atom_size;
88 double ligand_light_atom_size;
89 double ligand_heavy_atom_size;
90 double added_point_weight;
91 bool display_field_borders;
93 double border_line_width;
94 LinePlotStyle border_line_style;
95 std::string receptor_highlight;
96 std::string ligand_highlight;
98
99 // The following member variables control the coloration and lighting of the scene.
100 uchar4 receptor_line_color;
102 uchar4 ligand_line_color;
104 uchar4 added_point_color;
105 uchar4 border_line_color;
106 std::string lighting_mode;
107 std::string camlight_position;
112
113 // The following member variables control isosurfaces to be plotted from some field associated
114 // with the scene.
115 int isosurface_count;
116 std::vector<double> isosurface_values;
118 std::vector<uchar4> isosurface_colors;
122 std::vector<SurfaceRender> isosurface_mats;
123
125 NamelistEmulator nml_transcript;
126};
127
139uchar4 extractColorInformation(const NamelistEmulator &t_nml, const std::string &target_key,
140 int target_entry = 0,
141 const uchar4 init_value = { 255, 255, 255, 255 });
142
152NamelistEmulator sceneInput(const TextFile &tf, int *start_line, bool *found,
153 ExceptionResponse policy = ExceptionResponse::DIE,
154 WrapTextSearch wrap = WrapTextSearch::NO);
155
156} // namespace namelist
157} // namespace stormm
158
159#endif
Collection of variables to transcribe information contained within a namelist.
Definition namelist_emulator.h:30
RenderOptions exportData() const
Export the relevant information into a RenderOptions object. Rather than individual getters and sette...
Definition nml_scene.cpp:144
SceneControls(ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO)
The constructor can prepare an objct with default settings or read the corresponding namelist to acce...
Definition nml_scene.cpp:34
const std::string & getLabel() const
Get the label indicating how this control block is to be connected to program output.
SceneControls(const SceneControls &original)=default
As with other control objects, copy and move constructors, plus copy and move assignment operators,...
void setLabel(const std::string &label_in)
Set the label of this object. While it is expected that the label will come through a user input deck...
Structure for translating a text file into a compact, rapidly parsable vector of characters in CPU RA...
Definition textfile.h:45
Definition render_options.h:48
Definition stormm_vector_types.h:159