Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
mag-core
Commits
7e3459d4
Commit
7e3459d4
authored
Feb 18, 2019
by
Tobias WEBER
Browse files
cosmetic changes
parent
0e618c76
Changes
7
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
7e3459d4
...
...
@@ -48,6 +48,7 @@ tmp/**
build/**
tools/structfact/build/**
tools/magstructfact/build/**
tools/magsgbrowser/build/**
tools/pol/build/**
*.pyc
.DS_Store
...
...
tools/browser/CMakeLists.txt
→
tools/
magsg
browser/CMakeLists.txt
View file @
7e3459d4
...
...
@@ -4,7 +4,7 @@
# @license GPLv3, see 'LICENSE' file
# @desc The present version was forked on 8-Nov-2018 from the privately developed "magtools" project (https://github.com/t-weber/magtools).
#
project
(
sgbrowser
)
project
(
mag
sgbrowser
)
cmake_minimum_required
(
VERSION 3.0
)
find_package
(
Qt5 REQUIRED COMPONENTS Core Gui Widgets
)
...
...
@@ -19,12 +19,12 @@ include_directories("${PROJECT_SOURCE_DIR}" "../..")
# -----------------------------------------------------------------------------
# main program
add_executable
(
sgbrowser
add_executable
(
mag
sgbrowser
main.cpp
browser.cpp browser.h
)
target_link_libraries
(
sgbrowser
target_link_libraries
(
mag
sgbrowser
Qt5::Core Qt5::Gui Qt5::Widgets
)
# -----------------------------------------------------------------------------
...
...
tools/browser/browser.cpp
→
tools/
magsg
browser/browser.cpp
View file @
7e3459d4
...
...
@@ -68,7 +68,7 @@ SgBrowserDlg::SgBrowserDlg(QWidget* pParent, QSettings *pSett)
void
SgBrowserDlg
::
SetupSpaceGroups
()
{
std
::
cerr
<<
"Loading space groups ... "
;
m_sgs
.
Load
(
"
../
magsg.info"
);
m_sgs
.
Load
(
"magsg.info"
);
std
::
cerr
<<
"Done."
<<
std
::
endl
;
const
auto
*
pSgs
=
m_sgs
.
GetSpacegroups
();
...
...
tools/browser/browser.h
→
tools/
magsg
browser/browser.h
View file @
7e3459d4
File moved
tools/browser/browser.ui
→
tools/
magsg
browser/browser.ui
View file @
7e3459d4
File moved
tools/browser/main.cpp
→
tools/
magsg
browser/main.cpp
View file @
7e3459d4
File moved
tools/setup/convmag.cpp
View file @
7e3459d4
...
...
@@ -4,6 +4,8 @@
* @date 18-nov-17
* @license GPLv3, see 'LICENSE' file
* @desc The present version was forked on 8-Nov-2018 from the privately developed "magtools" project (https://github.com/t-weber/magtools).
*
* g++-8 -std=c++17 -fconcepts -I../../ -o convmag convmag.cpp
*/
#include <iostream>
...
...
@@ -384,12 +386,12 @@ void convert_spacegroup(std::istream& istr, ptree::ptree& prop, const std::strin
}
void
convert_table
(
const
char
*
pcFile
)
void
convert_table
(
const
char
*
pc
InFile
,
const
char
*
pcOut
File
)
{
std
::
ifstream
istr
(
pcFile
);
std
::
ifstream
istr
(
pc
In
File
);
if
(
!
istr
)
{
std
::
cerr
<<
"Cannot open
\"
"
<<
pcFile
<<
"
\"
."
<<
std
::
endl
;
std
::
cerr
<<
"Cannot open
\"
"
<<
pc
In
File
<<
"
\"
."
<<
std
::
endl
;
return
;
}
...
...
@@ -421,17 +423,23 @@ void convert_table(const char* pcFile)
std
::
cout
<<
"
\n
"
;
/*ptree::write_xml(
"magsg.xml"
, prop,
/*ptree::write_xml(
pcOutFile
, prop,
std::locale(),
ptree::xml_writer_make_settings('\t', 1, std::string("utf-8")));*/
ptree
::
write_info
(
"magsg.info"
,
prop
,
ptree
::
write_info
(
pcOutFile
,
prop
,
std
::
locale
(),
ptree
::
info_writer_make_settings
(
'\t'
,
1
));
}
int
main
()
int
main
(
int
argc
,
char
**
argv
)
{
convert_table
(
"mag.dat"
);
if
(
argc
<
3
)
{
std
::
cerr
<<
"Usage: "
<<
argv
[
0
]
<<
" <in.dat> <out.info>"
<<
std
::
endl
;
return
-
1
;
}
convert_table
(
argv
[
1
],
argv
[
2
]);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment