Beispiel #1
0
def modify_geometry(g):
    """Modify the geometry according to the interface"""
    if qtwrap.is_checked("remove_selected"):  # remove some atoms
        try:
            inds = np.array(np.genfromtxt("REMOVE_ATOMS.INFO", dtype=np.int))
            if inds.shape == (): inds = [inds]
        except:
            inds = []  # Nothing
        g = sculpt.remove(g, inds)  # remove those atoms
    if qtwrap.is_checked("remove_single_bonded"):  # remove single bonds
        g = sculpt.remove_unibonded(g, iterative=True)
    return g  # return geometry
Beispiel #2
0
def pickup_hamiltonian():
    if qtwrap.is_checked("do_scf"):
        return hamiltonians.load()  # load the Hamiltonian
    else:  # generate from scratch
        return initialize()