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
9cff8768
Unverified
Commit
9cff8768
authored
Nov 01, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'potential-performance-gain' into trunk
parents
cc671b80
728abe6d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
include/cif++/parser.hpp
+1
-1
src/parser.cpp
+5
-5
src/pdb/pdb2cif_remark_3.cpp
+1
-2
No files found.
include/cif++/parser.hpp
View file @
9cff8768
...
@@ -257,7 +257,7 @@ class sac_parser
...
@@ -257,7 +257,7 @@ class sac_parser
CIFToken
m_lookahead
;
CIFToken
m_lookahead
;
std
::
string
m_token_value
;
std
::
string
m_token_value
;
CIFValue
mTokenType
;
CIFValue
mTokenType
;
std
::
st
ack
<
int
>
m_buffer
;
std
::
st
ring
m_buffer
;
// retract buffer, used to be a stack<char>
};
};
// --------------------------------------------------------------------
// --------------------------------------------------------------------
...
...
src/parser.cpp
View file @
9cff8768
...
@@ -68,8 +68,8 @@ int sac_parser::get_next_char()
...
@@ -68,8 +68,8 @@ int sac_parser::get_next_char()
result
=
m_source
.
get
();
result
=
m_source
.
get
();
else
else
{
{
result
=
m_buffer
.
top
();
result
=
m_buffer
.
back
();
m_buffer
.
pop
();
m_buffer
.
pop
_back
();
}
}
// very simple CR/LF translation into LF
// very simple CR/LF translation into LF
...
@@ -77,11 +77,11 @@ int sac_parser::get_next_char()
...
@@ -77,11 +77,11 @@ int sac_parser::get_next_char()
{
{
int
lookahead
=
m_source
.
get
();
int
lookahead
=
m_source
.
get
();
if
(
lookahead
!=
'\n'
)
if
(
lookahead
!=
'\n'
)
m_buffer
.
push
(
lookahead
);
m_buffer
.
push
_back
(
lookahead
);
result
=
'\n'
;
result
=
'\n'
;
}
}
m_token_value
+=
static_cast
<
char
>
(
result
);
m_token_value
.
push_back
(
static_cast
<
char
>
(
result
)
);
if
(
result
==
'\n'
)
if
(
result
==
'\n'
)
++
m_line_nr
;
++
m_line_nr
;
...
@@ -106,7 +106,7 @@ void sac_parser::retract()
...
@@ -106,7 +106,7 @@ void sac_parser::retract()
if
(
ch
==
'\n'
)
if
(
ch
==
'\n'
)
--
m_line_nr
;
--
m_line_nr
;
m_buffer
.
push
(
ch
);
m_buffer
.
push
_back
(
ch
);
m_token_value
.
pop_back
();
m_token_value
.
pop_back
();
}
}
...
...
src/pdb/pdb2cif_remark_3.cpp
View file @
9cff8768
...
@@ -1427,10 +1427,9 @@ bool Remark3Parser::parse(const std::string &expMethod, PDBRecord *r, cif::datab
...
@@ -1427,10 +1427,9 @@ bool Remark3Parser::parse(const std::string &expMethod, PDBRecord *r, cif::datab
sort
(
scores
.
begin
(),
scores
.
end
());
sort
(
scores
.
begin
(),
scores
.
end
());
bool
guessProgram
=
scores
.
empty
()
or
scores
.
front
().
score
<
0.9
f
;
bool
guessProgram
=
scores
.
empty
()
or
scores
.
front
().
score
<
0.9
f
;
;
if
(
guessProgram
)
if
(
guessProgram
)
{
{
if
(
cif
::
VERBOSE
>
=
0
)
if
(
cif
::
VERBOSE
>
0
)
std
::
cerr
<<
"Unknown or untrusted program in REMARK 3, trying all parsers to see if there is a match"
<<
std
::
endl
;
std
::
cerr
<<
"Unknown or untrusted program in REMARK 3, trying all parsers to see if there is a match"
<<
std
::
endl
;
tryParser
(
new
BUSTER_TNT_Remark3Parser
(
"BUSTER-TNT"
,
expMethod
,
r
,
db
));
tryParser
(
new
BUSTER_TNT_Remark3Parser
(
"BUSTER-TNT"
,
expMethod
,
r
,
db
));
...
...
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