4.2. ligandparam.stages.charge
- class ligandparam.stages.charge.StageNormalizeCharge(stage_name: str, main_input: Path | str, cwd: Path | str, *args, **kwargs)[source]
Bases:
AbstractStageThis class normalizes the charges to the net charge.
This class works by calculating the charge difference, and then normalizing the charges based on the overall precision that you select, by adjusting each atom charge by the precision until the charge difference is zero.
Methods
add_required(filename)Add a required file to the stage.
check_charge(charges)This function checks the total charge and the charge difference.
execute([dry_run, nproc, mem])Execute the stage.
list_files_in_directory(directory)List all the files in a directory.
normalize(charges, charge_difference)This function normalizes the charges to the net charge.
append_stage
clean
- check_charge(charges)[source]
This function checks the total charge and the charge difference.
- Parameters:
charges (np.array) – The charges
- Returns:
total_charge (float) – The total charge
charge_difference (float) – The charge difference
- class ligandparam.stages.charge.StageUpdateCharge(stage_name: str, main_input: Path | str, cwd: Path | str, *args, **kwargs)[source]
Bases:
AbstractStageThis class creates a new mol2 file with updated charges.
Methods
add_required(filename)Add a required file to the stage.
list_files_in_directory(directory)List all the files in a directory.
append_stage
clean
execute