Author Topic: Mulliken Charge for each optimization step  (Read 4960 times)

0 Members and 1 Guest are viewing this topic.

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Mulliken Charge for each optimization step
« on: December 14, 2023, 16:04 »
Hello,

Please, is it possible calculate automatically the Mulliken charge for each optimization step in QuantumATK?






Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 174
  • Country: in
  • Reputation: 2
    • View Profile
Re: Mulliken Charge for each optimization step
« Reply #1 on: December 19, 2023, 13:39 »
hi,
Yes but you will have to run some code or else you can extract each configuration from trajectory and calculate mulliken charge.

Btw why is that required? Some of the images might have high forces/stresses and might not be of use?
Are you trying to track how Mulliken charge changes with steps?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5589
  • Country: dk
  • Reputation: 102
    • View Profile
    • QuantumATK at Synopsys
Re: Mulliken Charge for each optimization step
« Reply #2 on: January 5, 2024, 21:26 »
I do agree with AsifShah though, that it seems to be of limited usefulness, but it can be done (not sure about "automatically" but you can use a hook function). You basically just need a post_step_hook function and pass this as argument in OptimizeGeometry:
Code: python
def computeMulliken(step, config):
    m = MullikenPopulation(config)
    nlsave("some_file.hdf5", m)

opt_geo = OptimizeGeometry(
    configuration=configuration,
    max_forces=0.01*eV/Angstrom,
    ...
    post_step_hook = computeMulliken,
    ....
)

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Re: Mulliken Charge for each optimization step
« Reply #3 on: January 16, 2024, 11:45 »
Yeah, I am trying to see how the Mulliken charge is changing with the steps and this could be important on my case.

Thank you all for the reply!

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 174
  • Country: in
  • Reputation: 2
    • View Profile
Re: Mulliken Charge for each optimization step
« Reply #4 on: January 16, 2024, 13:11 »
Dear Jalmeida,
While you know your research problem well than what I understand. However, I believe this won't be of any use as optimization depends on algorithm used. Instead, a more better approach would be to use AIMD for your system and then track Milliken charge for each step.

Best regards

Offline jalmeida

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: fr
  • Reputation: 0
    • View Profile
Re: Mulliken Charge for each optimization step
« Reply #5 on: January 26, 2024, 14:10 »
Dear AsifShah,

It's good advice! I'm not going to use the variation itself, it's just to better understand what's going on with my system that it's difficult to maintain the correct magnetic moment when I optimize it. Thanks for your collaboration.

Best regards