Docking API

Introduction

Note

The ccdc.docking module is available only to CSD-Discovery and CSD-Enterprise users.

The ccdc.docking module provides an API to molecular docking functionality.

Note

The ccdc.docking module is available only to CSD-Discovery and CSD-Enterprise users.

The class ccdc.docking.Docker.LigandPreparation provides functionality for preparing ligands for docking. This classes encapsulate the typical preparation activities, such as protonation and bond typing.

API

class ccdc.docking.Docker(settings=None)[source]

Docker.

class InteractiveResults(settings, pid=None)[source]

A session connecting to a GOLD process.

If the ccdc.docking.Docker.InteractiveResults instance has an attribute, ‘ligand_preparation’, this should be either None, in which case no ligand preparation is performed, or an instance of ccdc.docking.Docker.LigandPreparation whose prepare method will be called for each interactive docking attempted. A default constructed ccdc.docking.Docker.LigandPreparation will be used if the attribute is not present.

dock(entry)[source]

Send an entry to be docked.

Returns:

a tuple of ccdc.entry.Entry instances. These are the docked poses.

class LigandPreparation(settings=None)[source]

Prepare ligands for docking.

class Settings[source]

Configuration options for the preparation of ligands.

prepare(entry)[source]

Prepare an entry for docking.

Parameters:

entryccdc.entry.Entry instance

Returns:

ccdc.entry.Entry instance with specified rules applied.

class Results(settings, return_code=None, pid=None)[source]

Docking results.

class DockedLigand(entry, settings)[source]

Subclass of ccdc.entry.Entry to provide nicer access to the scoring terms of the docking.

class HBond(text, ligand, results)[source]

A hydrogen bond in the docked ligand.

class ProteinRotatedTorsion(protein_rotated_torsion_sd_tag)[source]

Details of a protein amino acid side chain rotated in the docking solution.

property atom_indices

The file order index of each atom in the torsion.

property chi_number

The flexible sidechain chi number or -1 if this torsion is not part of a RotamerLibrary.

property final_angle

The torsion angle in the final pose.

property input_angle

The torsion angle in the protein before docking.

property type

The torsion type as a string.

“sidechain” : a torsion in a residue sidechain as defined in a rotamer library. “rotated_h” : a residue terminal rotatable hydrogen e.g. in a SER, THR, TYR hydroxyl or LYS NH3. “unknown” : type not set, should not usually be encountered.

:return string representation of the protein rotated torsion type.

property docked_waters

Optionally, it is possible in GOLD to specify waters that are docked alongside a given ligand. This property provides access to the positions of these waters.

:return molecules representing the docked waters in the binding site that are associated with this ligand pose as placed in the binding site

fitness(fitness_function=None)[source]

The recorded fitness of a docking.

Parameters:

fitness_function – one of the fitness functions of the ccdc.docking.Docker.Settings or None.

If the docking has exactly one fitness attribute, i.e., no rescoring has been performed, then there is no need to specify the fitness_function.

protein_rotated_torsions()[source]

Return the set of protein rotated torsions for a docked ligand.

scoring_term(*filters)[source]

Individual or dicts of scoring terms from the entry.

Parameters:
  • fitness_function – any of the fitness functions of ccdc.docking.Settings

  • *filters – an iterable of additional constraints to put on the name of the term.

Returns:

a float if the specification is exact or a dictionary of key:float if ambiguous.

class DockedLigandReader(file_name, settings)[source]

Subclass of ccdc.io.EntryReader to provide ccdc.docking.Docker.Results.DockedLigand instances.

property docking_log

The content of the docking log file.

property error_log

The content of the docking error log file.

ligand_log(index)[source]

The content of a ligand log.

property ligands

The ligands of the docking.

The value of this property is a ccdc.io.EntryReader. Each entry has an attributes property, a dictionary of the docking information pertaining to the docking.

make_complex(ligand)[source]

Make the complex with the ligand, adjusting rotatables as required and including any docked active waters

Returns:

a ccdc.protein.Protein with the ligand added.

property protein_log

The content of the protein log file.

property proteins

The protein(s) of the docking.

Returns:

a tuple of ccdc.protein.Protein.

This tuple will have more than one entry if ensemble docking was used.

