Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hng/BiomolecularStructures
Browse files Browse the repository at this point in the history
  • Loading branch information
gp0 committed Mar 24, 2015
2 parents a6561aa + d203eaf commit f34c28d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/MODELLER/modeller-basic-example-julia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Modeller basic example Julia adaption

These Julia files provide a drop-in replacement for the Python files that come with the [Modeller Tutorial Example](https://salilab.org/modeller/tutorial/basic.html). Just download the example files on the Modeller website and copy these Julia files into the example folder, they provide the same functionality.
20 changes: 16 additions & 4 deletions src/MODELLER/modeller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
"

module MODELLER
export model_single
export model_single, gen_script
using PyCall

@pyimport modeller
@pyimport modeller.automodel as am

function model_single(alnf, know, seq)

@pyimport modeller
@pyimport modeller.automodel as am

env = modeller.environ()
a = am.automodel(env, alnfile=alnf,
knowns=know, sequence=seq,
Expand All @@ -21,4 +22,15 @@ export model_single
a[:make]()
end

# Generator for MODELLER julia scripts.
# These scripts are based on the basic example scripts from the MODELLER website.
# Scripts are generated in the current working directory
# name: The name of the script (minus the extension), e.g. "build_profile"
function gen_script(name::String)
file = Pkg.dir("BiomolecularStructures", "src/MODELLER/modeller-basic-example-julia", "$name.jl")
if isfile(file)
cp(file, "./$name.jl")
println("Generated $name.jl MODELLER script")
end
end
end

0 comments on commit f34c28d

Please sign in to comment.