Beispiel #1
0
def _legacy_get_kpoints_path(structure, **kwargs):
    """
    Call the get_kpoints_path of the legacy implementation

    :param structure: a StructureData node
    :param bool cartesian: if set to true, reads the coordinates eventually passed in value as cartesian coordinates
    :param epsilon_length: threshold on lengths comparison, used to get the bravais lattice info
    :param epsilon_angle: threshold on angles comparison, used to get the bravais lattice info
    """
    args_recognized = ['cartesian', 'epsilon_length', 'epsilon_angle']
    args_unknown = set(kwargs).difference(args_recognized)

    if args_unknown:
        raise ValueError("unknown arguments {}".format(args_unknown))

    point_coords, path, bravais_info = legacy.get_kpoints_path(
        cell=structure.cell, pbc=structure.pbc, **kwargs)

    parameters = {
        'bravais_info': bravais_info,
        'point_coords': point_coords,
        'path': path,
    }

    return {'parameters': ParameterData(dict=parameters)}
Beispiel #2
0
    def get_special_points(self,
                           cartesian=False,
                           epsilon_length=_default_epsilon_length,
                           epsilon_angle=_default_epsilon_angle):
        """
        Get the special point and path of a given structure.

        References:

        - In 2D, coordinates are based on the paper:
          R. Ramirez and M. C. Bohm,  Int. J. Quant. Chem., XXX, pp. 391-411 (1986)

        - In 3D, coordinates are based on the paper:
          W. Setyawan, S. Curtarolo, Comp. Mat. Sci. 49, 299 (2010)

        .. deprecated:: 0.11
           Use the methods inside the :ref:`aiida.tools.data.array.kpoints<AutomaticKpoints>` module instead.

        :param cartesian: If true, returns points in cartesian coordinates.
            Crystal coordinates otherwise. Default=False
        :param epsilon_length: threshold on lengths comparison, used to get the bravais lattice info
        :param epsilon_angle: threshold on angles comparison, used to get the bravais lattice info
        :returns point_coords: a dictionary of point_name:point_coords key,values.
        :returns path: the suggested path which goes through all high symmetry lines.
            A list of lists for all path segments. e.g. [('G','X'),('X','M'),...]
            It's not necessarily a continuous line.
        :note: We assume that the cell given by the cell property is the primitive unit cell
        """
        import warnings
        warnings.warn(
            'this method has been deprecated, see {}'.format(
                DEPRECATION_DOCS_URL), DeprecationWarning)

        from aiida.tools.data.array.kpoints.legacy import get_kpoints_path
        point_coords, path, bravais_info = get_kpoints_path(
            cell=self.cell,
            pbc=self.pbc,
            cartesian=cartesian,
            epsilon_length=epsilon_length,
            epsilon_angle=epsilon_angle)

        return point_coords, path