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
4ce52b58
Commit
4ce52b58
authored
5 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Allow to choose remote repository if remote=True in io.LoadPDB
parent
c7eced1e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/io/pymod/__init__.py
+15
-5
15 additions, 5 deletions
modules/io/pymod/__init__.py
with
15 additions
and
5 deletions
modules/io/pymod/__init__.py
+
15
−
5
View file @
4ce52b58
...
...
@@ -65,8 +65,8 @@ def _override(val1, val2):
def
LoadPDB
(
filename
,
restrict_chains
=
""
,
no_hetatms
=
None
,
fault_tolerant
=
None
,
load_multi
=
False
,
quack_mode
=
None
,
join_spread_atom_records
=
None
,
calpha_only
=
None
,
profile
=
'
DEFAULT
'
,
remote
=
False
,
dialect
=
None
,
seqres
=
False
,
bond_feasibility_check
=
None
):
profile
=
'
DEFAULT
'
,
remote
=
False
,
remote_repo
=
'
pdb
'
,
dialect
=
None
,
seqres
=
False
,
bond_feasibility_check
=
None
):
"""
Load PDB file from disk and return one or more entities. Several options
allow to customize the exact behaviour of the PDB import. For more information
...
...
@@ -90,8 +90,16 @@ def LoadPDB(filename, restrict_chains="", no_hetatms=None,
:attr:`IOProfile.join_spread_atom_records`.
:param remote: If set to True, the method tries to load the pdb from the
remote pdb repository www.pdb.org. The filename is then interpreted as the
pdb id.
remote repository given as *remote_repo*. The filename is then
interpreted as the entry id as further specified for the *remote_repo*
parameter.
:param remote_repo: Remote repository to fetch structure if *remote* is True.
Must be one in [
'
pdb
'
,
'
smtl
'
,
'
pdb_redo
'
]. In case of
'
pdb
'
and
'
pdb_redo
'
, the entry must be given as lower
case pdb id, which loads the deposited assymetric unit
(e.g.
'
1ake
'
). In case of
'
smtl
'
, the entry must also
specify the desired biounit (e.g.
'
1ake.1
'
).
:rtype: :class:`~ost.mol.EntityHandle` or a list thereof if `load_multi` is
True.
...
...
@@ -135,8 +143,10 @@ def LoadPDB(filename, restrict_chains="", no_hetatms=None,
tmp_file
=
None
# avoid getting out of scope
if
remote
:
if
remote_repo
not
in
[
'
pdb
'
,
'
smtl
'
,
'
pdb_redo
'
]:
raise
IOError
(
"
remote_repo must be in [
'
pdb
'
,
'
smtl
'
,
'
pdb_redo
'
]
"
)
from
ost.io.remote
import
RemoteGet
tmp_file
=
RemoteGet
(
filename
)
tmp_file
=
RemoteGet
(
filename
,
from_repo
=
remote_repo
)
filename
=
tmp_file
.
name
conop_inst
=
conop
.
Conopology
.
Instance
()
...
...
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