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 ... 363
1
Python coding...
You can easily access the elements in a structure with configuration.elements(), that gives a list of the elements, you can then use the random.random() function to pick indices in a relevant way, replace an element and then put it back into the configuration with the secret method configuration._changeAtoms(elements=new_elements).

Or you can just remake the configuration from it's old parts:
new_configuration = BulkConfiguration(old_configuration.bravaisLattice(), new_elements, old_configuration.cartesianCoordinates())

2
Lucky for you I actually wrote a script to do this about 10 years ago, but nobody seemed to need the functionality so we never made it a feature in the software.

The usage is pretty obvious; the return is a list (one entry per eigenstate) of arrays, which contain the "contributions" (projections) onto the angular momenta s, p, d, and f.

I tested with NH3 from the example in the manual (https://docs.quantumatk.com/manual/Types/ElectronDensity/ElectronDensity.html) and the run this slightly clumsy code

Code: python
from PartialNorm import getPartialNorms
molecule = nlread("nh3.hdf5", MoleculeConfiguration)[0]
# HOMO state is 3
ix = 3
partial_norms = getPartialNorms(molecule, projection_atoms=[0])
print(partial_norms[ix])
partial_norms = getPartialNorms(molecule, projection_atoms=[1])
print(partial_norms[ix])
partial_norms = getPartialNorms(molecule, projection_atoms=[2])
print(partial_norms[ix])
partial_norms = getPartialNorms(molecule, projection_atoms=[3])
print(partial_norms[ix])

We can then see that the HOMO level derives almost 90% from Nitrogen (mostly p-states), but if we change to ix=4 we note that LUMO has a lot more H contributions (and the LUMO state is, as expected, dominated by s-states). Hopefully this is helpful for the analysis of your molecule too.

This function can be used for a lot of other cool things, like mapping out where s and p states dominate in the band structure of GaAs (RGB color scale mapped from spd contributions) as in the attached picture!

3
Yes the same trick should work

4
Yeah that should be enough. Are these DOS lines at very low energy or around the Fermi level? Really hard to provide any help without the actual input and output...

5
I don't think there should be any confusion about units? It prints
X Y Z of dipole: [ 7.50489746e-07 -5.50684384e-05  6.86097535e-01] Bohr**4*e
to the file, and if you had printed the magnitude as you perhaps intended (you write m1 to the file) it would have shown
0.686097536725 Bohr**4*e

(The numbers are not your numbers as I don't have your molecule, I just use NH3 as an example)

Oh, I see you still use the old wrong script from the manual. You need to remove * length_unit**3 from the line defining dV

6
Maybe too few k-points?

7
QuantumATK does not print anything you don't tell it to (apart from the self-consistent log) so this really depends on what your script looks like, which I don't know. Also, all quantities are kept internally with a unit attached, so there should never be a doubt about the unit, unless some special instructions are used to remove it. But you would have to share the script for us to help.

8
If you mean ferroelectric polarization this can be evaluated (in-plane at least) the same way as for 3D bulk: https://docs.quantumatk.com/tutorials/polarization/polarization.html

10
As you say, we might call it something else, but therefore we need to know how *you* define these coefficients :-)
And, it might help to know what you need them for, i.e. what analysis you can perform with them.

On the surface it sounds like you can just extract the Mulliken populations to know how much s, p, d contribution there is to a state, although it's a bit of a rough analysis.

11
Well, that is what the tutorial describes, and also you can study 100s of papers with QuantumATK on similar devices. As mentioned, we can answer specific questions, but we don't offer individual tutoring on using the software.

12
Not to be impolite but I honestly do not understand what you are asking, you need to be be clearer.

If you are following the tutorial and something doesn't work or you have a question on a particular step, you can ask about that. But don't expect other people to do your work for you...

13
I think the way we evaluate the dipole from the electron density is basically limited to molecules. For monolayers with voltages applied etc, it's more relevant to consider the dielectric response, i.e. the field gradient in the material vs. the external electric field.

14
Yes, it's a mistake. At some point in the ancient past numpy.dot would strip off the unit so we had to reapply now, but now it gets multiplied in with the unit already applied.

Just skip the length_unit**3 and it works better! However, also see https://forum.quantumatk.com/index.php?topic=10790 about why you should use the ElectronDifferenceDensity, rather.

15
Aha, interesting... I'll make sure to forward this to our developers, however at least now you have a workable way to run the calculations fast, and correctly!

Pages: [1] 2 3 ... 363