Name | atom2vec JSON |
Version |
1.1.0
JSON |
| download |
home_page | |
Summary | A python implement of Atom2Vec: a simple way to describe atoms for machine learning |
upload_time | 2024-02-23 21:43:42 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | |
keywords |
material science
machine learning
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Atom2Vec
A python implement of Atom2Vec: a simple way to describe atoms for machine learning
(*Updated 06/21/2021*: We refactored the code with `pymatgen`, you can find old version in branch `old_version`. Now the code is fully typed and tested.)
## Background
Atom2Vec is first proposed on [Zhou Q, Tang P, Liu S, et al. Learning atoms for materials discovery[J]. Proceedings of the National Academy of Sciences, 2018, 115(28): E6411-E6417.](https://www.pnas.org/content/115/28/E6411#page)
## Demo
[![Atom Similarity Demo](docs/atom_sim_vis.png)](https://old.yuxingfei.com/src/similarity.html)
## Installation
```shell
pip install atom2vec
```
## Usage
### Generating atom vectors and atom similarity matrix
We use `pymatgen.core.Structure` to store all the structures.
```python
from atom2vec import AtomSimilarity
from pymatgen.core import Structure
from typing import List
structures: List[Structure]
atom_similarity = AtomSimilarity.from_structures(structures,
k_dim=100, max_elements=3)
```
### Query atom vectors
```python
from atom2vec import AtomSimilarity
from pymatgen.core import Element
from typing import List
atom_similarity: AtomSimilarity
atom_vector: List[float]
atom_vector = atom_similarity.get_atom_vector(1) # atomic index
atom_vector = atom_similarity.get_atom_vector("H") # atom's name
atom_vector = atom_similarity.get_atom_vector(Element("H")) # pymatgen Element Enum
```
### Query atom similarity
```python
from atom2vec import AtomSimilarity
from pymatgen.core import Element
atom_similarity: AtomSimilarity
similarity: float
similarity = atom_similarity["Ca", "Sr"]
```
Raw data
{
"_id": null,
"home_page": "",
"name": "atom2vec",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "material science,machine learning",
"author": "",
"author_email": "Yuxing Fei <yuxingfei@berkeley.edu>",
"download_url": "https://files.pythonhosted.org/packages/d9/dc/085e2083d603006e1e22fd125ec11f01babd8ca3d40789f04d173f20b19b/atom2vec-1.1.0.tar.gz",
"platform": null,
"description": "# Atom2Vec\nA python implement of Atom2Vec: a simple way to describe atoms for machine learning\n\n(*Updated 06/21/2021*: We refactored the code with `pymatgen`, you can find old version in branch `old_version`. Now the code is fully typed and tested.)\n## Background\nAtom2Vec is first proposed on [Zhou Q, Tang P, Liu S, et al. Learning atoms for materials discovery[J]. Proceedings of the National Academy of Sciences, 2018, 115(28): E6411-E6417.](https://www.pnas.org/content/115/28/E6411#page)\n\n## Demo\n[![Atom Similarity Demo](docs/atom_sim_vis.png)](https://old.yuxingfei.com/src/similarity.html)\n\n## Installation\n```shell\npip install atom2vec\n```\n\n## Usage\n### Generating atom vectors and atom similarity matrix\nWe use `pymatgen.core.Structure` to store all the structures. \n```python\nfrom atom2vec import AtomSimilarity\nfrom pymatgen.core import Structure\nfrom typing import List\n\nstructures: List[Structure]\natom_similarity = AtomSimilarity.from_structures(structures, \n k_dim=100, max_elements=3)\n```\n\n### Query atom vectors\n```python\nfrom atom2vec import AtomSimilarity\nfrom pymatgen.core import Element\nfrom typing import List\n\natom_similarity: AtomSimilarity\natom_vector: List[float]\n\natom_vector = atom_similarity.get_atom_vector(1) # atomic index\natom_vector = atom_similarity.get_atom_vector(\"H\") # atom's name\natom_vector = atom_similarity.get_atom_vector(Element(\"H\")) # pymatgen Element Enum\n```\n\n### Query atom similarity\n```python\nfrom atom2vec import AtomSimilarity\nfrom pymatgen.core import Element\n\natom_similarity: AtomSimilarity\nsimilarity: float\n\nsimilarity = atom_similarity[\"Ca\", \"Sr\"]\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "A python implement of Atom2Vec: a simple way to describe atoms for machine learning",
"version": "1.1.0",
"project_urls": {
"Repository": "https://github.com/idocx/atom2vec"
},
"split_keywords": [
"material science",
"machine learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "52f88024b047558fd47b49521de8d62a9071b3d5da75cef8c6ff8367d93d81c2",
"md5": "e961a831a4e3b20d05bdbff5e5b95d93",
"sha256": "b2a1229d94b0af56dadcfb2772fb718dab6583e65f9182871779e744218bfc62"
},
"downloads": -1,
"filename": "atom2vec-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e961a831a4e3b20d05bdbff5e5b95d93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3845,
"upload_time": "2024-02-23T21:43:41",
"upload_time_iso_8601": "2024-02-23T21:43:41.031301Z",
"url": "https://files.pythonhosted.org/packages/52/f8/8024b047558fd47b49521de8d62a9071b3d5da75cef8c6ff8367d93d81c2/atom2vec-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d9dc085e2083d603006e1e22fd125ec11f01babd8ca3d40789f04d173f20b19b",
"md5": "95a05315753837b61ede0bf977dbdcef",
"sha256": "f0655301b87c831102b609149e7267f2a03f962866803f61ef7d8011a9723cec"
},
"downloads": -1,
"filename": "atom2vec-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "95a05315753837b61ede0bf977dbdcef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4584,
"upload_time": "2024-02-23T21:43:42",
"upload_time_iso_8601": "2024-02-23T21:43:42.047341Z",
"url": "https://files.pythonhosted.org/packages/d9/dc/085e2083d603006e1e22fd125ec11f01babd8ca3d40789f04d173f20b19b/atom2vec-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-23 21:43:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "idocx",
"github_project": "atom2vec",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "atom2vec"
}