from wavefunction import Wavefunction from hamiltonian import Hamiltonian from pbasis import PBasis from vmfpropagate import vmfpropagate if __name__ == "__main__": nel = 2 nmodes = 1 nspfs = np.array([[10], [10]], dtype=int) npbfs = [[24, 151]] # TODO need to be able to combine modes with different pbfs pbfs = list() pbfs.append( PBasis(['ho', 24, 1.0, 1.0]) ) pbfs.append( PBasis(['plane wave', 151, 1.0],sparse=True) ) wf = Wavefunction(nel, nmodes, nspfs, npbfs) wf.generate_ic(1) # reshpae y into A tensor and spfs A = np.zeros(2, dtype=np.ndarray) spfs = np.zeros(2, dtype=np.ndarray) for alpha in range(wf.nel): shaper = () for mode in range(wf.nmodes): shaper += (wf.nspfs[alpha,mode],) # set A ind0 = wf.psistart[0,alpha] indf = wf.psiend[0,alpha]
np.set_printoptions(precision=20) import units from wavefunction import Wavefunction from hamiltonian import Hamiltonian from pbasis import PBasis from optools import precompute_ops from eom import eom_coeffs nel = 2 nmodes = 4 nspfs = np.array([[8, 13, 7, 6], [7, 12, 6, 5]], dtype=int) npbfs = np.array([22, 32, 21, 12], dtype=int) pbfs = list() pbfs.append( PBasis(['ho', 22, 1.0, 1.0]) ) pbfs.append( PBasis(['ho', 32, 1.0, 1.0]) ) pbfs.append( PBasis(['ho', 21, 1.0, 1.0]) ) pbfs.append( PBasis(['ho', 12, 1.0, 1.0]) ) wf = Wavefunction(nel, nmodes, nspfs, npbfs) wf.generate_ic(1) w10a = 0.09357 w6a = 0.0740 w1 = 0.1273 w9a = 0.1568 delta = 0.46165 lamda = 0.1825 k6a1 = -0.0964 k6a2 = 0.1194