schrodinger.application.jaguar.csmiles.classes module

class schrodinger.application.jaguar.csmiles.classes.SmilesBond(bond: Bond, parent: SmilesAtom, child: SmilesAtom, read_dihedrals: ReadDihedral | None = None, is_ring_close: bool = False, is_ring_open: bool = False, tag: str = '')

Bases: object

__init__(bond: Bond, parent: SmilesAtom, child: SmilesAtom, read_dihedrals: ReadDihedral | None = None, is_ring_close: bool = False, is_ring_open: bool = False, tag: str = '')
bond: Bond
child: SmilesAtom
dihedrals: list[Dihedral]
back_dihedrals: list[float]
is_ring_close: bool
is_ring_open: bool
tag: str
reset_dihedral()
get_smiles_symbol() str
get_formatted_dihedral_block(precision: int, minimal: bool) str

Return the dihedral block string for this bond.

Parameters:
  • precision – The precision that the angles should be rounded to.

  • minimal – Flag that we should use the minimal set of delimiters for greater compression sacrificing readability.

Returns:

The dihedral block formatted in for a CSMILES string.

get_formatted_difference_block(other: Self, precision: int, tolerance: float, minimal: bool) str

Return the dihedral block string that is the difference between this bond and another bond. Suitable for a difference CSMILES string. Checks that the bonds are topologically identical and raises ConnectivityMismatchException if they are not.

Parameters:
  • other – The bond to compute the difference against.

  • precision – The precision that the angles should be rounded to before comparison.

  • tolerance – The tolerance below which differences will be truncated to zero.

  • minimal – Flag that the minimal representation should be used.

Raises:

ConnectivityMismatchException – If the bonds being compared are not topologically identical.

Returns:

The dihedral block formatted in for a CSMILES string.

is_same_bond(other: Self) bool

Check that this bond is topologically the same edge as another bond by confirming child and parent atoms have the same symmetry rank.

Parameters:

other – The bond to be compared against.

Returns:

True if self is topologically identical to other, else False.

class schrodinger.application.jaguar.csmiles.classes.WorkingBond(other_idx: int, bond_type: BondType, existing_bond: SmilesBond | None = None)

Bases: object

Helper structure to track bonds broken as dihedrals are applied so they can be restored after adjustments are made.

__init__(other_idx: int, bond_type: BondType, existing_bond: SmilesBond | None = None) None
other_idx: int
bond_type: BondType
existing_bond: SmilesBond | None = None