Ligand Utils
- assign_atom_names(mol)[source]
Arbitrarily assign atom names to a ligand. Specifically used to apply atom names to atoms read from an SDF file.
- Parameters:
mol (Dict) – Dictionary of molecular information as read from an SDF file using
read_sdf()- Returns:
names – List of atom names.
- Return type:
List[str]
- remap_sdf(sdf_data, mask)[source]
Reassign atom indices of SDF data when some atoms have been removed. This is usually performed when removing hydrogen atoms.
Note
This function does not remap atom property indices or indices of any field other than atoms and bonds.
- Parameters:
sdf_data (Dict) – Dictionary of SDF data as created by
read_sdf()mask (ArrayLike) – Array of boolean values corresponding to the atoms of the sdf_data molecule that wil be kept (
True) and removed (False).
- Returns:
new_data – Dictionary of molecular information as created by
read_sdf()no longer containing the atoms corresponding to theFalseentries ofmask.- Return type:
Dict