class Settings(_settings=None)[source]

Settings for docker.

class BindingSite[source]
class BindingSiteFromAtom(protein, atom, distance)[source]

A cavity defined from a protein atom.

class BindingSiteFromLigand(protein, ligand, distance=6.0, whole_residues=False)[source]

A cavity defined from a ligand and a contact distance.

class BindingSiteFromListOfAtoms(protein, atoms)[source]
class BindingSiteFromListOfResidues(protein, residues)[source]

Cavity defined from a list of residues.

class BindingSiteFromPoint(protein, origin=(0, 0, 0), distance=12.0)[source]

A cavity defined from a point.

class BindingSiteFromResidue(protein, residue, distance)[source]

A cavity defined from a protein residue.

class Constraint(_constraint=None)[source]

A docking constraint. This is the base class for all constraint and restraint like objects that GOLD can use in docking.

class DistanceConstraint(atom1, atom2, limits=(1.5, 3.5), weight=5.0, topological_equivalent=False, _constraint=None)[source]

A distance constraint.

A distance constraint adds a quadratic penalty function into a docking that penalizes the score by wd2 where w is a weight, and d is the deviation of a given distance between a protein atom and a ligand atom from the limits specified.

The constraint can be set so that all distances between topologically equivalant to those specified are tested. In this case, only one distance needs to fall inside the specified bounds to avoid a penalty.

Parameters:
  • atom2 (atom1,) – ccdc.molecule.Atom instances. These may be either protein or ligand atoms.

  • limits – range of values with no penalty.

  • weight – spring constant

  • topological_equivalent – whether or not to accept a topologically equivalent atom

class HBondConstraint(atom1, atom2, _constraint=None)[source]

An HBond constraint.

An HBond constraint expresses that a given hydrogen bond should be formed between a protein and a ligand atom. In this case, this means that the respective scoring function’s score for an H-Bond must be attractive for this particular H-Bond. The atoms involved are also always forced to map to one another in the docking mapping algorithm.

Parameters:

atom2 (atom1,) – ccdc.molecule.Atom instances.

One of the atoms should be a donatable hydrogen, the other a HBond acceptor atom. One atom should be on the protein, the other on a ligand.

class LigandFileInfo(file_name, ndocks=1, start=0, finish=0)[source]

Information about a ligand file.

class PharmacophoreConstraint(origin, type, radius, function_shape='block', use_as_fitting_point=True, weight=10.0, fitting_point_weight=1.0, _constraint=None)[source]

A pharmacophore constraint.

A PharmacophoreConstraint is in practice a docking reward: poses that match the constraint are rewarded with a contribution to the score. They are formulated as a point, a tolerance and then an overlay function with a given function shape.

You can also optionally use them to add fitting points to the docking, which will make poses that match the pharmacophore more likely. If, in a pose, an atom or ring center of the proscribed type is within the distance tolerance specified, the score of the pose will be increased by the value of the score weight. If outside, the behaviour will vary depending on the function shape.

A gaussian function shape will make the contribution to the score decay based on a gaussian with the excess distance. A block function shape will mean an atom outside the distance will contribute nothing to the score.

Parameters:
  • origin – a point in space where the pharamcophore point will be placed

  • type – the type of pharmacophore point. Must be one of ‘acceptor’, ‘donor_acceptor’, ‘donor’, ‘aromatic_center’ or ‘ring_center’

  • radius – the distance a point in the pose can be away from the origin to be accepted as a match for the pharmacophore

  • function_shape – how to score the match (can be gaussian or block.)

  • use_as_fitting_point – whether to use the point additionally as a fitting point

  • weight – the reward a perfect match to the pharmacophore makes in the score

  • fitting_point_weight – the weight given to the associated fitting point

class ProteinFileInfo(file_name=None, _protein_data=None, settings=None)[source]

Data associated with a protein for docking.

add_constraint(constraint)[source]

Add a constraint to the protein.

add_rotamer_library(rotamer_library)[source]

Add a rotamer library to this protein.

clear_constraints()[source]

Remove all constraints.

clear_rotamer_libraries()[source]

Remove all rotamer libraries

property constraints

The constraints associated with this protein.

property file_name

The file name of the protein.

property rotamer_libraries

