{ "info": { "author": "Morten Ledum", "author_email": "morten.ledum@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3 :: Only" ], "description": "OccamTools\n·\n[![Build Status](https://travis-ci.com/mortele/OccamTools.svg?token=81VUNKkUYjZSicZzs1NR&branch=master)](https://travis-ci.com/mortele/OccamTools) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/b91377a289bc42868314310dd6be2b60)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=mortele/OccamTools&utm_campaign=Badge_Grade) [![codecov](https://codecov.io/gh/mortele/OccamTools/branch/master/graph/badge.svg?token=IXlriBpSwo)](https://codecov.io/gh/mortele/OccamTools) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![PyPI version](https://badge.fury.io/py/occamtools.svg)](https://badge.fury.io/py/occamtools)\n=========\nAnalysis and synthesis tools for [OCCAM](#OCCAM) molecular dynamics/hybrid particle-field simulations.\n\nInput to [OCCAM](#OCCAM) consists mainly of three file types; `fort.1` (simulation metadata), `fort.3` (particle and bond parameters), and `fort.5` (positions and bond structure). The output from the run is a `fort.8` file, adhering to the [`.xyz`](https://en.wikipedia.org/wiki/XYZ_file_format) file format. The `occamtools` python package provides a reader for these file formats (both input and output) and generates a single object containing all the information about the simulation, making analysis of simulation runs and comparison between runs easier.\n\nInstallation\n---------\nInstall by (requires **python >= 3.6**)\n```bash\n> pip install occamtools\n```\n\nUsage\n---------\n**Loading data**\n·\nLoading simulation data is done by\n```python\nimport numpy as np\nfrom occamtools import OccamData\n\ndata = OccamData('your/file/or/directory/here')\n```\nwhere the `data` object now holds all information about the simulation run, e.g. print what kinds of particles a simulation consists of\n```python\nprint('Simulation consists of...')\nfor type_name in data.type_dict:\n num_type = sum(data.type == data.type_dict[type_name])\n print(f' - {num_type} particles of type {type_name}')\n\n# Simulation consists of...\n# - 400 particles of type H\n# - 100 particles of type C\n# - 250 particles of type Ar\n# ...\n```\nor make a simple plot of particles in a section of the simulation box diffusing (requires `pip install asciichartpy`)\n```python\nfrom asciichartpy import plot\n\nindices = (data.x[0, :] > 20.0) & (data.x[0, :] < 25.0)\ndiffused = data.x[-1, indices]\nbins, hist = np.histogram(diffused)\nprint(plot(bins.tolist(), hist.tolist()))\n\n# 9.00 \u2524 \u256d\u2500\u256e\n# 8.00 \u2524 \u2502 \u2570\u256e\n# 7.00 \u2524 \u2502 \u2502\n# 6.00 \u2524 \u256d\u256f \u2570\u256e\n# 5.00 \u2524 \u2502 \u2570\u256e\n# 4.00 \u2524 \u2502 \u2502\n# 3.00 \u2524\u256d\u256f \u2502\n# 2.00 \u2524\u2502 \u2570\u256e\n# 1.00 \u253c\u256f \u2570\n```\nor plot the deviations of the total kinetic energy from the mean over the simulation run (again requires `pip install asciichartpy`)\n```python\nkinetic_energy_deviations = data.kinetic_energy - np.mean(data.kinetic_energy)\nprint(plot(kinetic_energy_deviations.tolist()))\n\n# 60.53 \u2524 \u256d\u256e\n# 50.62 \u2524 \u2502\u2502 \u256d\u256e\u256d\u256e\n# 40.71 \u2524 \u2502\u2502 \u2502\u2502\u2502\u2502 \u256d\u256e\n# 30.81 \u2524 \u2502\u2502 \u2502\u2502\u2502\u2502 \u2502\u2502 \u256d\u256e \u256d\u2500\n# 20.90 \u2524 \u256d\u256e \u2502\u2502 \u2502\u2502\u2502\u2502 \u256d\u2500\u256e \u2502\u2502 \u2502\u2502 \u2502\n# 10.99 \u2524 \u2502\u2502 \u256d\u2500\u256e \u256d\u256e \u256d\u256f\u2502 \u2502\u2502\u2502\u2502\u256d\u256e \u2502 \u2502 \u256d\u256e \u2502\u2502 \u2502\u2502 \u2502\n# 10.09 \u2524 \u2502\u2502 \u2502 \u2502 \u2502\u2502 \u2502 \u2502 \u2502\u2502\u2502\u2502\u2502\u2570\u256e \u2502 \u2570\u256e\u2502\u2502 \u2502\u2502 \u256d\u256e \u2502\u2502\u256d\u256e\u256d\u256e\u2502\n# 0.18 \u253c\u256e\u2502\u2502 \u2502 \u2502 \u2502\u2502 \u2502 \u2570\u256e \u2502\u2502\u2502\u2570\u256f \u2502 \u2502 \u2570\u256f\u2502\u256d\u256e \u2502\u2570\u256e\u2502\u2502\u256d\u256e\u2502\u2502\u2502\u2502\u2502\u2502\u2502\n# -00.73 \u2524\u2502\u2502\u2502 \u2502 \u2502 \u2502\u2502 \u2502 \u2570\u2500\u256f\u2502\u2502 \u2502\u256d\u256f \u2502\u2502\u2570\u2500\u2500\u256f \u2570\u256f\u2502\u2502\u2502\u2502\u2502\u2502\u2502\u2502\u2502\u2502\n# -10.64 \u2524\u2502\u2502\u2502\u256d\u256f \u2502 \u2502\u2502\u256d\u256f \u2502\u2502 \u2502\u2502 \u2570\u256f \u2502\u2502\u2502\u2502\u2502\u2502\u2502\u2502\u2570\u256f\n# -20.54 \u2524\u2502\u2502\u2570\u256f \u2502 \u2502\u2570\u256f \u2570\u256f \u2570\u256f \u2502\u2502\u2502\u2502\u2502\u2502\u2570\u256f\n# -30.45 \u2524\u2570\u256f \u2570\u2500\u256f \u2502\u2502\u2502\u2502\u2570\u256f\n# -40.36 \u2524 \u2502\u2502\u2502\u2502\n# -50.26 \u2524 \u2502\u2502\u2570\u256f\n# -60.17 \u2524 \u2570\u256f\n```\n\n**File storage**\n·\nBehind the scenes, `.npy` (for numpy arrays) and `.json` (for anything else) files are used to represent the simulation data. By default, loading a simulation run causes the saving of small (relative to the original `fort.5/7/8`) binary files containing the data. These are used to load from on subsequent calls. This means calls to `OccamData.load('your/file/here')` of `OccamData('your/file/here')` will be significantly faster *after* the first call. In this specific example, a 25x speedup is achieved (but your mileage may vary).\n![load example](https://i.imgur.com/Wssbx9B.gif)\n\nRunning tests with `tox`\n---------\nAssuming python `3.7` is already installed, install separate `3.6` and `3.8` instances using `pyenv` by\n```bash\n> brew install pyenv\n> pyenv install 3.6.6\n> pyenv install 3.8-dev\n```\nand then inside the `occamtools` directory do\n```bash\n> git clone git@github.com:mortele/OccamTools.git occamtools\n> cd occamtools\n> pyenv local 3.6.6 3.8-dev\n> pip3 install tox-pyenv\n> tox\n```\nwhich will run unit tests (using `pytest`) with python versions `3.6`, `3.7`, and the `3.8` development build.\n\nOCCAM\n---------\nOCCAM is a program for Molecular Dynamics Simulations able to perform Hybrid Particle-Field (PF) Theoretical Molecular Dynamics simulations. This recent PF technique combines molecular dynamics (MD) and self consistent field theory (SCF). [Read more.](http://www.occammd.org/about/)\n\n[![occam-website](http://www.occammd.org/wp-content/uploads/2018/08/cropped-Untitled-2-01-2.png)](http://www.occammd.org/)\n\nChangelog\n---------\n**0.3.3**: Add option to not save `.npy` files when loading `OccamData` objects. Fix a bug causing errors when reading very short `.xyz` files. Fix a bug causing the grid size to not correctly update when using `replace_in_fort3`.
\n**0.3.2**: Add testing with python alpha version `3.8-dev`, stream line travis integration and coverage reporting.
\n**0.3.1**: Move the `bins` keyword argument to `histogram` from an explicit argument to `**kwargs` handled by `np.histogram`.
\n**0.3.0**: Add histogram computation capabilities.
\n**0.2.7**: Add the `velocity_traj` flag to `fort1` file reader.
\n**0.2.6**: Add proper testing for python `3.6` and `3.7` using [`tox`](https://pypi.org/project/tox/).
\n**0.2.5**: Change python version required to `>=3.6` (from `>=3.7`).
\n**0.2.4**: Add functionality for reading `.xyz` files with additional velocity information, as output by OCCAM when the `velocity_traj` flag is set in `fort.1`.
\n**0.2.3**: Code clean-up.
\n**0.2.2**: Extend `repace_in_fort3` to allow for changing compressibility and non-bonded interactions. Fix a bug causing new particle types added to break the chi matrix when writing `fort.3` files.
\n**0.2.1**: Update the `__all__` variable of `__init__.py` to reflect newly added classes and methods.
\n**0.2.0**: Add functionality for editing `fort.3` files (in-place or creating new ones).
\n**0.1.0**: Add functionality for editing `fort.1` files (in-place or creating new ones).
", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mortele/OccamTools", "keywords": "", "license": "GPL-3", "maintainer": "", "maintainer_email": "", "name": "occamtools", "package_url": "https://pypi.org/project/occamtools/", "platform": "", "project_url": "https://pypi.org/project/occamtools/", "project_urls": { "Homepage": "https://github.com/mortele/OccamTools" }, "release_url": "https://pypi.org/project/occamtools/0.3.3/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Analysis and synthesis tools for OCCAM hPF simulations", "version": "0.3.3" }, "last_serial": 5333065, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "13c839716e41ee26f48242ae04da7d5a", "sha256": "76bd300feeeff1ef8c26213e4691fb12af12a9d29f47827a8faf16df00f7cfc5" }, "downloads": -1, "filename": "occamtools-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "13c839716e41ee26f48242ae04da7d5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 24582, "upload_time": "2019-03-15T14:19:48", "url": "https://files.pythonhosted.org/packages/9b/c6/8dd4e094602a7606c342ec72726bf280855141d7fabed10e41fcaf9d4349/occamtools-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e2a78996b16da65aa5a332c03fea204", "sha256": "f9f025ec78ea8a6f7c91cbb84835aa731817583a6336910d2424498bd4f53f05" }, "downloads": -1, "filename": "occamtools-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4e2a78996b16da65aa5a332c03fea204", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 61470, "upload_time": "2019-03-15T14:19:50", "url": "https://files.pythonhosted.org/packages/6f/da/058e5904244a8072ee278503dc8b8ad16519ea2ede78d0e72c438dfd4019/occamtools-0.0.1.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "0277b9e0858173f1d5854cb1bee4ba2f", "sha256": "4da5de4a01adcfed0ca5e558ce3df12031132091281a50e860cf6656636d528b" }, "downloads": -1, "filename": "occamtools-0.0.5.tar.gz", "has_sig": false, "md5_digest": "0277b9e0858173f1d5854cb1bee4ba2f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 58663, "upload_time": "2019-03-15T14:52:48", "url": "https://files.pythonhosted.org/packages/ff/3a/a2ee2d28244a9a30e9812bf61506cf47b140a47dde55aeb3336fae9220fa/occamtools-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "7e36feb7854f17f09bdecafd5137efa1", "sha256": "82965a0d580b19389a01327bf241f700fe6957791bbf733206f0148d8667189d" }, "downloads": -1, "filename": "occamtools-0.0.6.tar.gz", "has_sig": false, "md5_digest": "7e36feb7854f17f09bdecafd5137efa1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 61214, "upload_time": "2019-03-15T15:08:27", "url": "https://files.pythonhosted.org/packages/e6/57/118488045765866e766900c1fbf6d4f9cf767cbf3db072d45e45c3dcd205/occamtools-0.0.6.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "51617eb0ab391629c910b70915bb9ecb", "sha256": "ca55edb1c1b97ab249d12cf0235575c1fcc06bac1a6cc2c4282889fb604564a2" }, "downloads": -1, "filename": "occamtools-0.1.0.tar.gz", "has_sig": false, "md5_digest": "51617eb0ab391629c910b70915bb9ecb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 62365, "upload_time": "2019-03-26T11:55:51", "url": "https://files.pythonhosted.org/packages/39/85/a5f78b79ce1275a707d88609858f1e79e5c1af29d9a600c8491563da1450/occamtools-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7010ba8fc7e18f888beea819117e6267", "sha256": "a29468543af38e51d01ddd3e1030ecbd6ffd0e81ce00339d52835fe4b5bfa619" }, "downloads": -1, "filename": "occamtools-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7010ba8fc7e18f888beea819117e6267", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 69541, "upload_time": "2019-04-04T13:49:54", "url": "https://files.pythonhosted.org/packages/e4/9d/b264ccbddba19feb7256f1d43d63ac0de671f90092d7cb0ed5991e33cf03/occamtools-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7d8bb2364f1fdedefb57ea91686a0828", "sha256": "0528d4e2be94a9d1c155f898b0fff09050f82fca9ce98ddb32c66de45ad7ff0e" }, "downloads": -1, "filename": "occamtools-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7d8bb2364f1fdedefb57ea91686a0828", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 69595, "upload_time": "2019-04-04T14:39:15", "url": "https://files.pythonhosted.org/packages/23/80/2f688c2f35af46e493e227d1028634ee435931dc95f27ddf2c82edd86aac/occamtools-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "dc9fe893562254a6bf723927927ccb8e", "sha256": "8b569ab105a79d7384450204aedb2356c29bad2d561ed7457906c6606dd72fa6" }, "downloads": -1, "filename": "occamtools-0.2.2.tar.gz", "has_sig": false, "md5_digest": "dc9fe893562254a6bf723927927ccb8e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 70116, "upload_time": "2019-04-04T15:39:54", "url": "https://files.pythonhosted.org/packages/d1/b3/8dfd3fc7ea4bcb78ceb4106e1afd1de277c8b33c5763cf161db217955ad9/occamtools-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "06cd208debc3502ade20692ead4273f8", "sha256": "ddecbbc3440246a668cd310135e16a59c4b181485e4e35653e24240e8c8a7d6a" }, "downloads": -1, "filename": "occamtools-0.2.3.tar.gz", "has_sig": false, "md5_digest": "06cd208debc3502ade20692ead4273f8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 69993, "upload_time": "2019-04-04T22:40:31", "url": "https://files.pythonhosted.org/packages/f1/ed/443545924f6f381a6d34cc1dc5f6df4d436d9562006534d251f4d4db1ad1/occamtools-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "22d33209d36eea38bfc888e5bdd7dd16", "sha256": "b850caeaa9c7c61ab8f77794a89dffc64fa15bfd1c938178e0542bb90dc3b603" }, "downloads": -1, "filename": "occamtools-0.2.4.tar.gz", "has_sig": false, "md5_digest": "22d33209d36eea38bfc888e5bdd7dd16", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 71020, "upload_time": "2019-04-05T09:03:36", "url": "https://files.pythonhosted.org/packages/d3/ff/44fdc1485a3a0155b5e45178d8486eb8d979830a203865b8c2a23ea82b12/occamtools-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "07ee06830497d957508188416ed77c41", "sha256": "5c673e54d20f9c59bd182950688202f326b6a9fcb450b445993ab2519d83a979" }, "downloads": -1, "filename": "occamtools-0.2.5.tar.gz", "has_sig": false, "md5_digest": "07ee06830497d957508188416ed77c41", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 73871, "upload_time": "2019-04-05T14:05:43", "url": "https://files.pythonhosted.org/packages/0f/01/b6e77c4a5e80dbb13665e2ae65f224b43e29a8d522499f4a8e7c92da243d/occamtools-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "763e09e1bf653000d51d1141dd2c45bc", "sha256": "88dcfc452ac4de0794780664e3559f169eae650ef1fbc120bc1ba322aa514e85" }, "downloads": -1, "filename": "occamtools-0.2.6.tar.gz", "has_sig": false, "md5_digest": "763e09e1bf653000d51d1141dd2c45bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 74844, "upload_time": "2019-04-05T16:02:22", "url": "https://files.pythonhosted.org/packages/6c/73/9c5f5e1f01f35af0e2f5ed9706caae4d911970d770ea2125d60428c448b4/occamtools-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "fb7b30c2900fc8c40368c0600e920ed0", "sha256": "e82775926db5b52b19d0b6f14c69360e749de6ccd7ec440ffd2f2f82f419a88c" }, "downloads": -1, "filename": "occamtools-0.2.7.tar.gz", "has_sig": false, "md5_digest": "fb7b30c2900fc8c40368c0600e920ed0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 74875, "upload_time": "2019-04-24T08:44:04", "url": "https://files.pythonhosted.org/packages/04/de/c7393c645b756ff5bbfb67a4accc5aa35731ba207e1e7c506b76cf129ef5/occamtools-0.2.7.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "98627a3f5c7666d8898b339a5c1b7446", "sha256": "0ed317326fa2939e3f22f59df23ee5a4e51c3548929e3adbd88e450e62a68ab2" }, "downloads": -1, "filename": "occamtools-0.3.0.tar.gz", "has_sig": false, "md5_digest": "98627a3f5c7666d8898b339a5c1b7446", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 76191, "upload_time": "2019-04-24T16:49:32", "url": "https://files.pythonhosted.org/packages/70/71/25905564325fb1f59f8ed9b64288cea30fd1602259e1b04e895f43d65725/occamtools-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "6cf33c92b2911ca8d722ce5916871339", "sha256": "eefdca9c42a25ce7717ebefab35079b79a02a41db6cbc58b96b8e7fc8f1e859d" }, "downloads": -1, "filename": "occamtools-0.3.1.tar.gz", "has_sig": false, "md5_digest": "6cf33c92b2911ca8d722ce5916871339", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 76185, "upload_time": "2019-04-25T07:55:56", "url": "https://files.pythonhosted.org/packages/57/b5/39d9096227907a653c5b5d5dfdc43245447c837f10b86e472400138f4cf4/occamtools-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9a6bc7574939bb5bdaaf9c9a4afd49a4", "sha256": "b3d4e449b13c307d88a09a299d92484eea48564c19a99e801c5071306ac34571" }, "downloads": -1, "filename": "occamtools-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9a6bc7574939bb5bdaaf9c9a4afd49a4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 73926, "upload_time": "2019-04-25T12:11:09", "url": "https://files.pythonhosted.org/packages/9a/42/4d8590fc2b942055f5b000af20d17f57097c2b4238a51cb2acede83d61a6/occamtools-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "4a319e20d92e0d9c516ae144af72c15b", "sha256": "6ae4dbddb9ea8b054dfeb2c72f097c1cdf0f41cfbb9031b070edea1d6d4ed513" }, "downloads": -1, "filename": "occamtools-0.3.3.tar.gz", "has_sig": false, "md5_digest": "4a319e20d92e0d9c516ae144af72c15b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 74397, "upload_time": "2019-05-29T15:59:41", "url": "https://files.pythonhosted.org/packages/94/18/4f634bf177d08c07afa0385a8d2dbf0d0c6e7bbf87eed489c7de67ca9de2/occamtools-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a319e20d92e0d9c516ae144af72c15b", "sha256": "6ae4dbddb9ea8b054dfeb2c72f097c1cdf0f41cfbb9031b070edea1d6d4ed513" }, "downloads": -1, "filename": "occamtools-0.3.3.tar.gz", "has_sig": false, "md5_digest": "4a319e20d92e0d9c516ae144af72c15b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 74397, "upload_time": "2019-05-29T15:59:41", "url": "https://files.pythonhosted.org/packages/94/18/4f634bf177d08c07afa0385a8d2dbf0d0c6e7bbf87eed489c7de67ca9de2/occamtools-0.3.3.tar.gz" } ] }