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

Pages: 1 2 [3] 4 5
31
General Questions and Answers / Re: Charge Density Difference
« on: December 12, 2022, 11:40 »
If I understand what you mean by charge density difference, you need to split it up in three different calculations: 1) Full system, e.g. surface + molecule 2) only surface 3) only molecule. It is important that you use the same unit cell and grid sampling for each calculation, even the small molecule. To set a specific grid sampling you can use: density_mesh_cutoff=GridSampling(Na, Nb, Nc). If you do the calculation of the full system you can read off the grid sampling used in the log output or using e.g. density.shape() in Python.

Calculate the electron density for each system, then you can calculate the difference as:

Code
density_full = nlread('calculation_surface+molecule.hdf5', ElectronDensity)[0]
density_surface = nlread('calculation_surface.hdf5', ElectronDensity)[0]
density_molecule = nlread('calculation_molecule.hdf5', ElectronDensity)[0]

charge_difference_density = density_full - density_surface - density_molecule
nlsave('charge_difference_density.hdf5', charge_difference_density)

The charge_difference_density variable will contain a generic GridValues object that can be opened and viewed in NanoLab.

32
General Questions and Answers / Re: ERROR
« on: December 7, 2022, 13:50 »
You calculate the total energy of the configuration, but with different distances between the ribbon and molecule. The most optimal distance is the one that minimizes the total energy.

This can be done in a Pythons script with a loop over distances, for example:

Code
distances = numpy.linspace(1.0, 3.0, 11) * Angstrom

for distance in distances:
    cartesian_coordinates[molecule_indices, 1] += distance

    configuration = BulkConfiguration(..., cartesian_coordinates=cartesian_coordinates)

    total_energy_analysis = TotalEnergy(configuration)
    nlsave(total_energy_analysis, ...)

Of course you have to write the actual script yourself so that it actually works. You can also do it by setting up multiple configurations in the Builder in the GUI and manually adjust the distance using the coordinate tools and submit each job separately if you're not experienced with Python programming.

33
General Questions and Answers / Re: ERROR
« on: December 6, 2022, 09:12 »
Geometry optimization is really hard and time consuming for all but the simplest systems due to the very high number of degrees of freedom. You need very high numerical parameters (basis set, k-point sampling, density mesh cutoff) in order for it to converge smoothly, as you otherwise get random numerical errors that are on the order of magnitude as the energy differences and forces involved in the optimization steps.

The first step before doing geometry optimization is always to first determine the numerical parameters to use by doing a convergence study. This means doing repeatet DFT calculations of energy, forces and stress for the initial structure at increasing basis set, k-point sampling and density mesh cutoff (vary each independently) until the energy/forces/stress change less than at least an order of magnitude lower than the tolerances you want to use for the geometry optimization. Having found the optimal numerical parameters you can then proceed to use those for the geometry optimization.

However, in many cases, especially for larger composite system, geometry optimization is simply not possible in a single "hit the button and run" approach. Either it simply takes too long time or it gets stuck jumping between the many local minima. In these situations it is better to break the optimization into steps.

For instance in your case you can break the optimization into 4 steps, each done as separate calculations/jobs:

  • Optimize the Stanene nanoribbon geometry alone by running a geometry optimization (atoms + unit cell along periodic direction) of a single unit cell
  • Optimize the molecule alone without the nanoribbin in a separate calculation
  • Find the optimimal nanoribbon <-> molecule distance by simply calculating the total energy of the nanoribbon + molecule system at different distances, fitting some polynomial to the results and finding the minimum
  • Relax the atoms in the molecule and in the nanoribbon close to the molecule with a regular geometry optimization where you fix the unit cell and most atoms in the nanoribbon. The more atoms and thus degrees of freedom you fix, the faster and more stable the geometry optimization will be

In this way you trade computational load with more manual work, but the above approach should work in most cases. Also you can find the optimum numerical parameters from doing calculations on the sub-parts: nanoribbon unit cell and molecule separately - this will be much, much faster than trying to do so for the entire system.

