Analysis Parameters#
Contains analysis parameters, default values, and validation ranges for molecular interaction analysis.
Module Overview#
Analysis parameters for HBAT molecular interaction analysis.
This module contains the AnalysisParameters class that defines all configurable parameters for hydrogen bond, halogen bond, and π interaction analysis.
- class hbat.constants.parameters.ParametersDefault[source]#
Bases:
object
Default values for molecular interaction analysis parameters.
- HB_DISTANCE_CUTOFF = 3.5#
- HB_ANGLE_CUTOFF = 120.0#
- HB_DA_DISTANCE = 4.0#
- XB_DISTANCE_CUTOFF = 4.0#
- XB_ANGLE_CUTOFF = 120.0#
- PI_DISTANCE_CUTOFF = 4.5#
- PI_ANGLE_CUTOFF = 90.0#
- COVALENT_CUTOFF_FACTOR = 0.6#
- ANALYSIS_MODE = 'complete'#
- MAX_BOND_DISTANCE = 2.5#
- MIN_BOND_DISTANCE = 0.5#
- FIX_PDB_ENABLED = True#
- FIX_PDB_METHOD = 'openbabel'#
- FIX_PDB_ADD_HYDROGENS = True#
- FIX_PDB_ADD_HEAVY_ATOMS = False#
- FIX_PDB_REPLACE_NONSTANDARD = False#
- FIX_PDB_REMOVE_HETEROGENS = False#
- FIX_PDB_KEEP_WATER = True#
- class hbat.constants.parameters.AnalysisParameters(hb_distance_cutoff: float = 3.5, hb_angle_cutoff: float = 120.0, hb_donor_acceptor_cutoff: float = 4.0, xb_distance_cutoff: float = 4.0, xb_angle_cutoff: float = 120.0, pi_distance_cutoff: float = 4.5, pi_angle_cutoff: float = 90.0, covalent_cutoff_factor: float = 0.6, analysis_mode: str = 'complete', fix_pdb_enabled: bool = True, fix_pdb_method: str = 'openbabel', fix_pdb_add_hydrogens: bool = True, fix_pdb_add_heavy_atoms: bool = False, fix_pdb_replace_nonstandard: bool = False, fix_pdb_remove_heterogens: bool = False, fix_pdb_keep_water: bool = True)[source]#
Bases:
object
Parameters for molecular interaction analysis.
This class contains all configurable parameters used during molecular interaction analysis, including distance cutoffs, angle thresholds, and analysis modes.
- Parameters:
hb_distance_cutoff (float) – Maximum H…A distance for hydrogen bonds (Å)
hb_angle_cutoff (float) – Minimum D-H…A angle for hydrogen bonds (degrees)
hb_donor_acceptor_cutoff (float) – Maximum D…A distance for hydrogen bonds (Å)
xb_distance_cutoff (float) – Maximum X…A distance for halogen bonds (Å)
xb_angle_cutoff (float) – Minimum C-X…A angle for halogen bonds (degrees)
pi_distance_cutoff (float) – Maximum H…π distance for π interactions (Å)
pi_angle_cutoff (float) – Minimum D-H…π angle for π interactions (degrees)
covalent_cutoff_factor (float) – Factor for covalent bond detection
analysis_mode (str) – Analysis mode (‘local’ or ‘global’)
fix_pdb_enabled (bool) – Enable PDB structure fixing
fix_pdb_method (str) – PDB fixing method (‘openbabel’ or ‘pdbfixer’)
fix_pdb_add_hydrogens (bool) – Add missing hydrogen atoms (both methods)
fix_pdb_add_heavy_atoms (bool) – Add missing heavy atoms (PDBFixer only)
fix_pdb_replace_nonstandard (bool) – Replace nonstandard residues (PDBFixer only)
fix_pdb_remove_heterogens (bool) – Remove heterogens (PDBFixer only)
fix_pdb_keep_water (bool) – Keep water when removing heterogens (PDBFixer only)
- validate() List[str] [source]#
Validate parameter values and return list of validation errors.
Checks all parameter values for validity and logical consistency. Returns a list of validation error messages, empty list if all valid.
- Returns:
List of validation error messages
- Return type:
List[str]
- __init__(hb_distance_cutoff: float = 3.5, hb_angle_cutoff: float = 120.0, hb_donor_acceptor_cutoff: float = 4.0, xb_distance_cutoff: float = 4.0, xb_angle_cutoff: float = 120.0, pi_distance_cutoff: float = 4.5, pi_angle_cutoff: float = 90.0, covalent_cutoff_factor: float = 0.6, analysis_mode: str = 'complete', fix_pdb_enabled: bool = True, fix_pdb_method: str = 'openbabel', fix_pdb_add_hydrogens: bool = True, fix_pdb_add_heavy_atoms: bool = False, fix_pdb_replace_nonstandard: bool = False, fix_pdb_remove_heterogens: bool = False, fix_pdb_keep_water: bool = True) None #
- class hbat.constants.parameters.ParameterRanges[source]#
Bases:
object
Valid ranges for analysis parameters.
- MIN_DISTANCE = 0.5#
- MAX_DISTANCE = 6#
- MIN_ANGLE = 0.0#
- MAX_ANGLE = 180.0#
- MIN_COVALENT_FACTOR = 0.0#
- MAX_COVALENT_FACTOR = 1.0#
- class hbat.constants.parameters.PDBFixingModes[source]#
Bases:
object
Available PDB structure fixing modes.
- OPENBABEL = 'openbabel'#
- PDBFIXER = 'pdbfixer'#
- ALL_METHODS = ['openbabel', 'pdbfixer']#
- ADD_HYDROGENS = 'add_hydrogens'#
- ADD_HEAVY_ATOMS = 'add_heavy_atoms'#
- REPLACE_NONSTANDARD = 'replace_nonstandard'#
- REMOVE_HETEROGENS = 'remove_heterogens'#
- OPENBABEL_OPERATIONS = ['add_hydrogens']#
- PDBFIXER_OPERATIONS = ['add_hydrogens', 'add_heavy_atoms', 'replace_nonstandard', 'remove_heterogens']#
Classes#
Parameters Default Values#
- class hbat.constants.parameters.ParametersDefault[source]#
Bases:
object
Default values for molecular interaction analysis parameters.
- HB_DISTANCE_CUTOFF = 3.5#
- HB_ANGLE_CUTOFF = 120.0#
- HB_DA_DISTANCE = 4.0#
- XB_DISTANCE_CUTOFF = 4.0#
- XB_ANGLE_CUTOFF = 120.0#
- PI_DISTANCE_CUTOFF = 4.5#
- PI_ANGLE_CUTOFF = 90.0#
- COVALENT_CUTOFF_FACTOR = 0.6#
- ANALYSIS_MODE = 'complete'#
- MAX_BOND_DISTANCE = 2.5#
- MIN_BOND_DISTANCE = 0.5#
- FIX_PDB_ENABLED = True#
- FIX_PDB_METHOD = 'openbabel'#
- FIX_PDB_ADD_HYDROGENS = True#
- FIX_PDB_ADD_HEAVY_ATOMS = False#
- FIX_PDB_REPLACE_NONSTANDARD = False#
- FIX_PDB_REMOVE_HETEROGENS = False#
- FIX_PDB_KEEP_WATER = True#
Analysis Parameters#
- class hbat.constants.parameters.AnalysisParameters(hb_distance_cutoff: float = 3.5, hb_angle_cutoff: float = 120.0, hb_donor_acceptor_cutoff: float = 4.0, xb_distance_cutoff: float = 4.0, xb_angle_cutoff: float = 120.0, pi_distance_cutoff: float = 4.5, pi_angle_cutoff: float = 90.0, covalent_cutoff_factor: float = 0.6, analysis_mode: str = 'complete', fix_pdb_enabled: bool = True, fix_pdb_method: str = 'openbabel', fix_pdb_add_hydrogens: bool = True, fix_pdb_add_heavy_atoms: bool = False, fix_pdb_replace_nonstandard: bool = False, fix_pdb_remove_heterogens: bool = False, fix_pdb_keep_water: bool = True)[source]#
Bases:
object
Parameters for molecular interaction analysis.
This class contains all configurable parameters used during molecular interaction analysis, including distance cutoffs, angle thresholds, and analysis modes.
- Parameters:
hb_distance_cutoff (float) – Maximum H…A distance for hydrogen bonds (Å)
hb_angle_cutoff (float) – Minimum D-H…A angle for hydrogen bonds (degrees)
hb_donor_acceptor_cutoff (float) – Maximum D…A distance for hydrogen bonds (Å)
xb_distance_cutoff (float) – Maximum X…A distance for halogen bonds (Å)
xb_angle_cutoff (float) – Minimum C-X…A angle for halogen bonds (degrees)
pi_distance_cutoff (float) – Maximum H…π distance for π interactions (Å)
pi_angle_cutoff (float) – Minimum D-H…π angle for π interactions (degrees)
covalent_cutoff_factor (float) – Factor for covalent bond detection
analysis_mode (str) – Analysis mode (‘local’ or ‘global’)
fix_pdb_enabled (bool) – Enable PDB structure fixing
fix_pdb_method (str) – PDB fixing method (‘openbabel’ or ‘pdbfixer’)
fix_pdb_add_hydrogens (bool) – Add missing hydrogen atoms (both methods)
fix_pdb_add_heavy_atoms (bool) – Add missing heavy atoms (PDBFixer only)
fix_pdb_replace_nonstandard (bool) – Replace nonstandard residues (PDBFixer only)
fix_pdb_remove_heterogens (bool) – Remove heterogens (PDBFixer only)
fix_pdb_keep_water (bool) – Keep water when removing heterogens (PDBFixer only)
- validate() List[str] [source]#
Validate parameter values and return list of validation errors.
Checks all parameter values for validity and logical consistency. Returns a list of validation error messages, empty list if all valid.
- Returns:
List of validation error messages
- Return type:
List[str]
- __init__(hb_distance_cutoff: float = 3.5, hb_angle_cutoff: float = 120.0, hb_donor_acceptor_cutoff: float = 4.0, xb_distance_cutoff: float = 4.0, xb_angle_cutoff: float = 120.0, pi_distance_cutoff: float = 4.5, pi_angle_cutoff: float = 90.0, covalent_cutoff_factor: float = 0.6, analysis_mode: str = 'complete', fix_pdb_enabled: bool = True, fix_pdb_method: str = 'openbabel', fix_pdb_add_hydrogens: bool = True, fix_pdb_add_heavy_atoms: bool = False, fix_pdb_replace_nonstandard: bool = False, fix_pdb_remove_heterogens: bool = False, fix_pdb_keep_water: bool = True) None #
Parameter Validation Ranges#
PDB Fixing Modes#
- class hbat.constants.parameters.PDBFixingModes[source]#
Bases:
object
Available PDB structure fixing modes.
- OPENBABEL = 'openbabel'#
- PDBFIXER = 'pdbfixer'#
- ALL_METHODS = ['openbabel', 'pdbfixer']#
- ADD_HYDROGENS = 'add_hydrogens'#
- ADD_HEAVY_ATOMS = 'add_heavy_atoms'#
- REPLACE_NONSTANDARD = 'replace_nonstandard'#
- REMOVE_HETEROGENS = 'remove_heterogens'#
- OPENBABEL_OPERATIONS = ['add_hydrogens']#
- PDBFIXER_OPERATIONS = ['add_hydrogens', 'add_heavy_atoms', 'replace_nonstandard', 'remove_heterogens']#