Git Product home page Git Product logo

watermd's Introduction

waterMD

Analysis code for water box MD simulations

The analysis of MD simulations is done by creating the WaterStat object (water_stat.py). All the functions for constructing nearest-neighbor tetrahedrons and computing correlators are in water_stat.py.

water_stats_util.py contains functions for anlysis and visualizing the results from the correaltor computations.

The workflow

  • run MD (code note included in this repo)
  • run assign_nearest_tthds.py to created database of water tetrahedrons generated by the MD simulation
  • run compute_correlator.py to compute correlators for various values of q's (see below for usage)
  • run stitch_corr_results.py to combine results from differen simulation frames (if choose to run compute_correlator in parallel)
  • use functions from water_stats_util to visualize results

Using compute_correlator.py

This is the important script that computes C4. To run it use the following command and pass on the required parameters: "python compute_correlator.py -i -o -q <q_inv> -p -r <phi_range> -s -e "]

Parameters:

-i: name of the simulation run to use, e.g. 'run1'

-o: the name output file to store the computed correlator, e.g. "corr_run1.csv". I also try to include other parameters in the name. The outputfile is by default saved in /computed_results. If the file already exist, the program will refuse to overwrite it and propt the user for a new outputfile name.

-q: defines the magnitude(s) of the q vectors. If multiple values are givem separate by '/'. At this point, the program only computes of qs with equal magnitude. The magnitude is defined as 2*pi/(input) and input is assumed to have the unit nm. I find defining this parameter in the unit of nm more intuitive for me. But I am also considering changing it to angstrom-inverse.

-p: number of phi for which to compute, spaced linearly. default is 30.

-r: range of phi to use for computation, in units of phi and separated by '/'. default is 0 to pi.

-s: frame in simulation to start computing

-e: fram in simulation to end computing

watermd's People

Contributors

shenglan0407 avatar

Watchers

 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.