Skip to main content

ASE calculator interface for FIREBALL code

Project description

Upload Python Package

Thunder ASE

Description

The interface of ASE for FIREBALL.

FIREBALL is an open source and high efficiency DFT software based on local-orbital ab-initio method, allows for the simulation very large supercells of thousands of atoms. ASE is a popular python package for atomic structure modeling. ASE provide interfaces with many QM and MM software. This thunder-ase package is not only the ASE interface for FIREBALL, but also provides many other useful functions.

thunder-ase-framework

Installation

pip install -U thunder-ase

Requirements

  • ase
  • dftd4 and dftd4-python for DFT-D4 (optional)

Tutorial

Simple example

from thunder_ase.fireball import Fireball
from ase.build import molecule

atoms = molecule('C6H6')
Fdata_path = 'YOUR_FDATA_PATH'

kwargs = {'iwriteout_charges': 1,  # Writing out the charges.
          'efermi_T': 200.0,
          'ipi': 1, # use i-PI socket protocol. Default is 0. Recommended for optimization and MD.
          }

calc = Fireball(command='YOUR_PATH for fireball-ase.x', 
                Fdata_path=Fdata_path,
                **kwargs)
atoms.calc = calc

e0 = atoms.get_potential_energy()
efermi = atoms.calc.get_fermi_level()

print("The energy is {:.3f} eV.".format(e0))
print("The Fermi Level is {:.3f} eV.".format(efermi))

# Optimization the Structure
from ase.optimize.bfgs import BFGS
dyn = BFGS(atoms, trajectory='opt.traj')
calc.dynamics(dyn, fmax=0.05)  # This function uses i-PI socket to speed up the calculation. The original ASE way still works, but without socket supported.

Important notes

  • The socket-run is highly recommended during MD simulation, it will save lots of time on reading Fdata. Related keywords: ipi, inet, host.
  • See more in C2H5OH optimization example.

Grimme's DFT-D3 and DFT-D4 combination

See

More info:

Basic Parameters

  • qstate : The charge state of the system. Default is 0. Positive values mean add extra electrons, negatives mean remove electrons.
  • efermi_t: Smearing temperature at Fermi level. Default is 100.0, which is about 0.0086 eV. For metal system, larger value is recommended.
  • max_scf_iterations_set: Scf steps maximum. Default is 50.
  • scf_tolerance_set: Scf tolerance of charge. Default is 1.0E-6. Smaller value is recommended for higher precision, e.g. 1.0E-8.
  • beta_set: Broyden’s mix factor of charges. Default is 0.08.
  • ecut_set: To control mesh grid density. Default is 200.0.
  • iwriteout_charges: Write out charges. Default is 0 (False).

The following keywords only for Thunder-ASE

  • kpt_size: Size of k point sampling. Default is None for molecules and [1, 1, 1] for crystals.
  • kpt_offset: Offset for k point sampling. Default is None for molecules and [0., 0., 0.] for crystals.
  • kpt_interval: Define kpoint sampling by the interval. Default is None.
  • kpt_path: K points path to obtain band structure. Default is None. See more in ase.dft.kpoints.BandPath.
  • nkpt: Number of kpoints on path. Default is None. Used if kpt_path is defined by string.
  • kpt_reduced: Whether reduce the k points. Default is True.
  • kpt_gamma: . Gamma centre mesh. Default is True.

Advanced Parameters

  • iconstraint_rcm: Whether shifts molecule to center of mass (COM) before the simulation. Default is 1 (True).
  • ifix_neighbors: Fix the neighbor list of the system to initial structure. Default is 0 (False).
  • ifix_charges: Fix the charges of the system to initial structure. Default is 0 (False). This is useful sometimes for very unreasonable initial structures.
  • iwriteout_me_sandh: Write out overlap (S) and Hamiltonian (H) matrix. Default is 0 (False).
  • iwriteout_cdcoeffs: Write out orbital coefficients. Default is 0 (False).
  • iwriteout_density: Write out density matrix. Default is 0 (False).
  • iwriteout_energies: Write out all energy terms. Default is 0 (False).
  • iwriteout_populations: Measure the localization by the entropic quantity W. Default is 0 (False). W is the number of accessible atoms for the given electronic energy and which describes the spatial extent of the electronic state. See more in Refs. H. Wang and J. P. Lewis, J. Phys.: Condens. Matter 18, 421–434 (2005) and H. Wang and J. P. Lewis, J. Phys.: Condens. Matter 17, L209–L213 (2005).
  • iwriteout_forces: Write out all force terms. Default is 0 (False).
  • iwriteout_neighbors: Write out all neighbors. Default is 0 (False).
  • iwriteout_abs: Write out absorption spectra. Default is 0 (False).
  • iwriteout_ewf: Write out wave functions. Default is 0 (False).
  • iwriteout_dos: Write out density of states. Default is 0 (False).
  • ipi: open I-PI socket. Default is 0.
  • inet: socket protocol, 0: unixsocket, 1: port. Default is 0(unixsocket). inet=1 is under-developing.
  • host: name for unixsocket. Default is 'thunder-ase-xxxx', xxxx is random string.

