{"id":17360867,"url":"https://github.com/certik/dynsf","last_synced_at":"2025-04-15T00:47:14.924Z","repository":{"id":35919281,"uuid":"40206912","full_name":"certik/dynsf","owner":"certik","description":"Automatically exported from code.google.com/p/dynsf","archived":false,"fork":false,"pushed_at":"2015-08-04T20:19:55.000Z","size":700,"stargazers_count":4,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T00:46:54.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/certik.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-04T20:15:46.000Z","updated_at":"2023-04-16T14:40:14.000Z","dependencies_parsed_at":"2022-09-18T01:46:32.640Z","dependency_job_id":null,"html_url":"https://github.com/certik/dynsf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/certik%2Fdynsf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/certik%2Fdynsf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/certik%2Fdynsf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/certik%2Fdynsf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/certik","download_url":"https://codeload.github.com/certik/dynsf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986278,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T19:28:46.864Z","updated_at":"2025-04-15T00:47:14.898Z","avatar_url":"https://github.com/certik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n=======\n Dynsf\n=======\n\nDynsf is a simple tool for calculaton partial dynamical structure factors\nfrom molecular dynamics (MD) simulations.\n\nThe main input consists of a trajectory output from a MD simulation;\ni.e. a file containing snapshots of the particle coordinates, and\noptionally velocities, for consecutively and equally spaced points\nin (simulation) time.\n\nDynsf can by itself read and parse standard lammpsdump-style trajectories.\nIf libgmx (gromacs lib) is available, dynsf can use it to read\ngromacs xtc-files.\nIf VMD is available, dynsf can use VMD's molfileplugin to read other\nformats (with some limitations) as well.\n\nDynsf is controlled via command line options, provided at command\ninvokation. The main difficulties in using dynsf lies in deciding which\nparticular values to use.\n\nOutput can be written in standard matlab/octave-stype .m-files, and/or as\npython pickle-files.\n\nThe most time critical part of the processing consists of the calculation\nof the fourier transformed densities, rho(k). This part is implemented in\nC, and is greatly improved by parallelizing it using OpenMP or OpenACC.\nThe time correlation calculation is performed explicitly in python (using\nnumpy arrays), and is parallelized with python threads (which works rather\nwell thanks to numpy releasing the python GIL).\n\n\n\n==============\n Installation\n==============\n\n\n Requirements\n ------------\n\nPython 2.6/2.7, numpy, and a C99-complient C-compiler.\n\n\n Quickstart\n ----------\n\n1. Decide a installation prefix (e.g. $HOME/opt/ or such)\n2. Install, \"python ./setup.py install --prefix=$HOME/opt\"\n3. Set PYTHONPATH to include newly installed site-packages directory\n   (e.g. $HOME/opt/lib64/python2.7/site-packages)\n4. Set PATH to include newly installed bin directory\n   (e.g. $HOME/opt/bin)\n\n\n Tune\n\n\n================================\n Various implementation details\n================================\n\n\n General overview\n ----------------\n\nTrajectories are read frame (single MD timestep) by frame by a\ntrajectory_reader, which is an iterable object. Each frame produced by the\ntrajectory_reader is represented as a dict object containing particle\npositions etc.\n\nThe trajectory_iterator is then wrapped in a \"window generator\", producing\na sliding window of frames through the trajectory. The size of the window\nis decided by the requested number of time frames to consider for time\ncorrelation. The argument --nt determines the width (time length) of the\nwindow, and the argument --stride determines how many frames to move the\nwindow between two consecutive windows.\n\nEach frame in a window will be processed to have its particle positions\n(and velocities) split info particle types/species, and for each particle\ntype the corresponding fourier transform of its density (and current) will\nbe calculated.\nInformation about which particle belongs to which type/species comes either\nfrom the trajectory file (if available), or from a separate index file\n(gromacs ndx-style).\n\nFor each window, time correlations ranging from delta_t=0 (the \"static\"\ncorrelation) to delta_t=\u003cwindow width\u003e is calculated.\nThe time correlations are averaged over all windows considered.\n\nEach of the averaged time correlations are then further averaged in the\nreciprocal domain by mapping it into --k-bins values ranging from 0\nto --k-max (for an isotropic media, only the absolute of the k-vector is\nof interest).\n\nFor each output format choosen, output is written.\n\n\n Calls to external libraries\n ---------------------------\n\nAll call to external libraries are used using ctypes.\nThe main reason for choosing ctypes over e.g. swig/weave/f2py/... is\nportability. Ctypes is included with python, and uses libffi so there is\nno need for a compiler. A drawback is that lots of API stuff needs to be\nexplicitly set up in python code.\nIf there is a change in the API to the external libraries used, some part\nof the dynsf code need to be modified.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcertik%2Fdynsf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcertik%2Fdynsf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcertik%2Fdynsf/lists"}