Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fly

Pages: [1] 2
1
General Questions and Answers / SGGA+U and Van der Waals correction
« on: September 26, 2018, 12:47 »
Hi
I'm working on the band structures of bilayer CrI3 using QuantumATK 2016.  After I Choose SGGA+U, why is Van der Waals
correction automatically closed?  Can SGGA+U and Van der Waals  correction be set at the same time?

2
General Questions and Answers / Re: modification of script
« on: April 25, 2012, 15:14 »
Thanks!

3
General Questions and Answers / Re: modification of script
« on: April 25, 2012, 03:56 »
When I change the script from ‘brillouin_zone_integration_parameters = None’ to brillouinZoneIntegrationParameters((3,3,1)), it does not work. But if I modify the script as brillouinZoneIntegrationParameters((3,3)), it works well.  Is it reasonable for this modification. If it is reasonable, whether this means the calculation for PDOS is always written as ‘brillouinZoneIntegrationParameters((3,3))’ when the K-points sampling is 3*3*100 or 3*3*500?

4
General Questions and Answers / modification of script
« on: April 24, 2012, 11:43 »
I have calculated a system using ATK2008-10. We can obtain the PDOS using the script below. But if the K-point sampling in x and y directions is 3*3. How do I modify this script?

from ATK.TwoProbe import *; import numpy
from projected_density_of_states import *


scf = restoreSelfConsistentCalculation('lih2li.nc')

projection_atoms = [5,6]
pdos = calculateProjectedDensityOfStates(scf,numpy.arange(-3,3.01,0.01)*Units.eV,
                                         projection_atoms = projection_atoms)

nlPrint(pdos)


from ATK.TwoProbe import *; import numpy as np

def calculateProjectedDensityOfStates(self_consistent_calculation = None,
                                      energies = None,
                                      brillouin_zone_integration_parameters = None,
                                      green_function_infinitesimal = None,
                                      projection_atoms = []):
    """
    Written by Nordland !
    Extreme usage of ATK backengine!

    Module for calculate the density of states projected onto the atoms.

    Uses the same interfaces as calculateDensityOfStates, but is extended with a parameter
    called projection_atoms.
   
    Give the projection atoms as a sequence of the indicies of the atoms to project onto
    for instance projection_atoms = [3,6,7,8]
    """
    atom_container = self_consistent_calculation._attributeContainer().getAtomContainer("AtomContainer")
    number_of_atoms = atom_container.numberOfAtoms()
    old_contact = [(atom_container.atoms()).isContact() for i in range(number_of_atoms)]
    first_atom_index = \
            np.where([ not(atom_container.atoms()).isElectrode() for i in range(number_of_atoms)])[0][0]
    new_contact = np.array([False]*number_of_atoms)
    indicies = np.array(projection_atoms)+first_atom_index
    new_contact[indicies] = True

    # Insert the new contact atoms.
    for i,c in enumerate(new_contact):
        (atom_container.atoms()).setContact(bool(c))
    pdos = calculateDensityOfStates(self_consistent_calculation,
                                    energies,
                                    brillouin_zone_integration_parameters,
                                    green_function_infinitesimal)
    # Restore the old contact atoms.
    for i,c in enumerate(old_contact):
        (atom_container.atoms()).setContact(bool(c))
    # Return the projected density of states.
    return pdos

5
Thank you for your reply. Can you present the full name for the abbreviations (BOMD, NVE, NVT, and NPT)? Thank you! ;)

6
Who can offer me some advice?  :(

7
If I execute an ab initio molecular dynamics simulation on 6-ZGNR
at room temperature (T=300 K) with a time step of 1 fs. Is it right for the following script? Do I need to make some revisions for some parameters in the following scrip? Who can provide the corresponding tutorial for molecular dynamics simulation in ATK 11.8. Thanks!


# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [10.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 23.56888, 0.0]*Angstrom
vector_c = [0.0, 0.0, 2.46100171044]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon,
            Carbon, Carbon, Carbon, Carbon, Hydrogen, Hydrogen]

