Coder Social home page Coder Social logo

non-bonded-periodic's Introduction

Computational Sciences WS17/18 project: Non Bonded Periodic

A Python package for non-bonded interactions in periodic systems.

The method used to simulate the system is Markov Chain Montecarlo (MCMC). Before the simulation starts, the system is optimized until its point of minimum energy. Then the simulation starts. As the system is simulated through MCMC, it does not evolve in time, but just samples from a probability distribution. It is possible to simulate the system at a certain temparature.

The energy is calculated using either Lennard-Jones Potential, Ewald Summation or both. There's the option to use neighbourlist techniques to cut the calculations.

Code structure

The structure of the code follows roughly this UML diagram. The code is divided in two subgroups:

  • the acting part (on the left), that optimize and simulate the system
  • the data part (on the right), that contains all the information, both static and dynamic, about the system Additional parts are to support, e.g. the misc and the neighbours class

Operating instructions

These are the steps to follow to simulate a system:

import nbp

sys = nbp.System(characteristic_length, sigma, epsilon_lj, particle_charges, positions, 
                 lj=True, ewald=True, use_neighbours=True)
optimized_sys = sys.optimize()
simulated_sys = optimized_sys.simulate(states, temp)

Measurement units

All distances in Angstrom;
all energies in kJ/mol;
all masses in g/mol;
all charges are multiples of the positive elementary charge.

Loading the parameters from a file

A file can be used to store the starting parameters of the system. It must contain a dictionary with keys:

['parameters', 'positions', 'types', 'box', 'readme']

The parameter fields are [sigma_Lj, epsilon_LJ, mass, charge].
To load the data into the System, the Parser contained into nbp must be used, for example:

import nbp.parser

data = Parser("file.npz").parse()

characteristic_length = data['ch_length']
sigma = data['sigma'][:, None]
epsilon = data['epsilon'][:, None]
charge = data['charge'][:, None]
positions = data['pos']

Then the procedure follows as stated before. If no file is passed, the file sodium-chloride-example.npz, contained in this repo, is used.


Authors

Theresa Kiszler
Ludovica Lombardi
Benjamin Miller
Alexey Shestakov
(Chris Weiss)

non-bonded-periodic's People

Contributors

bkmi avatar tracymcbean avatar iamluvi avatar salexey avatar

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.