Other DART Modules

This file contains the base module class and several small modules for the DARTassembler package. The assembler and ligandfilters modules are not included here.

class DARTassembler.src.modules.modules.BaseModule[source]

Bases: object

Base class for all modules in the DARTassembler package. Implements the basic structure for running modules from the command line interface (CLI).

classmethod run_from_cli(**kwargs)[source]
run(*args, **kwargs)[source]

This method should be implemented in the subclass.

class DARTassembler.src.modules.modules.Concat[source]

Bases: BaseModule

This module concatenates multiple ligand databases into one.

run(dbs, outpath=None, n=None)[source]

Concatenate multiple ligand databases into one.

Parameters:
  • dbs – Paths to the ligand databases.

  • outpath – Path to the output ligand database. If None, no output file is saved.

  • n – Maximum number of ligands to be read in from each ligand database. If None, all ligands are read in. This is useful for testing purposes.

class DARTassembler.src.modules.modules.DBInfo[source]

Bases: BaseModule

This module reads in a ligand database (.jsonlines) and saves a .csv file with an overview of the ligands and a concatenated .xyz file with the structures of the ligands.

run(db='metalig', outdir=None, n=None, metal=True)[source]

Reads in the given ligand database and saves a .csv file and a concatenated .xyz file with an overview of the ligands.

Parameters:
  • db – Path to the ligand database. The default path is ‘metalig’, which points to the full ligand database.

  • outdir – Path to the output .csv file. If None, no output file is saved. If ‘.csv’, the output file is saved in the same directory as the input file with the same name but with the .csv extension.

  • n – Maximum number of ligands to be read in from the initial full ligand database. If None, all ligands are read in. This is useful for testing purposes.

  • metal – If True, the metal atom is included in the concatenated .xyz file. If False, only the ligand is included.

Returns:

Tuple of (LigandDB, DataFrame, concatenated xyz string) of the ligands.

class DARTassembler.src.modules.modules.Configs[source]

Bases: BaseModule

This module returns the default .yml configuration files for the assembler and the ligandfilters. Use these files as templates to adapt to your specific needs.

run(outdir=None)[source]

Get the default yaml configuration files for the assembler and the ligandfilters and optionally save them to the specified output path.

Parameters:

outdir – Output directory where the configuration files will be saved. If None, the files are not saved and only the dictionaries are returned.

Returns:

A tuple containing the assembler options and the ligandfilters options as dictionaries.