# Define coordinates
cartesian_coordinates = [[  5.        ,  17.46788   ,   0.        ],
                         [  5.        ,   6.101     ,   0.        ],
                         [  5.        ,   6.81143   ,   1.23050086],
                         [  5.        ,   8.23229   ,   1.23050086],
                         [  5.        ,   8.94272   ,   0.        ],
                         [  5.        ,  10.36358   ,   0.        ],
                         [  5.        ,  11.07401   ,   1.23050086],
                         [  5.        ,  12.49487   ,   1.23050086],
                         [  5.        ,  13.2053    ,   0.        ],
                         [  5.        ,  14.62616   ,   0.        ],
                         [  5.        ,  15.33659   ,   1.23050086],
                         [  5.        ,  16.75745   ,   1.23050086],
                         [  5.        ,  18.56888   ,   0.        ],
                         [  5.        ,   5.        ,   0.        ]]*Angstrom

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
numerical_accuracy_parameters = NumericalAccuracyParameters(
    grid_mesh_cutoff=150.0*Hartree,
    k_point_sampling=(1, 1, 100),
    )

iteration_control_parameters = IterationControlParameters(
    tolerance=1e-05,
    )

calculator = LCAOCalculator(
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    iteration_control_parameters=iteration_control_parameters,
    )

bulk_configuration.setCalculator(calculator)
nlprint(bulk_configuration)
bulk_configuration.update()
nlsave('analysis.nc', bulk_configuration)

initial_velocity = None
method = VelocityVerlet(
        time_step=1.0*femtoSecond,
        initial_velocity=initial_velocity
    )
molecular_dynamics = MolecularDynamics(
        bulk_configuration,
        constraints=[],
        log_filename='trajectory.nc',
        steps=1000,
        log_interval=1,
        method=method
    )
nlsave('analysis.nc', molecular_dynamics)
nlprint(molecular_dynamics)

8
General Questions and Answers / Re: smearing width for DOS
« on: February 20, 2012, 15:51 »
Thanks! ;D

