Package schrodinger :: Module surface :: Class SurfaceDict
[hide private]
[frames] | no frames]

Class SurfaceDict

       object --+            
                |            
    _abcoll.Sized --+        
                    |        
       object --+   |        
                |   |        
 _abcoll.Iterable --+        
                    |        
       object --+   |        
                |   |        
_abcoll.Container --+        
                    |        
      _abcoll.Mapping --+    
                        |    
   _abcoll.MutableMapping --+
                            |
                           SurfaceDict

A dictionary of {surface name: ProjectSurface object} for the specified project row. Note that surfaces may not be created by assignment to a dictionary value. Use add, {addFromFile}, or schrodinger.project.ProjectRow.newMolecularSurface instead. SurfaceDict objects are typically accessed via schrodinger.project.ProjectRow.surface.

Nested Classes [hide private]

Inherited from _abcoll.Sized: __metaclass__

Instance Methods [hide private]
 
__init__(self, proj, row)
@param proj: The project @type proj: L{schrodinger.project.Project}
 
__len__(self)
 
__getitem__(self, name)
 
__setitem__(self, key, value)
 
__delitem__(self, name)
 
__iter__(self)
ProjectSurface
add(self, surf, overwrite=True, copy=False)
Add an existing Surface object to the project row.
ProjectSurface
addFromFile(self, filename, name=None, overwrite=True)
Read a surface from a file and add it to the project row.

Inherited from _abcoll.MutableMapping: clear, pop, popitem, setdefault, update

Inherited from _abcoll.Mapping: __contains__, __eq__, __ne__, get, items, iteritems, iterkeys, itervalues, keys, values

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

Class Methods [hide private]

Inherited from _abcoll.Sized: __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
  _abc_cache = <_weakrefset.WeakSet object at 0x7f5962f3ad90>
  _abc_registry = <_weakrefset.WeakSet object at 0x7f5962f1df50>

Inherited from _abcoll.Mapping: __hash__

Inherited from _abcoll.Mapping (private): _abc_negative_cache_version

Inherited from _abcoll.Sized (private): _abc_negative_cache

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, proj, row)
(Constructor)

 

@param proj: The project
@type proj: L{schrodinger.project.Project}

@param row: The project row
@type row: L{schrodinger.project.ProjectRow

Overrides: object.__init__

__len__(self)
(Length operator)

 
Overrides: _abcoll.Sized.__len__

__getitem__(self, name)
(Indexing operator)

 
Overrides: _abcoll.Mapping.__getitem__

__setitem__(self, key, value)
(Index assignment operator)

 
Overrides: _abcoll.MutableMapping.__setitem__

__delitem__(self, name)
(Index deletion operator)

 
Overrides: _abcoll.MutableMapping.__delitem__

__iter__(self)

 
Overrides: _abcoll.Iterable.__iter__

add(self, surf, overwrite=True, copy=False)

 

Add an existing Surface object to the project row. Note that if copy is False (the default), this method will invalidate the input Surface object, as the mmsurf handle will be managed by the project.

Parameters:
  • surf (Surface) - The surface to add.
  • overwrite (bool) - What to do if the new surface has the same name as an existing surface for this project row. If True, the existing surface will be overwritten. In False, a ValueError will be raised.
  • copy (bool) - If True, a copy of the surface will be added to the project and the input surface will not be invalidated.
Returns: ProjectSurface
A ProjectSurface object for the added surface.

addFromFile(self, filename, name=None, overwrite=True)

 

Read a surface from a file and add it to the project row.

Parameters:
  • filename (str) - The file to read
  • name (str) - If given, the surface will be renamed to this before being loaded into the project.
  • overwrite (bool) - What to do if the new surface has the same name as an existing surface for this project row. If True, the existing surface will be overwritten. In False, a ValueError will be raised.
Returns: ProjectSurface
A ProjectSurface object for the added surface.