DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
PeriodicTable.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17// @author Phani Motamarri
18//
19
20#ifndef PERIODICTABLE_H
21#define PERIODICTABLE_H
22
23#include <map>
24#include <string>
25#include <vector>
26#include <TypeConfig.h>
27
28namespace dftfe
29{
30 //
31 // Declare pseudoUtils function
32 //
33
34 /** @file PeriodicTable.h
35 * @brief stores a map between atomic number and atomic symbol and atomic mass
36 *
37 *
38 * @author Phani Motamarri
39 */
40 namespace pseudoUtils
41 {
42 struct Element
43 {
45 std::string symbol;
46 std::string config;
47 double mass;
48 Element(dftfe::Int zz, std::string s, std::string c, double m)
49 : z(zz)
50 , symbol(s)
51 , config(c)
52 , mass(m)
53 {}
54 };
55
57 {
58 private:
59 std::vector<Element> ptable;
60 std::map<std::string, dftfe::Int> zmap;
61
62 public:
65 z(std::string symbol) const;
66 std::string
67 symbol(dftfe::Int zval) const;
68 std::string
70 std::string
71 configuration(std::string symbol) const;
72 double
73 mass(dftfe::Int zval) const;
74 double
75 mass(std::string symbol) const;
77 size(void) const;
78 };
79 } // namespace pseudoUtils
80} // namespace dftfe
81#endif
std::vector< Element > ptable
Definition PeriodicTable.h:59
std::string configuration(dftfe::Int zval) const
std::string symbol(dftfe::Int zval) const
std::string configuration(std::string symbol) const
dftfe::Int size(void) const
dftfe::Int z(std::string symbol) const
double mass(std::string symbol) const
std::map< std::string, dftfe::Int > zmap
Definition PeriodicTable.h:60
double mass(dftfe::Int zval) const
wrapper to convert pseudopotential file from upf to dftfe format and returns the nonlinear core corre...
Definition pseudoPotentialToDftfeConverter.cc:36
Definition pseudoPotentialToDftfeConverter.cc:34
std::int32_t Int
Definition TypeConfig.h:11
std::string config
Definition PeriodicTable.h:46
dftfe::Int z
Definition PeriodicTable.h:44
double mass
Definition PeriodicTable.h:47
std::string symbol
Definition PeriodicTable.h:45
Element(dftfe::Int zz, std::string s, std::string c, double m)
Definition PeriodicTable.h:48