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
c5331bdb
Commit
c5331bdb
authored
6 years ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
Allow running the Processor with PDBStrToEntity.
parent
00b3ffb5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/io/pymod/export_pdb_io.cc
+3
-1
3 additions, 1 deletion
modules/io/pymod/export_pdb_io.cc
modules/io/src/mol/pdb_str.cc
+5
-1
5 additions, 1 deletion
modules/io/src/mol/pdb_str.cc
modules/io/src/mol/pdb_str.hh
+2
-1
2 additions, 1 deletion
modules/io/src/mol/pdb_str.hh
with
10 additions
and
3 deletions
modules/io/pymod/export_pdb_io.cc
+
3
−
1
View file @
c5331bdb
...
...
@@ -98,7 +98,9 @@ void export_pdb_io()
def
(
"EntityToPDBStr"
,
pdb_str_b
,
(
arg
(
"entity"
),
arg
(
"profile"
)
=
IOProfile
()));
def
(
"PDBStrToEntity"
,
&
PDBStringToEntity
,
(
arg
(
"pdb_string"
),
arg
(
"profile"
)
=
IOProfile
()));
def
(
"PDBStrToEntity"
,
&
PDBStringToEntity
,
(
arg
(
"pdb_string"
),
arg
(
"profile"
)
=
IOProfile
(),
arg
(
"process"
)
=
false
));
// we need to make sure there are no pending references to Python objects
// tied to the IOProfileRegistry singleton. The destructor of
...
...
This diff is collapsed.
Click to expand it.
modules/io/src/mol/pdb_str.cc
+
5
−
1
View file @
c5331bdb
...
...
@@ -37,11 +37,15 @@ String EntityToPDBString(const mol::EntityView& ent, const IOProfile& profile) {
return
stream
.
str
();
}
mol
::
EntityHandle
PDBStringToEntity
(
const
String
&
pdb
,
const
IOProfile
&
profile
)
{
mol
::
EntityHandle
PDBStringToEntity
(
const
String
&
pdb
,
const
IOProfile
&
profile
,
bool
process
)
{
std
::
stringstream
stream
(
pdb
);
PDBReader
reader
(
stream
,
profile
);
mol
::
EntityHandle
ent
=
mol
::
CreateEntity
();
reader
.
Import
(
ent
);
if
(
profile
.
processor
&&
process
)
{
profile
.
processor
->
Process
(
ent
);
}
return
ent
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/io/src/mol/pdb_str.hh
+
2
−
1
View file @
c5331bdb
...
...
@@ -34,7 +34,8 @@ String DLLEXPORT_OST_IO
EntityToPDBString
(
const
mol
::
EntityView
&
ent
,
const
IOProfile
&
profile
=
IOProfile
());
mol
::
EntityHandle
DLLEXPORT_OST_IO
PDBStringToEntity
(
const
String
&
pdb
,
const
IOProfile
&
profile
=
IOProfile
());
PDBStringToEntity
(
const
String
&
pdb
,
const
IOProfile
&
profile
=
IOProfile
(),
bool
process
=
false
);
}}
...
...
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