Giter VIP home page Giter VIP logo

meansquaredisplacements's Introduction

MSDfromMultipleTrajectories

@author: Ali Hashmi

a simple script to determine Mean-Squared Displacements (MSD) from multiple particle trajectories

a part of the MSD code is borrowed from: https://stackoverflow.com/questions/32988269/speedup-msd-calculation-in-python

How to compute from rawdata (rawdata as .txt files):

msd = MSDtraj("C:\\academic\\codes and scripts\\brownian simulation of nodal lefty\\3dcheck\\res",10,['t','x','y','z'],0.000001);

args are as follows: directory, number of files (trajectories), dimensions, smallest time-step, timeCMSD = 1000 (pts to consider))

msddata,stddata = msd.main()

msdplot = plt.plot(msddata)

plt.show(msdplot)

grad = np.polyfit(range(1,101),msddata[1:101], 1)[0] # using the first 100 values for computing gradient

print 'the effective diffusion coefficient is : ' + str(grad/(6*1e-6)) + ' um^2/sec' # effective diffusion coefficient `

meansquaredisplacements's People

Contributors

alihashmiii 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.