Recent Posts

Pages: [1] 2 3 ... 10
1
General Questions and Answers / Re: Orbital coefficients
« Last post by Anders Blom on Yesterday at 20:17 »
It just need to have converged the molecular calculation. You can project on individual atoms (the example shows projection on N, H, H, H through the numbers 0,1,2,3.) or a collection of atoms by giving more than one index in the list.
2
General Questions and Answers / Re: Orbital coefficients
« Last post by lohy on Yesterday at 08:38 »
Wonderful thank you!  - you had a great idea 10 years ago  :)

Just to be sure, the script "only" needs the configuration and the energy state of the molecule I am interested in? and then I can choose which atoms I want to project on? where you have e.g. 0, can I then have a list or do I need to have a line for each atom in the molecule?
3
How to get/plot the loss function for the training/testing set of the moment tensor potential, i.e., variation in the error with respect to the number of epochs.
4
General Questions and Answers / Re: Random Swap of Elements
« Last post by Anders Blom on May 10, 2024, 00:17 »
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())
5
General Questions and Answers / Re: Orbital coefficients
« Last post by Anders Blom on May 9, 2024, 21:42 »
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!
6
Yes the same trick should work
7
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...
8
General Questions and Answers / Re: Unit trouble dipole moments
« Last post by Anders Blom on May 9, 2024, 20:30 »
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
9
Hello,

I am having the same issue with V-2023.12 with the builder tool on Windows. Restore Layout also does not work... is there a similar work around?

Thanks!
10
General Questions and Answers / Re: Unit trouble dipole moments
« Last post by MariaWJ on May 9, 2024, 12:09 »
I have attached the script I use to get the dipole. It is a modified version of the one you have to get the dipole from the electron density, this one just uses the electron difference density. I hope it is not too messy.

Hope you can help,
Maria
Pages: [1] 2 3 ... 10