34
General Questions and Answers / Re: ERROR
« on: December 5, 2022, 11:17 »
I can't try out your script as copying from a PDF doesn't work for me. It would have been more useful if you simply attached the original .py file.

I'm not an expert in all kinds of materials, but my immediate intuition tells me that this Tin-Hydrogen-Iron compound is metallic (also it only really makes sense to do spin-polarized calculations for metallic systems). For metallic systems you should use a sizeable smearing, but you use 0.01 eV which is very low and only useful for ungapped systems. So try to change the smearing/electron temperature to the default value of 1000K, which is suitable for most metals. This should improve convergence. If you think this influences the results too much you have to use a denser k-point sampling. See also: https://docs.quantumatk.com/manual/technicalnotes/occupation_methods/occupation_methods.html

35
General Questions and Answers / Re: Error - Exit Code : 9
« on: November 22, 2022, 13:56 »
MPI exit code 9 means that the program recieved the SIGKILL event, see https://www.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/troubleshooting/error-message-bad-termination.html. This means that the process was killed by an outside process like the job scheduler or the OS. The reason is typically that the program used more memory than it was allowed or that a runtime limit was exceeded. Be sure to submit the job in way so that the job scheduler sends you an email when it aborts the program. Such an email will typically state the reason for why the job was killed.

36
General Questions and Answers / Re: Simulating protein
« on: October 31, 2022, 14:28 »
Quote
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Killed (signal 9)

Means that your calculation was killed = stopped by an external process or user. This is in most cases the job scheduling system (Torque, Slurm, SGE, ...) on the cluster that kills the job if it takes longer than the allowed time, uses more memory than allowed or requested or uses more processes than there are cores on the node. If the job scheduler is configured correctly and you configured your submission script for it it should send you an email with clarification of why the job was killed.

If the job used too much memory you will have to run on machines with more memory or try to get the calculation to consume less or distribute the memory use over more nodes (physical machines). This can be done in a multitude of ways:

  • Use more OpenMP threads
  • Use more nodes and thus more MPI processes
  • Increase use of multilevel parallelism where possible (processes_per_<...>)
  • Reduce the computational load by decreasing system size or computational parameters

See also:

37
In QuantumATK Cesium is called "Caesium", so the basis set name should be "BasisGGASG15.Caesium_Medium"

38
The legacy Materials Project API that QuantumATK uses seems to be temporarily down, see: https://matsci.org/t/legacy-materials-project-website-temporarily-in-degraded-status/44750. It will hopefully come back online at some point. You can follow the status here: https://www.nersc.gov/live-status/motd/

39
Did you enable software rendering when installing QuantumATK? Can you show us the content of the file ~/.vnl/software-rendering (Linux) or C:\Users\<USER>\.vnl\software-rendering (Windows)?

The file Preferences.py is part of the QuantumATK source code which is not part of the installed program and thus not accessible to users. The problem is not due to a problem in that file, but because it tries to read a number from a settings file which is likely corrupted.

40
General Questions and Answers / Re: ATK installation
« on: October 4, 2022, 09:22 »
I'm not certain, but it appears that the pymatgen library tries to look for pymatgen or VASP specific settings in your environment.  Be sure that you do not have the following environment variables set/defined before running atkpython:

  • Any variable starting with PMG_
  • VASP_PSP_DIR, MAPI_KEY and DEFAULT_FUNCTIONAL

If these are set in e.g. your ~/.bashrc file you must either remove the definitions from the that file or manually unset them before running atkpython.

