Page 1 of 1

Adding user defined external potential

Posted: Wed Apr 25, 2018 2:36 pm
by jbniser
Not sure if it is worth a new topic.
I wish to introduce external potential of specific profiles to create inhomogeneity in charge density.
In quantum espresso I can do this easily by modifying the add_efield subroutine.
Would like to do the same in Abinit to be able to use some post-processing modules available with Abinit.
I could see that modifying vlocal can be a possibility but not sure at what level.
Kindly suggest possibilities.

Re: Adding user defined external potential

Posted: Wed Apr 25, 2018 4:24 pm
by ebousquet
Dear jbniser,
You could indeed add an additional potential potential in 67_common/setvtr.F90 and rhotov.F90. If you want to compare energy you'll also have to correct the energy accordingly in energy.F90.
All the best,
Eric

Re: Adding user defined external potential

Posted: Fri Apr 27, 2018 2:13 pm
by jbniser
Thanks Eric.

Looks like it is working.
I just added an external potential folded in the same way as vxc or vHartree, to vtrial wherever it was being calculated
in the three subroutines you had pointed out.