Package schrodinger :: Package application :: Package matsci :: Module amorphous :: Class XYZVolumeGraph
[hide private]
[frames] | no frames]

Class XYZVolumeGraph

object --+
         |
        XYZVolumeGraph

Create a networkx graph to search the voids in structure.

Instance Methods [hide private]
 
__init__(self, struct, spacing=2.0, scaffold=None)
Create networkx graph based on the structure PBC or coordinates.
tuple
getNodeXYZ(self, node)
Convert networkx node (tuple of X, Y, Z index) to XYZ coordinates
 
removeOverlappedNodes(self, atom_ids=None, vdw_scale=1.0)
Remove all nodes that overlap a bitset-on atom (all atoms by default) in current structure.
tuple
voids(self)
A generator that returns groups of connected nodes that define voids in the structure.
tuple
getLargestVoid(self)
Get the largest void.
tuple
getBuriedNode(self, blob)
A generator that returns nodes that is buried inside the blob of connected nodes.
tuple
getBuriedXYZ(self, blob)
Like getBuriedNode but return the xyz coordinates.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, struct, spacing=2.0, scaffold=None)
(Constructor)

 

Create networkx graph based on the structure PBC or coordinates.

Parameters:
  • struct (schrodinger.structure.Structure) - The structure to compute the graph over
  • spacing (float) - The approximate spacing (Angstroms) between graph nodes. The actual grid spacing will be adjusted in each direction to ensure uniform grid point distribution, and the actual spacing used in each direction can be found in the self.xyz_spacings list
  • scaffold (Scaffold or None) - a structure that occupies space as a cluster of molecules.
Overrides: object.__init__

getNodeXYZ(self, node)

 

Convert networkx node (tuple of X, Y, Z index) to XYZ coordinates

Parameters:
  • node (tuple) - the node to convert
Returns: tuple
A tuple of x, y z coordinates in Angstroms

removeOverlappedNodes(self, atom_ids=None, vdw_scale=1.0)

 

Remove all nodes that overlap a bitset-on atom (all atoms by default) in current structure.

Parameters:
  • atom_ids (set or None) - if not None, only check clashes for atoms in this set
  • vdw_scale (float) - VDW scale factor to use

voids(self)

 

A generator that returns groups of connected nodes that define voids in the structure.

Returns: tuple
Each returned value is a set of nodes that are all connected and define a void blob. The sets are returned in order of size, largest to smallest

getLargestVoid(self)

 

Get the largest void.

Returns: tuple
The set of nodes that form the largest void in the structure

getBuriedNode(self, blob)

 

A generator that returns nodes that is buried inside the blob of connected nodes. Buried nodes have lots of connections to other nodes.

Parameters:
  • blob (a set of tuples) - Each item of the set is a node
Returns: tuple
The buried node

getBuriedXYZ(self, blob)

 

Like getBuriedNode but return the xyz coordinates.

Parameters:
  • blob (a set of tuples) - Each item of the set is a node
Returns: tuple
A tuple of x, y z coordinates in Angstroms