File: ace.rst

package info (click to toggle)
python-ase 3.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (101 lines) | stat: -rw-r--r-- 3,675 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.. module:: ase.calculators.acemolecule

============
ACE-Molecule
============

`ACE-Molecule <https://gitlab.com/aceteam.kaist/ACE-Molecule/wikis/home>`_ ACE-Molecule, whitch
stands for Advanced Computational Engine for Molecule, is a quantum chemistry package based on a 
real-space numerical grid. The package aims to carry out accurate and fast electronic structure 
calculations for large molecular systems. The present main features include ground-state DFT 
calculations using LDA, GGA, and hybrid functionals with an exact-exchange potential under the KLI 
approximation, atomic force calculations, and excited state calculations using 
linear-response TD-DFT, CIS, and CISD methods.

The ASE calculator is an interface to the ``ace`` executable.

Setup
=====

A simple calculation can be set up::

    import sys
    from ase.io import read
    from ase.calculators.acemolecule import ACE
    
    label = sys.argv[1]    
    mol= read('H2.xyz')
    basic_list = {'Cell' : 12.0}
    ace = ACE(label=label, BasicInformation = basic_list)
    mol.calc = ace
    print (mol.get_potential_energy())

A Force calculation can be set up::
    
    import sys
    from ase.io import read
    from ase.calculators.acemolecule import ACE
    
    basic_list = {'Cell' : 12.0 ,'Pseudopotential' : {'Pseudopotential' : 1, 'Format' : 'upf', 'PSFilePath' : '/PATH/TO/UPF/FILES', 'PSFileSuffix' : '.pbe-theos.UPF'} }
    label = sys.argv[1]    
    mol= read('H2.xyz')
    order_list = ["BasicInformation", "Guess", "Scf", "Force"]
    ace = ACE(label=label, BasicInformation = basic_list, order = order_list)
    mol.calc = ace
    print (mol.get_forces())
    

A Geometry optimization calculation can be set up:: 

    import sys
    from ase.io import read
    from ase.calculators.acemolecule import ACE
    from ase.optimize import BFGS

    basic_list = {'Cell' : 12.0, 'Pseudopotential' : {'Pseudopotential' : 1, 'Format' : 'upf', 'PSFilePath' : '/PATH/TO/UPF/FILES', 'PSFileSuffix' : '.pbe-theos.UPF'} }
    label = sys.argv[1]    
    mol= read('H2.xyz')
    order_list = ["BasicInformation", "Guess", "Scf", "Force"]
    ace = ACE(label=label, BasicInformation = basic_list, order = order_list)
    mol.calc = ace
    g_opt = BFGS(mol)
    g_opt.run(fmax=0.05)
    print ("OPT is end")

A TDDFT calculation can be set up::

   import sys
   from ase.io import read
   from ase.calculators.acemolecule import ACE
   from ase.optimize import BFGS

   label = sys.argv[1]
   mol= read('H2.xyz')
   basic_list = {'Cell' : 12.0}
   order_list = ["BasicInformation", "Guess", "Scf", "TDDFT"]
   scf_list = [dict(FinalDiagonalize = dict(NumberOfEigenvalues= 12))]
   ace = ACE(label=label, BasicInformation = basic_list, Scf= scf_list, order = order_list)
   mol.calc = ace
   print (ace.get_property('excitation-energy', mol))


Parameters
==========

The calculator will interpret any of the documented options for ``ace``:
https://gitlab.com/aceteam.kaist/ACE-Molecule/tree/master/vars

By default, this calculator sets simple SCF calculations (Including BasicInformation, Guess, and Scf section).
If you want to do force or excited state calculations, or change exchange-correlation functionals, you need to change input parameters.
Parameters can be given as keywords and the calculator will put them into the corresponding section of the input file.
Each (sub)section is represented as dictionary.

An example for updating parameters::

    basic = dict(Cell = 12.0, VerboseLevel = 2)
    ace.set(BasicInformation = basic)

An example for updating subsection parameters::

    ace.set(Scf = {"ExchangeCorrelation": {"XFunctional": "LDA_X", "CFunctional": "LDA_C_PZ"}})