6.8. Scanning Interface
- class pharmaforge.interfaces.scanning.Scan(interface)[source]
Bases:
objectThis is a class for performing cans on a molecule using a calculator of your choice.
- Parameters:
calculator (object) – The calculator to use for the calculations. This should be an instance of a class that inherits from AbstractIO.
- calculator
The calculator to use for the calculations. This should be an instance of a class that inherits from AbstractIO.
- Type:
See also
ase.neighborlist.NeighborListThe ASE neighbor list object used to determine connectivity.
MDAnalysisThe MDAnalysis library used for molecular dynamics analysis.
multiprocessingThe multiprocessing library used for parallel processing.
Methods
add_initial_coordinates(structure)Add the initial coordinates of the molecule to the torsional scan.
plot_scan([save])Plot the scan results.
scan([atoms, scan_range, mask, verbose, ...])Perform a scan on the molecule.
write_xyz([filename])Write the scan results to an XYZ file.
process_angle_scan
process_bond_scan
process_structure
- add_initial_coordinates(structure)[source]
Add the initial coordinates of the molecule to the torsional scan.
- Parameters:
structure (ase.Atoms) – The ASE atoms object containing the initial coordinates of the molecule.
- plot_scan(save=None)[source]
Plot the scan results.
- Parameters:
save (str) – The filename to save the plot. If None, the plot will be shown but not saved.
- scan(atoms=None, scan_range=(0, 10, 1), mask=None, verbose=False, num_workers=1, charge=0, schedule=None, constrain=None, optimize=True)[source]
Perform a scan on the molecule.
- Parameters:
atoms (list) – A list of atoms indices to scan. Must be length 2, 3, or 4.
scan_range (tuple) – A tuple containing the start, end, and step size of the scan. Default is (0,10,1).
mask (list) – A list of atom indices that should be rotated. If None, the function will automatically select the mask.
verbose (bool) – If True, print the dihedral angle being scanned.
num_workers (int) – The number of workers to use for parallel processing. Default is 1.
charge (int) – The net charge of the system. Default is 0.
schedule (str) – The schedule for the scan. Can be “linear” or “iterative”. Default is None, which means no schedule is applied.
- Returns:
energies (list) – A list of energies for each scan point.
forces (list) – A list of forces for each scan point.
coordinates (list) – A list of coordinates for each scan point.
- Raises:
ValueError – If the number of atoms is not 2, 3, or 4.