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
0ef8eb59
Unverified
Commit
0ef8eb59
authored
May 18, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix scattering factors error
parent
b5fe4a9a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletions
+20
-1
CMakeLists.txt
+1
-1
changelog
+5
-0
src/AtomType.cpp
+14
-0
No files found.
CMakeLists.txt
View file @
0ef8eb59
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
cmake_minimum_required
(
VERSION 3.16
)
cmake_minimum_required
(
VERSION 3.16
)
# set the project name
# set the project name
project
(
cifpp VERSION 4.1.
0
LANGUAGES CXX
)
project
(
cifpp VERSION 4.1.
1
LANGUAGES CXX
)
list
(
PREPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
list
(
PREPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
...
...
changelog
View file @
0ef8eb59
Version
4.1.1
-
Fall
back
to
zero
charge
for
scattering
factors
if
the
atom
was
not
found
in
the
table
.
-
Improve
code
to
locate
resources
,
failing
less
.
Version
4.1.0
Version
4.1.0
-
Some
interface
changes
for
mmcif
::
Atom
-
Some
interface
changes
for
mmcif
::
Atom
...
...
src/AtomType.cpp
View file @
0ef8eb59
...
@@ -1083,6 +1083,20 @@ auto AtomTypeTraits::wksf(int charge) const -> const SFData&
...
@@ -1083,6 +1083,20 @@ auto AtomTypeTraits::wksf(int charge) const -> const SFData&
return
sf
.
sf
;
return
sf
.
sf
;
}
}
if
(
charge
!=
0
)
{
// Oops, not found. Fall back to zero charge and see if we can use that
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"No scattering factor found for "
<<
name
()
<<
" with charge "
<<
charge
<<
" will try to fall back to zero charge..."
<<
std
::
endl
;
for
(
auto
&
sf
:
data
::
kWKSFData
)
{
if
(
sf
.
symbol
==
mInfo
->
type
and
sf
.
charge
==
0
)
return
sf
.
sf
;
}
}
throw
std
::
runtime_error
(
"No scattering factor found for "
+
name
()
+
std
::
to_string
(
charge
));
throw
std
::
runtime_error
(
"No scattering factor found for "
+
name
()
+
std
::
to_string
(
charge
));
}
}
...
...
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