File: external.rst

package info (click to toggle)
gpaw 21.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,492 kB
  • sloc: python: 121,997; ansic: 14,138; sh: 1,125; csh: 139; makefile: 43
file content (26 lines) | stat: -rw-r--r-- 605 bytes parent folder | download
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
.. module:: gpaw.external

External potential
==================

Examples
--------

>>> # 2.5 eV/Ang along z:
>>> from gpaw.external import ConstantElectricField
>>> calc = GPAW(external=ConstantElectricField(2.5, [0, 0, 1]), ...)

.. autoclass:: ConstantElectricField

>>> # Two point-charges:
>>> from gpaw.external import PointChargePotential
>>> pc = PointChargePotential([-1, 1], [[4.0, 4.0, 0.0], [4.0, 4.0, 10.0]])
>>> calc = GPAW(external=pc, ...)

.. autoclass:: PointChargePotential


Your own potential
------------------

See an example here: :git:`gpaw/test/ext_potential/test_harmonic.py`.