matlanticgrrm.atomslist のソースコード

# from pfp_api_client.pfp.calculators.ase_calculator import ASECalculator
# from pfp_api_client.pfp.estimator import Estimator, EstimatorCalcMode

def pfp_calculator():
    estimator = Estimator(calc_mode=EstimatorCalcMode.CRYSTAL_PLUS_D3)
    calc = ASECalculator(estimator)
    return calc

[ドキュメント]def copy(atoms_list): """ase.Atomsのリストをコピーする Parameters: atoms_list: list of ase.Atoms ase.Atomsを要素とするリスト. """ return [atoms.copy() if atoms else None for atoms in atoms_list]
[ドキュメント]def set_calculator(atoms_list,func): """各要素(構造)にcalculatorを設定する. Parameters: atoms_list: list of ase.Atoms ase.Atomsを要素とするリスト. func: calculatorを返す関数. """ for atoms in atoms_list: if atoms: atoms.calc = func()
[ドキュメント]def set_constraints(atoms_list,fix_atoms): """各要素(構造)にconstraint(FixAtoms)を設定する. Parameters: atoms_list: list of ase.Atoms ase.Atomsを要素とするリスト. fix_atoms: ase.constraints.FixAtoms FixAtoms """ for atoms in atoms_list: if atoms: atoms.set_constraint(fix_atoms)
[ドキュメント]def del_constraints(atoms_list): """全てのconstraintsを削除する """ for atoms in atoms_list: if atoms: del atoms.constraints
[ドキュメント]def set_pbc(atoms_list,pbc): """各要素(構造)にconstraint(FixAtoms)を設定する. Parameters: atoms_list: list of ase.Atoms ase.Atomsを要素とするリスト. pbc: bool or list Trueにすると全ての要素に周期境界条件を設定できる """ for atoms in atoms_list: if atoms: atoms.set_pbc(pbc)
[ドキュメント]def set_cell(atoms_list,cell, scale_atoms=False, apply_constraint=True): """各要素(構造)にconstraint(FixAtoms)を設定する. Parameters: atoms_list: list of ase.Atoms ase.Atomsを要素とするリスト. cell: Cell object Cellオブジェクト """ for atoms in atoms_list: if atoms: atoms.set_cell(cell, scale_atoms=scale_atoms, apply_constraint=apply_constraint)
[ドキュメント]def translate(atoms_list,displacement): """並行移動する Parameters: atoms_list: list of ase.Atoms ase.Atomsを要素とするリスト. displacement: list 1*3のリスト[x(float),y(float),z(float)]の場合,全ての構造を同じ変位で並行移動させる. [1*3]*nの2Dリストで与えた場合,各要素ごとに異なる変位で並行移動させることができる. Note: 破壊的メソッドなので注意!!.特にnote-book形式で実行する場合は慎重に行なう """ if type(displacement[0]) == list: """各要素に異なる並行移動を行なう""" for atoms,d in zip(atoms_list,displacement): if atoms: atoms.translate(d) else: for atoms in atoms_list: if atoms: atoms.translate(displacement)
[ドキュメント]def get_potential_energy(atoms_list): """各要素(構造)のpotential_energyを出力 """ return [atoms.get_potential_energy() if atoms else None for atoms in atoms_list]
[ドキュメント]def get_total_energy(atoms_list): """各要素(構造)のtotal_energyを出力 """ return [atoms.get_total_energy() if atoms else None for atoms in atoms_list]
[ドキュメント]def get_forces(atoms_list): """各要素(構造)のforcesを出力 """ return [atoms.get_forces() if atoms else None for atoms in atoms_list]
[ドキュメント]def get_positions(atoms_list): """各要素(構造)の座標を出力 """ return [atoms.get_positions() if atoms else None for atoms in atoms_list]
[ドキュメント]def get_kinetic_energy(atoms_list): """各要素(構造)のkinetic_energyを出力 """ return [atoms.get_kinetic_energy() if atoms else None for atoms in atoms_list]