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 - wachr

Pages: [1]
1
Gallery / Re: Your Valentines molecule
« on: July 9, 2012, 17:04 »
All the girlfriends will be impressed ;). Thank you :D

[But honestly, great idea and inspiring concerning the use of the new builder.]

2
Dear Nordland,

thank you very much for your interesting answer concerning your implementation.

I hope that I got your answer right and the scaling behaviour you are mentioning is based on the evaluation of the bandstructure, which should normally take longer than the calculation of the transmission. (I had to think about your answer to know, where this scaling behaviour of "my method" comes from...)

I also see the comment from Anders, that the implementation of the 3D-case would really a mess with my method (one could calculate the bandstructure with different directions in the kspace, then, the transmission into a single direction in the real space could be obtained.)

So nevertheless, thank you for valuing my contribution!

Best, Christian Wagner

3
Dear Anders,

thank you very much for that detailed answer - it was approximately what I expected (a bit more than that - so I learned sth :) ). So, this approach will possibly not hold for metal-decorated CNTs as there is scattering. And I fully agree, that ideal systems are some kind of "uninteresting". Nevertheless, the following question:

For transport at finite bias voltage, within NEGF, the coupling of the electrodes is neglected (only coupling between contact and central region is taken into account). What should one do, if the coupling still exists and cannot be avoided? (e.g. having an ideal system CNT-CNT-CNT, where the electronic states spread over the whole system.) In this ideal case, would it be simply senseless to apply NEGF, because the results would not change in comparison to zero-bias-transport, as there is no scatterer?

Best regards, Christian

P.S Thanks for pointing out that ATK already has this feature - I just did not find it so far.

4
Dear community,

as I have seen that the creation of a (zero-bias) transmission spectrum, e.g. for a nanotube, takes much longer than the calculation of the bandstructure, I have written a (simple) function that generates a transmission spectrum out of a given bandstructure. The calculation time of the transmission is in the range of seconds and almost not independent on the resolution given.

@ATK-developers / experienced users: What does the implemented ATK-feature do else to generate a transmission spectrum? May this approach used here generate errors for special systems?

Best regards!

Code
from NanoLanguange 
from numpy import * # sorry for this dirty import of numpy
from NanoLanguage import *

def create_transmission_atk(band, emin = -4, emax = 4, npoints = 1000):
    # create transmission function, band is an ATK-bandstructure object
    # [emin, emax] define the energy interval
    # npoints gives the resolution of the interval (+1 is added to this value, later on)
    energies = array(band.evaluate()) # all the energy points of the bandstructure in an array    
    return create_transmission(energies, emin = emin, emax = emax, npoints = npoints)

# the next function may be used also with other programs than ATK, no nano languange is needed

def create_transmission(energies, emin = -4, emax = 4, npoints = 1000):
    # create transmission function
    # energies = the energy points of the bandstructure in an array, each band separated
    epoints = linspace(emin, emax, npoints+1)
    transmission = zeros(npoints+1)
    nbands = size(energies[0,:])
    
    for i in range(nbands): # loop over bands
        tmp = energies[:,i] # band number i
        # print tmp
        l = size(tmp)
        nextreme = [0] # minima and maxima of the band
        de2 = 0; de = 0;
        for j in range(1,l-1):
            de2 = de
            de = tmp[j]-tmp[j-1]
            if (de2*de < 0):
                # does the sign of the energy difference change? (local extremum)
                nextreme.append(j-1)
        nextreme.append(l-1)
        
        for k in range(size(nextreme)-1):
            # all the minima and maxima
            istart = int((tmp[nextreme[k]]-emin) / (emax - emin) * npoints)
            iend = int((tmp[nextreme[k+1]]-emin) / (emax - emin) * npoints)
            if (istart < 0):
                istart = 0
            if (iend < 0):
                iend = 0
            if (istart > npoints ):
                istart = npoints
            if (iend > npoints ):
                iend = npoints
            if istart > iend:
                istart, iend = iend, istart
            transmission[istart:iend] = transmission[istart:iend] + ones(iend - istart)

    return array([epoints, transmission])

5
General Questions and Answers / Re: script stucks on nlsave
« on: August 18, 2011, 10:59 »
Thank you very much for the explanation. (It's about what I thought after having found the error.) Yes, hopefully, this topic is useful to others.

6
General Questions and Answers / Re: script stucks on nlsave
« on: August 17, 2011, 19:36 »
Dear Mr. Blom,

Thank you very much for the quick answer. I found the error - nlsave must be executed by all the processes, not just by the master process. Therefore, yes, the pbs-script can  write into this location, filename is just a "simple" filename, not a path. And there was also no error message in the .o-file. (There is another error in the line after the error comment in my posted example - but that was not the reason.)

Concerning the version - I just "moved" to 11.2, today.

7
General Questions and Answers / Re: script stucks on nlsave
« on: August 17, 2011, 12:22 »
Just fogot - I am using ATK 10.8.2

8
General Questions and Answers / script stucks on nlsave
« on: August 17, 2011, 12:18 »
Dear QuantumWise-Team,

I have got a question concerning an curious problem: I have written a script to evaluate the number of k-points needed to perform calculations for a nanotube as a first step towards my final simulation.

When I go through step script step by step via the console (also testet as an interactive, parallelized MPAVICH-job on a SMP machine), everything works fine, but when I start the job via the queuing system, ATK seems to hang up while saving the .nc-file, showing me 16 processors fully occupied, but I don't see any progress at all. The resulting .nc-file can be acessed witout any difficulties and doesn't show any error (it contains all the calculated Hamiltonians and my saved structure). The only difference between the script and the manual calculation is the for-loop around the instructions.

So here is the (minimal) script and the according output:

Code
# reading input and so on...

master = processIsMaster()

for k in arange(kstart,kend,kstep): # (1,52,5)
# Define nanotube
NT = NanoTube(n,m,element1,element2,bond_length*Units.Ang,vacuum*Units.Ang) # given parameters
NT = NT.center()
if master:
print "k-number: %d" % (k)

# Basis Set and basic calculator config
basis_set = LDABasis.DoubleZetaPolarized
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling = (1, 1, int(k)),
grid_mesh_cutoff = 40.0*Rydberg,
)
calculator = LCAOCalculator(
basis_set=basis_set,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
NT.setCalculator(calculator)

t1 = time()
force = Forces(NT)
t2 = time()

if master:
print "time for DFT + Forces: %fs" % (t2-t1)
desc = "Nanotube-%d-%d" % (n,m)
nlsave(filename + ".nc", NT, desc)
print "structure \"%s\" successfully written to %.nc" % (desc,filename)
# program stucks here! why?
print >> "%s epsilon %f" % ('%',epsilon)
f = open(filename + "_forces_NT.txt", 'w')
print >> f,"%s epsilon %f" % ('%',epsilon)
force.nlprint(f)
print >> f,""
f.close()

output:
Code
[...]
+------------------------------------------------------------------------------+
| Calculation Converged in 13 steps                                            |
|                                                                              |
| Fermi Level  = -0.131172 Ha                                                  |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| DFT Calculation  [Finished Wed Aug 17 11:50:15 2011]                         |
|                                                                              |
+------------------------------------------------------------------------------+

                            |--------------------------------------------------|
Calculating Eigenvalues    : ==================================================
Calculating Density Matrix : ==================================================

time for DFT + Forces: 92.478966s


Pages: [1]