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 - Anders Blom

Pages: [1] 2 3 ... 364
1
Plugin Development / Re: Fun with graphene
« on: June 28, 2024, 14:19 »
Since it seems there is still some interest in this plugin, I have updated it to work with newer versions of QuantumATK based on Qt5 (after 2017).
Still the exact same functionality, and you can easily install it via the Plugin Manager.
Have fun!

2
Your original file actually works perfectly well as long as you replace element X with Xe.
Turns out we don't recognize dummy elements like X...

3
Interesting question. I think the truth both practically and principally, lies somewhere between your points 1 and 2.

No matter the size of the cell, if we use PBC we enforce a quasi-periodicity on the system, which numerically may be hard to converge (the self-consistent loop) with too few k-points. So in practice you might want something like 3x3x3 because of that, even if yes, if the cell was large enough, 1x1x1 should be enough. The problem might however be that "large enough" may be too large for DFT...

On the other hand, if by converge you mean "minimize the total energy as function of k-point sampling", I would actually stick to 1x1x1 since there are other approximations in DFT that may be larger. Energy convergence in k-point sampling is notoriously slow and typically even oscillates, and for special systems even depends whether or not you include "magical numbers" like multiples of 3 in the case of graphene (ok, this is not so relevant for amorphous systems with no symmetries).

So, in summary, I would use the largest possible cell from a practical perspective, and stick to 1x1x1, unless there is convergence issues in the SCF loop.

4
Yes, there is a slightly hidden function for this:

Code: python
calculateDipoleTransitionMatrixElements(configuration, kpoint=None, number_of_states=None)

Calculates the dipole transition matrix elements for a bulk configuration at a specified k-point.

The x-component of the dipole matrix elements is defined as

x_nm(k) = <mk | x | nk>,

where |nk> is a Bloch state in band 'n' at the k-point 'k', and likewise for the y- and z-components. When calculating the dipole matrix element, we use the commutator relation [H, x] = -i*hbar*p_x / m, where p_x is the momentum matrix element. Note, however, that this commutator relation is only approximately true for a normconserving DFT Hamiltonian due to the non-local pseudopotential operator. Using the commutator relation, the relation between the dipole transition matrix element and the momentum matrix element is x_nm = -i * hbar * p_nm^x / (m * E_nm), where 'm' is the electron mass and E_nm is the energy difference between the band energies E_n(k) - E_m(k).

configuration = The configuration for which to calculate the gradients
kpoint = The kpoint (as three floats representing fractional reciprocal space coordinates)
param number_of_states = The states in the index interval [0, number_of_states - 1] are used to construct the momentum operator matrix elements

Returns a matrix with shape (3, N, N), where N is the number of bands included (unpolarized, noncolinear and spin-orbit), or (2, 3, N, N) with the first index corresponding to Spin.Up and Spin.Down (for (spin-polarized)

5
It looks like the original structure is already close to the minimum, which might be quite flat. So the algorithm is struggling to find a clear direction to move in to lower the force even further. I would suggest lowering the SCF convergence criterion (generally for all geometry optimizations) since what could be happening is that the forces are just not accurate enough to distinguish clearly so close to the minimum.

You can also consider a different way to optimize. This is a highly symmetric structure, so the atoms should not really move (that is, their fractional coordinates should not change). Thus, the proper constraint is rather to keep the space group (constraints=[SpaceGroupConstraint()],) and optimize the hexagonal lattice constants a and c. (Tip: First symmetrize the structure to move the atoms into their exact positions [[2/3,1/3,0],[0,0,1/2]] instead of the approximate coordinates you have now.)

6
MTPs work the same way as for other forcefields in this respect. You need to compute partial charges using e.g. Qeq or even DFT, then use can use those to couple to an electric field. You typically do not include this in the fitting procedure. It might be hard to go to high fields though, but this would hold true also for ReaxFF etc.

7
The .vnl directory was renamed into .quantumatk, located in C:\users\<username> on Windows and $HOME on Linux. However, your issue will not be resolved by removing any file there.

I think the problem is that the tutorial is designed for an older version, and we now use a few different classes for a defect study. The tell-tale sign is the "import SMW" at the top of your script; this module is now more or less retired.

What I would recommend is to open the Workflow Builder in the new version of NanoLab and go to Templates in the right-hand panel. From there, insert the Defect Formation workflow (under Defects and Defect Diffusion). Now, you need to add the actual materials to use in the empty boxes, and define calculators etc, but hopefully it's intuitive enough, even without a tutorial. If not, let us know here and we can guide more.

8
They should be the same, but can be affected by numerical convergence (they do look similar, so I think that is the case). Maybe you have different k-point settings or maybe the device needs to be better converged. 4 units is also perhaps a bit small for the center part, depending on the size in C of the unit cell.

9
I am sure an MTP can be just as accurate a ReaxFF if not more.

Second, the whole point of the way we fit MTPs is that you do NOT need AIMD data.

If you take a look at the tutorial https://docs.quantumatk.com/tutorials/mtp_basic/mtp_basic.html you can see that we have protocols for automatically generating small sets (100-200) of training structures very fast, based on logical distortions of the unit cell, and for complex systems like amorphous we use active learning (https://docs.quantumatk.com/tutorials/mtp_hfo2/mtp_hfo2.html). In both cases we explicitly avoid AIMD!

10
I am trying to be constructive here, not criticize or downplay the problem, but why not fit an MTP for MoS2 instead, if this is urgent (and anyway)? I am sure it will be more accurate and perform similarly.

Even if that takes a week month to fit (which it doesn't, more like a day or two) it's faster than waiting for us to try to debug someone else's potential which may have some mistake in the numerical values, which is almost impossible to sort out; even if we see where the problem is we don't know the correct value. Or if there is a mistake in our ReaxFF model, it will take until September to release a new version...

So in any scenario you are probably much better off fitting a new MTP, and after that you can use the same procedure for any other 2D material (for which there are no ReaxFF potentials).



11
Apart from numerical points like how many bands/levels you include, it's rather straightforward: the optical spectrum is computed from the difference of energy levels and the matrix elements between the eigenstates with the momentum operator. For two different molecules, obviously both will be quite distinct.

12
Yeah MTP can be particularly sensitive to this, forces can diverge in such geometries. We have been experimenting with adding a short-range repulsive potential (ZBL) but it doesn't always work as well as desired. Good that you solved it!

13
Could be. Finished just means the job is not running any more, but the Job Manager does not know anything about possible errors that arose.

14
The IVCharacteristics framework is handy since it is restartable and provides a nice way to loop over all bias values and gate voltages. If you have multiple gates or a more complex system I recommend just running individual simulations or a script with a loop over values, and then collect the results in the end.

15
Yeah sorry, we removed this model because it was not giving good results. We forgot to update the tutorial. You will have to run with DFT instead, you can use the smallest basis set FHI/SingleZeta to get fast results, probably similar accuracy as DFTB.

Pages: [1] 2 3 ... 364