How to use the ase.calculators.calculator.Calculator.__init__ function in ase

To help you get started, we’ve selected a few ase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github isayev / ASE_ANI / ani.py View on Github external
def __init__(self, **kwargs):
        Calculator.__init__(self, **kwargs)
github isayev / ASE_ANI / ani.py View on Github external
def __init__(self, **kwargs):
        Calculator.__init__(self, **kwargs)
github libAtoms / matscipy / matscipy / calculators / mcfm / calculator.py View on Github external
# Set the verbose status
        self.verbose = verbose
        self.debug_cluster_carving = False

        # Set storing atoms - slows down evaluation but enables check_state funtion
        self.enable_check_state = enable_check_state

        # Flag for warmup
        self.warmup = False

        # Init ASE calculator as a parent class
        self._calc_args = {}
        self._default_properties = []
        self.calculation_always_required = calculation_always_required
        Calculator.__init__(self)

        # If an atoms objct has been specified, attach a copy to the calculator to facilitate
        # the proper use of meth:check_state()
        if atoms is not None:
            self.atoms = atoms.copy()
            atoms.set_calculator(self)

        # Set some flags and values
        self.errors = {}
        self.calculate_errors = calculate_errors
        self.change_bonds = change_bonds
        self.buffer_hops = buffer_hops
        self.conserve_momentum = False
        self.long_range_weight = 0.0
        self.doParallel = True
github rosswhitfield / ase / ase / calculators / mixed.py View on Github external
def __init__(self, calc1, calc2, weight1, weight2):
        Calculator.__init__(self)
        self.calc1 = calc1
        self.calc2 = calc2
        self.weight1 = weight1
        self.weight2 = weight2
github libAtoms / matscipy / matscipy / fracture_mechanics / idealbrittlesolid.py View on Github external
def __init__(self, *args, **kwargs):
        Calculator.__init__(self, *args, **kwargs)
        self.crystal_bonds = 0
github rosswhitfield / ase / ase / calculators / qmmm.py View on Github external
self.interaction = interaction
        self.vacuum = vacuum
        self.embedding = embedding

        self.qmatoms = None
        self.mmatoms = None
        self.mask = None
        self.center = None  # center of QM atoms in QM-box

        self.name = '{0}+{1}+{2}'.format(qmcalc.name,
                                         interaction.name,
                                         mmcalc.name)

        self.output = convert_string_to_fd(output)

        Calculator.__init__(self)
github rosswhitfield / ase / ase / calculators / morse.py View on Github external
def __init__(self, **kwargs):
        """
        Parameters
        ----------
        epsilon: float
          Absolute minimum depth, default 1.0
        r0: float
          Minimum distance, default 1.0
        rho0: float
          Exponential prefactor. The force constant in the potential minimum
          is k = 2 * epsilon * (rho0 / r0)**2, default 6.0
        """
        Calculator.__init__(self, **kwargs)
github rosswhitfield / ase / ase / optimize / activelearning / gp / calculator.py View on Github external
def __init__(self, train_images=None, prior=None,
                 update_prior_strategy='maximum', weight=1.,
                 fit_weight=None, scale=0.4, noise=0.005,
                 update_hyperparams=False,
                 batch_size=5, bounds=None, kernel=None,
                 max_train_data=None, force_consistent=None,
                 max_train_data_strategy='nearest_observations',
                 wrap_positions=False, calculate_uncertainty=True,
                 mask_constraints = True,
                 **kwargs):

        Calculator.__init__(self, **kwargs)
        self.prior = prior
        self.strategy = update_prior_strategy
        self.weight = weight
        self.scale = scale
        self.noise = noise
        self.update_hp = update_hyperparams
        self.nbatch = batch_size
        self.hyperbounds = bounds
        self.fc = force_consistent
        self.max_data = max_train_data
        self.max_data_strategy = max_train_data_strategy
        self.kernel = kernel
        self.train_images = train_images
        self.old_train_images = []
        self.prev_train_y = []  # Do not retrain model if same data.
        self.calculate_uncertainty = calculate_uncertainty
github rosswhitfield / ase / ase / optimize / bayesian / model.py View on Github external
def __init__(self, parameters, get_variance=False, **kwargs):

        Calculator.__init__(self, **kwargs)
        self.gp = parameters
        self.get_variance = get_variance
github rosswhitfield / ase / ase / calculators / vdwcorrection.py View on Github external
self.vdWDB_alphaC6 = vdWDB_alphaC6
        self.Rmax = Rmax
        self.Ldecay = Ldecay
        self.atoms = None

        if sR is None:
            try:
                xc_name = self.calculator.get_xc_functional()
                self.sR = sR_opt[xc_name]
            except KeyError:
                raise ValueError('Tkatchenko-Scheffler dispersion correction not implemented for %s functional' % xc_name)
        else:
            self.sR = sR
        self.d = 20

        Calculator.__init__(self)