atom2vec-1.0.5
توضیحات
A python implement of Atom2Vec: a simple way to describe atoms for machine learning
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | atom2vec-1.0.5 |
| نام | atom2vec |
| نسخه کتابخانه | 1.0.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | idocx |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/idocx/Atom2Vec |
| آدرس اینترنتی | https://pypi.org/project/atom2vec/ |
| مجوز | MIT |
# 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
[](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"]
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.20.3,<2.0.0 | numpy |
| >=4.61.1,<5.0.0 | tqdm |
| >=2022.0.8,<2023.0.0 | pymatgen |
| >=1.7.0,<2.0.0 | scipy |
| >=0.0,<0.1 | sklearn |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<3.10 | Python |
نحوه نصب
نصب پکیج whl atom2vec-1.0.5:
pip install atom2vec-1.0.5.whl
نصب پکیج tar.gz atom2vec-1.0.5:
pip install atom2vec-1.0.5.tar.gz