The set of defined rotamer libraries for this protein.

update_rotamer_library(rotamer_library)[source]

Update rotamer library to this protein.

class ProteinHBondConstraint(atoms, weight=10.0, min_hbond_score=0.005, _constraint=None)[source]

A Protein HBond constraint.

This constraint forces specfic protein donors or acceptors to form a hydrogen bond if possible to at least one ligand atom. Unlike the ccdc.docking.Docker.Settings.HBondConstraint this constraint only requires the user to specify atoms in the protein; any complementary atom in the ligand will be considered.

Parameters:
  • atoms – a list ccdc.molecule.Atom instances from the protein. The atoms should be donatable hydrogens or acceptor atoms.

  • weight – the penalty to be applied for no atom of the list forming an HBond.

  • min_hbond_score – the minimal score of an HBond to be considered a valid HBond.

class RegionConstraint(origin, radius, type, weight=5.0, atoms=None, _constraint=None)[source]

A region constraint.

A region constraint is a coarse method for ensuring that either aromatic atoms, hydrophobic atoms or atoms indexes explicitly listed (these will be matched by index in the input ligands) occupy a particular spherical region in the binding site. Some of the functionality provided in this constraint is superceded by functionality in ccdc.docking.Docker.Settings.PharmacophoreConstraint

For the spherical binding site region, atoms should be specified using a list of ccdc.molecule.Atom instances. Alternatively, it is possible to use either all hydrophobic ligand atoms, or to use only those hydrophobic atoms in aromatic rings by setting the optional ‘type’ parameter to ‘hydrophobic’ or ‘arom_ring_atoms’ respectively.

Parameters:
  • origin – a point in space

  • radius – a radius of the sphere around the origin - this defines the sphere where a docked pose should have the desired atoms

  • type – Must be one of ‘hydrophobic atoms’, ‘arom_ring_atoms’, ‘’None’’ (default)

  • weight – the value to add to the score if the constraint is not fulfilled

  • atoms – a list of ccdc.molecule.Atom instances whose indexes will be extracted

class Rotamer(num_torsions, rotamer=None)[source]

A rotamer in a rotamer library.

Parameters:

num_torsions – the number of torsions in the residue

The torsions can be accessed or set via chi<n> attributes. For examples:

rotamer = Docker.Settings.Rotamer(3)
rotamer.energy = 10

rotamer.chi1 = (-60,)
rotamer.chi2 = (-75, 10)
rotamer.chi3 = (-90, 10, 20)

assert(rotamer.chi1.angle, -60)
assert(rotamer.chi2.min_delta, 10)
assert(rotamer.chi3.max_delta, 20)
property energy

Get or set the rotamer energy

property improper

Get or set whether the rotamer is improper

property improper_angle

Get or set the improper angle

If setting the improper angle, the tuple must include one, two or three elements, which represent the following cases respectively:

  1. The angle is set, the deltas are set to 0

  2. The angle is set with the first element, the deltas are set with the second element

  3. The angle is set with the first element, the lower delta is set with the second element, the upper delta is set with the third element

Returns:

a ccdc.docking.Docker.Settings.RotamerAngleRange object

Raises:

RuntimeError if rotamer is not an improper rotamer

class RotamerAngleRange(angle_range=(0,))[source]

A rotamer angle range.

Parameters:

angle_range – a tuple representing the angle range

The tuple must include one, two or three elements, which represent the following cases respectively:

  1. The angle is set, the deltas are set to 0

  2. The angle is set with the first element, the deltas are set with the second element

  3. The angle is set with the first element, the lower delta is set with the second element, the upper delta is set with the third element

property angle

Get and set the angle (in degrees)

property max_delta

Get and set the upper delta (in degrees)

property min_delta

Get and set the lower delta (in degrees)

class RotamerLibrary(protein_file_info, residue, _rotamer_library=None)[source]

A rotamber library associated with a protein binding site.

A binding site should have been configured because a residue from the list of binding site residues is required to create this.

Parameters:
  • protein_file_info – the Docker.Settings.ProteinFileInfo object the rotamer library is associated with

  • residue – the residue of the binding site the rotamer library is associated with

add_crystal_rotamer(delta=10)[source]

Add a rotamer corresponding to the residue in the crystal

