Skip to content

IndexError in disconnectivity_graph.py", line 643 #175

@tessavdheiden

Description

@tessavdheiden

Hey!

I'm eager to start working with the disconnectivity graphs.
I've created a minimal example, but I receive an error:
pele/utils/disconnectivity_graph.py", line 643, in __init__ self.gmin0 = elist[0][1] IndexError: list index out of range

Here's the example:

from pele.systems import BaseSystem
class MySystem(BaseSystem):
    def __init__(self, natoms):
        super(MySystem, self).__init__()
        self.natoms = natoms
        self.params.database.accuracy = 0.001

    def get_potential(self):
        return MyPot(self.natoms)

import numpy as np
natoms = 8
system = MySystem(natoms)
database = system.create_database()

from pele.utils.disconnectivity_graph import DisconnectivityGraph, database2graph
import matplotlib.pyplot as plt
#convert the database to a networkx graph
graph = database2graph(database)
dg = DisconnectivityGraph(graph, nlevels=3, center_gmin=True)
dg.calculate()
dg.plot()
plt.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions