pyCADD.Dock package

Submodules

pyCADD.Dock.cli module

pyCADD.Dock.common module

class pyCADD.Dock.common.EnsembleInputFile(path: str)[source]

Bases: File

classmethod from_csv(file_path: str, sep: str = ',', header: bool = False) EnsembleInputFile[source]

Parse input file as csv format

Args:

file_path (str): csv file path sep (str, optional): separator. Defaults to ‘,’. header (bool, optional): whether the csv file has header. Defaults to None.

csv examples:

` 1XJ7,DHT 1XQ3,R18 2AM9,TES 2AM9,DTT 2YLP,TES 2YLP,056 `

Returns:

EnsembleInputFile: instance of EnsembleInputFile

classmethod from_ini(config_file: str) EnsembleInputFile[source]

Parse input file as ini format

Args:

config_file (str): ini file path

ini examples:

``` [P10275]

1XJ7: DHT 1XQ3: R18 2AM9: TES,DTT 2YLP: TES,056

```

Returns:

EnsembleInputFile: instance of EnsembleInputFile

classmethod from_yaml(yaml_file: str) EnsembleInputFile[source]

Parse input file as yaml format

Args:

yaml_file (str): yaml file path

yaml examples:

``` P10275:

1XJ7: DHT 1XQ3: - R18 2AM9: - TES - DTT 2YLP: - TES - ‘056’

Returns:

EnsembleInputFile: instance of EnsembleInputFile

get_ligand_list() List[str][source]

Get the list of unique ligands

Returns:

list: list of ligands

get_pairs_list() List[tuple][source]

Get the list of pairs. Pairs are defined as (pdb, ligand)

Returns:

list: list of pairs

get_pdbid_list() List[str][source]

Get the list of unique pdb ids

Returns:

list: list of pdb ids

property ligand_list: list
classmethod parse_file(path: str, header: bool = False) EnsembleInputFile[source]

Parse input file

Args:

path (str): file path header (bool, optional): whether the file has header. Only for csv file. Defaults to False.

Raises:

ValueError: Unsupported file type

Returns:

EnsembleInputFile: instance of EnsembleInputFile

property pdbid_list: list
read(file_path: str) None[source]

Read and parse the input file

Args:

file_path (str): file path

class pyCADD.Dock.common.PDBFile(path: str)[source]

Bases: File

get_chain(chain_id: str, return_str: bool = False) list | str[source]

Get the pdb file content of a single chain

Args:

chain_id (str): chain id return_str (bool, optional): get the string instead of list[str]. Defaults to False.

Returns:

str: pdb file content of a single chain

get_lines(return_str: bool = False) list | str[source]

Get the pdb file content as a list of lines or a string

Args:

return_str (bool, optional): get the string instead of list[str]. Defaults to False.

Returns:

list|str: pdb file content

class pyCADD.Dock.common.PDBLine(line: str)[source]

Bases: object

get_atom_name() str[source]

Get the atom name from the line

Returns:

str: atom name

get_line() str[source]

Get the line string from current attributes

Returns:

str: line string

property is_amino: bool
property is_atom_line: bool
property is_conect: bool
property is_end: bool
property is_hetatm: bool
property is_ter: bool
property line: str
class pyCADD.Dock.common.PDBLineParser(pdb_str: str = None, pdb_file: str = None)[source]

Bases: object

get_amino_lines()[source]

Get a list of amino acid line objects parsed from the pdb file. Amino acid line is defined as the line with record name ‘ATOM’ and res_name in AMINO_ACIDS

Returns:

list[PDBLine]: amino acid line objects list

get_atom_lines()[source]

Get a list of atom line objects parsed from the pdb file.

Returns:

list[PDBLine]: atom line object list

get_hetatm_lines()[source]

Get a list of HETATM line objects parsed from the pdb file.

Returns:

list[PDBLine]: HETATM line objects list

get_lines()[source]

Get a list of all lines parsed from the pdb file.

Returns:

list[PDBLine]: pdb line object list

get_str_list()[source]

Get a list of pdb line strings.

Returns:

list[str]: pdb line strings list

save_pdb(file_path)[source]

Save the pdb file to the file_path

Args:

file_path (str): file path to save the pdb file

pyCADD.Dock.config module

pyCADD.Dock.console module

pyCADD.Dock.core module

pyCADD.Dock.data module

pyCADD.Dock.ensemble module

pyCADD.Dock.ui module

Module contents