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
1cb702c9
Commit
1cb702c9
authored
Mar 02, 2015
by
John Chodera (MSKCC)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize tests; simplify doctests.
parent
23ebf586
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
14 deletions
+10
-14
pdbfixer/pdbfixer.py
+10
-14
pdbfixer/tests/data/test.pdb
+0
-0
pdbfixer/tests/test_build_and_simulate.py
+0
-0
pdbfixer/tests/test_mutate.py
+0
-0
pdbfixer/tests/test_removechains.py
+0
-0
No files found.
pdbfixer/pdbfixer.py
View file @
1cb702c9
...
@@ -45,6 +45,8 @@ import os
...
@@ -45,6 +45,8 @@ import os
import
os.path
import
os.path
import
math
import
math
from
pkg_resources
import
resource_filename
# Imports for urlopen
# Imports for urlopen
if
sys
.
version_info
>=
(
3
,
0
):
if
sys
.
version_info
>=
(
3
,
0
):
from
urllib.request
import
urlopen
from
urllib.request
import
urlopen
...
@@ -156,29 +158,23 @@ class PDBFixer(object):
...
@@ -156,29 +158,23 @@ class PDBFixer(object):
Examples
Examples
--------
--------
Start from a file object.
>>> pdbid = '1VII'
>>> url = 'http://www.rcsb.org/pdb/files/
%
s.pdb'
%
pdbid
>>> file = urlopen(url)
>>> fixer = PDBFixer(pdbfile=file)
Start from a filename.
Start from a filename.
>>> filename = 'test.pdb'
>>> filename = resource_filename('pdbfixer', 'tests/data/test.pdb')
>>> file = urlopen(url)
>>> outfile = open(filename, 'w')
>>> outfile.write(file.read())
>>> outfile.close()
>>> fixer = PDBFixer(filename=filename)
>>> fixer = PDBFixer(filename=filename)
Start from a file object.
>>> with open(filename) as f:
... fixer = PDBFixer(pdbfile=f)
Start from a URL.
Start from a URL.
>>> fixer = PDBFixer(url=
url
)
>>> fixer = PDBFixer(url=
'http://www.rcsb.org/pdb/files/1VII.pdb'
)
Start from a PDB code.
Start from a PDB code.
>>> fixer = PDBFixer(pdbid=
pdbid
)
>>> fixer = PDBFixer(pdbid=
'1VII'
)
"""
"""
...
...
pdbfixer/tests/data/test.pdb
0 → 100644
View file @
1cb702c9
This diff is collapsed.
Click to expand it.
tests/test_build_and_simulate.py
→
pdbfixer/
tests/test_build_and_simulate.py
View file @
1cb702c9
File moved
tests/test_mutate.py
→
pdbfixer/
tests/test_mutate.py
View file @
1cb702c9
File moved
tests/test_removechains.py
→
pdbfixer/
tests/test_removechains.py
View file @
1cb702c9
File moved
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