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.


Topics - Anders Blom

Pages: 1 2 [3] 4 5
31
A rather annoying "feature" of running calculations on a remote host, such as a cluster, is that if you are not careful, the calculation will be interrupted if you lose the network connection.

The way I used to get around this was to submit my jobs under "nohup", like

Code
nohup atkpython myscript.py > myscript.log &

Note the ampersand "&" at the end, so that the processes goes into the background.

Now, there are certain disadvantages with nohup, which I will not go into. One very notable feature is also that if you launch "mpiexec" under nohup, you must redirect stdin too:

Code
nohup mpiexec atkpython myscript.py > myscript.log < /dev/null &

otherwise your log file will fill up with warning messages real fast.

Fortunately, there is an alternative to nohup, called screen. There is a very nice tutorial for it here:
http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/

To summarize briefly how to run ATK on a detached screen (we assume screen is installed on the remote host; if not, please confer with the sysadm of that system):

1. Log into the remote host where you want to run, e.g. using ssh
2. Use the command "screen" to start a new screen (there is some information screen that pops up, it can be avoided with "screen -q")
3. Start ATK as you would normally, for instance

Code
atkpython myscript.py

(we use an example without a log file, it works fine with one as well, of course)

4. Hit Ctrl-A-D to detach the screen
5. You will be returned to the login session on the node, from which you can now safely log off ("exit") and the calculation will continue to run in the background.

Some time later, you want to check if the calculation finished.

1. ssh back into the remote host
2. Type "screen -r" to resume the screen (if you have several screens running, you will be prompted to provide the pid, like "screen -r 1234")
3. You are now back in the session where you started ATK, and you can operate as usual. If the calculation didn't finish, just detach the screen with Ctrl-A-D again. If it finished and you want to exit permanently, type "exit"

There are more options, like switching between different screens (Ctrl-A-N), etc. For details, see the tutorial mentioned above.

32
We have learned that sometimes the error

Code
locale.Error: unsupported locale setting

appears when starting VNL 2008.10 on machines running Linux distributions configured for e.g. Korean or Chinese locale (language settings).

To resolve this, insert the line

Code
export LC_ALL=C

in your .bashrc file in your home directory. Restart the shell for the change to take effect.

33
News and Announcements / FFT bug in ATK 2010.02
« on: May 5, 2010, 10:58 »
A bug in the FFT routines for two-probe (device) calculation has been found in ATK 2010.02.4185. We recommend all users to switch to the multi-grid method until the problem is resolved.

We wish to point out that ATK 2010.02 is an alpha version, and contains known bugs (besides the one mentioned above). A new major, stable release is expected by summer 2010, which will replace the 2008.10 and 2010.xx packages.

34
As a follow-up to my VASP importer, I would like to share with the community a VASP exporter.

Update: Scroll down to the last post in this thread to download the latest version of the script.
It's really simple to use: drop the attached file on the "Custom" builder icon in VNL2010.02, then drop your geometry (must be a bulk configuration) on the drop zone, and the resulting POSCAR data will be written in the Log panel.

The first line (the comment line) contains the element ordering; use this to create your POTCAR file (which for obvious reasons VNL cannot generate).

