Пример #1
0
def get_dlist_random(system, n=10):
    dlist = DeltaList(system)
    for row in xrange(n):
        i = np.random.randint(system.natom)
        j = (i + np.random.randint(1, system.natom)) % system.natom
        dlist.add_delta(i, j)
    return dlist
Пример #2
0
def get_dlist_bonds(system):
    dlist = DeltaList(system)
    for i, j in system.bonds:
        dlist.add_delta(i, j)
    return dlist