Skip to content

Commit

Permalink
build based on a040ebf
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Oct 2, 2023
1 parent 240bd88 commit fde9d83
Show file tree
Hide file tree
Showing 43 changed files with 1,993 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stable
2 changes: 1 addition & 1 deletion v1
2 changes: 1 addition & 1 deletion v1.3
1 change: 1 addition & 0 deletions v1.3.1/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-02T16:22:56","documenter_version":"1.1.0"}}
92 changes: 92 additions & 0 deletions v1.3.1/assets/ComplexMixtures.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#
# ComplexMixtures.py
#
# A Python module to provide an inferface for the Julia ComplexMixtures.jl package.
#
# See: https://m3g.github.com/ComplexMixtures.jl
#
# Author: L. Martinez / IQ-Unicamp, 2023.
#
import sys

#
# Check juliacall installation
#
try :
print("Loading juliacall: on the first call this will install the julia executable.")
from juliacall import Main as jl
except :
print("""
juliacall module not found. Install it with:
pip install juliacall
""")
sys.exit()

#
# Install and load necessary julia packages
#
try :
jl.seval("import ComplexMixtures as cm")
jl.seval("import PDBTools as pdb")
except :
print("Installing the ComplexMixtures and PDBTools julia packages...")
jl.Pkg.add("ComplexMixtures")
jl.Pkg.add("PDBTools")
jl.seval("import ComplexMixtures as cm")
jl.seval("import PDBTools as pdb")

#
# Interfaces
#

# From PDBTools
readPDB = jl.pdb.readPDB
select = jl.pdb.select

# From ComplexMixtures
Selection = jl.cm.Selection
Trajectory = jl.cm.Trajectory
Options = jl.cm.Options
save = jl.cm.save
load = jl.cm.load
write = jl.cm.write
contributions = jl.cm.contributions
coordination_number = jl.cm.coordination_number
gr = jl.cm.gr
overview = jl.cm.overview

# For the possibly multi-threaded call to mddf, we need to disable the garbage collector
def mddf(*args, **kwargs) :
jl.GC.enable(False)
result = jl.cm.mddf(*args, **kwargs)
jl.GC.enable(True)
return result

# Covert python lists to julia arrays
def list(python_list) :
return jl.map(jl.identity, python_list)






















Loading

0 comments on commit fde9d83

Please sign in to comment.