Package schrodinger :: Package application :: Package glide :: Module poseviewconvert :: Class Complex
[hide private]
[frames] | no frames]

Class Complex

A helper class to split a receptor-ligand complex structure into ligand, and receptor structure components, and write the structure components to new files.

API Examples:

   # Write a pv file 
   comp = Complex(st)
   comp.writePv('output_pv.mae')

   # Write a ligand file, transfer all the complex's properties
   comp = Complex(
       st
       ligand_properties = st.property.keys()
   )
   comp.writeLigand('ligand-only.mae')

The receptor will have the same properties as the input complex. By default, the ligand takes the title of the complex but has no other properties. The ligand title can be selected from one of the complex's properties with ligand_title_source, and a list of properties to transfer to the ligand can be specified with ligand_properties.

Instance Methods [hide private]
 
__init__(self, st, ligand_asl=None, ligand_title_source=None, ligand_properties=None)
 
_split(self)
Extracts the ligand from the ligand-receptor complex, creates the ligand structure attribute, and deletes the ligand from the complex to form the receptor attribute.
 
writePv(self, file_name)
Writes receptor and ligand to disk, in pv file format.
 
writeLigand(self, file_name)
Writes the ligand structure to the passed filename, clobbering as needed.
 
appendLigand(self, file_name)
Appends the ligand structure to the passed filename.
 
writeReceptor(self, file_name)
Writes the receptor structure to the passed filename, clobbering as needed.
 
appendReceptor(self, file_name)
Appends the receptor structure to the passed filename.
Instance Variables [hide private]
structure.Structure complex
The original receptor-ligand complex.
structure.Structure ligand
The ligand-only structure.Structure.
list ligand_indexes
List of atom numbers for the ligand in the complex, the match to the ASL evaluation.
list ligand_properties
A list of m2io datanames of entry level properties to copy from the complex to the ligand structure.
string ligand_title_source
A single m2io dataname of an entry level property in the complex structure to use as the title for the ligand.
structure.Structure receptor
The receptor-only (non-ligand).
Method Details [hide private]

__init__(self, st, ligand_asl=None, ligand_title_source=None, ligand_properties=None)
(Constructor)

 
Parameters:
  • st (structure.Structure) - Structure instance of the receptor-ligand complex.
  • ligand_asl (str) - Optional Atom Selection Language expression for the ligand molecule, Default is None, which will select the last molecule in the complex (mol.n #).
  • ligand_title_source (str) - An m2io entry data name of the complex property to use as the ligand's title. Default is 's_m_title'.
  • ligand_properties (list of str) - List of m2io entry level data names in the complex to be transfered to the ligand entry.
Raises:
  • RuntimeError - If the structure can't be split.

Instance Variable Details [hide private]

ligand_title_source

A single m2io dataname of an entry level property in the complex structure to use as the title for the ligand. Default is 's_m_title'.
Type:
string