pyqcstrc.dode package

Subpackages

Submodules

pyqcstrc.dode.intsct12 module

pyqcstrc.dode.math12 module

pyqcstrc.dode.numericalc12 module

pyqcstrc.dode.occupation_domain module

pyqcstrc.dode.occupation_domain.as_it_is(obj)

Returns an object as it is,

Parameters:

obj (numpy.ndarray) – the shape is (num,3,6,3) or (num*3,6,3), where num=numbre_of_triangle.

Returns:

the shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

Occupation domains (numpy.ndarray)

pyqcstrc.dode.occupation_domain.asymmetric(symmetric_obj, position, vecs)

Asymmetric part of occupation domain.

Parameters:
  • symmetric_obj (numpy.ndarray) – Occupation domain of which the asymmetric part is calculated. The shape is (num,2,6,3), where num=numbre_of_triangle.

  • position (numpy.ndarray) – 6d coordinate of the site of which the occupation domain centres. The shape is (6,3)

  • vecs (numpy.ndarray) – Three vectors that defines the asymmetric part. The shape is (2,6,3)

Returns:

The shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

Asymmetric part of the occupation domains (numpy.ndarray)

pyqcstrc.dode.occupation_domain.genobjv(obj, vlist=[0], path='.', basename='tmp', verbose=0)

Generate objs from vlist.

Parameters:
  • obj (numpy.ndarray) – ndarray contains vertices The shape is (num,4,6,3), where num=numbre_of_vertices.

  • vlist (list)

  • path (str) – Path of the output files

  • basename (str) – Basename of the output files

  • verbose (int) – verbose = 0 (silent, default) verbose = 1 (normal)

Returns:

0 (succeed), 1 (fail)

Return type:

int

pyqcstrc.dode.occupation_domain.genstrc(l1)

Generate atomic structure of DD QC.

Parameters:

l1 (list) –

List contains structural dataThe occupation domain, which contains following:

  1. The shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

0 (int)

pyqcstrc.dode.occupation_domain.get_perp_component(vec6)
pyqcstrc.dode.occupation_domain.intersection(obj1, obj2, verbose=0)
pyqcstrc.dode.occupation_domain.intersection_two_segments(segment1, segment2, verbose=0)

Returns an intersecting point of two line segments.

Parameters:
  • segment1 (numpy.ndarray) – the shape is (2,6,3).

  • segment2 (numpy.ndarray) – the shape is (2,6,3).

  • verbose (int) – 0 (defalt)

Returns:

the shape is (6,3).

Return type:

intersecting point (numpy.ndarray)

pyqcstrc.dode.occupation_domain.outline(obj, verbose=0)

Generate outline of the occupation domain.

Parameters:
  • obj (numpy.ndarray) – the shape is (num,3,6,3), where num=numbre_of_triangle.

  • verbose (int) – 0 (defalt)

Returns:

The shape is (num,2,6,3), where num=number of the outlines.

Return type:

Outline of the occupation domain (numpy.ndarray)

pyqcstrc.dode.occupation_domain.outline1(obj, num_cycle=20, verbose=0)

Generate outline of the occupation domain.

Parameters:
  • obj (numpy.ndarray) – the shape is (num,3,6,3), where num=numbre_of_triangle.

  • num_cycle (int) – 10 (defalt)

  • verbose (int) – 0 (defalt)

Returns:

The shape is (num,2,6,3), where num=number of the outlines.

Return type:

Outline of the occupation domain (numpy.ndarray)

pyqcstrc.dode.occupation_domain.qcstrc(obj, positions, path, basename, atm, phason_matrix, nmax, shift, origin_shift, verbose=1, option=0)
pyqcstrc.dode.occupation_domain.read_xyz(path, basename, select='triangle')

Load new occupation domain on input XYZ file.

Parameters:
  • path (str) – Path of the input XYZ file

  • basename (str) – Basename of the input XYZ file

Returns:

Loaded occupation domains. The shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

Occupation domains (numpy.ndarray)

pyqcstrc.dode.occupation_domain.shift(obj, shift, verbose=0)

Shift the occupation domain.

Parameters:
  • obj (numpy.ndarray) – The occupation domain The shape is (num,3,6,3), where num=numbre_of_triangle.

  • shift (numpy.ndarray) – 6d coordinate to which the occupation domain is shifted. The shape is (6,3)

  • verbose (int) – verbose = 0 (silent, default) verbose = 1 (normal)

Returns:

The shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

Shifted occupation domains (numpy.ndarray)

