SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CONFIG Class Reference

Read CONFIG files. More...

#include <config.h>

Inheritance diagram for CONFIG:
Inheritance graph
[legend]
Collaboration diagram for CONFIG:
Collaboration graph
[legend]

Public Member Functions

 CONFIG (std::filesystem::path path, bool blocking=false)
 Construct a new CONFIG object to read from path.
 
- Public Member Functions inherited from Structure
 Structure (std::filesystem::path path, bool blocking=false)
 
virtual uint64_t atomCount () const
 Get the number of atoms in the file.
 
virtual void readFrame (uint64_t frame)
 Read a single frame at position frame, and increment the current frame.
 
virtual ~Structure ()=default
 
uint64_t frameCount () const
 Get the number of frames.
 
uint64_t framePosition () const
 Get the current frame index.
 
bool framePositionsLoaded () const
 Check if frames start positions have been loaded.
 
uint64_t frameReadProgress () const
 Progress of the current frame read.
 
bool frameReadComplete () const
 If the frame has been fully read into atoms.
 
glm::vec3 getCellA () const
 Get the a cell vector.
 
glm::vec3 getCellB () const
 Get the b cell vector.
 
glm::vec3 getCellC () const
 Get the c cell vector.
 

Additional Inherited Members

- Public Attributes inherited from Structure
std::vector< Atomatoms
 The Atoms read in the current frame.
 
std::map< Element, glm::vec4 > colourMap = CPK_COLOURS
 Colour map from Element to colour.
 
- Protected Member Functions inherited from Structure
void skipFrame ()
 
virtual void skipFrames (uint64_t count)
 
void skipLine (std::ifstream &in)
 
void scanPositions ()
 
void cachePositions ()
 
void countContentLinesInFile ()
 
void checkRead (std::stringstream &ss, std::string lastInput, std::string context)
 
- Protected Attributes inherited from Structure
std::filesystem::path path
 
bool blockingReads
 
std::ifstream filestream
 
uint64_t natoms
 
uint64_t frames
 
uint64_t linesPerFrame
 
uint64_t timeStep
 
uint64_t currentFrame
 
uint64_t linesInFile
 
uint64_t atomsRead
 
glm::vec3 cellA
 
glm::vec3 cellB
 
glm::vec3 cellC
 
bool cacheComplete = false
 
std::map< uint64_t, uint64_tframePositions
 

Detailed Description

Read CONFIG files.

Remarks
The file structure is:
  • A title line [string].
  • A meta data line.
    • levcfg [integer] 0 = positions, 1 = positions and velocities, 2 = positions, velocities, and forces.
    • imcon [integer] boundary type.
    • megatm [integer] atom count.
  • A set of n*(1+levcfg) recrods.
    • positions [float, float, float]
    • velocities [float, float, float], if levcfg > 0
    • forces [float, float, float], if levcfg > 1
A trajectory is the HISTORY file which contains more information.

Constructor & Destructor Documentation

◆ CONFIG()

CONFIG::CONFIG ( std::filesystem::path  path,
bool  blocking = false 
)
inline

Construct a new CONFIG object to read from path.

Parameters
paththe file path of the CONFIG file.
blockingif reads are blocking or detached.

The documentation for this class was generated from the following file: