Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
48853b5
Added machine learning prediction capability to Sails
Dialpuri Oct 6, 2025
f1a1c8d
Update to gemmi 0.7.0
Dialpuri Oct 7, 2025
91a4124
Added sails-find to predicted density and updated to gemmi 0.7.3
Dialpuri Oct 7, 2025
bcd67d8
Added sails-find multiclass capability
Dialpuri Oct 9, 2025
a77f694
Added requests dependency
Dialpuri Oct 10, 2025
ada2a1d
Added early exit when no positive predictions found
Dialpuri Oct 10, 2025
340bf8e
Added sails prediction submodule to pyproject.toml
Dialpuri Oct 10, 2025
7ae1e2f
Added nullptr check and nanobind dependency
Dialpuri Oct 11, 2025
23c8a41
Added nullptr check and nanobind dependency
Dialpuri Oct 12, 2025
1c1731e
Added ability to use glycan finding in protein prediction
Dialpuri Oct 14, 2025
7166e4b
Added autoglycoslate function to API
Dialpuri Oct 18, 2025
73f1c55
Added renumber function to Glycan
Dialpuri Oct 18, 2025
18d5fed
Added standardise residue name function
Dialpuri Oct 18, 2025
6d4be5e
Fixed bugs in density calculation
Dialpuri Oct 18, 2025
f6f46d6
Added validate based on RSCC
Dialpuri Oct 19, 2025
910005c
Added chain and seqid glycoyslation options
Dialpuri Oct 19, 2025
6663fed
Added logging to sails-validate
Dialpuri Oct 19, 2025
c774882
Added masked RSCC function
Dialpuri Oct 20, 2025
f886814
Added links to return structure
Dialpuri Oct 20, 2025
b327d5b
Fixed bug with extra comma with 1 cycle jobs
Dialpuri Oct 20, 2025
491dc92
Added sails-validate global RSCC calculation
Dialpuri Oct 21, 2025
bcd5618
Added space group to structure
Dialpuri Oct 21, 2025
4d06dde
Refactored RSCC calculation to support EM formfactors
Dialpuri Oct 21, 2025
d308346
Added global RSCC score in per cycle removal
Dialpuri Oct 22, 2025
72a7c95
Updated compare script
Dialpuri Oct 22, 2025
a06f03f
Updated protein finding to use glycan prediction too
Dialpuri Oct 23, 2025
bb1846d
Added better clash score which counts all but donor atom clash
Dialpuri Oct 23, 2025
10ce8f0
Added sequential sites to autoglycosylate
Dialpuri Oct 23, 2025
051a5d7
Fixed bug with chain names not going past Z
Dialpuri Oct 23, 2025
acb981b
Fixed bug with chain names not going past Z
Dialpuri Oct 23, 2025
9ccb3ea
Added functions to remove free sugars
Dialpuri Oct 23, 2025
1439b86
Added functions to remove free sugars
Dialpuri Oct 23, 2025
58e196a
Added searchtype to sails-find em
Dialpuri Oct 24, 2025
5f8bf31
Added preddirin to sails-find em
Dialpuri Oct 24, 2025
c8c4cde
Added preddirin to sails-find em
Dialpuri Oct 24, 2025
04a7ec1
Added preddirin to sails-find em
Dialpuri Oct 24, 2025
5872518
Added skipping of glycosites in EM mode
Dialpuri Oct 25, 2025
528f60c
Added Q Score to Sails
Dialpuri Oct 25, 2025
79214f8
Added FUC clash removal
Dialpuri Oct 26, 2025
5898912
Added q score option to validate
Dialpuri Oct 26, 2025
a5b9cf3
Added Q Score threshold calculation
Dialpuri Oct 27, 2025
606e34d
Added early stopping to X-ray cycles
Dialpuri Oct 27, 2025
d74c267
Fixed bug in FUC clash score
Dialpuri Oct 27, 2025
838f52d
Inlined util methods
Dialpuri Oct 27, 2025
4be2df5
Added back sites
Dialpuri Oct 27, 2025
d884dd0
Added protein-glycan finding and ordered preference of N,C,O
Dialpuri Oct 28, 2025
7c9b6f0
Fixed bug in link creation
Dialpuri Oct 28, 2025
0019a59
Added EM removal with Q score rather than RSCC
Dialpuri Oct 28, 2025
3c09843
Added supplementation to em mode
Dialpuri Oct 28, 2025
18217dd
Added chain and seqid options to validate
Dialpuri Oct 28, 2025
dcac4ba
Fixed call to logging in EM mode
Dialpuri Oct 28, 2025
23c5523
Fixed issue with missing donor atoms
Dialpuri Nov 4, 2025
8aa0aee
Updated data.json
Dialpuri Nov 4, 2025
4a258a1
Removed bad clusters in data.json
Dialpuri Nov 5, 2025
5b974b6
Updated prediction commandline to remove -m requirement
Dialpuri Dec 10, 2025
a477b94
Updated basic testing
Dialpuri Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FetchContent_Declare(
# Download Gemmi
FetchContent_Declare(
gemmi-dependencies
URL http://www.ysbl.york.ac.uk/jsd523/gemmi-0.6.5.tar.gz
URL https://github.com/Dialpuri/gemmi-bundles/raw/refs/heads/main/gemmi-0.7.3.tar.gz
)

FetchContent_MakeAvailable(clipper-dependencies mmdb2-dependencies fftw-dependencies ccp4-dependencies gemmi-dependencies)
Expand Down Expand Up @@ -101,8 +101,10 @@ add_library(
${WRK_DIR}/src/cpp/sails-telemetry.cpp
${WRK_DIR}/src/cpp/sails-solvent.cpp
${WRK_DIR}/src/cpp/sails-wurcs.cpp

${WRK_DIR}/src/cpp/sails-predictions.cpp
${WRK_DIR}/src/cpp/sails-morph.cpp
${WRK_DIR}/src/cpp/sails-score.cpp

# Density
${WRK_DIR}/src/cpp/density/sails-density.cpp
${WRK_DIR}/src/cpp/density/sails-xtal-density.cpp
Expand Down
9 changes: 8 additions & 1 deletion package/_pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ dependencies=[
'tqdm',
'gemmi',
'numpy<2.0.0',
'typing-extensions'
'typing-extensions',
'onnxruntime-gpu; platform_system != "Darwin"',
'onnxruntime; platform_system == "Darwin"',
'requests'
]

[project.urls]
Expand All @@ -32,6 +35,10 @@ sails-find = "sails.find:run"
sails-test = "sails.test:run"
sails-wurcs = "sails.wurcs:run"
sails-morph = "sails.morph:run"
sails-predict = "sails.prediction.predict:run"
sails-install = "sails.install:run"
sails-clean = "sails.clean:run"
sails-validate = "sails.validate:run"

[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
Expand Down
37 changes: 22 additions & 15 deletions package/gemmi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,31 @@ add_library(gemmi_cpp STATIC
${gemmi_src}/src/align.cpp
${gemmi_src}/src/assembly.cpp
${gemmi_src}/src/calculate.cpp
${gemmi_src}/src/ccp4.cpp
${gemmi_src}/src/crd.cpp
${gemmi_src}/src/ddl.cpp
${gemmi_src}/src/dssp.cpp
${gemmi_src}/src/eig3.cpp
${gemmi_src}/src/fprime.cpp
${gemmi_src}/src/gz.cpp
${gemmi_src}/src/intensit.cpp
${gemmi_src}/src/json.cpp
${gemmi_src}/src/mmcif.cpp
${gemmi_src}/src/mmread_gz.cpp
${gemmi_src}/src/monlib.cpp
${gemmi_src}/src/mtz.cpp
${gemmi_src}/src/mtz2cif.cpp
${gemmi_src}/src/polyheur.cpp
${gemmi_src}/src/pdb.cpp
${gemmi_src}/src/read_cif.cpp
${gemmi_src}/src/resinfo.cpp
${gemmi_src}/src/riding_h.cpp
${gemmi_src}/src/select.cpp
${gemmi_src}/src/sprintf.cpp
${gemmi_src}/src/symmetry.cpp
${gemmi_src}/src/to_json.cpp
${gemmi_src}/src/to_mmcif.cpp
${gemmi_src}/src/to_pdb.cpp
${gemmi_src}/src/monlib.cpp
${gemmi_src}/src/topo.cpp
${gemmi_src}/src/xds_ascii.cpp
)
Expand All @@ -63,7 +70,6 @@ set(gemmi_HEADERS
${gemmi_src}/include/gemmi/ccp4.hpp
${gemmi_src}/include/gemmi/cellred.hpp
${gemmi_src}/include/gemmi/chemcomp.hpp
${gemmi_src}/include/gemmi/chemcomp_xyz.hpp
${gemmi_src}/include/gemmi/cif.hpp
${gemmi_src}/include/gemmi/cif2mtz.hpp
${gemmi_src}/include/gemmi/cifdoc.hpp
Expand All @@ -72,6 +78,7 @@ set(gemmi_HEADERS
${gemmi_src}/include/gemmi/ddl.hpp
${gemmi_src}/include/gemmi/dencalc.hpp
${gemmi_src}/include/gemmi/dirwalk.hpp
${gemmi_src}/include/gemmi/dssp.hpp
${gemmi_src}/include/gemmi/ecalc.hpp
${gemmi_src}/include/gemmi/eig3.hpp
${gemmi_src}/include/gemmi/elem.hpp
Expand All @@ -86,20 +93,21 @@ set(gemmi_HEADERS
${gemmi_src}/include/gemmi/grid.hpp
${gemmi_src}/include/gemmi/gz.hpp
${gemmi_src}/include/gemmi/input.hpp
${gemmi_src}/include/gemmi/intensit.hpp
${gemmi_src}/include/gemmi/interop.hpp
${gemmi_src}/include/gemmi/it92.hpp
${gemmi_src}/include/gemmi/iterator.hpp
${gemmi_src}/include/gemmi/json.hpp
${gemmi_src}/include/gemmi/levmar.hpp
${gemmi_src}/include/gemmi/linkhunt.hpp
${gemmi_src}/include/gemmi/logger.hpp
${gemmi_src}/include/gemmi/math.hpp
# ${gemmi_src}/include/gemmi/merge.hpp
${gemmi_src}/include/gemmi/metadata.hpp
${gemmi_src}/include/gemmi/mmcif.hpp
${gemmi_src}/include/gemmi/mmcif_impl.hpp
${gemmi_src}/include/gemmi/mmcif.hpp
${gemmi_src}/include/gemmi/mmdb.hpp
${gemmi_src}/include/gemmi/mmread.hpp
${gemmi_src}/include/gemmi/mmread_gz.hpp
${gemmi_src}/include/gemmi/mmread.hpp
${gemmi_src}/include/gemmi/model.hpp
${gemmi_src}/include/gemmi/modify.hpp
${gemmi_src}/include/gemmi/monlib.hpp
Expand All @@ -108,24 +116,23 @@ set(gemmi_HEADERS
${gemmi_src}/include/gemmi/neighbor.hpp
${gemmi_src}/include/gemmi/neutron92.hpp
${gemmi_src}/include/gemmi/numb.hpp
${gemmi_src}/include/gemmi/pdb.hpp
${gemmi_src}/include/gemmi/pdb_id.hpp
${gemmi_src}/include/gemmi/pdb.hpp
${gemmi_src}/include/gemmi/pirfasta.hpp
${gemmi_src}/include/gemmi/polyheur.hpp
${gemmi_src}/include/gemmi/qcp.hpp
${gemmi_src}/include/gemmi/read_cif.hpp
${gemmi_src}/include/gemmi/read_map.hpp
${gemmi_src}/include/gemmi/recgrid.hpp
${gemmi_src}/include/gemmi/reciproc.hpp
${gemmi_src}/include/gemmi/refln.hpp
${gemmi_src}/include/gemmi/remarks.hpp
${gemmi_src}/include/gemmi/resinfo.hpp
${gemmi_src}/include/gemmi/riding_h.hpp
${gemmi_src}/include/gemmi/scaling.hpp
${gemmi_src}/include/gemmi/select.hpp
${gemmi_src}/include/gemmi/seqalign.hpp
${gemmi_src}/include/gemmi/seqid.hpp
${gemmi_src}/include/gemmi/seqtools.hpp
${gemmi_src}/include/gemmi/serialize.hpp
${gemmi_src}/include/gemmi/sfcalc.hpp
${gemmi_src}/include/gemmi/small.hpp
${gemmi_src}/include/gemmi/smcif.hpp
Expand All @@ -146,14 +153,14 @@ set(gemmi_HEADERS
${gemmi_src}/include/gemmi/util.hpp
${gemmi_src}/include/gemmi/version.hpp
${gemmi_src}/include/gemmi/xds_ascii.hpp

${gemmi_src}/include/gemmi/xds2mtz.hpp

)

set(gemmi_third_party-headers_HEADERS
${gemmi_src}/include/gemmi/third_party/fast_float.h
${gemmi_src}/include/gemmi/third_party/pocketfft_hdronly.h
# ${gemmi_src}/include/gemmi/third_party/sajson.h
# ${gemmi_src}/include/gemmi/third_party/sajson.h
${gemmi_src}/include/gemmi/third_party/tinydir.h
)

Expand Down Expand Up @@ -198,7 +205,7 @@ set(gemmi_third_party_tao_pegtl_analysis-headers_HEADERS
${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/generic.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/grammar_info.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/insert_guard.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/insert_rules.hpp
# ${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/insert_rules.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/rule_info.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/analysis/rule_type.hpp
)
Expand All @@ -217,7 +224,7 @@ set(gemmi_third_party_tao_pegtl_internal-headers_HEADERS
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/bof.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/bol.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/bump_help.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/bump_impl.hpp
# ${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/bump_impl.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/bytes.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/control.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/cr_crlf_eol.hpp
Expand All @@ -240,7 +247,7 @@ set(gemmi_third_party_tao_pegtl_internal-headers_HEADERS
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/eof.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/eol.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/eolf.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/file_mapper.hpp
# ${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/file_mapper.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/file_opener.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/file_reader.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/has_apply.hpp
Expand All @@ -262,7 +269,7 @@ set(gemmi_third_party_tao_pegtl_internal-headers_HEADERS
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/list_tail.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/list_tail_pad.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/marker.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/minus.hpp
# ${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/minus.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/must.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/not_at.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/one.hpp
Expand All @@ -284,7 +291,7 @@ set(gemmi_third_party_tao_pegtl_internal-headers_HEADERS
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/rep_opt.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/require.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/result_on_found.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/rule_conjunction.hpp
# ${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/rule_conjunction.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/rules.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/seq.hpp
${gemmi_src}/include/gemmi/third_party/tao/pegtl/internal/skip_control.hpp
Expand Down
12 changes: 10 additions & 2 deletions package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ dependencies=[
'tqdm',
'gemmi',
'numpy<2.0.0',
'typing-extensions'
'typing-extensions',
'onnxruntime-gpu; platform_system != "Darwin"',
'onnxruntime; platform_system == "Darwin"',
'requests',
'nanobind==2.4.0'
]

[tool.setuptools]
packages = ["sails"]
packages = ["sails", "sails.prediction"]
package-dir = {"" = "src"}
include-package-data = true

Expand All @@ -40,6 +44,10 @@ sails-find = "sails.find:run"
sails-test = "sails.test:run"
sails-wurcs = "sails.wurcs:run"
sails-morph = "sails.morph:run"
sails-predict = "sails.prediction.predict:run"
sails-install = "sails.install:run"
sails-clean = "sails.clean:run"
sails-validate = "sails.validate:run"

[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
Expand Down
7 changes: 5 additions & 2 deletions package/scripts/compare_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import gemmi
import json
import numpy as np
from pprint import pprint


def load_data_file(filename):
Expand All @@ -20,11 +21,11 @@ def format_residue(chain: gemmi.Chain, residue: gemmi.Residue):


def main(args):
data = load_data_file("package/data/data.json")
data = load_data_file("package/src/sails/data/data.json")
structure = gemmi.read_structure(args.model)
reference = gemmi.read_structure(args.reference)

ns = gemmi.NeighborSearch(structure, max_radius=1).populate()
ns = gemmi.NeighborSearch(structure, max_radius=1.5).populate()

output = {}

Expand Down Expand Up @@ -84,6 +85,8 @@ def main(args):
percentage_modelled = 100 * modelled / total_sugars
print(f"Percentage Modelled {percentage_modelled:.2f}")

pprint(output)


if __name__ == "__main__":
parser = argparse.ArgumentParser()
Expand Down
Loading
Loading