This is equivalent to the “Crystal” button in the Hermes GUI.

Parameters:

delta – the tolerance of the crystal rotamer angle, and also for improper angle

add_default_rotamers(deltas=(10,))[source]

Add default rotamers for this residue

The rotamers are read from rotamer_library.txt in the distribution.

This is equivalent to the “Library” button in the Hermes GUI.

Parameters:

deltas – the angle range to be set for improper angle, if applicable

add_free_rotamer(deltas=(10,))[source]

Add a free (delta=180) rotamer

This is equivalent to the “Free” button in the Hermes GUI.

Doing this will remove all existing rotamers in this library.

Parameters:

deltas – the angle range to be set for improper angle, if applicable

add_rotamer(rotamer, angle=0, deltas=(10,))[source]

Add a user-defined rotamer

This is equivalent to the “From dials” button in the Hermes GUI.

Parameters:
  • rotamer – a ccdc.docking.Docker.Settings.Rotamer object to add

  • angle – the improper angle to be set, if applicable

  • deltas – the angle range to be set for improper angle, if applicable

property number_of_torsions

Number of torsion angles of the associated residue

remove_rotamer(index)[source]

Remove a rotamer from the library

Parameters:

index – the index of the rotamer to remove

Returns:

the rotamer removed from the library

remove_rotamers()[source]

Remove all rotamers

This is equivalent to the “Rigid” button in the Hermes GUI.

rotamers()[source]

Return the list of rotamers from this rotamer library

Note that the returned objects are views of the rotamers in the settings. Changing them does not change the settings.

Returns:

list of ccdc.docking.Docker.Settings.Rotamer objects

set_improper(is_improper, deltas=(10,))[source]

To set the improper status of the rotamer library

Parameters:
  • is_improper – a boolean for the improper state

  • deltas – a tuple of 1 or 2 to define the rotamer angle ranges for improper angle

class ScaffoldMatchConstraint(molecule, weight=5.0, atoms=None, _constraint=None)[source]

A scaffold match constraint.

A scaffold match constraint will attempt to force a substructure in an input ligand to match onto a template provided by the user. The template is substructure matched onto the ligand and then a distance constraint for each matching atom pair is added.

Parameters:
class SubstructureConstraint(protein_atom, substructure, substructure_atom, limits, weight=5.0, use_ring_centre=True, substructure_file_name=None, _constraint=None)[source]

A Substructure constraint.

This constraint allows a user to express a substructure to match onto a ligand and then express a distance constraint with respect to an atom in that substructure.

Note that a ligand will still be docked if it does not contain the substructure. If you wish to skip such ligands, the setting ccdc.docking.Docker.Settings.force_constraints must be set to True

Parameters:
  • protein_atom – an atom in the protein

  • substructure – a ccdc.search.QuerySubstructure object

  • substructure_atom – an atom in the substructure

  • limits – a tuple of size 2 that expresses the maximum and minimum allowed distances

class TemplateSimilarityConstraint(type, template, weight=5.0, template_file_name=None, _constraint=None)[source]

A template similarity constraint.

This is a fuzzy score reward; on docking the overlap of atoms in the docked pose is measured using the overlap of gaussians positioned at atoms in a template with atoms in the pose. The types of atoms assessed can be donor atoms, acceptor atoms or all atoms. The gaussian overlap is assessed and normalised into a range of 0->1; this is then multiplied by a weight to provide a score to add to the docking score as an overlap regard.

Parameters:
  • type – must be ‘donor’, ‘acceptor’ or ‘all’

  • template – a ccdc.molecule.Molecule instance

  • template_file_name – where the template may be written. If not provided, the identifier of the template will be used.

  • weight – the maximum weight to be given in the event of an exact match with the template.

class WaterFileInfo(file_name, toggle_state='toggle', spin_state='spin', movable_distance=0.0)[source]

Information about an active water file.

property atom_index

:return the index of the atom in the water that is the Oxygen

property file_name

:return the filename of the file that contains the water to be active in docking

add_constraint(constraint)[source]

Add a constraint to the docking.

Parameters:

constraintccdc.docking.Docker.Settings.Constraint instance.

add_ligand_file(file_name, ndocks=1, start=0, finish=0)[source]

