<commit_before>#!/usr/bin/env python

"""
This module defines classes for point defects
"""
from __future__ import division

__author__ = "<NAME>"
__copyright__ = "Copyright 2014, The Materials Project"
__maintainier__ = "<NAME>"
__email__ = "<EMAIL>"
__date__ = "Jul 1 2014"

from pymatgen.analysis.defects.point_defects import Vacancy, \
    ValenceIonicRadiusEvaluator, Interstitial
from pymatgen.transformations.transformation_abc import AbstractTransformation
from pymatgen.transformations.standard_transformations import \
    AutoOxiStateDecorationTransformation

class VacancyTransformation(AbstractTransformation):
    """
    Generates vacancy structures
    """
    def __init__(self, supercell_dim, valences=None, radii=None):
        """
        :param supecell_dim: Supercell scaling matrix
        :return:
        """
        self.supercell_dim = supercell_dim
        self.valences = valences
        self.radii = radii

    def apply_transformation(self,structure):
        """
        :param structure:
        :return:
            scs: Supercells with one symmetrically distinct vacancy in each
                 structure. The first supercell doesn't contain any
                 vacancy.
        """
        vac = Vacancy(structure,self.valences,self.radii)
        #print vac.enumerate_defectsites()
        scs = vac.make_supercells_with_defects(self.supercell_dim)
        return scs
<commit_msg>Minor edits.<commit_after>#!/usr/bin/env python

"""
This module defines classes for point defects
"""
from __future__ import division

__author__ = "<NAME>"
__copyright__ = "Copyright 2014, The Materials Project"
__maintainier__ = "<NAME>"
__email__ = "<EMAIL>"
__date__ = "Jul 1 2014"

from pymatgen.analysis.defects.point_defects import Vacancy, \
    ValenceIonicRadiusEvaluator, Interstitial
from pymatgen.transformations.transformation_abc import AbstractTransformation


class VacancyTransformation(AbstractTransformation):
    """
    Generates vacancy structures
    """
    def __init__(self, supercell_dim, valences=None, radii=None):
        """
        :param supecell_dim: Supercell scaling matrix
        :return:
        """
        self.supercell_dim = supercell_dim
        self.valences = valences
        self.radii = radii

    def apply_transformation(self,structure):
        """
        :param structure:
        :return:
            scs: Supercells with one symmetrically distinct vacancy in each
                 structure. The first supercell doesn't contain any
                 vacancy.
        """
        vac = Vacancy(structure,self.valences,self.radii)
        #print vac.enumerate_defectsites()
        scs = vac.make_supercells_with_defects(self.supercell_dim)
        return scs

{'fraction_non_alphanumeric': 0.08263254113345521, 'fraction_numerical': 0.006581352833638025, 'mean_word_length': 3.1204819277108435, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5904373', 'n_tokens_mistral': 819, 'n_tokens_neox': 765, 'n_words': 187}