GithubHelp home page GithubHelp logo

whitead / symd Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 6.0 51.26 MB

N-Dimensional MD engine with symmetry group constraints

Home Page: https://whitead.github.io/symd

License: MIT License

C 27.66% Python 9.41% CMake 0.73% Jupyter Notebook 61.85% Makefile 0.16% Batchfile 0.20%
molecular-dynamics symmetry crystallography python c

symd's Introduction

Symmetric Molecular Dynamics Engine

GitHub PyPI version

This is a simple MD engine written in C that can be constrained to obey given symmetry groups at every frame. It can be compiled for any dimensions. It supports the following features:

  • NVE, NVT (BAOAB, CSVR thermostats), NPT
  • LJ, harmonic, cosine potentials
  • Neighbor lists (use nlj instead of lj for potential)
  • Symmetry constraints and all Bravais Lattices

Purpose

traj.mp4

This is not really intended to be a production-ready simulation engine. Instead, it is a reference implementation of symmetry MD. I hope then the algorithm can be incorporated into other engines, or this engine can be extended, for others to use the algorithm. The Python package (see below) should make implementing the method as easy as possible. With that said, the most important files are box.c and group.c, which contain the key algorithms: fold_particles and the NPT algorithms: make_box, and try_rescale.

Python Package

There is a companion python package (symd) that can be installed via:

pip install symd

This does not include the MD engine, but instead includes necessary details to set-up symmetry constraints like getting affine matrices and Bravais lattice tensors.

Docs & Examples

See the docs which includes the python API, examples of running simulations, and shows how the figures from the manuscript were generated.

Compiling

mkdir build && cd build
cmake ..
make && [sudo] make install

The executable is symdX where X is the number of spatial dimensions

Dependencies

  • libgsl-dev (GNU Scientific Library headers)
  • CMake

Python Interface

It is recommended to use the python interface, which simplifies building the input files and parsing output files. See the examples in the docs.

Example

An example can be found in the examples/lj-symm-example directory.

Citation

See paper

@article{cox2022symmetric,
author = {Cox, Sam and White, Andrew D.},
title = {Symmetric Molecular Dynamics},
journal = {Journal of Chemical Theory and Computation},
year = {2022},
doi = {10.1021/acs.jctc.2c00401},
}

symd's People

Contributors

samcox822 avatar whitead avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

symd's Issues

Release

  • Unit Tests
  • Colab
  • ctypes access ?

Trigonal Projectors Error

(Referencing symd/python/symd/groups.py)

In the projectors, I think this line:
projectors3d["Trigonal"] = projectors3d["Hexagonal"]
is wrong.

Trigonal should be a1 = a2 = a3, whereas hexagonal is a1 = a2 != a3

I think it should be
projectors3d["Trigonal"] = projectors3d["Cubic"]

Version 2

  • Add versioning
  • Resurrect Python interface - but simplify!
  • Cut all the stuff that is unused - MD_Success, outputting forces/velocities, etc. Can we get back to < 1k?
  • NPT via MC

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.