forked from dftfeDevelopers/dftfe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made changes to ctests infrastructure and added appropriate changes i…
…n src folder
- Loading branch information
1 parent
fd03c67
commit 24f7074
Showing
39 changed files
with
3,372 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// --------------------------------------------------------------------- | ||
// | ||
// Copyright (c) 2017 The Regents of the University of Michigan and DFT-FE authors. | ||
// | ||
// This file is part of the DFT-FE code. | ||
// | ||
// The DFT-FE code is free software; you can use it, redistribute | ||
// it, and/or modify it under the terms of the GNU Lesser General | ||
// Public License as published by the Free Software Foundation; either | ||
// version 2.1 of the License, or (at your option) any later version. | ||
// The full text of the license can be found in the file LICENSE at | ||
// the top level of the DFT-FE distribution. | ||
// | ||
// --------------------------------------------------------------------- | ||
// | ||
// @author Phani Motamarri (2018) | ||
// | ||
|
||
#ifndef PERIODICTABLE_H | ||
#define PERIODICTABLE_H | ||
|
||
#include <map> | ||
#include <vector> | ||
#include <string> | ||
|
||
namespace dftfe | ||
{ | ||
namespace pseudoUtils | ||
{ | ||
struct Element | ||
{ | ||
int z; | ||
std::string symbol; | ||
std::string config; | ||
double mass; | ||
Element(int zz, std::string s, std::string c, double m) : z(zz), symbol(s), config(c),mass(m) {} | ||
}; | ||
|
||
class PeriodicTable | ||
{ | ||
private: | ||
|
||
std::vector<Element> ptable; | ||
std::map<std::string,int> zmap; | ||
|
||
public: | ||
|
||
PeriodicTable(void); | ||
int z(std::string symbol) const; | ||
std::string symbol(int zval) const; | ||
std::string configuration(int zval) const; | ||
std::string configuration(std::string symbol) const; | ||
double mass(int zval) const; | ||
double mass(std::string symbol) const; | ||
int size(void) const; | ||
|
||
}; | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// --------------------------------------------------------------------- | ||
// | ||
// Copyright (c) 2017 The Regents of the University of Michigan and DFT-FE authors. | ||
// | ||
// This file is part of the DFT-FE code. | ||
// | ||
// The DFT-FE code is free software; you can use it, redistribute | ||
// it, and/or modify it under the terms of the GNU Lesser General | ||
// Public License as published by the Free Software Foundation; either | ||
// version 2.1 of the License, or (at your option) any later version. | ||
// The full text of the license can be found in the file LICENSE at | ||
// the top level of the DFT-FE distribution. | ||
// | ||
// --------------------------------------------------------------------- | ||
// | ||
// @author Phani Motamarri (2018) | ||
// | ||
|
||
#ifndef converter_h | ||
#define converter_h | ||
#include <string> | ||
#include "string.h" | ||
namespace dftfe | ||
{ | ||
namespace pseudoUtils | ||
{ | ||
void convert(std::string & file); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// --------------------------------------------------------------------- | ||
// | ||
// Copyright (c) 2017 The Regents of the University of Michigan and DFT-FE authors. | ||
// | ||
// This file is part of the DFT-FE code. | ||
// | ||
// The DFT-FE code is free software; you can use it, redistribute | ||
// it, and/or modify it under the terms of the GNU Lesser General | ||
// Public License as published by the Free Software Foundation; either | ||
// version 2.1 of the License, or (at your option) any later version. | ||
// The full text of the license can be found in the file LICENSE at | ||
// the top level of the DFT-FE distribution. | ||
// | ||
// --------------------------------------------------------------------- | ||
// | ||
// @author Phani Motamarri (2018) | ||
// | ||
|
||
#ifndef upfToxml_h | ||
#define upfToxml_h | ||
#include <string> | ||
#include "string.h" | ||
#include <headers.h> | ||
#include <dftParameters.h> | ||
|
||
namespace dftfe | ||
{ | ||
namespace pseudoUtils | ||
{ | ||
int upfToxml(std::string &inputFile, | ||
std::string &outputFile); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// --------------------------------------------------------------------- | ||
// | ||
// Copyright (c) 2017-2018 The Regents of the University of Michigan and DFT-FE authors. | ||
// | ||
// This file is part of the DFT-FE code. | ||
// | ||
// The DFT-FE code is free software; you can use it, redistribute | ||
// it, and/or modify it under the terms of the GNU Lesser General | ||
// Public License as published by the Free Software Foundation; either | ||
// version 2.1 of the License, or (at your option) any later version. | ||
// The full text of the license can be found in the file LICENSE at | ||
// the top level of the DFT-FE distribution. | ||
// | ||
// --------------------------------------------------------------------- | ||
// | ||
// @author Shukan Parekh, Phani Motamarri | ||
// | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <string.h> | ||
#include <stdio.h> | ||
#include <iostream> | ||
#include <cstring> | ||
#include <sstream> | ||
#include <fstream> | ||
#include <tuple> | ||
#include <stack> | ||
#include <libxml/parser.h> | ||
#include <libxml/tree.h> | ||
#include <fstream> | ||
|
||
#ifndef xmlTodftfeParser_h | ||
#define xmlTodftfeParser_h | ||
|
||
namespace dftfe{ | ||
// | ||
//Declare pseudoUtils function | ||
// | ||
namespace pseudoUtils | ||
{ | ||
|
||
class xmlTodftfeParser{ | ||
|
||
private: | ||
xmlDoc *doc; | ||
xmlNode *root; | ||
double mesh_spacing; | ||
std::vector<std::string> local_potential; | ||
std::vector<std::string> density; | ||
std::vector<std::string> mesh; | ||
std::vector<std::tuple<size_t, size_t, std::vector<std::string>>> projectors; | ||
std::vector<std::tuple<size_t, size_t, size_t, double>> d_ij; | ||
|
||
std::ofstream loc_pot; | ||
std::ofstream dense; | ||
std::ofstream denom; | ||
std::ofstream l1; | ||
std::ofstream l2; | ||
std::ofstream l3; | ||
std::ofstream ad_file; | ||
std::ofstream pseudo; | ||
|
||
public: | ||
/** | ||
* class constructor | ||
*/ | ||
xmlTodftfeParser(); | ||
|
||
/** | ||
* class destructor | ||
*/ | ||
~xmlTodftfeParser(); | ||
|
||
/** | ||
* @brief parse a given xml pseudopotential file | ||
* | ||
* @param filePath location of the xml file | ||
*/ | ||
bool parseFile(std::string & filePath); | ||
|
||
/** | ||
* @brief output the parsed xml pseudopotential file into dat files required by dftfe code | ||
* | ||
* @param filePath location to write the data | ||
*/ | ||
bool outputData(std::string & filePath); | ||
|
||
}; | ||
|
||
} | ||
|
||
} | ||
#endif /* parser_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.