Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pdbfixer
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
pdbfixer
Commits
10eb76db
Commit
10eb76db
authored
Mar 31, 2014
by
John Chodera (MSKCC)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed ability to create PDBFixer objects from PdbStructure objects.
parent
68ff21f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
pdbfixer/pdbfixer.py
+6
-17
No files found.
pdbfixer/pdbfixer.py
View file @
10eb76db
...
...
@@ -119,13 +119,11 @@ class PDBFixer(object):
"""PDBFixer implements many tools for fixing problems in PDB files.
"""
def
__init__
(
self
,
structure
=
None
,
filename
=
None
,
file
=
None
,
url
=
None
,
pdbid
=
None
):
def
__init__
(
self
,
filename
=
None
,
file
=
None
,
url
=
None
,
pdbid
=
None
):
"""Create a new PDBFixer instance to fix problems in a PDB file.
Parameters
----------
structure : PdbStructure, optional, default=None
A PdbStructure object containing the PDB file to be repaired.
filename : str, optional, default=None
A filename specifying the file from which the PDB file is to be read.
file : file, optional, default=None
...
...
@@ -143,17 +141,11 @@ class PDBFixer(object):
Examples
--------
Start from a
PdbStructure
Start from a
file object.
>>> pdbid = '1VII'
>>> url = 'http://www.rcsb.org/pdb/files/
%
s.pdb'
%
pdbid
>>> file = urlopen(url)
>>> structure = PdbStructure(file)
>>> fixer = PDBFixer(structure=structure)
Start from a file object.
>>> file = urlopen(url)
>>> fixer = PDBFixer(file=file)
Start from a filename.
...
...
@@ -176,13 +168,10 @@ class PDBFixer(object):
"""
# Check to make sure only one option has been specified.
if
bool
(
structure
)
+
bool
(
filename
)
+
bool
(
file
)
+
bool
(
url
)
+
bool
(
pdbid
)
!=
1
:
raise
Exception
(
"Exactly one option [
structure,
filename, file, url, pdbid] must be specified."
)
if
bool
(
filename
)
+
bool
(
file
)
+
bool
(
url
)
+
bool
(
pdbid
)
!=
1
:
raise
Exception
(
"Exactly one option [filename, file, url, pdbid] must be specified."
)
if
structure
:
# A PDB structure has been specified; do nothing.
pass
elif
filename
:
if
filename
:
# A local file has been specified.
file
=
open
(
filename
,
'r'
)
structure
=
PdbStructure
(
file
)
...
...
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