schrodinger.structutils.assignbondorders module

A module to assign bond orders based on molecular geometry.

Assigns double and triple bonds to structures based on molecular geometry (bond length, bond angles, and dihedral angles). Useful when importing ligands from PDBs into Maestro. Please check the output structure for errors and compare it to the molecular formula. If this script assigns bond orders incorrectly to a reasonable structure, please email the maestro file of the structure to help@schrodinger.com.

There is a single public function:

assignbondorders.assign_st(input_st, atoms=None, neutralize=False,
                           problem_only=False, skip_assigned_residues=True,
                           _logger=None)

Assigns bond orders to atom list [atoms] of structure input_st and returns a list of bonds that were adjusted. Bond orders are assigned for all atoms if the atoms list is empty or not specified.

Copyright (c) Schrodinger, LLC. All rights reserved.

schrodinger.structutils.assignbondorders.assign_st(st, atoms=None, neutralize=False, problem_only=False, skip_assigned_residues=True, use_ccd=False, _logger=None)

Perform the assign-bond-order algorithm on the supplied structure. If the atom list is specified, only those atoms are fixed.

Parameters:
  • st (L{structure.Structure)) – Structure to assign bond orders in

  • atoms (list of ints) – List of atoms to assign. By default all atoms as assigned.

  • neutralize (bool) – Whether to protonate carboxylic acids.

  • problem_only (bool) – Whether to assign only to atoms with PDB convert problem of 4 (orange atoms). Not compatible with <atoms> argument.

  • skip_assigned_residues (bool) – If True, bond orders are not assigned to residues that have double or triple bonds, even if that residue’s atoms are in <atoms>. Not compatible with <problem_only> option.

  • use_ccd (bool) – Whether to use the Chemical Component Dictionary for hets that have records there. Not supported for covalent ligands. NOTE: if set to True, then all existing bond orders and charges (if present) will be overwritten (for residues with CCD entries). If False (or if residue can’t be assigned by CCD), formal charges are not adjusted, and existing bond orders will never be reduced.

  • _logger (logger) – logger to send messages to

Returns:

List of (atom1, atom2, order) for every bond whose order was altered.

Return type:

list of (int, int, int)

schrodinger.structutils.assignbondorders.orders_assigned(st, atoms=None, all=False)

Returns True if all bond orders are OK in the specified structure. Can be given a list of atoms to check bond orders of. If not list is specified and all flag is set to True, all atoms are checked; otherwise only atoms with a PDB convert error (appear orange in Maestro) are checked. NOTE: atoms and all options are mutually exclusinve.