Name | AtomisticReverseMonteCarlo JSON |
Version |
0.0.3
JSON |
| download |
home_page | |
Summary | OVITO Python modifier to generate bulk crystal structures with target Warren-Cowley parameters. |
upload_time | 2023-08-10 15:34:45 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT License |
keywords |
ovito
python-modifier
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Atomistic Reverse Monte-Carlo
 
OVITO Python modifier to generate bulk crystal structures with target Warren-Cowley parameters.
## Usage
Here's an example on how to use the code to create the ``fcc_wc.dump`` file which has Warren-Cowley parameters that falls within a 1% difference of the targeted ones:
```python
from ovito.io import export_file, import_file
from AtomisticReverseMonteCarlo import AtomisticReverseMonteCarlo
mod = AtomisticReverseMonteCarlo(
nneigh=12, # number of neighbors to compute WC parameters (12 1NN in fcc)
T=1e-9, # rMC temperature
target_wc=[ # wc target 1-pij/cj
[0.32719603, -0.19925471, -0.12794131],
[-0.19925471, 0.06350427, 0.13575045],
[-0.12794131, 0.13575045, -0.00762235],
],
tol_percent_diff=[ # max percent tolerence allowed before stopping
[1, 1, 1],
[1, 1, 1],
[1, 1, 1],
],
save_rate=1000, # save rate
seed=123,
max_iter=None, # infinity number of iterations
)
# Load the intial snapshot
pipeline = import_file("fcc_random.dump")
pipeline.modifiers.append(mod)
data = pipeline.compute()
# Load data of the last trajectory
data = pipeline.compute(-1)
print(f'Target Warren-Cowley parameters: \n {data.attributes["Target Warren-Cowley parameters"]}')
print(f'Warren-Cowley parameters: \n {data.attributes["Warren-Cowley parameters"]}')
print(f'Warren-Cowley Percent error: \n {data.attributes["Warren-Cowley percent error"]}')
export_file(
data,
"fcc_wc.dump",
"lammps/dump",
columns=[
"Particle Identifier",
"Particle Type",
"Position.X",
"Position.Y",
"Position.Z",
],
)
```
The script can be found in the ``examples`` directory.
## Installation
For a standalone Python package or Conda environment, please use:
```bash
pip install --user AtomisticReverseMonteCarlo
```
For *OVITO PRO* built-in Python interpreter, please use:
```bash
ovitos -m pip install --user AtomisticReverseMonteCarlo
```
If you want to install the lastest git commit, please replace ``AtomisticReverseMonteCarlo`` with ``git+https://github.com/killiansheriff/AtomisticReverseMonteCarlo``.

