Quickstart#
Call require("dseams") from Lua, or (require :dseams) from
Fennel. This tree builds no yodaStruct executable. Call seams
for the engine CLI, in
seams-core.
require("yoda") still resolves to dseams.
Prerequisites#
A Lua 5.4 interpreter on
PATHmeson >= 1.3, ninja, a C++20 compiler, pkg-config
Work from the repository root so the shipped dump path resolves
How meson emits dseams_core.so, and where an install puts it, is
in Install the library.
Meson#
From the repository root. LUA_PATH finds lua/dseams.lua.
LUA_CPATH finds dseams_core.so in the build directory.
meson setup bbdir --wrap-mode=nofallback
meson compile -C bbdir
LUA_PATH="$PWD/lua/?.lua;;" LUA_CPATH="$PWD/bbdir/?.so;;" \
lua example_lua/library/read.lua
That script is:
local dseams = require("dseams")
local cloud = dseams.read("input/traj/exampleTraj.lammpstrj", {type = 2})
assert(cloud.nop > 0, "empty cloud")
print(string.format("dseams_lib nop=%d", cloud.nop))
You should see:
dseams_lib nop=250
dseams.read keeps one atom type. This dump stores oxygen as
LAMMPS type 2, so the option table is {type = 2}.
Nix#
nix develop sets LUA_PATH and LUA_CPATH to the installed
library.
nix build
nix develop
lua example_lua/library/read.lua
Fennel#
Fennel loads the same Lua module:
(local dseams (require :dseams))
(local cloud (dseams.read "input/traj/exampleTraj.lammpstrj" {:type 2}))
(print (dseams.chill_plus cloud {:cutoff 3.5 :type 2}))
How to invoke the vendored compiler and the kebab-case wrappers in
lua/dseams.fnl is in Call dseams from Fennel.
Next steps#
Tutorial: Read a dump and classify :: CHILL+ labels and cage flags on the same cloud
Install the library :: How the
.sois built and foundEmbed in a Lua host :: Load
dseams_corefrom a process that already ownsmain