Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Carlos GO
RNAmigos_server
Commits
bf03c0d2
Commit
bf03c0d2
authored
Jun 16, 2020
by
Carlos GO
Browse files
svg fix
parent
3cc4ed41
Changes
1
Hide whitespace changes
Inline
Side-by-side
fp2lig.py
View file @
bf03c0d2
...
...
@@ -43,14 +43,14 @@ def draw(smiles):
drawer
.
DrawMolecule
(
mc
)
drawer
.
FinishDrawing
()
svg
=
drawer
.
GetDrawingText
()
svg
=
svg
.
replace
(
'svg
:
'
,
''
)
svg
=
svg
.
replace
(
'
:
svg'
,
''
)
savepath
=
os
.
path
.
join
(
"static"
,
"mol_drawings"
,
f
"
{
smiles_hash
}
.svg"
)
# Draw.MolToFile( mc, savepath )
# for line in svg_file:
# if "xmlns:svg" in line:
# line = line.replace(":svg", "")
with
open
(
savepath
,
"w"
)
as
svg_file
:
for
line
in
svg_file
:
if
"xmlns:svg"
in
line
:
line
=
line
.
replace
(
":svg"
,
""
)
svg_file
.
write
(
line
)
svg_file
.
write
(
svg
)
# drawing = svg2rlg(f"../Data/{name}.svg")
# renderPDF.drawToFile(svg, f"../Data/ligand_images/{name}.pdf")
def
screen
(
fp_pred
,
library
,
n_hits
=
30
):
...
...
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