Package schrodinger :: Package application :: Package desmond :: Module fep_struc :: Class SchrodStruc
[hide private]
[frames] | no frames]

Class SchrodStruc

object --+    
         |    
     Struc --+
             |
            SchrodStruc

A `Struc' subclass based on Schrodinger's infrastructure

Instance Methods [hide private]
 
__init__(self, struc)
`struc' should be a `schrodinger.structure.Structure' object.
 
__setstate__(self, dict)
 
copy(self)
Returns a copy of this structure.
 
extract(self, indices)
Return a new structure object which contains the atoms of the current structure that appear in the specified list.
 
title(self)
Returns the title of this structure.
 
set_title(self, new_title)
Sets a new title to this structure.
 
heavy_atoms(self)
Returns a list of indices of heavy atoms (viz non-hydrogen atoms).
 
is_chiral_atom(self, atom_index)
Returns true if the atom indicated by atom_index is chiral; otherwise, false.
list of int
chiral_atoms(self)
Returns the indices of the chiral atoms.
set of int or a list of set of int
ring_atoms(self, aromaticity=0, group=False)
Returns ring atoms.
list of int
bonded_atoms(self, atom_index)
Returns a list of atom indices of atoms bonded to the indicated atom.
 
molecules(self)
Returns a list of atom lists.
 
total_charge(self)
Returns the formal charge of the structure
 
add_hydrogens(self)
Adds hydrogen atoms to this molecule.
 
delete_atom(self, atom_index)
Deletes a atom.
 
smarts(self, atoms=None)
Returns a SMARTS string for this structure.
 
smiles(self)
Returns a SMILES string for this structure.
 
write(self, filename, format=None, mode='a', cil=False)
Writes this structure into a file in the designated format.

Inherited from Struc: __str__, id, set_id

Inherited from Struc (private): _atom

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, struc)
(Constructor)

 

`struc' should be a `schrodinger.structure.Structure' object.

Overrides: object.__init__

copy(self)

 

Returns a copy of this structure.

Overrides: Struc.copy

extract(self, indices)

 

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

Overrides: Struc.extract

title(self)

 

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

Overrides: Struc.title

set_title(self, new_title)

 

Sets a new title to this structure.

Overrides: Struc.set_title

heavy_atoms(self)

 

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

Overrides: Struc.heavy_atoms

is_chiral_atom(self, atom_index)

 

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

Parameters:
  • atom_index (int) - Atom index
Overrides: Struc.is_chiral_atom

chiral_atoms(self)

 

Returns the indices of the chiral atoms.

Returns: list of int
A list of atom indices
Overrides: Struc.chiral_atoms

ring_atoms(self, 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.
Returns: set of int or a list of set of int
A set or a list of sets of atom indices
Overrides: Struc.ring_atoms

bonded_atoms(self, 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
Returns: list of int
A list of atom indices of atoms bonded to the indicated atom
Overrides: Struc.bonded_atoms

molecules(self)

 

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(self)

 

Returns the formal charge of the structure

Overrides: Struc.total_charge

delete_atom(self, 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
Overrides: Struc.delete_atom

smarts(self, atoms=None)

 

Returns a SMARTS string for this structure.

Parameters:
  • atoms (list of int) - A list of atom indices
Overrides: Struc.smarts

smiles(self)

 

Returns a SMILES string for this structure.

Overrides: Struc.smiles

write(self, 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".
Overrides: Struc.write