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
e30ef3a9
Unverified
Commit
e30ef3a9
authored
Feb 27, 2020
by
peastman
Committed by
GitHub
Feb 27, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #197 from peastman/pdbx
Added option to save files in PDBx/mmCIF format
parents
9fe3e544
e8695503
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
pdbfixer/html/saveFile.html
+2
-1
pdbfixer/ui.py
+10
-1
No files found.
pdbfixer/html/saveFile.html
View file @
e30ef3a9
The fixed PDB file is ready to save.
The fixed PDB file is ready to save.
<p>
<p>
<form
method=
"post"
action=
"/"
>
<form
method=
"post"
action=
"/"
>
<input
type=
"submit"
name=
"save"
value=
"Save File"
/>
<input
type=
"submit"
name=
"pdb"
value=
"Save PDB File"
/>
<input
type=
"submit"
name=
"pdbx"
value=
"Save PDBx/mmCIF File"
/>
<input
type=
"submit"
name=
"newfile"
value=
"Process Another File"
/>
<input
type=
"submit"
name=
"newfile"
value=
"Process Another File"
/>
</form>
</form>
<script>
<script>
...
...
pdbfixer/ui.py
View file @
e30ef3a9
...
@@ -138,7 +138,7 @@ def addHydrogensPageCallback(parameters, handler):
...
@@ -138,7 +138,7 @@ def addHydrogensPageCallback(parameters, handler):
displaySaveFilePage
()
displaySaveFilePage
()
def
saveFilePageCallback
(
parameters
,
handler
):
def
saveFilePageCallback
(
parameters
,
handler
):
if
'
save
'
in
parameters
:
if
'
pdb
'
in
parameters
:
output
=
StringIO
()
output
=
StringIO
()
if
fixer
.
source
is
not
None
:
if
fixer
.
source
is
not
None
:
output
.
write
(
"REMARK 1 PDBFIXER FROM:
%
s
\n
"
%
fixer
.
source
)
output
.
write
(
"REMARK 1 PDBFIXER FROM:
%
s
\n
"
%
fixer
.
source
)
...
@@ -147,6 +147,15 @@ def saveFilePageCallback(parameters, handler):
...
@@ -147,6 +147,15 @@ def saveFilePageCallback(parameters, handler):
except
AssertionError
:
except
AssertionError
:
print
print
handler
.
sendDownload
(
output
.
getvalue
(),
'output.pdb'
)
handler
.
sendDownload
(
output
.
getvalue
(),
'output.pdb'
)
elif
'pdbx'
in
parameters
:
output
=
StringIO
()
if
fixer
.
source
is
not
None
:
output
.
write
(
"# Created with PDBFixer from:
%
s
\n
"
%
fixer
.
source
)
try
:
app
.
PDBxFile
.
writeFile
(
fixer
.
topology
,
fixer
.
positions
,
output
,
True
)
except
AssertionError
:
print
handler
.
sendDownload
(
output
.
getvalue
(),
'output.cif'
)
else
:
else
:
displayStartPage
()
displayStartPage
()
...
...
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