schrodinger.application.desmond.fep_struc module

Defines a Struc class as a generic represention of molecular structure

class schrodinger.application.desmond.fep_struc.Struc

Bases: object

__init__()
id()

Returns the ID of this structure.

set_id(id)

Sets the ID for this structure.

copy()
extract(indices)

Return a new structure object which contains the atoms of the current structure that appear in the specified list.

title()
set_title(new_title)
heavy_atoms()

Returns a list of indices of heavy atoms (viz non-hydrogen atoms).

is_chiral_atom(atom_index)

Returns true if the atom indicated by atom_index is chiral; otherwise, false.

Parameters

atom_index (int) – Atom index

chiral_atoms()

Returns the indices of the chiral atoms.

Return type

list of int

Returns

A list of atom indices

ring_atoms()

Returns a set of ring atoms.

Return type

set of int

Returns

A set of atom indices

bonded_atoms(atom_index)

Returns a list of atom indices of atoms bonded to the indicated atom.

Parameters

atom_index (int) – A single index or a list of indices of the atoms to be deleted

Return type

list of int

Returns

A list of atom indices of atoms bonded to the indicated atom

total_charge()

Returns the total charge of the structure.

delete_atom(atom_index)

Deletes a atom.

Parameters

atom_index (int or list of int) – A single index or a list of indices of the atoms to be deleted

smarts()

Returns a SMARTS string of this structure.

smiles()

Returns a SMILES string of this structure.

write(format, mode='a')

Writes this structure into a file in the designated format.

Parameters

mode (char, ‘a’ | ‘w’) – When a file of the same name exists, this determines whether to overwrite (‘w’) or append (‘a’) to the file.

class schrodinger.application.desmond.fep_struc.SchrodStruc(struc)

Bases: schrodinger.application.desmond.fep_struc.Struc

A Struc subclass based on Schrodinger’s infrastructure

__init__(struc)

struc should be a schrodinger.structure.Structure object.

copy()

Returns a copy of this structure.

extract(indices)

Return a new structure object which contains the atoms of the current structure that appear in the specified list.

title()

Returns the title of this structure. (Normally title’s a user-friendly description)

set_title(new_title)

Sets a new title to this structure.

heavy_atoms()

Returns a list of indices of heavy atoms (viz non-hydrogen atoms).

is_chiral_atom(atom_index)

Returns true if the atom indicated by atom_index is chiral; otherwise, false.

Parameters

atom_index (int) – Atom index

chiral_atoms()

Returns the indices of the chiral atoms.

Return type

list of int

Returns

A list of atom indices

ring_atoms(aromaticity=0, group=False)

Returns ring atoms.

Parameters
  • aromaticity (int -1, 0, 1) – -1 = non-aromatic, 0 = all, 1 = aromatic. Make the function return the specified type of ring atoms.

  • group (bool) – If true, returns a list of set objects, each of which is a set of indices of atoms in the same ring; otherwise, returns a single set containing indices of all selected ring atoms.

Return type

set of int or a list of set of int

Returns

A set or a list of sets of atom indices

bonded_atoms(atom_index)

Returns a list of atom indices of atoms bonded to the indicated atom.

Parameters

atom_index (int) – A single index or a list of indices of the atoms to be deleted

Return type

list of int

Returns

A list of atom indices of atoms bonded to the indicated atom

molecules()

Returns a list of atom lists. Each element list is a list of atoms of a molecule in the structure. The first element in the returned list belongs to the biggest molecule.

total_charge()

Returns the formal charge of the structure

add_hydrogens()

Adds hydrogen atoms to this molecule.

delete_atom(atom_index)

Deletes a atom.

Parameters

atom_index (int or list of int) – A single index or a list of indices of the atoms to be deleted

smarts(atoms=None)

Returns a SMARTS string for this structure.

Parameters

atoms (list of int) – A list of atom indices

smiles()

Returns a SMILES string for this structure.

write(filename, format=None, mode='a', cil=False)

Writes this structure into a file in the designated format.

Parameters

format (str or None) – If its value is None, the file format is determined from the filename suffix. If specified, it must be one of the following case-sensitive strings: “pdb”, “mol2”, “sd”, “maestro”, “smiles”, and “smilescsv”.