Ejemplo n.º 1
0
#  Copyright (c) 2020 Kumagai group.
# This file is originally developed by Naoki Tsunoda.

import itertools
from pathlib import Path
from typing import Union, Optional, Dict, Iterable, List, Tuple

import numpy as np

from vise.analyzer.vesta.element_colors import atom_color
from pymatgen.core import DummySpecies
from pymatgen.core.structure import Structure
from vise.util.logger import get_logger
from vise.util.unit_conversion import au_to_angstrom

logger = get_logger(__name__)


def replace_dummy_to_xx(target_str: str) -> str:
    return target_str.replace("X0+", "XX", -1)


def val_to_str_line(val_line: list or tuple) -> str:
    format_str = "{{:.{0}f}}".format(6)
    return " ".join([format_str.format(c) for c in val_line])


class VestaFile:
    def __init__(self,
                 structure: Structure,
                 title: str = None,
Ejemplo n.º 2
0
def test_get_logger():
    assert str(get_logger("a")) == "<Logger a (DEBUG)>"