## Contact
If any questions, feel free to contact me (ksheriff at mit dot edu).
## References & Citing
If you use this repository in your work, please cite ``bibtex entry to follow``.
Raw data
{
"_id": null,
"home_page": "",
"name": "AtomisticReverseMonteCarlo",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Killian Sheriff <ksheriff@mit.edu>",
"keywords": "ovito,python-modifier",
"author": "",
"author_email": "Killian Sheriff <ksheriff@mit.edu>",
"download_url": "https://files.pythonhosted.org/packages/b2/d1/1589b29d23ede4732e848e6b69da4354ace19fe7d289b027efcb4be9f4ed/AtomisticReverseMonteCarlo-0.0.3.tar.gz",
"platform": null,
"description": "# Atomistic Reverse Monte-Carlo \n \n\nOVITO Python modifier to generate bulk crystal structures with target Warren-Cowley parameters. \n\n## Usage \nHere's an example on how to use the code to create the ``fcc_wc.dump`` file which has Warren-Cowley parameters that falls within a 1% difference of the targeted ones:\n\n```python \nfrom ovito.io import export_file, import_file\n\nfrom AtomisticReverseMonteCarlo import AtomisticReverseMonteCarlo\n\nmod = AtomisticReverseMonteCarlo(\n nneigh=12, # number of neighbors to compute WC parameters (12 1NN in fcc)\n T=1e-9, # rMC temperature\n target_wc=[ # wc target 1-pij/cj\n [0.32719603, -0.19925471, -0.12794131],\n [-0.19925471, 0.06350427, 0.13575045],\n [-0.12794131, 0.13575045, -0.00762235],\n ],\n tol_percent_diff=[ # max percent tolerence allowed before stopping\n [1, 1, 1],\n [1, 1, 1],\n [1, 1, 1],\n ], \n save_rate=1000, # save rate\n seed=123,\n max_iter=None, # infinity number of iterations\n)\n\n# Load the intial snapshot \npipeline = import_file(\"fcc_random.dump\")\npipeline.modifiers.append(mod)\ndata = pipeline.compute()\n\n# Load data of the last trajectory\ndata = pipeline.compute(-1)\nprint(f'Target Warren-Cowley parameters: \\n {data.attributes[\"Target Warren-Cowley parameters\"]}')\nprint(f'Warren-Cowley parameters: \\n {data.attributes[\"Warren-Cowley parameters\"]}')\nprint(f'Warren-Cowley Percent error: \\n {data.attributes[\"Warren-Cowley percent error\"]}')\n\nexport_file(\n data,\n \"fcc_wc.dump\",\n \"lammps/dump\",\n columns=[\n \"Particle Identifier\",\n \"Particle Type\",\n \"Position.X\",\n \"Position.Y\",\n \"Position.Z\",\n ],\n)\n```\nThe script can be found in the ``examples`` directory.\n\n## Installation\nFor a standalone Python package or Conda environment, please use:\n```bash\npip install --user AtomisticReverseMonteCarlo\n```\n\nFor *OVITO PRO* built-in Python interpreter, please use:\n```bash\novitos -m pip install --user AtomisticReverseMonteCarlo\n```\n\nIf you want to install the lastest git commit, please replace ``AtomisticReverseMonteCarlo`` with ``git+https://github.com/killiansheriff/AtomisticReverseMonteCarlo``.\n\n\n\n## Contact\nIf any questions, feel free to contact me (ksheriff at mit dot edu).\n\n## References & Citing \nIf you use this repository in your work, please cite ``bibtex entry to follow``.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "OVITO Python modifier to generate bulk crystal structures with target Warren-Cowley parameters.",
"version": "0.0.3",
"project_urls": {
"repository": "https://github.com/killiansheriff/AtomisticReverseMonteCarlo"
},
"split_keywords": [
"ovito",
"python-modifier"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8744d9ebd37fb1d82e47415bc9293813a123b88bb5d244adf68b10e51298a808",
"md5": "afbd192e6819e55358621cdcee0371d7",
"sha256": "7f03c8e058c89c50fe61df8fd0a15fa8398be631b5932a1e5eaa8ade6cb7cb10"
},
"downloads": -1,
"filename": "AtomisticReverseMonteCarlo-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "afbd192e6819e55358621cdcee0371d7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6238,
"upload_time": "2023-08-10T15:34:43",
"upload_time_iso_8601": "2023-08-10T15:34:43.669818Z",
"url": "https://files.pythonhosted.org/packages/87/44/d9ebd37fb1d82e47415bc9293813a123b88bb5d244adf68b10e51298a808/AtomisticReverseMonteCarlo-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b2d11589b29d23ede4732e848e6b69da4354ace19fe7d289b027efcb4be9f4ed",
"md5": "44e0cff48a271e955f1209c285ca9c6e",
"sha256": "8d9d78f50b673e9756b3c5d87db98685c2325066175893810cdec11acb2383dd"
},
"downloads": -1,
"filename": "AtomisticReverseMonteCarlo-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "44e0cff48a271e955f1209c285ca9c6e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 5851,
"upload_time": "2023-08-10T15:34:45",
"upload_time_iso_8601": "2023-08-10T15:34:45.049891Z",
"url": "https://files.pythonhosted.org/packages/b2/d1/1589b29d23ede4732e848e6b69da4354ace19fe7d289b027efcb4be9f4ed/AtomisticReverseMonteCarlo-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-10 15:34:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "killiansheriff",
"github_project": "AtomisticReverseMonteCarlo",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "atomisticreversemontecarlo"
}