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
27namespace dftfe
28{
29 //
30 // Declare pseudoUtils function
31 //
32
33 /** @file PeriodicTable.h
34 * @brief stores a map between atomic number and atomic symbol and atomic mass
35 *
36 *
37 * @author Phani Motamarri
38 */
39 namespace pseudoUtils
40 {
41 struct Element
42 {
43 int z;
44 std::string symbol;
45 std::string config;
46 double mass;
47 Element(int zz, std::string s, std::string c, double m)
48 : z(zz)
49 , symbol(s)
50 , config(c)
51 , mass(m)
52 {}
53 };
54
56 {
57 private:
58 std::vector<Element> ptable;
59 std::map<std::string, int> zmap;
60
61 public:
63 int
64 z(std::string symbol) const;
65 std::string
66 symbol(int zval) const;
67 std::string
68 configuration(int zval) const;
69 std::string
70 configuration(std::string symbol) const;
71 double
72 mass(int zval) const;
73 double
74 mass(std::string symbol) const;
75 int
76 size(void) const;
77 };
78 } // namespace pseudoUtils
79} // namespace dftfe
80#endif
double mass(int zval) const
std::vector< Element > ptable
Definition PeriodicTable.h:58
std::string symbol(int zval) const
std::string configuration(int zval) const
std::string configuration(std::string symbol) const
std::map< std::string, int > zmap
Definition PeriodicTable.h:59
int z(std::string symbol) const
double mass(std::string symbol) 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
int z
Definition PeriodicTable.h:43
std::string config
Definition PeriodicTable.h:45
double mass
Definition PeriodicTable.h:46
std::string symbol
Definition PeriodicTable.h:44
Element(int zz, std::string s, std::string c, double m)
Definition PeriodicTable.h:47