pele.landscape._graph#
Wrapper to represent a storage class as a graph
- pele.landscape._graph.database2graph()[source]
-
def database2graph(db, Emax=None):make a networkx graph from a database
- Parameters:
- dbpele Database
- Emaxfloat optional
including only transition states with energy < Emax
- class pele.landscape._graph.TSGraph[source]
-
class TSGraph:Wrapper to represent a database object as a graph
This class is primarily used by DoubleEndedConnect and has a number of utility functions for that purpose. If you want access to the networkx Graph object, it is stored as self.graph
- Parameters:
- database
the database object to represent
- minimalist of minima, optional
if none, include all minima and transition states from the database, else include only the minima in the list
- no_edgesbool, optional
If true include no transition states in the graph. This is used, for example, to try to find a new connection between two minima.
See also
Examples
a graph can be easily constructed from a database:
>>> graph = TSGraph(database)the networkx graph is accessed directly by
>>> networkx_graph = graph.graph
- TSGraph.addMinimum()[source]
-
def addMinimum(self, minimum):add a minimum to the database and graph
- TSGraph.mergeMinima()[source]
-
def mergeMinima(self, min1, min2):delete minima2. all transition states pointing to min2 should now point to min1