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
f43eb11f
Commit
f43eb11f
authored
Mar 27, 2014
by
John Chodera (MSKCC)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added draft .travis.yml
parent
7a33eebb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
0 deletions
+119
-0
.travis.yml
+19
-0
tests/test_build.py
+50
-0
tests/test_simulate.py
+50
-0
No files found.
.travis.yml
0 → 100644
View file @
f43eb11f
language
:
python
python
:
-
"
2.7"
install
:
-
sudo apt-get update -qq
-
sudo apt-get install -qq python-dev python-pip python-yaml g++
-
sudo pip install conda
-
sudo conda init
-
conda config --add channels http://conda.binstar.org/rmcgibbo
-
conda create --yes --name test numpy scipy biopython pyflakes openmm
script
:
-
python setup.py install
-
nosetests tests/test_build.py
-
nosetests tests/test_simulate.py
after_script
:
-
pyflakes pdbfixer/*.py
tests/test_build.py
0 → 100644
View file @
f43eb11f
from
Bio.PDB
import
PDBList
from
simtk
import
unit
from
pdbfixer.pdbfixer
import
*
import
os
import
sys
pdbcodes
=
[
'1PGB'
,
'1VII'
]
for
pdbcode
in
pdbcodes
:
pdblist
=
PDBList
()
input_pdb_filename
=
pdblist
.
retrieve_pdb_file
(
pdbcode
,
pdir
=
'.'
)
output_pdb_filename
=
'output.pdb'
pH
=
7.0
ionic
=
50.0
*
unit
.
millimolar
box
=
10.0
*
unit
.
angstrom
positiveIon
=
'Na+'
negativeIon
=
'Cl-'
print
"Running PDBFixer..."
infile
=
open
(
input_pdb_filename
)
outfile
=
open
(
output_pdb_filename
,
'w'
)
try
:
fixer
=
PDBFixer
(
PdbStructure
(
infile
))
fixer
.
findMissingResidues
()
fixer
.
findNonstandardResidues
()
fixer
.
replaceNonstandardResidues
()
fixer
.
findMissingAtoms
()
fixer
.
addMissingAtoms
()
fixer
.
removeHeterogens
(
False
)
fixer
.
addMissingHydrogens
(
pH
)
#fixer.addSolvent(box*unit.nanometer, positiveIon, negativeIon, ionic*unit.molar)
app
.
PDBFile
.
writeFile
(
fixer
.
topology
,
fixer
.
positions
,
outfile
)
infile
.
close
()
outfile
.
close
()
# Delete input file.
os
.
remove
(
input_pdb_filename
)
os
.
remove
(
output_pdb_filename
)
except
Exception
as
e
:
print
str
(
e
)
sys
.
exit
(
1
)
# Signal success.
sys
.
exit
(
0
)
tests/test_simulate.py
0 → 100644
View file @
f43eb11f
from
Bio.PDB
import
PDBList
from
simtk
import
unit
from
pdbfixer.pdbfixer
import
*
import
os
import
sys
pdbcodes
=
[
'1PGB'
,
'1VII'
]
for
pdbcode
in
pdbcodes
:
pdblist
=
PDBList
()
input_pdb_filename
=
pdblist
.
retrieve_pdb_file
(
pdbcode
,
pdir
=
'.'
)
output_pdb_filename
=
'output.pdb'
pH
=
7.0
ionic
=
50.0
*
unit
.
millimolar
box
=
10.0
*
unit
.
angstrom
positiveIon
=
'Na+'
negativeIon
=
'Cl-'
print
"Running PDBFixer..."
infile
=
open
(
input_pdb_filename
)
outfile
=
open
(
output_pdb_filename
,
'w'
)
try
:
fixer
=
PDBFixer
(
PdbStructure
(
infile
))
fixer
.
findMissingResidues
()
fixer
.
findNonstandardResidues
()
fixer
.
replaceNonstandardResidues
()
fixer
.
findMissingAtoms
()
fixer
.
addMissingAtoms
()
fixer
.
removeHeterogens
(
False
)
fixer
.
addMissingHydrogens
(
pH
)
#fixer.addSolvent(box*unit.nanometer, positiveIon, negativeIon, ionic*unit.molar)
app
.
PDBFile
.
writeFile
(
fixer
.
topology
,
fixer
.
positions
,
outfile
)
infile
.
close
()
outfile
.
close
()
# Delete input file.
os
.
remove
(
input_pdb_filename
)
os
.
remove
(
output_pdb_filename
)
except
Exception
as
e
:
print
str
(
e
)
sys
.
exit
(
1
)
# Signal success.
sys
.
exit
(
0
)
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