allfunc module
grouped_basisの作成は、複雑なのは自作してもらうかto be continued, 金属種ごとくらいなら実装する?金属間化合物や酸化物で重要になるが、今の間はしない。後ほど行う。 サイトの違いはgrouped_basisで対応できる ひとまずCu-Coに速く映りたい Cu111から 七種君にもやることを確認。急いで毎日やる logger infoとdebugを書いていく 最後のチェックがてら。読みにくいところは修正の余地ありなのでそのチェックにも
- allfunc.storage_path_initialize(config)[ソース]
- input:
config: Prepare_Configクラスのもの。
- description:
storage_pathを設定し、hostの構造と使用するconfigを保存する(ある意味、その時々の状況のセーブになっている)
- allfunc.output_symmetry(config, storage_path=None, host=None)[ソース]
- input:
config: Prepare_Configクラスのもの。 storage_path: configで自動設定されるが、別用途で使いたいときのため host: 同上, 設定の時はase.Atoms class
- output:
rotations: 回転対称操作 translations: 並進対称操作
- description:
host.cifの対称性を確認するとともに対称操作を返す
- allfunc.convert_nanosheet_into_slab(config, host=None)[ソース]
- input:
config: Prepare_Configクラスのもの。 host: configで自動設定されるが、別用途で使いたいときのため。設定の時はase.Atoms class
- output:
None
- description:
ナノシートモデル(上下とも緩和)をスラブモデル(固定層を設定)に変換。output_symmetryに入れる前に行うことでスラブモデルの場合はz方向に少し原子を動かすことでz方向の対称性をなくす。
- allfunc.symmetry_equivalent_arrange(host, symmetry)[ソース]
- input:
host: 対称性を明らかにしたい構造。 symmetry: spglib.get_symmetry_datasetの結果か、dict:{"rotations": output_symmetry(config)[0],"translations": output_symmetry(config)[1]}でOK
- output:
symmtetry_equivalent_arrange_index: 並進回転対象運動後の原子位置の移動先
- description:
host.cifの対称性を確認するとともに対称操作を返す
- allfunc.visualize_symmetry_operation(config)[ソース]
- input:
config: Prepare_Configクラスのもの。
- output:
None
- description:
visualizeフォルダにsymmetry_operationフォルダを作り、対称操作の結果を記したcifファイルを保存する
- class allfunc.ClusterExpansionSettings_nowarning(prim, concentration, size, supercell_factor=27, db_name='clease.db', max_cluster_dia=(5.0, 5.0, 5.0), include_background_atoms=False, basis_func_type='polynomial')[ソース]
ベースクラス:
ClusterExpansionSettings- __init__(prim, concentration, size, supercell_factor=27, db_name='clease.db', max_cluster_dia=(5.0, 5.0, 5.0), include_background_atoms=False, basis_func_type='polynomial')[ソース]
- property index_by_basis
- property all_cf_names
- property cluster_mng
- class allfunc.ClusterManager_each_sublattice(prim_cell, background_syms=None)[ソース]
ベースクラス:
ClusterManager
- allfunc.CESlab_nowarning(conventional_cell, miller, basis_elements, ranges, grouped_basis, vacuum_thickness, model_type, size, **kwargs)[ソース]
- パラメータ:
conventional_cell -- Bulk lattice structure. Note that the unit-cell must be the conventional cell - not the primitive cell. One can also give the chemical symbol as a string, in which case the correct bulk lattice will be generated automatically.
miller -- Surface normal in Miller indices (h,k,l).
concentration -- Class for restricting the concentrations
size -- Size of the simulations cell. The third number represents the number of layers. The two first are repetitions of the in-plane unit vectors
For more kwargs, see docstring of
clease.settings.ClusterExpansionSettings.
- class allfunc.CSV_Reader(config, **kwargs)[ソース]
ベースクラス:
Calculator- implemented_properties: List[str] = ['energy']
Properties calculator can handle (energy, forces, ...)
- nolabel = True
- default_parameters: Dict[str, Any] = {'asap_cutoff': False}
Default parameters
- __init__(config, **kwargs)[ソース]
Basic calculator implementation.
- restart: str
Prefix for restart file. May contain a directory. Default is None: don't restart.
- ignore_bad_restart_file: bool
Deprecated, please do not use. Passing more than one positional argument to Calculator() is deprecated and will stop working in the future. Ignore broken or missing restart file. By default, it is an error if the restart file is missing or broken.
- directory: str or PurePath
Working directory in which to read and write files and perform calculations.
- label: str
Name used for all files. Not supported by all calculators. May contain a directory, but please use the directory parameter for that instead.
- atoms: Atoms object
Optional Atoms object to which the calculator will be attached. When restarting, atoms will get its positions and unit-cell updated from file.
- calculate(atoms=None, properties=['energy'], system_changes=['positions', 'numbers', 'cell', 'pbc', 'initial_charges', 'initial_magmoms'])[ソース]
Do the calculation.
- properties: list of str
List of what needs to be calculated. Can be any combination of 'energy', 'forces', 'stress', 'dipole', 'charges', 'magmom' and 'magmoms'.
- system_changes: list of str
List of what has changed since last calculation. Can be any combination of these six: 'positions', 'numbers', 'cell', 'pbc', 'initial_charges' and 'initial_magmoms'.
Subclasses need to implement this, but can ignore properties and system_changes if they want. Calculated properties should be inserted into results dictionary like shown in this dummy example:
self.results = {'energy': 0.0, 'forces': np.zeros((len(atoms), 3)), 'stress': np.zeros(6), 'dipole': np.zeros(3), 'charges': np.zeros(len(atoms)), 'magmom': 0.0, 'magmoms': np.zeros(len(atoms))}
The subclass implementation should first call this implementation to set the atoms attribute and create any missing directories.
- class allfunc.NewStructures_each_sublattice(config, settings, generation_number=None, struct_per_gen=5, check_db=True)[ソース]
ベースクラス:
NewStructures- generate_probe_structure(atoms=None, init_temp=None, final_temp=None, num_temp=5, num_steps_per_temp=1000, approx_mean_var=True, num_samples_var=10000)[ソース]
Generate a probe structure according to PRB 80, 165122 (2009).
- パラメータ:
atoms -- ASE Atoms object with the desired cell size and shape of the new structure.
init_temp -- initial temperature (does not represent physical temperature)
final_temp -- final temperature (does not represent physical temperature)
num_temp -- number of temperatures to be used in simulated annealing
num_steps_per_temp -- number of steps in simulated annealing
approx_mean_var --
whether or not to use a spherical and isotropical distribution approximation scheme for determining the mean variance.
- -True: Assume a spherical and isotropical distribution of
structures in the configurational space. Corresponds to eq.4 in PRB 80, 165122 (2009)
- -False: Use sigma and mu of eq.3 in PRB 80, 165122 (2009)
to characterize the distribution of structures in population. Requires pre-sampling of random structures before generating probe structures. sigma and mu are generated and stored in 'probe_structure-sigma_mu.npz' file.
num_samples_var -- number of samples to be used in determining signam and mu. Only used when approx_mean_var is True.
- Note: init_temp and final_temp are automatically generated if either
one of the two is not specified.
- class allfunc.ProbeStructure_each_sublattice(config, settings, atoms, init_temp=None, final_temp=None, num_temp=5, num_steps_per_temp=1000, approx_mean_var=False)[ソース]
ベースクラス:
ProbeStructure
- class allfunc.Slab_Processor(cif_list=None, model_type=None, vacuum=None, config=None, leyer_number=None)[ソース]
ベースクラス:
object
- class allfunc.ClusterExpansionExcutor(config, seed=None, confirm_max_cluster_size=True)[ソース]
ベースクラス:
object- __init__(config, seed=None, confirm_max_cluster_size=True)[ソース]
- input:
config: Prepare_Configクラスのもの。 seed: 構造生成をそろえて比較したいとき用
- output:
None
- description:
CEの準備をします。
- add_further_model(struct_per_gen=1, generation_number=None, mode=None, init_temp=2000, final_temp=1, num_temp=10, num_steps_per_temp=5000, random_composition=True, ECI_file_name='ECI.json')[ソース]
- class allfunc.Fixstars_Amplify(config, QUBO, constant, qubit_dict)[ソース]
ベースクラス:
Annealing_Machine_Converter