Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
b65aa46d
Commit
b65aa46d
authored
Oct 21, 2020
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better symop table
parent
faef95a8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
17 deletions
+38
-17
include/cif++/Symmetry.hpp
+15
-15
src/SymOpTable_data.cpp
+0
-0
tools/symop-map-generator.cpp
+23
-2
No files found.
include/cif++/Symmetry.hpp
View file @
b65aa46d
...
...
@@ -50,21 +50,21 @@ extern const std::size_t kNrOfSpaceGroups;
struct
SymopData
{
constexpr
SymopData
(
const
std
::
array
<
int
,
15
>&
data
)
:
m_packed
((
static_cast
<
uint64_t
>
(
data
[
0
])
&
0x03
)
<<
34
bitor
(
static_cast
<
uint64_t
>
(
data
[
1
])
&
0x03
)
<<
32
bitor
(
static_cast
<
uint64_t
>
(
data
[
2
])
&
0x03
)
<<
30
bitor
(
static_cast
<
uint64_t
>
(
data
[
3
])
&
0x03
)
<<
28
bitor
(
static_cast
<
uint64_t
>
(
data
[
4
])
&
0x03
)
<<
26
bitor
(
static_cast
<
uint64_t
>
(
data
[
5
])
&
0x03
)
<<
24
bitor
(
static_cast
<
uint64_t
>
(
data
[
6
])
&
0x03
)
<<
22
bitor
(
static_cast
<
uint64_t
>
(
data
[
7
])
&
0x03
)
<<
20
bitor
(
static_cast
<
uint64_t
>
(
data
[
8
])
&
0x03
)
<<
18
bitor
(
static_cast
<
uint64_t
>
(
data
[
9
])
&
0x07
)
<<
15
bitor
(
static_cast
<
uint64_t
>
(
data
[
10
])
&
0x07
)
<<
12
bitor
(
static_cast
<
uint64_t
>
(
data
[
11
])
&
0x07
)
<<
9
bitor
(
static_cast
<
uint64_t
>
(
data
[
12
])
&
0x07
)
<<
6
bitor
(
static_cast
<
uint64_t
>
(
data
[
13
])
&
0x07
)
<<
3
bitor
(
static_cast
<
uint64_t
>
(
data
[
14
])
&
0x07
)
<<
0
)
:
m_packed
((
data
[
0
]
&
0x03ULL
)
<<
34
bitor
(
data
[
1
]
&
0x03ULL
)
<<
32
bitor
(
data
[
2
]
&
0x03ULL
)
<<
30
bitor
(
data
[
3
]
&
0x03ULL
)
<<
28
bitor
(
data
[
4
]
&
0x03ULL
)
<<
26
bitor
(
data
[
5
]
&
0x03ULL
)
<<
24
bitor
(
data
[
6
]
&
0x03ULL
)
<<
22
bitor
(
data
[
7
]
&
0x03ULL
)
<<
20
bitor
(
data
[
8
]
&
0x03ULL
)
<<
18
bitor
(
data
[
9
]
&
0x07ULL
)
<<
15
bitor
(
data
[
10
]
&
0x07ULL
)
<<
12
bitor
(
data
[
11
]
&
0x07ULL
)
<<
9
bitor
(
data
[
12
]
&
0x07ULL
)
<<
6
bitor
(
data
[
13
]
&
0x07ULL
)
<<
3
bitor
(
data
[
14
]
&
0x07ULL
)
<<
0
)
{
}
...
...
src/SymOpTable_data.cpp
View file @
b65aa46d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
tools/symop-map-generator.cpp
View file @
b65aa46d
...
...
@@ -225,6 +225,8 @@ int main()
SymInfoBlock
cur
=
{};
std
::
vector
<
array
<
int
,
15
>>
symops
,
cenops
;
while
(
getline
(
file
,
line
))
{
switch
(
state
)
...
...
@@ -264,13 +266,32 @@ int main()
else
if
(
line
.
compare
(
0
,
6
,
"symop "
)
==
0
)
{
SymopParser
p
;
data
.
emplace_back
(
cur
.
nr
,
symopnr
,
p
.
parse
(
line
.
substr
(
6
)));
++
symopnr
;
symops
.
emplace_back
(
p
.
parse
(
line
.
substr
(
6
)));
}
else
if
(
line
.
compare
(
0
,
6
,
"cenop "
)
==
0
)
{
SymopParser
p
;
cenops
.
emplace_back
(
p
.
parse
(
line
.
substr
(
6
)));
}
else
if
(
line
==
"end_spacegroup"
)
{
for
(
auto
&
cenop
:
cenops
)
{
for
(
auto
symop
:
symops
)
{
for
(
size_t
i
=
9
;
i
<
15
;
++
i
)
symop
[
i
]
+=
cenop
[
i
];
data
.
emplace_back
(
cur
.
nr
,
symopnr
,
symop
);
++
symopnr
;
}
}
symInfo
.
emplace
(
cur
.
nr
,
cur
);
state
=
State
::
skip
;
symops
.
clear
();
cenops
.
clear
();
}
break
;
}
...
...
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