Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
131d149a
Verified
Commit
131d149a
authored
1 year ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
feat: report possible compatibiltiy issues
parent
812e856c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/conop/src/compound_lib.cc
+12
-1
12 additions, 1 deletion
modules/conop/src/compound_lib.cc
with
12 additions
and
1 deletion
modules/conop/src/compound_lib.cc
+
12
−
1
View file @
131d149a
...
@@ -397,7 +397,6 @@ CompoundLibPtr CompoundLib::Load(const String& database, bool readonly)
...
@@ -397,7 +397,6 @@ CompoundLibPtr CompoundLib::Load(const String& database, bool readonly)
}
}
String
aq
;
String
aq
;
sqlite3_stmt
*
stmt
;
sqlite3_stmt
*
stmt
;
std
::
stringstream
ss
;
// check if SMILES are available
// check if SMILES are available
aq
=
"SELECT smiles FROM chem_compounds LIMIT 1"
;
aq
=
"SELECT smiles FROM chem_compounds LIMIT 1"
;
retval
=
sqlite3_prepare_v2
(
lib
->
db_
->
ptr
,
aq
.
c_str
(),
retval
=
sqlite3_prepare_v2
(
lib
->
db_
->
ptr
,
aq
.
c_str
(),
...
@@ -417,12 +416,24 @@ CompoundLibPtr CompoundLib::Load(const String& database, bool readonly)
...
@@ -417,12 +416,24 @@ CompoundLibPtr CompoundLib::Load(const String& database, bool readonly)
lib
->
creation_date_
=
lib
->
GetCreationDate
();
lib
->
creation_date_
=
lib
->
GetCreationDate
();
lib
->
ost_version_used_
=
lib
->
GetOSTVersionUsed
();
lib
->
ost_version_used_
=
lib
->
GetOSTVersionUsed
();
// Report compatibility issues
if
(
lib
->
ost_version_used_
.
compare
(
COMPAT_VERSION
)
<
0
)
{
if
(
lib
->
ost_version_used_
.
compare
(
COMPAT_VERSION
)
<
0
)
{
std
::
stringstream
ss
;
ss
<<
"Compound lib was created with an unsupported version of OST: "
ss
<<
"Compound lib was created with an unsupported version of OST: "
<<
lib
->
ost_version_used_
<<
lib
->
ost_version_used_
<<
". Please update your compound library."
;
<<
". Please update your compound library."
;
throw
ost
::
Error
(
ss
.
str
());
throw
ost
::
Error
(
ss
.
str
());
}
}
if
(
!
lib
->
smiles_available_
)
{
LOG_WARNING
(
"SMILES not available in compound library v."
<<
lib
->
ost_version_used_
<<
". Only empty strings will be returned."
);
}
if
(
!
lib
->
charges_available_
)
{
LOG_WARNING
(
"Charges not available in compound library v."
<<
lib
->
ost_version_used_
<<
". All charges will be 0."
);
}
return
lib
;
return
lib
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment