Example #1
0
    def _get_images_by_linear_interp(self, nimages, ep0, ep1):
        logger = get_logger(__name__)
        sort_tol = self.get("sort_tol", 0.0)

        try:
            images = ep0.interpolate(ep1, nimages=nimages + 1, autosort_tol=sort_tol)
        except Exception as e:
            if "Unable to reliably match structures " in str(e):
                logger.warn("Auto sorting is turned off because it is unable to match the "
                            "end-point structures!")
                images = ep0.interpolate(ep1, nimages=nimages + 1, autosort_tol=0)
            else:
                raise e

        return images
Example #2
0
    def _get_images_by_linear_interp(self, nimages, ep0, ep1):
        logger = get_logger(__name__)
        sort_tol = self.get("sort_tol", 0.0)

        try:
            images = ep0.interpolate(ep1, nimages=nimages + 1, autosort_tol=sort_tol)
        except Exception as e:
            if "Unable to reliably match structures " in str(e):
                logger.warning("Auto sorting is turned off because it is unable to match the "
                            "end-point structures!")
                images = ep0.interpolate(ep1, nimages=nimages + 1, autosort_tol=0)
            else:
                raise e

        return images
Example #3
0
# coding: utf-8

from __future__ import absolute_import, division, print_function, unicode_literals

from tqdm import tqdm

from matgendb.util import get_database

from pymatgen import Composition

from atomate.vasp.builders.base import AbstractBuilder
from atomate.utils.utils import get_logger

logger = get_logger(__name__)

__author__ = 'Anubhav Jain <*****@*****.**>'


class FileMaterialsBuilder(AbstractBuilder):
    def __init__(self, materials_write, data_file, delimiter=",", header_lines=0):
        """
        Updates the database using a data file. Format of file must be:
        <material_id or formula>, <property>, <value>

        Comment lines should *start* with '#'.

        Args:
            materials_write: mongodb collection for materials (write access needed)
            data_file (str): path to data file
            delimiter (str): delimiter for file parsing
            header_lines (int): number of header lines to skip in data file
Example #4
0
    add_tags,
    add_additional_fields_to_taskdocs,
    add_wf_metadata,
    add_common_powerups,
)
from atomate.vasp.workflows.base.core import get_wf
from atomate.vasp.firetasks.parse_outputs import (
    MagneticDeformationToDB,
    MagneticOrderingsToDB,
)

from pymatgen.alchemy.materials import TransformedStructure

from atomate.utils.utils import get_logger

logger = get_logger(__name__)

from atomate.vasp.config import VASP_CMD, DB_FILE, ADD_WF_METADATA

from atomate.vasp.workflows.presets.scan import wf_scan_opt
from uuid import uuid4
from pymatgen.io.vasp.sets import MPRelaxSet
from pymatgen.core import Lattice, Structure
from pymatgen.analysis.magnetism.analyzer import (
    CollinearMagneticStructureAnalyzer,
    MagneticStructureEnumerator,
)

__author__ = "Matthew Horton"
__maintainer__ = "Matthew Horton"
__email__ = "*****@*****.**"