41
For DFT the kinetic energy is calculated as in any other DFT code (see e.g. https://en.wikipedia.org/wiki/Density_functional_theory and https://en.wikipedia.org/wiki/Kohn%E2%80%93Sham_equations):

T = ⟨T⟩ = ∑n fn ⟨ψn| -ħ2/(2m)∇2n

where fn is the occupation number of the n'th state and |ψn⟩ are the Kohn-Sham states.

42
I'll address the last problem (with shipped MPI) first: There are actually two atkpython "executables": one in the 'bin' folder, which is actually a bootstrap bash script (that sets LD_LIBRARY_PATH) and the other in the libexec folder, which is the actual executable. When I suggested you to set PATH to include the libexec folder it will actually run the executable there instead of the bash script. So my mistake! Instead of setting path, specify the full path to the mpi executable:

Code
/path/to/quantumatk/libexec/mpiexec.hydra -n 4 atkpython test_mpi.py

However, I doubt that this will work, as it also fails with the other MPI programs.

From the other error messages it appears that the cluster is configured for infiniband but that MPI for some reason can't find the device. From similar problems (e.g. https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/open-hca-device-mlx4-0-not-found/td-p/982635) it could be that you can solve this by setting the I_MPI_DAPL_PROVIDER environment variable - but to what exactly, I don't know - that depends on your cluster.

Again, I think you will get much better help if you contact your cluster admin/support as they are the ones responsible for configuring the hardware and the MPI installation. You can also get help on Intels HPC support forum: https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/bd-p/oneapi-hpc-toolkit

We can't really provide much more help and support on this issue - I think you will have the same problem running any other MPI executable on the cluster, not just QuantumATK (in fact Intel ships some MPI benchmark programs that you can run: https://www.intel.com/content/www/us/en/develop/documentation/imb-user-guide/top.html)

43
I don't think this is due to a problem in QuantumATK, but instead due to the configuration of MPI on the cluster.

QuantumATK 2022 (and many earlier versions) have been built, linked and tested against Intel MPI 2018.1 - but it should work with any Intel MPI version that is ABI compatible with this. Just as a check you could try to ensure that SLURM uses Intel MPI 2018 - typically that is done by e.g.:

Code
module load intel-mpi/2018.1

You will need to ensure that SLURM is actually configured to use the loaded Intel MPI when the module is loaded.

If this doesn't work you can try to use the Intel MPI that we ship with QuantumATK, i.e. instead of srun use:

Code
export PATH=/path/to/quantumatk/libexec # If it isn't already in PATH
mpiexec.hydra -n4 atkpython test_mpi.py

You can also try a newer version of Intel MPI, preferably newer than 2019 as that particular version had some serious issues.

If neither of these approaches work, it's likely that there is some incompatibility between the configuration of Intel MPI and the cluster and it's network hardware. We can't really help you much here as it's out of our hands. Instead I suggest you to try to run your script again but with

Code
export I_MPI_DEBUG=5

This will print a lot of MPI debugging information. Now copy that output and send it along with your current question to your cluster administrators. If they can't solve the problem I will suggest you to ask for help on the Intel MPI support forum.

44
It looks like a bug in Intel MPI, see e.g.: https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/Intel-MPI-2018-4-error/td-p/1137805

Here are some suggestions on what you can try:

  • Try changing the parallelization scheme: try with either more/fewer OpenMP threads, more processes per k-points, etc
  • Try setting I_MPI_FABRICS=shm:dapl in the submission script as suggested in the Intel Forum thread
  • Try using a newer Intel MPI installation if available on the cluster (you don't have to use the one shipped with QuantumATK). You will need to specify the mpiexec path in the machine settings in the job manager

There is not really much we can do as the error is likely not in the QuantumATK program. Try to consult your compute cluster admin or ask for help on the Intel MPI support forum.

45
When you calculate the H2 using polarized spin treatment the initial density will be maximally polarized (both electrons will be put in the UP state) and the implementation of PBE in the libXC library that we use for calculating XC functionals can't correctly handle this situation and it yields wrong results. This only happens for systems where the initial density is maximally polarized, i.e. for atoms/molecules that do not have any full shells, so basically only H and H2 when using spin-polarized PBE. As a workaround you should adjust the initial spin to anything smaller than strictly 1.0, i.e. 0.999 - or since you know H2 is unpolarized you might as well choose 0.0 (or do an unpolarized calculation). You can set the initial spin in the GUI by choosing the "Initial State" block in the Script Generator, insert it after the calculator, open its settings, choosing "polarized spin" and setting the spin polarization for each atom.

We have run into this problem before, but unfortunately it is not so easy to fix in general without implications in other parts of the program, so setting the initial spin != 1.0 is currently the best solution.

Pages: 1 2 [3] 4 5