[ase-users] getting Hamiltonian and overlap matrices from NWChem

Kondov, Ivan (SCC) ivan.kondov at kit.edu
Wed Jun 21 18:46:37 CEST 2017


Dear Panu,



you can check out this branch



https://gitlab.com/ikondov/ase/tree/kitnwchem



For historical reasons the mentioned methods are in a derived class which has 
a slightly different parameter keys. Here a simple use:



from ase.calculators.nwchem import KITnwchem

from ase.build import molecule

mol = molecule('NH3')

params = {

    'title': 'ammonia',

    'task': 'energy',

    'basis set name': 'sto-3g',

    'total charge': 0,

    'multiplicity': 1,

    'use dft': True,

    'density functional': 'b3lyp'

}

calc = KITnwchem(**params)

mol.set_calculator(calc)

print(calc.get_mos(mol))

print(calc.get_fock_overlap())



I think this can be used for the time being. I can migrate the relevant two or 
three methods to the base class but for that I will need time. Please let me 
know.



Best regards,

Ivan





From: Panu Sam-Ang [mailto:panu.sam-ang at stonybrook.edu]
Sent: Tuesday, June 20, 2017 5:22 PM
To: Kondov, Ivan (SCC)
Cc: ase-users at listserv.fysik.dtu.dk
Subject: Re: [ase-users] getting Hamiltonian and overlap matrices from NWChem



Thank you, Ivan.  Could you share the code?



Best,

Panu



On Tue, Jun 20, 2017 at 6:11 AM, Kondov, Ivan (SCC) <ivan.kondov at kit.edu> 
wrote:

Dear Panu,



you only need the eigenvectors (the molecular orbitals) and the eigenvalues 
(molecular orbital energies) to restore the fock matrix and the overlap 
matrix. To make nwchem write them out you have to put the line



print "final vectors analysis" "final vectors"



in the dft section of the input. See



http://www.nwchem-sw.org/index.php/Release66:Hartree-Fock_Theory_for_Molecules#Printing_Information_from_the_SCF_Module



I have an own code for all this including reading the orbitals with the ASE 
nwchem calculator. I can share it if you like.



Best regards,

Ivan







From: ase-users-bounces at listserv.fysik.dtu.dk 
[mailto:ase-users-bounces at listserv.fysik.dtu.dk] On Behalf Of Panu Sam-Ang via 
ase-users
Sent: Tuesday, June 06, 2017 10:19 PM
To: Ask Hjorth Larsen
Cc: ase-users at listserv.fysik.dtu.dk
Subject: Re: [ase-users] getting Hamiltonian and overlap matrices from NWChem



Thank you, Ask.  That's helpful!



On Tue, Jun 6, 2017 at 4:15 PM, Ask Hjorth Larsen <asklarsen at gmail.com> wrote:

Hi Panu,

2017-06-06 21:38 GMT+02:00 Panu Sam-Ang <panu.sam-ang at stonybrook.edu>:
> Hi Ask,
>
> Thank you for your suggestion.  I just got NWChem installed on my laptop and
> haven't really used it before.  I thought ase.calculators.nwchem or
> ase.calculators.interface would have a function that can do that.  But I
> guess I have to write my own script?

ASE mostly does energies/forces and the more universal electronic
structure quantities like KS eigenvalues and occupation numbers.  Many
codes do not establish the Hamiltonian explicitly, so this is not part
of the standard interface.  You can probably pass any keywords to
NWChem through the standard interface, and then manually extract what
you need from the files saved.  (One could add special functions for
getting the Hamiltonian to the calculator to ease this in the future.)

Best regards
Ask




>
> Best,
> Panu
>
> On Tue, Jun 6, 2017 at 12:31 PM, Ask Hjorth Larsen <asklarsen at gmail.com>
> wrote:
>>
>> Hi Panu,
>>
>> How would you get these from NWChem normally?  I guess the way is to
>> enable a keyword so it is saved to a file, and then read the file
>> manually from the script.
>>
>> Best regards
>> Ask
>>
>> 2017-06-05 21:48 GMT+02:00 Panu Sam-Ang via ase-users
>> <ase-users at listserv.fysik.dtu.dk>:
>> > Hello,
>> >
>> > Does anyone know how to get the Hamiltonian and overlap matrices from
>> > using
>> > NWChem as the calculator?   What is the command?
>> >
>> > Thank you,
>> > Panu
>> >
>> > _______________________________________________
>> > ase-users mailing list
>> > ase-users at listserv.fysik.dtu.dk
>> > https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
>





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170621/be665cd4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6317 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170621/be665cd4/attachment-0001.p7s>


More information about the ase-users mailing list