Add a file of ligands to the docking settings.

Parameters:
  • file_name – a mol2 or sdf file of ligand molecules, or a ccdc.docking.Docker.Settings.LigandFileInfo instance.

  • ndocks – int, the number of docking attempts for each ligand

  • start – int, index of ligand at which to start

  • finish – int, index of ligand at which to finish

add_protein_file(file_name)[source]

Add a target file to be docked against.

add_rotamer_library(protein, rotamer_library)[source]

Add a rotamer library to a protein

Parameters:
Raises:

ValueError if protein cannot be found

add_specific_fixed_rotatable_bond(bond)[source]

Set a specific rotatable bond, or a list or rotatable bonds as fixed in docking.

The index of the two atoms forming each bond passed in will ultimately be used in the docking, and so if docking multiple ligands, bonds relating to these indexes will be fixed for all of them.

Parameters:

bond – the bond to add, or a list of bonds to add

add_water_file(file_name, toggle_state='toggle', spin_state='spin', movable_distance=0.0)[source]

Add a water file to be docked.

property autoscale

The autoscale percentage, which controls how much searching is performed.

The docker will determine how much docking is reasonable to perform on a ligand based on the number of rotatable bonds and the number of hydrogen donors and acceptors. This percentage will scale the amount of docking done to perform faster or more thorough docking.

property binding_site

Set or get the binding site configuration for this docking.

Parameters:

value – should be a Docker.Settings.BindingSite object (or derived class.)

clear_constraints()[source]

Clears the set of constraints.

clear_ligand_files()[source]

Remove all ligand datafiles from settings.

clear_protein_files()[source]

Clear the set of targets.

clear_rotamer_libraries()[source]

Remove all rotamer libraries

clear_water_files()[source]

Remove all water objects from settings.

property conf_file

The GOLD conf file represented by this settings instance.

property constraints

The tuple of constraints set.

property detect_cavity

Set or get whether to detect the cavity from the binding site definition or not (i.e. post-process the binding site)

Parameters:

value – True if cavity detection should be switched on, False otherwise

Raises:

RuntimeError if no binding site is set

Returns:

The setting of cavity detection

property detect_internal_hydrogen_bonds

Get or set whether to detect and score internal hydrogen bonds in ligands during docking (can be True or False)

property diverse_solutions

Diverse solutions settings.

If diverse solutions is enabled this will be (True, cluster size, rmsd), otherwise (False, None, None)

property early_termination

Whether early termination is permitted.

If early termination is permitted this will be (True, number_of_solutions, rmsd_threshold), if not this will be (False, None, None)

property fitness_function

Which fitness function to use.

Options are ‘goldscore’, ‘chemscore’, ‘asp’, ‘plp’. GoldScore is selected by default.

Note that if you pass in ‘None’ the API will assume you are planning a rescoring run, set the fitness function to the rescore function, and set the run type as a rescore-only run. One other side effect of this will be to disable use_internal_ligand_energy_offset

property fitting_points_file

A file to read or write the fitting points.

property fix_all_protein_rotatable_bonds

Get or set whether to fix all terminal protein rotatable bonds during docking (can be set to True to fix them all or False to allow them to move)

property fix_ligand_rotatable_bonds

Set or get the state of fixing rotatable bonds in docked ligands

  • ‘all’ means all ligand bonds will be held rigid in docking

  • ‘all_but_terminal’ means all bonds except terminal groups such as hydroxyls, methyls etc will be held rigid

  • ‘specific’ means that certain bonds have been set as rigid. It is assumed that the indexes of the atoms involved are valid for all ligands docked, but the API will refer to bonds in the first input ligand expressed in the Docker.Settings object. See specific_fixed_rotatable_bonds to interrogate which bonds are held fixed

  • None means no bonds are held rigid

Returns:

‘all’, ‘all_but_terminal’,’specific’ or None

property flip_amide_bonds

Get or set whether to flip amide bonds during docking (can be True or False)

property flip_free_corners

Get or set whether to flip ring free corners during docking (can be True or False)

property flip_planar_nitrogen

Return the current settings for flexibility of planar nitrogens

property flip_pyramidal_nitrogen

get or set whether to flip pyramidal nitrogens during docking (can be True or False)

property force_constraints