pyqcstrc.dode.occupation_domain.similarity(obj, order)
pyqcstrc.dode.occupation_domain.site_symmetry(wyckoff_position, verbose=0)

Symmetry operators in the site symmetry group G and its left coset decomposition.

Parameters:
  • position (Wyckoff) – 4D coordinate. The shape is (6,3).

  • verbose (int)

Returns:

The symmetry operators leaves xyz identical.

List of index of symmetry operators in the left coset representatives of the poibt group G (list):

The symmetry operators generates equivalent positions of the site xyz.

Return type:

List of index of symmetry operators of the site symmetry group G (list)

pyqcstrc.dode.occupation_domain.symmetric(asymmetric_unit, site, verbose=0)

Generate symmterical occupation domain from its asymmetric unit by applying site simmetry.

Parameters:
  • asymmetric_unit (numpy.ndarray) – Asymmetric unit of the occupation domain The shape is (num,3,6,3), where num=numbre_of_triangle.

  • site (numpy.ndarray) – 6d coordinate of the site of which the occupation domain centres. The symmetric centre. The shape is (6,3)

Returns:

The shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

Symmetric occupation domains (numpy.ndarray)

pyqcstrc.dode.occupation_domain.symmetric_12(obj)

Generate symmteric occupation domain by symmetric elements of 12m on the input.

Parameters:

obj (numpy.ndarray) – occupation domain The shape is (num,3,6,3), where num=numbre_of_triangle.

Returns:

The shape is (num,3,6,3), where num=numbre_of_triangle.

Return type:

Symmetric occupation domains (numpy.ndarray)

pyqcstrc.dode.occupation_domain.triangulation(obj, position, num_cycle=20, verbose=0)

Triangulation of the occupation domain.

Parameters:
  • obj (numpy.ndarray) – the shape is (num,3,6,3), where num=numbre_of_triangle.

  • position (numpy.ndarray) – 6d vector. the shape is (6,3)

  • num_cycle (int) – 10 (defalt)

  • verbose (int) – 0 (defalt)

Returns:

The shape is (num,3,6,3), where num=number of triangles.

Return type:

Outline of the occupation domain (numpy.ndarray)

pyqcstrc.dode.occupation_domain.write(obj, path='.', basename='tmp', format='xyz', color='k', dmax=5.0)

Export occupation domains.

Parameters:
  • obj (numpy.ndarray) – the occupation domain The shape is (num,4,6,3), where num=numbre_of_tetrahedron.

  • path (str) – Path of the output XYZ file

  • basename (str) – Basename of the output XYZ file

  • format (str) – format of output file format = ‘xyz’ (default) format = ‘vesta’

  • color (str) – one of the characters {‘k’,’r’,’b’,’p’}, which are short-hand notations for shades of black, red, blue, and pink, in case where ‘vesta’ format is selected (default, color = ‘k’).

  • dmax (float) – Distance for bonds in case where ‘vesta’ format is selected. (default, dmax = 5.0)

Returns:

0 (succeed), 1 (fail)

Return type:

int

pyqcstrc.dode.occupation_domain.write_vesta(obj, path, basename, color='k', dmax=5.0, select='normal')

Export occupation domains in VESTA format.

Parameters:
  • obj (numpy.ndarray) – the occupation domain The shape is (num,4,6,3), where num=numbre_of_tetrahedron.

  • path (str) – Path of the output XYZ file

  • basename (str) – Basename of the output XYZ file

  • color (str) – one of the characters {‘k’,’r’,’b’,’p’}, which are short-hand notations for shades of black, red, blue, and pink, in case where ‘vesta’ format is selected (default, color = ‘k’).

  • dmax (float) – Distance for bonds in case where ‘vesta’ format is selected. (default, dmax = 5.0)

  • select (str) – (default, select = ‘normal’)

Returns:

0 (succeed), 1 (fail)

Return type:

int

pyqcstrc.dode.occupation_domain.write_xyz(obj, path, basename)

Export occupation domains in XYZ format.

Parameters:
  • obj (numpy.ndarray) – the occupation domain The shape is (num,3,6,3), where num=numbre_of_triangle.

  • path (str) – Path of the output XYZ file

  • basename (str) – Basename of the output XYZ file

  • select (str) – ‘triangle’: set of triangle (default)

Returns:

0 (succeed), 1 (fail)

Return type:

int

pyqcstrc.dode.setup module

pyqcstrc.dode.strc12 module

pyqcstrc.dode.symmetry12 module

pyqcstrc.dode.utils12 module

Module contents