예제 #1
0
def nexus_tile(axes0, pos0, tmat):
    """ tile a single species of particles from primitive to supercell

  for multiple species, tile one species at a time, then concatenate.

  Args:
    axes0 (np.array): primitive lattice vectors
    pos0 (np.array): primitive atomic positions
    tmat (np.array): tile matrix
  Return:
    (np.array, np.array): axes, pos in supercell
  """
    from nexus import Structure
    s0 = Structure(axes=axes0, pos=pos0, elem=['H'] * len(pos0), units='B')
    s1 = s0.tile(tmat)
    return s1.axes, s1.pos
예제 #2
0
from qmcpack_calculations import basic_qmc

#general settings for nexus
settings(
    pseudo_dir='./pseudopotentials',  # directory with all pseudopotentials
    sleep=3,  # check on runs every 'sleep' seconds
    generate_only=0,  # only make input files
    status_only=0,  # only show status of runs
    machine='node16',  # local machine is 16 core workstation
)

#generate the C20 physical system
# specify the xyz file
structure_file = 'c20.cage.xyz'
# make an empty structure object
structure = Structure()
# read in the xyz file
structure.read_xyz(structure_file)
# place a bounding box around the structure
structure.bounding_box(
    box='cubic',  # cube shaped cell
    scale=1.5  # 50% extra space
)
# make it a gamma point cell
structure.add_kmesh(
    kgrid=(1, 1, 1),  # Monkhorst-Pack grid
    kshift=(0, 0, 0)  # and shift
)
# add electronic information
c20 = PhysicalSystem(
    structure=structure,  # C20 structure
예제 #3
0
from nexus import settings
from nexus import Structure, PhysicalSystem
from nexus import generate_pwscf, Job
from nexus import ProjectManager

# set global parameters of nexus
settings(
    pseudo_dir='./pseudopotentials',  # directory with pseudopotentials
    generate_only=0,  # only generate input files, T/F
    status_only=0,  # only show run status, T/F
    machine='node16'  # local machine is 16 core workstation
)

# describe the physical system
T_structure = Structure()  # empty structure
T_structure.read_xyz('./Ge_T_16.xyz')  # read in Ge T interstitial structure

T_structure.reset_axes([  # specify cell axes (in Angstrom)
    [5.66, 5.66, 0.], [0., 5.66, 5.66], [5.66, 0., 5.66]
])

T_system = PhysicalSystem(  # make the physical system
    structure=T_structure,  # out of the T interstitial structure
    Ge=4  # pseudo-Ge has 4 valence electrons
)

# specify MP k-point grids for successive relaxations
supercell_kgrids = [
    (1, 1, 1),  #   1 k-point
    (2, 2, 2),  #   8 k-points
예제 #4
0
pwscf               = 'pw.x'
pw2qmcpack          = 'pw2qmcpack.x'
qmcpack             = 'qmcpack'

# Pseudopotentials
dft_pps             = ['O.BFD.upf','H.BFD.upf']
qmc_pps             = ['O.BFD.xml','H.BFD.xml']

# Job Definitions (MPI Tasks, MP Threading, PBS Queue, Time, etc.)
scf_job             = Job(app=pwscf,serial=True)
p2q_job             = Job(app=pw2qmcpack,serial=True)
opt_job             = Job(threads=4,app=qmcpack,serial=True)
dmc_job             = Job(threads=4,app=qmcpack,serial=True)

# System To Be Simulated
structure = Structure()
structure.read_xyz('H2O.xyz')
structure.bounding_box(
    box             = 'cubic',
    scale           = 1.5
    )
structure.add_kmesh(
    kgrid           = (1,1,1),
    kshift          = (0,0,0)
)
H2O_molecule = PhysicalSystem(
    structure       = structure,
    net_charge      = 0,
    net_spin        = 0,
    O               = 6,
    H               = 1,
예제 #5
0
#general settings for nexus
settings(
    pseudo_dir    = './pseudopotentials',# directory with all pseudopotentials
    sleep         = 3,                   # check on runs every 'sleep' seconds
    generate_only = 0,                   # only make input files
    status_only   = 0,                   # only show status of runs
    machine       = 'node16',            # local machine is 16 core workstation
    )



#generate the C20 physical system
# specify the xyz file
structure_file = 'c20.cage.xyz'
# make an empty structure object
structure = Structure()
# read in the xyz file
structure.read_xyz(structure_file)
# place a bounding box around the structure
structure.bounding_box(
    box   = 'cubic',         # cube shaped cell
    scale = 1.5              # 50% extra space
    )
# make it a gamma point cell
structure.add_kmesh(
    kgrid      = (1,1,1),    # Monkhorst-Pack grid
    kshift     = (0,0,0)     # and shift
    )
# add electronic information
c20 = PhysicalSystem(
    structure = structure,   # C20 structure
from nexus import run_project



# set global parameters of nexus
settings(
    pseudo_dir    = '../pseudopotentials',# directory with pseudopotentials
    generate_only = 0,                    # only generate input files, T/F
    status_only   = 0,                    # only show run status, T/F
    machine       = 'ws16'                # local machine is 16 core workstation
    )



# describe the physical system
T_structure = Structure()             # empty structure
T_structure.read_xyz('./Ge_T_16.xyz') # read in Ge T interstitial structure

T_structure.reset_axes([              # specify cell axes (in Angstrom)
        [ 5.66,  5.66,  0.  ],
        [ 0.  ,  5.66,  5.66],
        [ 5.66,  0.  ,  5.66]
        ])

T_system = PhysicalSystem(            # make the physical system
    structure = T_structure,          # out of the T interstitial structure
    Ge        = 4                     # pseudo-Ge has 4 valence electrons
    )


# specify MP k-point grids for successive relaxations
예제 #7
0
# ======= simulations =======
'''
MODERN BASIS SET FAMILIES (CCN, PCN, MCP_NZP, IMCP) ARE INTENDED
 FOR USE ONLY AS SPHERICAL HARMONIC BASIS SETS. PLEASE SET ISPHER=1
  IN THE $CONTRL GROUP IN ORDER TO USE GBASIS=ACCT
'''

rhf_runs = []
x = np.linspace(-1.5, 1.5, 32)
z = np.linspace(-1.0, 2.0, 32)
for i in range(len(x)):
    for j in range(len(z)):
        myid = "x%2.5f_z%2.5f" % (x[i], z[j])
        struct = Structure(elem=['H', 'C', 'N'],
                           pos=[[x[i], 0, z[j]], [0, 0, -CH],
                                [0, 0, -(CH + CN)]],
                           units='A')
        system = generate_physical_system(structure=struct,
                                          net_charge=0,
                                          net_spin=0)
        rhf_inputs = obj(
            identifier=myid + 'rhf',
            scftyp='rhf',
            gbasis=basis,
            ispher=1,
            runtyp='energy',
            coord='unique',
            system=system,
            dirscf=True,  # use ram for speed
            job=gms_job,
        )