Whether the constraints are to be forced.

static from_file(file_name)[source]

Read docking settings from a gold.conf file.

Parameters:

file_name – Location of the gold.conf file.

property ligand_files

The ligand datafile settings.

Returns:

tuple of class:ccdc.docking.Docker.Settings.LigandFileInfo instances.

property ligands

The ligands specified for docking.

make_absolute_file_names(file_name, relative=False)[source]

Convert any relative file names to absolute file names.

Parameters:
  • file_name – str, the location of the settings file.

  • relative – bool, whether to make file names relative to the settings file.

property match_template_conformations

Get or set whether to match template conformations of rings during docking (can be True or False)

property output_directory

Directory to which output will be sent.

property output_file

Output file.

If this is an empty string then each docking will be in a separate file.

property output_format

Desired format for output file.

property protein_files

The protein file targets.

property proteins

The proteins.

property reference_ligand_file

Any reference ligand file name set.

remove_specific_fixed_rotatable_bond(bond)[source]

Remove a specific rotatable bond or a list or rotatable bonds that were previously added

Parameters:

bond – the bond to remove, or a list of bonds to remove

property rescore_function

The fitness function used for rescoring.

Should not be the same as the fitness function.

rotamer_libraries(protein=None)[source]

Get the set of defined rotamer libraries

If protein is None all rotamer libraries in the settings will be returned. Otherise only rotamer libraries associated with the protein will be returned.

Parameters:

protein – A ccdc.docking.Docker.Settings.Protein instance

Returns:

A list of :class:`ccdc.docking.Docker.Settings.RotamerLibrary objects

rotamer_library(protein, residue_id)[source]

Return the rotamer library for this residue in this protein

Parameters:
  • protein – A ccdc.docking.Docker.Settings.Protein instance

  • residue_id – A residue ID string

Returns:

A :class:`ccdc.docking.Docker.Settings.RotamerLibrary objects

property rotatable_bond_override_file

The location of a rotatable bond override file.

If set to a relative path, the file will be found in the standard GOLD distribution. If set to None, the DEFAULT file will be used.

Note: setting this value will not turn using the rotatable bond override file on or off. You can use use_rotatable_bond_override_file to switch this on or off

property rotate_carboxylic_hydroxyl_groups

get or set whether to rotate carboxylic hydroxyl group during docking :param setting: a string that can be one of ‘flip’, ‘fix’ or ‘rotate’

property save_binding_site_atoms

Whether or not to write the binding site atom file.

property save_lone_pairs

Get or set whether to include lone pairs in output files or not (can be True of False: False will mean lone pairs are omitted from output)

property score_parameter_file

The location of an alternative score parameter file.

If set to a relative path the file will be found in the standard GOLD distribution. If set to None, the DEFAULT file will be used.

property seed_file

The seed file for the pseudo random number generator

set_flip_planar_nitrogen(setting, ring_NRR=None, ring_NHR=None)[source]

Set the flip_planar_nitrogen settings

Parameters:
  • setting – whether to switch this off or on

  • ring_NRR – whether to fix, flip or rotate ring NRR groups (Can be ‘fix’, ‘flip’, ‘rotate’ or None. None means keep the current setting)

  • ring_NHR – whether to fix, flip or rotate ring NHR groups (Can be ‘fix’, ‘flip’, ‘rotate’ or None. None means keep the current setting)

set_hostname(hostname='localhost', ndocks=1)[source]

Set the hostname on which docking jobs will be run.

property solvate_all

Get or set whether to treat all fitting points associated with solvent-accessible donors or acceptors as themselves solvent-accessible. (See the GOLD conf file documentation for more information) (can be True or False)

property specific_fixed_rotatable_bonds

Return the specific bonds that are fixed in docking, or an empty list if none are fixed

The bonds returned relate to the first loaded ligand in the settings note.

Will raise an IndexError if no ligands are available but fixed_rotatable_bonds have been read in from a GOLD configuration file

See also

Returns:

a list of bonds that are held fixed (all are bonds in the first input ligand note)

property torsion_distribution_file

The location of a torsion distribution file.

If set to a relative path, the file will be found in the standard GOLD distribution. If set to None, the DEFAULT file will be used.

