Skip to content

d-SEAMS/seams-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6e51956 · May 21, 2020
Nov 13, 2018
Apr 11, 2019
Jan 10, 2020
Jan 20, 2020
Jan 9, 2020
Jan 9, 2020
Dec 27, 2019
Jan 9, 2020
Jan 10, 2020
Jan 10, 2020
Nov 3, 2019
Nov 20, 2018
Jan 13, 2020
Jan 14, 2020
Oct 31, 2019
May 21, 2020
Sep 19, 2019
Sep 19, 2019
Jan 7, 2020
Jan 7, 2020
Jan 8, 2019
Mar 20, 2020
Jan 8, 2019
Jan 8, 2019
Jan 8, 2019
Jan 8, 2019
Jan 8, 2019
Dec 26, 2019
Nov 13, 2019
Jan 9, 2020
Oct 28, 2019

Repository files navigation

d-SEAMS

Deferred Structural Elucidation Analysis for Molecular Simulations

Build Status built with nix

\brief The C++ core of d-SEAMS, a molecular dynamics trajectory analysis engine.

\note The wiki describes the examples and how to obtain the data-sets (trajectories) from figshare.

\warning If you are unwilling to use the nix build system, then please note that you must manage the dependencies MANUALLY, including the compiler versions.

Citation

If you use this software please cite the following:

Goswami, R., Goswami, A., & Singh, J. K. (2020). d-SEAMS: Deferred Structural Elucidation Analysis for Molecular Simulations. Journal of Chemical Information and Modeling. https://doi.org/10.1021/acs.jcim.0c00031

The corresponding bibtex entry is:

@Article{Goswami2020,
author={Goswami, Rohit and Goswami, Amrita and Singh, Jayant Kumar},
title={d-SEAMS: Deferred Structural Elucidation Analysis for Molecular Simulations},
journal={Journal of Chemical Information and Modeling},
year={2020},
month={Mar},
day={20},
publisher={American Chemical Society},
issn={1549-9596},
doi={10.1021/acs.jcim.0c00031},
url={https://doi.org/10.1021/acs.jcim.0c00031}
}

Compilation with Nix

We use a deterministic build system to generate both bug reports and uniform usage statistics. This also handles the lua scripting engine.

\note The lua functions are documented on the wiki

Build

Since this project is built with nix, we can simply do the following from the root directory (longer method):

# Make sure there are no artifacts
rm -rf build
# This will take a long time the first time as it builds the dependencies
nix-build . # Optional
# Install into your path
nix-env -if . # Required
# Run the command anywhere
yodaStruct -c lua_inputs/config.yml

A faster method of building the software is by using the cachix binary cache as shown:

# Install cachix
nix-env -iA cachix -f https://cachix.org/api/v1/install
# Use the binary cache
cachix use dseams
# Faster with the cache than building from scratch
nix-build . # Optional
# Install into your path
nix-env -if . # Required
# Run the command anywhere
yodaStruct -c lua_inputs/config.yml

\note The paths in the .yml should be relative to the folder from which the binary is called.

If you're confused about how to handle the relative paths, run the command yodaStruct -c lua_inputs/config.yml in the top-level directory, and set the paths relative to the top-level directory. This is the convention used in the examples as well.

Language Server Support

To generate a compile_commands.json file for working with a language server like ccls use the following commands:

# Pure environment
nix-shell --run 'bash' --pure
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES ../
cp compile_commands.json ../

Note that there is no need to actually compile the project if you simply need to get the compiler database for the language server.

Do Not commit the .json file.

Development

We can simply use the nix environment:

# From the project root
nix-shell

Running

This is built completely with nix:

# Install systemwide
nix-env -if .

To run the sample inputs, simply install the software, and ensure that input/ is a child directory.

# Assuming you are in the src directory
# Check help with -h
yodaStruct -c lua_inputs/config.yml

Tests

Apart from the examples, the test-suite can be run with the yodaStruct_test binary, which will drop into the nix environment before building and executing gdb:

# Just run this
./testBuild.sh
# quit gdb with quit
# Go run the test binary
cd shellBuild
./yodaStruct_test

Do note that the regular installation via nix-env runs the tests before the installation

Developer Documentation

Test the build with nix:

nix-build .
# Outputs are in ./result
# If you get a CMake error
rm -rf build
nix-store --delete /nix/store/$whatever # $whatever is the derivation complaining
nix-collect-garbage # then try again [worst case scenario]

Leaks and performance

While testing for leaks, use clang (for AddressSanitizer and LeakSanitizer) and the following:

# From the developer shell
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

Overview

As of Mon Jan 20 15:57:18 2020, the lines of code calculated by cloc are as follows:

Cloc Lines

Contributing

Please ensure that all contributions are formatted according to the clang-format configuration file.

Specifically, consider using the following:

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.

Acknowledgements

The following tools are used in this project:

Third Party Libraries

The libraries used are: