ichor.core.files.aimall package
Submodules
ichor.core.files.aimall.ab_int module
- class AbInt(path: str | Path)
-
- a: str
- b: str
- classmethod check_path(path: Path) bool
Checks the suffix of the given path matches the filetype associated with class that subclasses from File :param path: A Path object to check :return: True if the Path object has the same suffix as the class filetype, False otherwise
- property e_inter
- iqa_diatomic_contributions: Dict[str, float]
- path: Path | str
- property raw_data: dict
Returns the raw data associated with the current object.
- Returns:
_description_
- Return type:
dict
- total_time: int
ichor.core.files.aimall.aim module
- class Aim(path: Path)
Bases:
ReadFile,dictClass which wraps around an AIMAll output file, where settings and timings are written out to. The .int files are parsed separately in the INT/INTs classes.
- cwd: Path
- extout_path: Path
- license_check_succeeded: bool | None
- mgp_path: Path
- mgpviz_path: Path
- nacps: int
- nbcps: int
- nccps: int
- nnacps: int
- nproc: int
- nrcps: int
- output_file: Path
- path: Path | str
- sum_path: Path
- sumviz_path: Path
- wfn_path: Path
- class AimAtom(atom_name: str | None = None, inp_file: Path | None = None, int_file: Path | None = None, time_taken: int | None = None, integration_error: float | None = None)
Bases:
objectHelper class which stores information for each atom which was in the AIMAll output file. Information such as timing required to integrate atom, as well as the integration error are stored.
ichor.core.files.aimall.int module
- class CriticalPoint(index: int, ty: CriticalPointType, x, y, z, connecting_atoms: List[str])
Bases:
Coordinates3D
- class CriticalPointType(value)
Bases:
EnumAn enumeration.
- Bond = 'BCP'
- Cage = 'CCP'
- Ring = 'RCP'
- class Int(path: Path | str)
-
Wraps around one .int file which is generated by AIMALL for every atom in the system.
- Parameters:
path – The Path object corresponding to an .int file
parent – An Atoms instance which holds the coordinate information for all atoms in the system. This information is needed to form the C matrix when rotating multipoles from the global to the local frame. Note that the Atoms instance must contain the same atom name (i.e. atom type + atom index), so that rotating of the multipoles can happen.
- atom_name: str
- property atom_num: int
Returns the atom index in the system. (atom indices in atom names start at 1)
- basin_integration_results: Dict[str, float]
- property bond_critical_points: List[CriticalPoint]
Returns list of bond critical points
- property cage_critical_points: List[CriticalPoint]
Returns list of ring critical points
- classmethod check_path(path: Path) bool
Checks the path is the same as for .int file. The _ in the .int file indicates AB interactions, which have to be read in differently because the file is strucutred differently.
- critical_points: List[CriticalPoint]
- current_directory: Path
- dft_model: str
- property dipole_mag: float
Returns the magnitude of the dipole moment of the topological atom. The magnitude of the vector is not affected by the rotation of multipoles.
- property e_intra: float
- property global_multipole_moments: dict
Returns the spherical multipole moments calculated by AIMAll. .. note:
These are in the global (Cartesian) frame, i.e. they have NOT been rotated using ALF. Rotation is done by converting to Cartesian, rotating, and then converting back to spherical.
- global_spherical_multipoles: Dict[str, float]
- property i: int
Returns the atom index in the system. (atom indices in atom names start at 1)
- inp_file_path: Path
- property integration_error: float
The integration error can tell you if a point has been decomposed into topological atoms correctly. A large integration error signals that the point might not be suitable for training as the AIMALL IQA/multipole moments might be inaccurate.
- property iqa: float
Returns the IQA energy of the topological atom that was calculated for this topological atom (since 1 .int file is written for each topological atom).
- iqa_energy_components: Dict[str, float]
- local_spherical_multipoles(C: ndarray) Dict[str, float]
Rotates global spherical multipoles into local spherical multipoles. Optionally a rotation matrix can be passed in. Otherwise, the wfn file associated with this int file (as read in from the int file) will be used (if it exists).
- Parameters:
C – Rotation matrix to be used to rotate multipoles.
- Raises:
FileNotFoundError – If no C_matrix is passed in and the wfn file associated with the int file does not exist. Then we cannot calculate multipoles.
- net_charge: float
- out_file_path: Path
- path: Path | str
- property q: float
Returns the point charge (monopole moment) of the topological atom.
- property q00: float
Returns the point charge (monopole moment) of the topological atom.
- property raw_data
Get properties which we are interested in machine learning from the INT file. Rotate multipoles using a given C matrix.
- property ring_critical_points: List[CriticalPoint]
Returns list of ring critical points
- title: str
- total_time: int
- wfn_file_path: Path
ichor.core.files.aimall.ints module
- class IntDirectory(path: Path | str)
Bases:
HasData,AnnotatedDirectoryWraps around a directory which contains all .int files for the system.
- Parameters:
path – The Path corresponding to a directory holding .int files
parent – An Atoms instance that holds coordinate information for all the atoms in the system. Things like XYZ and GJF hold geometry.
- classmethod check_path(path: Path) bool
Checks if the given Path instance has _atomicfiles in its name.
- contents = {'interaction_ints': <class 'ichor.core.files.aimall.ab_int.AbInt'>, 'ints': <class 'ichor.core.files.aimall.int.Int'>}
- get(pattern: str, default=None)
Does the same thing as get of a dictionary, returning a default is KeyError
- path: Path | str
- properties(C_dict: Dict[str, ndarray]) Dict[str, Dict[str, float]]
Returns a dictionary of dictionaries containing atom names as keys an a dictionary as value. The value dictionary contains the properties we are interested in machine learning as keys and the values of these properties as floats. A list of C matrices needs to be passed in because we must rotate the multipoles.
- Parameters:
C_list – A list of rotation matrices, each of the atoms
- Raises:
FileNotFoundError – If no C_matrix is passed in and the wfn file associated with the int file does not exist. Then we cannot calculate multipoles.
- property raw_data: dict
Returns data associated with each atom. If interaction ints are present, also adds these to the dictionary.
Module contents
- class AbInt(path: str | Path)
-
- a: str
- b: str
- classmethod check_path(path: Path) bool
Checks the suffix of the given path matches the filetype associated with class that subclasses from File :param path: A Path object to check :return: True if the Path object has the same suffix as the class filetype, False otherwise
- property e_inter
- iqa_diatomic_contributions: Dict[str, float]
- path: Path | str
- property raw_data: dict
Returns the raw data associated with the current object.
- Returns:
_description_
- Return type:
dict
- total_time: int
- class Aim(path: Path)
Bases:
ReadFile,dictClass which wraps around an AIMAll output file, where settings and timings are written out to. The .int files are parsed separately in the INT/INTs classes.
- cwd: Path
- extout_path: Path
- license_check_succeeded: bool | None
- mgp_path: Path
- mgpviz_path: Path
- nacps: int
- nbcps: int
- nccps: int
- nnacps: int
- nproc: int
- nrcps: int
- output_file: Path
- path: Path | str
- sum_path: Path
- sumviz_path: Path
- wfn_path: Path
- class Int(path: Path | str)
-
Wraps around one .int file which is generated by AIMALL for every atom in the system.
- Parameters:
path – The Path object corresponding to an .int file
parent – An Atoms instance which holds the coordinate information for all atoms in the system. This information is needed to form the C matrix when rotating multipoles from the global to the local frame. Note that the Atoms instance must contain the same atom name (i.e. atom type + atom index), so that rotating of the multipoles can happen.
- atom_name: str
- property atom_num: int
Returns the atom index in the system. (atom indices in atom names start at 1)
- basin_integration_results: Dict[str, float]
- property bond_critical_points: List[CriticalPoint]
Returns list of bond critical points
- property cage_critical_points: List[CriticalPoint]
Returns list of ring critical points
- classmethod check_path(path: Path) bool
Checks the path is the same as for .int file. The _ in the .int file indicates AB interactions, which have to be read in differently because the file is strucutred differently.
- critical_points: List[CriticalPoint]
- current_directory: Path
- dft_model: str
- property dipole_mag: float
Returns the magnitude of the dipole moment of the topological atom. The magnitude of the vector is not affected by the rotation of multipoles.
- property e_intra: float
- property global_multipole_moments: dict
Returns the spherical multipole moments calculated by AIMAll. .. note:
These are in the global (Cartesian) frame, i.e. they have NOT been rotated using ALF. Rotation is done by converting to Cartesian, rotating, and then converting back to spherical.
- global_spherical_multipoles: Dict[str, float]
- property i: int
Returns the atom index in the system. (atom indices in atom names start at 1)
- inp_file_path: Path
- property integration_error: float
The integration error can tell you if a point has been decomposed into topological atoms correctly. A large integration error signals that the point might not be suitable for training as the AIMALL IQA/multipole moments might be inaccurate.
- property iqa: float
Returns the IQA energy of the topological atom that was calculated for this topological atom (since 1 .int file is written for each topological atom).
- iqa_energy_components: Dict[str, float]
- local_spherical_multipoles(C: ndarray) Dict[str, float]
Rotates global spherical multipoles into local spherical multipoles. Optionally a rotation matrix can be passed in. Otherwise, the wfn file associated with this int file (as read in from the int file) will be used (if it exists).
- Parameters:
C – Rotation matrix to be used to rotate multipoles.
- Raises:
FileNotFoundError – If no C_matrix is passed in and the wfn file associated with the int file does not exist. Then we cannot calculate multipoles.
- net_charge: float
- out_file_path: Path
- path: Path | str
- property q: float
Returns the point charge (monopole moment) of the topological atom.
- property q00: float
Returns the point charge (monopole moment) of the topological atom.
- property raw_data
Get properties which we are interested in machine learning from the INT file. Rotate multipoles using a given C matrix.
- property ring_critical_points: List[CriticalPoint]
Returns list of ring critical points
- title: str
- total_time: int
- wfn_file_path: Path
- class IntDirectory(path: Path | str)
Bases:
HasData,AnnotatedDirectoryWraps around a directory which contains all .int files for the system.
- Parameters:
path – The Path corresponding to a directory holding .int files
parent – An Atoms instance that holds coordinate information for all the atoms in the system. Things like XYZ and GJF hold geometry.
- classmethod check_path(path: Path) bool
Checks if the given Path instance has _atomicfiles in its name.
- contents = {'interaction_ints': <class 'ichor.core.files.aimall.ab_int.AbInt'>, 'ints': <class 'ichor.core.files.aimall.int.Int'>}
- get(pattern: str, default=None)
Does the same thing as get of a dictionary, returning a default is KeyError
- path: Path | str
- properties(C_dict: Dict[str, ndarray]) Dict[str, Dict[str, float]]
Returns a dictionary of dictionaries containing atom names as keys an a dictionary as value. The value dictionary contains the properties we are interested in machine learning as keys and the values of these properties as floats. A list of C matrices needs to be passed in because we must rotate the multipoles.
- Parameters:
C_list – A list of rotation matrices, each of the atoms
- Raises:
FileNotFoundError – If no C_matrix is passed in and the wfn file associated with the int file does not exist. Then we cannot calculate multipoles.
- property raw_data: dict
Returns data associated with each atom. If interaction ints are present, also adds these to the dictionary.