Note: setting this value will not turn using torsion distributions on or off. You can use use_torsion_angle_distributions to switch this on or off

update_rotamer_library(protein, rotamer_library)[source]

Update a rotamer library to a protein

The name of the rotamer library is used to determine which existing library to update.

Parameters:
Raises:

ValueError if protein cannot be found

property use_internal_ligand_energy_offset

Get or set whether to apply a score offset in scoring that accounts for the lowest ligand energy observed in the search (can be True or False)

Note that this only applies when running a full docking run. If you try to set this for a rescoring run, you will get a ValueError raised, as rescoring runs do not have access to the previous GA sampling.

property use_rotatable_bond_override_file

Set whether to use overrides from a rotatable bond override file in the genetic algorithm. Can be set to True or False

See:

rotatable_bond_override_file for information on how to configure the file to use

property use_torsion_angle_distributions

Set whether to use torsion distributions from a torsion distributions file in the genetic algorithm. Can be set to True or False

See:

torsion_distribution_file for information on how to configure the distributions to use

property water_files

The water datafile settings.

Returns:

tuple of class:ccdc.docking.Docker.Settings.WaterFileInfo instances.

property waters

The waters specified for docking as read in from the input files

write(file_name)[source]

Write docking settings to a GOLD configuration file

Note that calling this method writes a self-contained configuration file but may also cause copying of other files to locations relative to the configuration file, so file names in the calling settings object will change to point to these copies.

No tests are performed to check for over-writing of files when calling write.

Parameters:

file_name – The path of the output GOLD configuration file

Raises:

RuntimeError if no fitness and rescore function is set

property write_options

Determines which write options are set.

The options are:

  • MIN_OUT: Use this to write only the gold.log and bestranking.lst files. This is the recommended option for high-throughput virtual screening

  • NO_LOG_FILES: Use this to disable the writing of all ligand log files and the gold_protein.log file.

  • NO_LINK_FILES: Use this to disable the writing of ranked pose shortcut files to solution files. By default, one file is written per solution file.

  • NO_RNK_FILES: Use this to disable the writing of the ranked fitness lists (.rnk extension) for each molecule. By default, one file is written per ligand.

  • NO_BESTRANKING_LST_FILE: Use this to disable the writing of the bestranking.lst file which includes a list of the highest scoring pose for each ligand.

  • NO_GOLD_SOLN_LIGAND_MOL2_FILES: Use this to disable the writing of all solution files. As there would be nothing to point to, this option also disables the writing of the ranked pose shortcut files.

  • NO_GOLD_LIGAND_MOL2_FILE: Use this to disable the writing of all ligand files. By default, one file is written per ligand.

  • NO_GOLD_PROTEIN_MOL2_FILE: Use this to disable the writing of the protein file. By default, one file is written per target protein.

  • NO_LGFNAME_FILE: Use this to disable the writing of the .lgfname file.

  • NO_PLP_MOL2_FILES: If using the ChemPLP scoring function, use this to disable the writing of plp_ligand.mol2 and plp_protein.mol2.

  • NO_PID_FILE: Use this to disable the writing of the gold.pid file.

  • NO_SEED_LOG_FILE: Use this to disable the writing of the gold.seed_log file.

  • NO_GOLD_ERR_FILE: Use this to disable the writing of the gold.err file.

  • NO_FIT_PTS_FILES: Use this to disable the writing of all files related to fitting points including, but not limited to, fit_pts.mol2 and fit_pts_merged.mol2.

  • NO_ASP_MOL2_FILES: If using the ASP scoring function, use this to disable the writing of asp_ligand.mol2 and asp_protein.mol2.

  • NO_GOLD_LOG_FILE: Use this to disable the writing of gold.log.

Returns a list of enabled write options.

copy_settings(newdocker)[source]

Copy this docker’s settings to another docker instance

dock(file_name=None, mode='foreground')[source]

Dock from the current settings.

Parameters:
  • file_name – file name for the settings. If None, current settings are written to a temporary directory.

  • mode – one of ‘foreground’, ‘background’ or ‘interactive’.

Raises:

RuntimeError if no GOLD executable is found.

dock_status()[source]

Check the status of a docking job via the gold.pid file.

property results

The docking results.

If the docking is still in progress, the results may be partial.