The C++ core of d-SEAMS, a molecular dynamics trajectory analysis engine.Deferred Structural Elucidation Analysis for Molecular Simulations
This software is being actively developed and written up. If you do use it in an academic capacity, for now please cite the following preprint:
Goswami, R.; Goswami, A.; Singh, J. K. (2019). "d-SEAMS: Deferred Structural Elucidation Analysis for Molecular Simulations". arXiv:1909.09830 [physics.comp-ph].
Lua v5.3 is used for the scripting engine. It needs to be installed via the operating system's normal packaging system for now. If possible, install a version compiled with
# Ubuntu and derivatives sudo apt install lua5.3 liblua5.3 # ArchLinux sudo pacman -S lua
Since a major portion of the frontend is in
lua, the following modules are required.LuaRocks is the recommended package manager and they are to be installed as root.
# For cross-OS filesystem operations sudo luarocks install luafilesystem
We use a deterministic build system to generate both bug reports and uniform usage statistics.
Since this project is built with
nix, we can simply do the following from the root directory:
# This will take a long time the first time since it builds sharkML nix-build . # Install into your path nix-env -if . # Use anywhere cd lua_inputs/ yodaStruct -c config.yml # Use with lua modules nix-shell --run 'bash' --pure
Though the build itself is guaranteed to be reproducible as the
nixpkgs are also pinned to a particular commit, the
luarocks dependencies are still local, since they are determined at runtime. This means, for example, to use the sample file, you need to ensure you have the
luarocks modules installled in your system.
The above caveats are not relevant when you run it in the shell environment defined by
lua we use luas. Note that this is still an imperfect method and the best way to run this is via the `nix-shell –run 'bash' –pure` environment.
luas init 5.2.4 luas use 5.2.4 luarocks install luafilesystem
We can simply use the
# From the project root nix-shell # Sanitize and fix the shell stty sane export TERM="xterm-256color"
To run the sample inputs, simply move the binary to the project root, or to a directory where
input/ is a child directory.
# Assuming you are in the build directory # Check help with -h # --script and --file are optional now ./yodaStruct --script ../lua_inputs/transition_diff.lua -f ../lua_inputs/parameter.txt -c ../lua_inputs/config.yml
For updates to any of the bundled
external libraries change the commit number and use:
$ cd src/external # Sol2 wget https://raw.githubusercontent.com/ThePhD/sol2/develop/single/sol/sol_forward.hpp wget https://raw.githubusercontent.com/ThePhD/sol2/develop/single/sol/sol.hpp # cxxopts wget https://raw.githubusercontent.com/jarro2783/cxxopts/master/include/cxxopts.hpp
Leaks and performance
export CXX=/usr/bin/clang++ && export CC=/usr/bin/clang cmake .. -DCMAKE_CXX_FLAGS="-pg -fsanitize=address " -DCMAKE_EXE_LINKER_FLAGS=-pg -DCMAKE_SHARED_LINKER_FLAGS=-pg
Please ensure that all contributions are formatted according to the clang-format configuration file.
Specifically, consider using the following:
-Sublime Plugin for users of Sublime Text
- format-all for Emacs
- vim-clang-format for Vim
- Visual Studio: http:/
/ llvm.org/ builds/ , or use the integrated support in Visual Studio 2017
- Xcode: https:/
/ github.com/ travisjeffery/ ClangFormat-Xcode
Where some of the above suggestions are derived from this depreciated githook.
Also, do note that we have a
CONTRIBUTING file you need to read to contribute, for certain reasons, like, common sense.
The following tools are used in this project:
- CMake for compilation (cmake-init was used as a reference)
- Clang because it is more descriptive with better tools
- Conan and [https:/
/ pipenv.readthedocs.io/ en/ latest/ ](pipenv) for dependency management
- Doxygen for the developer API
- clang-format for code formatting
- lua for the scripting engine
- yaml for the configuration
Third Party Libraries
The libraries used are:
- backward-cpp for better stacktraces without
- cxxopts for parsing command line options
- rang for terminal styles (ANSI)
- sol2 for interfacing with lua
- yaml-cpp for working with
- fmt for safe and fast formatting
- Linear Algebra PACKage (LAPACK)
- Basic Linear Algebra Subprograms (BLAS)
- Boost Geometry for working with different coordinates
- Boost Math for spherical harmonics
- Blaze for very fast modern linear algebra
- nanoflann to calculate nearest neighbors