29 const std::string
msg =
"setAtomColour expects an atom index and RGB or RGBA arguments.\n";
43 const std::string
msg =
"setAtomColour atom index larger than atom count.\n";
48 r = std::clamp(
float(
lua_r.n), 0.0f, 1.0f);
50 g = std::clamp(
float(
lua_g.n), 0.0f, 1.0f);
52 b = std::clamp(
float(
lua_b.n), 0.0f, 1.0f);
56 a = std::clamp(
float(
lua_a.n), 0.0f, 1.0f);
76 const std::string
msg =
"getAtomColour expects an atom index as argument.\n";
88 const std::string
msg =
"getAtomColour atom index larger than atom count.\n";
93 glm::vec4 colour =
atoms[index].colour;
135 const std::string
msg =
"getAtomsNeighbours expects an atom index and cutoff distance as argument.\n";
156 const std::string
msg =
"getAtom atom index larger than atom count.\n";
191 const std::string
msg =
"getAtom expects an atom index as argument.\n";
203 const std::string
msg =
"getAtom atom index larger than atom count.\n";
268 const std::string
msg =
"getAtomsBonds expects an atom index as argument.\n";
280 const std::string
msg =
"getAtomsBonds atom index larger than atom count.\n";
An atom structure.
Definition atom.h:20
Calculate neighbour lists.
Definition neighbours.h:18
glm::vec< L, float, glm::qualifier::highp > vec
Definition commandLine.h:214
const std::map< Element, std::string > STRING_FROM_ELEMENT
Map Element to string symbols.
Definition element.h:348
Interop for booleans Lua.
Definition LuaBool.h:11
void read(lua_State *lua, int index)
Read the bool from stack index index.
Definition LuaBool.h:27
bool bit
Definition LuaBool.h:85
Interop for a number in Lua.
Definition LuaNumber.h:11
void read(lua_State *lua, int index)
Read the number from stack index index.
Definition LuaNumber.h:26
std::map< uint64_t, glm::vec4 > atomColourOverrides
Definition visualisationState.h:120
int lua_atomCount(lua_State *lua)
Lua binding to get the Atom count.
Definition atoms.h:114
std::vector< Atom > & atoms
Definition visualisationState.h:116
int lua_getAtom(lua_State *lua)
Lua binding to get an Atom.
Definition atoms.h:186
std::map< uint64_t, std::set< uint64_t > > bonds
Definition visualisationState.h:117
int lua_setAtomColour(lua_State *lua)
Lua binding to set an Atom's colour by index.
Definition atoms.h:24
std::vector< float > atomEmphasisOverrides
Definition visualisationState.h:119
uint64_t atomCount
Definition visualisationState.h:127
int lua_getAtomsNeighbours(lua_State *lua)
Lua binding to get the neighbours of an Atom to a cutoff.
Definition atoms.h:130
int lua_getAtomsBonds(lua_State *lua)
Lua binding to get the bonds of an Atom.
Definition atoms.h:263
int lua_getAtomColour(lua_State *lua)
Lua binding to get a Atom's colour by index.
Definition atoms.h:71