示例#1
0
            substeps=3,  # MC steps taken w/o computing E_local
            samplesperthread=40  # No. of dmc walkers per thread
        ),
        dmc(  # dmc parameters
            timestep=0.01,  # dmc timestep (1/Ha)
            warmupsteps=50,  # No. of MC steps before data is collected
            blocks=400,  # No. of data blocks recorded in scalar.dat
            steps=5,  # No. of steps per block
            nonlocalmoves=True  # use Casula's T-moves
        ),  #  (retains variational principle for NLPP's)
    ],
    # return a list or object containing simulations
    return_list=False)

#the project manager monitors all runs
pm = ProjectManager()

# give it the simulation objects
pm.add_simulations(qsims.list())

# run all the simulations
pm.run_project()

# print out the total energy
performed_runs = not settings.generate_only and not settings.status_only
if performed_runs:
    # get the qmcpack analyzer object
    # it contains all of the statistically analyzed data from the run
    qa = qsims.qmc.load_analyzer_image()
    # get the local energy from dmc.dat
    le = qa.dmc[1].dmc.LocalEnergy  # dmc series 1, dmc.dat, local energy
示例#2
0
        system     = system,
        dirscf     = True, # use ram for speed
        job        = gms_job,
    )
    rhf = generate_gamess(
        path = myid+'/rhf',
        **rhf_inputs
    )
    rhf_runs.append(rhf)
  # end for j
# end for i

# ======= main ======
if __name__=='__main__':
    from nexus import ProjectManager
    pm = ProjectManager()
    pm.add_simulations(rhf_runs)
    pm.run_project()

    data = []
    for rhf in rhf_runs:
      ga = rhf.load_analyzer_image()
      hline = rhf.input.data.text.split("\n")[2]
      myx,myy,myz = map(float,hline.split()[-3:])
      try:
        Etot = ga.energy["total"]
      except:
        Etot = 0 # if Hartree-Fock fails, then H is too close to C
      # end try
      data.append({
        "x":myx,
示例#3
0
        conv_thr=1e-6,  # convergence threshold
        kgrid=kgrid,  # supercell k-point grid
        kshift=(1, 1, 1),  # grid centered at supercell L point
        pseudos=['Ge.pbe-kjpaw.UPF'],  # PBE pseudopotential
        system=T_system  # the interstitial system
    )
    # link together the simulation cascade
    #   current relax gets structure from previous
    if len(relaxations) > 0:  #   if it exists
        relax.depends(relaxations[-1], 'structure')
    #end if
    relaxations.append(relax)  # add relax simulation to the list
#end for

# perform the simulations
pm = ProjectManager()  # start the project manager

pm.add_simulations(relaxations)  # give it the relax calculations

pm.run_project()  # run all the jobs

# analyze the results
performed_runs = not settings.generate_only and not settings.status_only
if performed_runs:
    print
    print 'Relaxation results:'
    print '-------------------'
    print '    kgrid     starting force   max force    # of cycles'
    for ik in range(len(supercell_kgrids)):
        kgrid = supercell_kgrids[ik]
        relax = relaxations[ik]
示例#4
0
            timestep      = 0.01, # dmc timestep (1/Ha)
            warmupsteps   =  50,  # No. of MC steps before data is collected
            blocks        = 400,  # No. of data blocks recorded in scalar.dat
            steps         =   5,  # No. of steps per block
            nonlocalmoves = True  # use Casula's T-moves
            ),                    #  (retains variational principle for NLPP's)
        ],
    # return a list or object containing simulations
    return_list = False
    )




#the project manager monitors all runs
pm = ProjectManager()  

# give it the simulation objects
pm.add_simulations(qsims.list()) 

# run all the simulations    
pm.run_project()  



# print out the total energy
performed_runs = not settings.generate_only and not settings.status_only
if performed_runs:
    # get the qmcpack analyzer object
    # it contains all of the statistically analyzed data from the run
    qa = qsims.qmc.load_analyzer_image()
示例#5
0
            ispher=1,
            runtyp='energy',
            coord='unique',
            system=system,
            dirscf=True,  # use ram for speed
            job=gms_job,
        )
        rhf = generate_gamess(path=myid + '/rhf', **rhf_inputs)
        rhf_runs.append(rhf)
    # end for j
# end for i

# ======= main ======
if __name__ == '__main__':
    from nexus import ProjectManager
    pm = ProjectManager()
    pm.add_simulations(rhf_runs)
    pm.run_project()

    data = []
    for rhf in rhf_runs:
        ga = rhf.load_analyzer_image()
        hline = rhf.input.data.text.split("\n")[2]
        myx, myy, myz = map(float, hline.split()[-3:])
        try:
            Etot = ga.energy["total"]
        except:
            Etot = 0  # if Hartree-Fock fails, then H is too close to C
        # end try
        data.append({"x": myx, "z": myz, "E": Etot})
    # end for
        kshift     = (1,1,1),               # grid centered at supercell L point
        pseudos    = ['Ge.pbe-kjpaw.UPF'],  # PBE pseudopotential
        system     = T_system               # the interstitial system
        )
                                        # link together the simulation cascade
                                        #   current relax gets structure from previous
    if len(relaxations)>0:              #   if it exists
        relax.depends(relaxations[-1],'structure')
    #end if
    relaxations.append(relax)           # add relax simulation to the list
#end for



# perform the simulations
pm = ProjectManager()                 # start the project manager  

pm.add_simulations(relaxations)       # give it the relax calculations

pm.run_project()                      # run all the jobs



# analyze the results
performed_runs = not settings.generate_only and not settings.status_only
if performed_runs:
    print
    print 'Relaxation results:'
    print '-------------------'
    print '    kgrid     starting force   max force    # of cycles'
    for ik in range(len(supercell_kgrids)):