Skip to main content

PyQCstrc provides Python library for Quasi-Crystal structure.

Project description

PyQCstrc - Python library for Quasi-Crystal structure

Main websites:

Installation using pip

$ python  pip install `pyqcstrc`.

Supported versions

  • Python: 3.9
  • Operating systems: Linux, macOS, and Windows

Requirements

  • Cython>=0.29.21
  • numpy>=1.20.1
  • scipy>=1.6.0

Citation:

If you use this tool in a program or publication, please acknowledge its author:

@article{pyqcstrc,
  title     = {PyQCstrc.icosah: A computing package for structure model of icosahedral quasicrystals},
  author    = {Yamada, Tsunetomo},
  journal   = {},
  volume    = {},
  number    = {},
  pages     = {},
  year      = {},
  publisher = {},
  version   = {},
  doi       = {},
  url       = {}
}

Python example

# import libraries
import numpy as np
import pyqcstrc.icosah.occupation_domain as od
import pyqcstrc.icosah.two_occupation_domains as ods

# Vertices of tetrahedron, v0,v1,v2,v3, which
# defines the asymmetric part.
v0 = np.array([[ 0, 0, 1],[ 0, 0, 1],[ 0, 0, 1],
               [ 0, 0, 1],[ 0, 0, 1],[ 0, 0, 1]]) 
v1 = np.array([[ 1, 0, 2],[-1, 0, 2],[-1, 0, 2],
               [-1, 0, 2],[-1, 0, 2],[-1, 0, 2]]) 
v2 = np.array([[ 1, 0, 2],[-1, 0, 2],[-1, 0, 2],
               [ 1, 0, 2],[-1, 0, 2],[-1, 0, 2]]) 
v3 = np.array([[ 1, 0, 2],[-1, 0, 2],[-1, 0, 2],
               [ 0, 0, 2],[-1, 0, 2],[ 0, 0, 2]]) 
seed = np.vstack([v0,v1,v2,v3]).reshape(4,6,3)
od0 = od.as_it_is(seed)

# Creating the basic occupation domain (OD) from its asymmetric unit 
# by applying the symmetry operations of m35 around the origin:
# generate symmetric OD, symmetric centre is v0.
od1 = od.symmetric(od, v0)

# Creating the basic OD at (1,0,0,0,0,0):
# 6D coordinates of position_1
pos1 = np.array([[ 1, 0, 1],[ 0, 0, 1],[ 0, 0, 1],
                 [ 0, 0, 1],[ 0, 0, 1],[ 0, 0, 1]]) 
od2 = od.shift(od1,pos1)  # move to position_1

# Intersection operation on od1 and od2:
od3 = ods.intersection(od1, od2)

# Export od3 in .vesta and .xyz files:
od.write(od3, basename='od3', format='vesta')
od.write(od3, basename='od3', format='xyz')

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyqcstrc-0.0.1a7-cp39-cp39-win_amd64.whl (1.9 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

pyqcstrc-0.0.1a7-cp39-cp39-manylinux1_x86_64.whl (9.3 MB view hashes)

Uploaded CPython 3.9

pyqcstrc-0.0.1a7-cp39-cp39-macosx_10_14_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

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