Thus, now you can build a very complex system, using the nice GUI tools in VNL, and then export the geometry to run it with VASP! (Of course, we'd prefer that you would run the system with ATK, but we understand why VASP is useful too ;) )

As always, feedback is very welcome! Would you like an option to write Cartesian coordinates (right now it writes only "direct")? Other features?

35
I have written a small utility that allows you to import VASP geometries to use, or just visualize, in VNL 2010.02.

To use it, drop the attached script on the Custom builder icon in VNL 2010.02. Then, drop your POSCAR/CONTCAR file on the drop zone that says "Drop file here". That's it, really - you should see the structure in the 3D window!

You can then transfer the structure further to the Bulk Builder to modify it, or the Scripter to perform a calculation on it, all using the blue "Send To" arrow in the lower right-hand corner.

Notes:
  • The importer will not attempt to read any comments in POSCAR to figure out the elements. Instead, it relies on a valid POTCAR or OUTCAR file residing in the same directory as the file you dropped.
  • It works fine even if your POTCAR/OUTCAR file is zipped (bz2, gzip, zip).
  • The script is written for VASP 5.x, I'm not sure if it will work with older versions.
  • It will not attempt to read any information about constraints, and if you use Selective Dynamics mode, it will only read the first structure.

If you have a POSCAR file that doesn't work, let us know. We plan to support proper import of VASP input files in VNL soon, so it will be good to test the code.

36
Scripts, Tutorials and Applications / Basis set range
« on: March 26, 2010, 09:12 »
One of the distinct features of ATK (or, more correctly, the SIESTA method) is the use of localized numerical orbitals basis sets.

Each basis set orbital has a finite range, beyond which it is identically zero. This gives sparse matrices which saves a lot of memory, esp. for large two-probe calculations, and makes ATK efficient in describing systems with abrupt interfaces, defects, and vacuum.

Knowing the basis set range can be important in many situations, e.g. if you are trying to figure out how long the electrodes need to be. And sometimes you want to increase the basis set range, if there e.g. is a vacuum gap in the system that needs to be bridged.

Now, in 2010.xx, the basis set range is specified explicitly. So, you just set the range to whatever you want. Of course, one should be careful and not make it deviate wildly from the default, atomic-like value, since that compromises the quality of the basis set.

In 2008.10 and earlier versions, on the other hand, the basis set range was implicitly defined via the energy shift, which is the difference in energy between the basis orbital and the true atomic orbital from which the basis orbital is derived. The atomic orbital has infinite range with an exponential tail, so the energy difference arises from imposing a hard cut-off radius.

The attached scripts provide some utilities that allows you to compute the basis set radius for given basis set parameters.

As an example of how to use these functions, attached is also a plot showing the radius of the carbon SingleZeta (LDA.PZ) basis set, as a function of the energy shift. Note the logscale on the horizontal axis; the shift goes exponentially with the radius (and not opposite!).

37
What to do if you have installed ATK 2010.02 (or 2010.01) on Windows, and double-click then desktop icon, but absolutely nothing happen?

The cause of this problem is that there is another installed program which also provides Qt 4.x libraries, but this program appears before ATK in the path. The most typical example is MIKTeX, which additionally has a slightly nasty habit of inserting itself at the beginning of the path. This means that if you install MIKTeX after ATK, the ATK desktop icon will stop working, and if it already is installed when you install ATK, the desktop icon will not function either.

To solve this, simply move the MIKTeX part of the path to after ATK's vnl/bin directory.

To change system environment variables, follow these steps.

1. From the desktop, right-click My Computer (or just Computer, in Windows Vista/7) and click Properties.
2. In the window that appears, click on the Advanced tab (or the Advanced system settings link, in Windows Vista/7)
3. Click the Environment Variables button.
4. In the Environment Variables window (see attached picture), select the PATH variable under "Systems Variables" and click Edit. Each different directory is separated with a semicolon; what you need to do is move MIKTeX to the end.

Tip: You may want to copy the whole path definition and paste it into Notepad and edit it there, as it's very hard to see what goes on in the small edit field.

NOTE: I cannot guarantee that this will not render some part of MiKTeX non-functional. However, I have MiKTeX installed in nice coexistence with ATK, after having followed the steps above.

An alternative (which e.g. can be used if for some reason you discover that MiKTEX stops working) is to set the "Start in" folder of ATK to the vnl/bin directory instead. To do this, right-click the ATK desktop icon and choose Properties. Copy the specification of "Target" to "Start in" and just remove "vnl.exe" from the end (see second attached picture).

38
The attached files implement support for importing and exporting CAR files in NanoLanguage for ATK 2008.10.

There are two versions of CAR files, as seen from the header (first line), which will say "!BIOSYM archive 3" for version 3 and archive 1 for version 1. The script handles both. I'm not sure if there's a version 2, let me know if you come across it.

A simple usage example would be:

Code
from ATK.KohnSham import *
from car import *

imported_configuration = importCARfile('testfile.car')

There is also an export function, which takes 4 parameters:

Code
exportCARfile(filename, configuration, CARversion, configname)

where CARversion and configname are optional (default version is 3).

I wish to point out that this is a rather experimental first effort. I didn't have too many CAR files to test with... In particular, I don't know if the conversion of the unit cell shape works in all cases. Therefore, please do let me know of any problems you have using this tool (and naturally attach any CAR files that fail to import properly).

There is an explicit assumption that the first unit cell vector A lies along X, that A and B span the X/Y plane and that the angle between them is [tex]\gamma[/tex]. The third vector C follows from the definition of [tex]\alpha[/tex] and [tex]\beta[/tex] as the angles between  B and C, and A and C, respectively.

39
We have discovered a problem with the Windows release of ATK 2009.12.0.3643. Fortunately we were quickly able to determine the reason for it, and we also have a temporary work-around. Since we are in the middle of an active development period, we are however not able to release a new package immediately.

It will take 1-2 weeks before an updated version will be made available.

Problem description

  • The symptom of the issue is that calculations don't converge, or converge to the wrong result, because of incorrectly computed eigenvectors
  • The problem only occurs when running threaded on multi-cores, on Windows. If you run ATK on a single core, all is fine.
  • On Linux, there seems to be no problem even with threading turned on, but we cannot be sure

Solution

The solution is to disable threading, which automatically is turned ON in Windows, but (usually, unfortunately!!!) turned OFF in Linux (this is outside of our control).

Therefore, users of 2009.12.0.3643 should set the following environment variables in Contol Panel>System

Code
MKL_NUM_THREADS   =   1
MKL_DYNAMIC       =   FALSE

Don't forget to remove these when installing the updated version later on!

As noted above, the code seems to run fine on Linux even with threading turned on (which usually has to be activated manually), but for now we recommend everyone to leave it turned off, for safety.

For reference, the problem is not in the ATK code, but it's a bug in Intel's MKL library. The bug was discovered in November and fixed December 21st, and we have now updated to the latest library version which should solve the problem.

40
After upgrading to Ubuntu 9.10, VNL 2008.10 will not start, because libg2c is missing. In earlier versions this library could just be installed from the Package Manager, but from 9.10 this is no longer possible.

The solution is to download the attached tar-file and manually install the required files in /usr/lib.

Installation instructions

1. Download and save the attachment in your home directory

2. Extract the tar-file:

Code
cd $HOME
tar xzvf libg2c_32bit.tgz

The next step differs between 32/64-bit distros.

3: On 32-bit Ubuntu:
Code
sudo mv libg2c.* /usr/lib

3: On 64-bit Ubuntu:
Code
sudo mv libg2c.* /usr/lib32

After this, VNL 2008.10 should start.

41
Future Releases / What is your Linux distribution?
« on: October 26, 2009, 18:05 »
In order for us to determine which Linux distributions that are most important to test ATK/VNL on, it would help a lot to know which distributions people out there are using. This will also help us decide which distros to support, in the case we discover some where the programs do not run properly.

Since there are many versions of each distribution, it would be great if you post the more precise distro/version in a comment too.

Thank you for your assistance!

PS: To all the Windows users - we'll make a Windows version poll too, but let's not mix that in with the Linux stuff, ok? :)