9
General Questions and Answers / Re: smearing width for DOS
« on: February 20, 2012, 03:07 »
I can obtain data for PDOS from vnl in ATK 11.8.2. But the picture shows that PDOS peaks are very sharp. I have to smear the DOS using "gaussianSpectrum()": according to the comment of referee.  But the script only present total DOS,  I desire to obtain the script for PDOS. Who can help me ?  :'( :'( :'( :'(

10
General Questions and Answers / Re: smearing width for DOS
« on: February 19, 2012, 14:30 »
broadening
Broadening of the Gaussian.

Type: PhysicalQuantity with unit energy

Default: 0.1*eV

The referee say that the quality of DOS needs to be improved by employing a larger smearing width. If I want to improve smearing width, how can I set it?
I use the manuscript below, but it only present a picture and I cannot obtain data for dos and pdos. Because this picture needs to be plotted using Matlab, can you present a manuscript which can change smearing width and obtain data for dos and pdos (especially for pdos).






# read DOS object from file
dos = nlread('si_dos.nc', DensityOfStates)[0]


# make list of energies
energies = numpy.arange(-14,5,0.01)*eV

# calculate the DOS spectrum with two different methods
dos_t = dos.tetrahedronSpectrum(energies)
dos_g = dos.gaussianSpectrum(energies, broadening = 0.2*eV)

#plot the spectra using pylab
import pylab
pylab.figure()
pylab.plot(energies.inUnitsOf(eV), dos_t.inUnitsOf(eV**-1))
pylab.plot(energies.inUnitsOf(eV), dos_g.inUnitsOf(eV**-1))
pylab.xlabel("Energy (eV)")
pylab.ylabel("DOS (1/eV)")
pylab.show()

11
General Questions and Answers / smearing width for DOS
« on: February 19, 2012, 10:20 »
When we plot DOS, is it possible to set smearing width in ATK 11.8.2?

12
Our studied configuration is optimized until all residual forces on each atom are smaller than 0.04 eV/angstrom , but the reviewer thinks that this force convergence criteria is a little too large. He ask us provide the information about energy convergence per atom. How can I obtain energy convergence per atom in geometry optimization by using ATK. Our convergence criterion for geometry optimization is 10^−5 (Ry) in total energy.. Whether energy convergence per atom is 10^−5/the number of atoms?

13
If the geometry of 4-ZGNR is optimized until all residual forces on each atom are smaller than 0.05 eV/angstrom , what is the physical meaning for 0.05 eV/angstrom , and What is the corresponding energy convergence per atom?  The configuration of 4-ZGNR is obtained using following manuscript. I have carefully read ATK manual, but I cannot find corresponding information for this question. Who can help me?

armchair = False   # False -> zigzag
width = 8          # ribbon width across, number of layers (must be even for zigzag)
repetitions = 1    # repetitions of the minimal unit along the ribbon
PAC = True         # False -> molecule

# C-C and C-H and unit cell padding distances (all in Angstrom)
aCC = 1.42086
aCH = 1.101
cell_pad = 30.

'''===========================================================================
Nothing needs to be modified below this line!
==========================================================================='''

from ATK.KohnSham import *
from numpy import array, fromfunction
import math

# -------------------------------------------------------------------------------------------
# Positions are in units of aCC until the very end!
# -------------------------------------------------------------------------------------------

def unit_cell_C_atoms (zigzag,layers):
   
    zpos = []
    xpos = []
    zigzag_zpos = [0.0,0.5,0.5,0.0]
    zigzag_xpos = [0.0,0.5,1.5,2.0]
    for x in range(0,layers):
        if zigzag:
            zpos += [zigzag_zpos[x%4] * math.sqrt(3.)]
            xpos += [zigzag_xpos[x%4] + 3.*(x//4)]
        else:
            zpos += [0.5+1.5*(x%2), 1.5-1.5*(x%2)]
            xpos += [x*math.sqrt(3.)/2.,]*2
    return (xpos,zpos)

def unit_cell_H_atoms (zigzag,layers,xpos,zpos,xCH,zCH):

    if zigzag:
        hydrogen_z = [0., 0.5*math.sqrt(3.)*((width/2)%2)]
        hydrogen_x = [xpos[0]-xCH, xpos[-1]+xCH]
    else:
        hydrogen_z = [zpos[0]-zCH, zpos[1]+zCH, zpos[-2]-zCH, zpos[-1]+zCH]
        hydrogen_x = [xpos[0]-xCH, xpos[0]-xCH, xpos[-1]+xCH, xpos[-1]+xCH]
    return (hydrogen_x,hydrogen_z)

# -----------------------------------------------------------------------

zigzag = not armchair

if (zigzag and (width%2==1)):
    raise ValueError, "Width must be an even number for zigzag"

pad = cell_pad/aCC

# For zigzag, the unit cell in Z is sqrt(3)*aCC, for armchair 3*aCC
if zigzag:
    atoms_per_cell = width + 2
    period_z = math.sqrt(3.)
    xCH = aCH/aCC
    zCH = 0.
    elements = ([Carbon,]*width+[Hydrogen,]*2)*repetitions
else:
    atoms_per_cell = width*2 + 4
    period_z = 3.
    xCH = aCH/aCC*math.sqrt(3.)/2.
    zCH = aCH/aCC/2.
    elements = ([Carbon,]*2*width+[Hydrogen,]*4)*repetitions

# -----------------------------------------------------------------------

# Set up the unit cell along the ribbon
(xpos,zpos) = unit_cell_C_atoms (zigzag,width)
(h_xpos,h_zpos) = unit_cell_H_atoms (zigzag,width,xpos,zpos,xCH,zCH)

# Merge C and H, and repeat desired times along ribbon length (Z)
xpos = array((xpos + h_xpos)*repetitions)
zpos = array((zpos + h_zpos)*repetitions)

# The coordinates in zpos must still be shifted along z by N*unit cell width where N=0,1,2,3,...,repetitions-1
# This part is not needed if we would do all repetitions in VNL
shift = fromfunction( lambda i,j : j//atoms_per_cell, (1,atoms_per_cell*repetitions) )
zpos = zpos + shift[0] * period_z

# Unit cell
# In x, add the desired padding the the distance between the outermost atoms
# In y, use the desired padding
# In z, the period is given by period_z, we just need to scale it properly
unit_x = (max(xpos)-min(xpos)) + pad
unit_y = pad
unit_z = period_z * repetitions
unit_cell = array([ [unit_x, 0., 0. ],
                    [0., unit_y, 0. ],
                    [0., 0., unit_z ] ])
             
# Center the atoms in the unit cell
# For x, first adjust for position of H atom, then shift by half the padding
xpos += xCH + pad/2.
# z shift is half
if zigzag:
    zpos += period_z / 4.
else:
    zpos += period_z / 6.   
# And finally y
ypos = array([0.] * repetitions * atoms_per_cell) + pad/2.
   
# Merge coordinates to xyz
pos = array([xpos,ypos,zpos]).transpose()

# Apply final scaling by aCC * Angstrom
# Note: If PACs can be dropped on Molecular Builder, we can do PAC=True permanently
if PAC:
    graphene_ribbon = PeriodicAtomConfiguration (unit_cell*aCC*Ang, elements, pos*aCC*Ang)
else:
    graphene_ribbon_as_molecule = MoleculeConfiguration (elements,pos*aCC*Ang)

14
General Questions and Answers / Co or Ni electrode
« on: May 8, 2011, 13:39 »
I want to set a two-probe syetem using Co or Ni electrode. If the intial spin for Co (Ni) atoms is set as 1. Is it right?

15
Recently, I try to use atk-11.2.0.  However, when I test spin-polarized ZGNR, I cannot get the
spin up and spin down bands.  In vnl, I can only find a band picture. The band is the same with spin unpolarized band whatever the intial spin is set AF or FM. Why is this? I have tested other systems, same case is presented. The script is posted as follows:
# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [10.0, 0.0, 0.0]*Angstrom
vector_b = [0.0, 19.3063, 0.0]*Angstrom
vector_c = [0.0, 0.0, 2.46100171044]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon, Carbon,
            Hydrogen, Hydrogen]

# Define coordinates
cartesian_coordinates = [[  5.        ,  13.2053    ,   0.        ],
                         [  5.        ,   6.101     ,   0.        ],
                         [  5.        ,   6.81143   ,   1.23050086],
                         [  5.        ,   8.23229   ,   1.23050086],
                         [  5.        ,   8.94272   ,   0.        ],
                         [  5.        ,  10.36358   ,   0.        ],
                         [  5.        ,  11.07401   ,   1.23050086],
                         [  5.        ,  12.49487   ,   1.23050086],
                         [  5.        ,  14.3063    ,   0.        ],
                         [  5.        ,   5.        ,   0.        ]]*Angstrom

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = LDABasis.SingleZetaPolarized

numerical_accuracy_parameters = NumericalAccuracyParameters(
    grid_mesh_cutoff=150.0*Hartree,
    )

calculator = LCAOCalculator(
    basis_set=basis_set,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    )

bulk_configuration.setCalculator(calculator)

# -------------------------------------------------------------
# Initial State
# -------------------------------------------------------------
initial_spin = InitialSpin(scaled_spins=[1.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0])
bulk_configuration.setCalculator(
    calculator,
    initial_spin=initial_spin,
)
bulk_configuration.update()
nlsave('analysis.nc', bulk_configuration)
nlprint(bulk_configuration)

# -------------------------------------------------------------
# Bandstructure
# -------------------------------------------------------------
bandstructure = Bandstructure(
    configuration=bulk_configuration,
    route=['G', 'Z'],
    points_per_segment=20,
    bands_above_fermi_level=All
    )
nlsave('analysis.nc', bandstructure)

Pages: [1] 2