[ase-users] Idea for improvement: ase.calculators.vasp.vasp ... VaspChargeDensity for VASP potentials
Gaël Donval
G.Donval at bath.ac.uk
Tue Jun 13 14:21:32 CEST 2017
Hi,
> Dear ASE developers,
>
> the vasp calculator contains the class VaspChargeDensity. Since VASP
> has the same file format for charge densities (stored in the CHGCAR)
> and potentials (stored in LOCPOT), this class can in principle also
> be used for reading potentials from the file vasp file LOCPOT.
> However, potentials in VASP are stored in a particular way, namely as
> "(charge density) times (unit cell volume)". In the ASE routine
> VaspChargeDensity this is accounted for by dividing the values from
> the charge-density file by the volume (line 1377: "chg /= volume)".
> When dealing with potentials, however, no such division should be
> done.
>
> My suggestion: Can you create a new class "VaspPotential" which is
> identical to "VaspChargeDensity", just with the line "chg /= volume"
> removed (and the comments adapted to potentials)?
Would you mind doing it? :)
Everything needed can be found there:
https://wiki.fysik.dtu.dk/ase/development/contribute.html
As you said, the change are not big and you have a good understanding
of what needs to be done.
As far as your suggestion is concerned, it is fine as long as you avoid
duplication (i.e. copy-pasting the code). That means that you could
create a "VaspAsciiReader" class first for instance that is supposed to
handle the common format used by CHGCAR and LOCPOT. That class could
then be inherited from (or composed with) to create the two specialised
classes VaspChargeDensity and VaspLocalPotential if that makes sense.
In practice, that means that you would rename "VaspChargeDensity" as
"VaspAsciiReader" and remove the division as suggested. Then you would
create the two other classes from that first class.
Gaël
>
> Best,
> Jürgen
>
> ---------------------------------------------------------------------
>
> Dr. Jürgen Spitaler
> Gruppenleiter / Group Leader Atomistic Modeling
> Materials Center Leoben Forschung GmbH (MCL)
> Roseggerstraße 12
> A-8700 Leoben
>
> Tel.: +43 3842 45922 - 70
> Fax.: +43 3842 45922 - 500
> Email: juergen.spitaler at mcl.at<mailto:juergen.spitaler at mcl.at>
> www.mcl.at<http://www.mcl.at>;
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3199 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170613/ec10fbed/attachment-0001.bin>
More information about the ase-users
mailing list