Skip to content

deeporigin.drug_discovery.Complex

class to represent a set of a protein and 1 or many ligands

Attributes

abfe instance-attribute

abfe = ABFE(parent=self)

client class-attribute instance-attribute

client: Optional[DeepOriginClient] = client

docking instance-attribute

docking = Docking(parent=self)

ligands property writable

ligands: LigandSet

protein instance-attribute

protein: Protein = protein

rbfe instance-attribute

rbfe = RBFE(parent=self)

Functions

from_dir classmethod

from_dir(
    directory: str,
    *,
    client: Optional[DeepOriginClient] = None
) -> Complex

Initialize a Complex from a directory containing protein and ligand files.

Parameters:

Name Type Description Default
directory str

Directory containing ligand and protein files.

required

The directory should contain: - Exactly one PDB file for the protein - One or more SDF files for the ligands. Each SDF file can contain one or more molecules.

Returns:

Name Type Description
Complex Complex

A new Complex instance initialized from the files in the directory.

Raises:

Type Description
ValueError

If no PDB file is found or if multiple PDB files are found.

prepare

prepare(
    ligand: Optional[Ligand] = None,
    *,
    padding: float = 2.0,
    retain_waters: bool = False,
    add_H_atoms: bool = False,
    protonate_protein: bool = False,
    use_cache: bool = True
) -> Protein | list[Protein]

run system preparation on the protein and one or more ligands from the Complex

Parameters:

Name Type Description Default
ligand Ligand

The ligand to prepare. If None, prepares all ligands in the Complex.

None
padding float

Padding to add around the system.

2.0
retain_waters bool

Whether to keep water molecules.

False
add_H_atoms bool

Whether the ligand is already protonated.

False
protonate_protein bool

Whether to protonate the protein.

False
use_cache bool

Whether to use the cache.

True

Returns:

Name Type Description
Protein Protein | list[Protein]

If a single ligand is provided, returns the prepared Protein object.

Protein | list[Protein]

list[Protein]: If ligand is None, returns a list of prepared Protein objects, one for each ligand.