PS2: For a list of popular distributions, in general, see DistroWatch


42
It has been brought to our attention that if you run ATK using Sun Grid Engine, you need to take care not to over-allocate licenses.

If you use the default settings, and run a job over, say, 4 nodes, you will actually consume 4 master licenses, which is not what you want. To avoid this, you should use the setting

Code
#$ -l atk=0.25

or 4 nodes, 0.125 for 8 nodes, etc (that is, in general 1/N where N is the number of nodes).

The keyword "atk" here is linked to the "-N" option, i.e. the name of the job. So, a more complete way to start a job on 4 nodes would be

Code
#!/bin/bash
#$ -N atk
#$ -l virtual_free=1G
#$ -l h_cpu=40:00:00
#$ -l atk=0.25
#$ -pe atk=4
module load atk
atk script.py

43
Dear all,

there have been several questions on the Forum about the electrode constraints, in particular how they are related to the voltage drop.

To explain, finally, all the deeper aspects of the three available constraints, we have published a small presentation, that should explain why you should always use the undocumented DensityMatrix constraint if you want to compute the voltage drop, plus it sheds light on various other things related to the constraints.

44
News and Announcements / ATK SE 2009.06 released
« on: September 9, 2009, 09:50 »
New release: Atomistix ToolKit Semi-Empirical (ATK-SE) 2009.06
QuantumWise is proud to announce the release of its new software package for simulations of electronic structure and transport properties of nanostructures, Atomistix ToolKit Semi-Empirical (ATK-SE). ATK-SE offers basically the same functionality as ATK-DFT, while at the same time introducing several new features that allow for even more realistic modeling of nanoscale electronic devices.

ATK-SE sets a new standard for nanoscale device simulations! Faster than DFT, allowing for larger systems, and featuring a unique capability to calculate how electrostatic (metallic and dielectric) gates influence the electron transport. And that's just the beginning...!

For detailed information, see http://quantumwise.com/products/12-products/28-atk-se-200906.

45
To run VNL on a 64-bit Ubuntu, you must install the "lib32g2c0" package. This can be done either via the Synaptic Package Manager (menu System>Administration) or by using the command

Code
sudo apt-get install lib32g2c0

In addition, if you want to run a license server on Ubuntu 64-bit, see this thread.

Pages: 1 2 [3] 4 5