Skip to main content

A python code repo to initialize different crystal structures based on Pearson symbol or space group

Project description

A python package to initialize different crystal structures. Named after the Russian mathematician, crystallographer and mineralogist: Evgraf Fedorov. This package provides methods to generate any user defined crystal structures in both 2D and 3D systems, and includes access to 590 known crystal structures defined in Aflow. Users can use this package to obtain the necessary data in form of numpy array to use for softwares such as HOOMD-Blue to construct any systems with specific crystal structure for simulation and analysis. In addition, the package also provides access to all the 3D space group, 2D plane group as well as point group operations that allows user to apply different symmetry operations.

Installation

Install with pip

To install the package with the package manager pip, execute

$ pip install fedorov --user

To upgrade the package, simply execute the same command with the --upgrade option.

$ pip install fedorov --user --upgrade

Install from source

Alternatively you can clone the git repository and execute the setup.py script to install the package.

git clone https://github.com/glotzerlab/fedorov.git
cd fedorov
python setup.py install --user

Documentation

  • Documentation link: Website link to be added

You can also build the documentation with sphinx:

You can install sphinx using conda:

conda install sphinx

or pip:

pip install sphinx

To build the documentation, run the following commands in the source directory:

cd doc
make html
# Then open _build/html/index.html

To build a PDF of the documentation (requires LaTeX and/or PDFLaTeX):

cd doc
make latexpdf
# Then open _build/latex/fedorov.pdf

Quickstart

This package provides methods to generate known or user defined crystal structures. For example, to generate any known crystal structures from this list:

import numpy as np
from fedorov import SpaceGroup, Prototype, AflowPrototype
from fedorov import convert_to_box
# generate the exact prototype provided by Aflow, use prototype_index [0, 589]
prototype_index = 5
new_structure = AflowPrototype(prototype_index=prototype_index, print_info=True,
                               set_type=True)
basis_vectors, type_list = new_structure.get_basis_vectors()
lattice_vectors = new_structure.get_lattice_vectors()
Lx, Ly, Lz, xy, xz, yz = convert_to_box(lattice_vectors)

More example can be found here.

Testing

You can test this package by executing:

python -m pytest tests/

within the repository root directory.

Credits

See Credits.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fedorov-0.1.0.tar.gz (84.5 kB view details)

Uploaded Source

Built Distribution

fedorov-0.1.0-py3-none-any.whl (140.8 kB view details)

Uploaded Python 3

File details

Details for the file fedorov-0.1.0.tar.gz.

File metadata

  • Download URL: fedorov-0.1.0.tar.gz
  • Upload date:
  • Size: 84.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for fedorov-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30e7db234ed0448c0447e41dd858d47fb4fb92acaaff3bbca1eaae26e7025b8c
MD5 8f91e973c7fb0a35f34b2c1b578d3c67
BLAKE2b-256 3f6a9f91582cff31c83f78de151e835e5c31421055cf238db3839c095e6b9288

See more details on using hashes here.

File details

Details for the file fedorov-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fedorov-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 140.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

File hashes

Hashes for fedorov-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f60a58cb39bdb5f6c26f39f104e10fc77869af5301fdf701f9ec3bbedd5c901d
MD5 514cfaeded68d8c802026d29923b7021
BLAKE2b-256 bd033ca6f18de9891362b955632799da077ab9affaed78e0a82f9cc1097efdd1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page