Deprecated Parameters

The following parameters are deprecated due to the usage of thunder-ase. In the future, they will be removed from FIREBALL. Most parameters are for MD simulations.

  • nstepi: Initial step number. Default is 1.
  • iconstraint_rcm: Shift COM to [0,0,0] before simulation. Default is 0 (False).
  • iconstraint_vcm: Constraining the velocities about the COM, it means whether fix the COM during simulation. Default is 1 (True).
  • iconstraint_l: Angular momentum constraint of the whole system. Default is 1 (True).
  • iconstraint_ke: Kinetic energy constraint of the whole system. Default is 0 (False).
  • nstepf: Final step number. Default is 1. nstepf - nstepi is the required MD steps.
  • t_initial: Initial temperature of MD simulation. Default is 300.0.
  • t_final: Final temperature of MD simulation. Default is 0.0.
  • iquench: Quench method. Default is 0.
    • iquench = n: quench the velocities on every n’th step;
    • iquench = -1: quench whenever the instantaneous temperature T_instantaneous is lower than the instantaneous temperature on the previous step T_previous;
    • iquench = -2: annealing simulation. T_want is the desired annealing temperature and taurelax is for specifies how rapidly of quench;
    • iquench = -3: Coordinate power quench, quench velocities one coordinate at a time.
  • t_want: Annealing temperature to reach. Default is 300.0 K.
  • taurelax: Quench rate. Default is 5.0 fs.
  • dt: Time step of MD simulation. Default is 0.25 fs.
  • iensemble: Thermodynamic ensemble. Default is 0.
    • iensemble = 1: Constant temperature ensemble

Roadmap

  • v0.1: run basic fireball calculation and read basic result from it.
    • jupyter-notebook for examples
    • multiple atoms for one calculator
    • read fireball input to construct calculator
  • v0.2: band structure calculation.
    • DOS calculation.
  • v0.3: fit basis to gaussian basis set, write orbitals to mwfn.
    • interface to multiwfn.
  • v0.4: Read charges and support charged system.
    • add MD simulation examples
    • add Fukui function calculation examples
  • v0.5: interactive running with socket.
  • v0.6: combination with Grimme's DFT-D4 correction.
  • v0.7: new calc.dynamics() function for easy running optimization and MD with socket.
  • vx.x: support more functionals, add keywords xc.
  • vx.x: Fdata management.
  • vx.x: interface with LODESTAR to do open quantum system simulation.
  • vx.x: support XingChen Liu's nano-reactor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thunder-ase-0.7.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

thunder_ase-0.7-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file thunder-ase-0.7.tar.gz.

File metadata

  • Download URL: thunder-ase-0.7.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for thunder-ase-0.7.tar.gz
Algorithm Hash digest
SHA256 aea9ae03ecfb19e3b52d60727074ef922cf6d1bacefaf8ed28e92bfa127f7e88
MD5 6023cb3e7788dbc5d12f00d087bb1443
BLAKE2b-256 a5d0e603a1fed591a25770bc624aa128f4c69db8589bcca0c031576535727ae8

See more details on using hashes here.

File details

Details for the file thunder_ase-0.7-py3-none-any.whl.

File metadata

  • Download URL: thunder_ase-0.7-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for thunder_ase-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a884edf98287b841bc0dbbd550e1840364f9fba975c911b8077ea2f85ef97dc9
MD5 10e2561de5dc2608c3353fe481785f17
BLAKE2b-256 4b63f93ff22cec918ed47a37061d20d49148e79357626ebf266d3a319447b353

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page