Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
146 lines (115 loc) · 4.79 KB
/
Copy pathMakefile
File metadata and controls
146 lines (115 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
################################################################################
#
# Makefile for ARC
#
################################################################################
DEVTOOLS_DIR := devtools
.PHONY: all help clean test test-unittests test-functional test-all \
install-all install-ci install-rmg install-autotst install-gcn \
install-gcn-cpu install-kinbot install-sella install-xtb install-torchani install-uma install-ob \
install-goflow install-rits lite check-env compile
# Default target
all: help
help:
@echo "Available targets:"
@echo ""
@echo "Testing:"
@echo " test Run unit tests"
@echo " test-unittests Run unit tests with coverage"
@echo " test-functional Run functional tests"
@echo " test-all Run all tests with coverage"
@echo ""
@echo "Installation:"
@echo " install Install all external dependencies"
@echo " install-ci Install all external dependencies for CI (no clean)"
@echo " install-rmg Install RMG (default: packaged, override via RMG_ARGS=...)"
@echo " install-autotst Install AutoTST"
@echo " install-gcn Install TS-GCN (GPU)"
@echo " install-gcn-cpu Install TS-GCN (CPU)"
@echo " install-kinbot Install KinBot"
@echo " install-sella Install Sella"
@echo " install-xtb Install xTB"
@echo " install-torchani Install TorchANI"
@echo " install-uma Install UMA (fairchem MLIP, gated model; users only, not CI)"
@echo " install-ob Install OpenBabel"
@echo " install-goflow Install GoFlow (TS guesser, ~2-3 GB env; downloads pretrained ckpt from Zenodo, SHA-256-verified)"
@echo " install-rits Install RitS (TS guesser, ~3 GB env; downloads pretrained ckpt from Zenodo, SHA-256-verified)"
@echo ""
@echo "Maintenance:"
@echo " lite Run lite installation (no tests)"
@echo " clean Clean build artifacts"
@echo " delete Delete cloned repositories (inc. RMG)"
@echo " compile Compile ARC's Cython module (arc.molecule)"
@echo ""
@echo "Diagnostics:"
@echo " check-env Show Python environment info"
test: test-unittests
test-unittests:
pytest arc/ --cov --cov-report=xml -ra -vv -n auto
test-functional:
pytest functional/ -ra -vv -n auto
test-all:
pytest arc/ functional/ --cov --cov-report=xml -ra -vv -n auto
install-all: install
install:
@echo "Installing all external ARC dependencies..."
bash $(DEVTOOLS_DIR)/install_all.sh
install-ci:
@echo "Installing all external ARC dependencies for CI (no clean, no GoFlow, no RitS — each runs in its own CI lane)..."
bash $(DEVTOOLS_DIR)/install_all.sh --no-clean --no-goflow --no-rits
install-lite:
@echo "Installing ARC's lite version (no external dependencies)..."
bash $(DEVTOOLS_DIR)/install_all.sh --no-ext
install-rmg:
bash $(DEVTOOLS_DIR)/install_rmg.sh $(RMG_ARGS)
install-autotst:
bash $(DEVTOOLS_DIR)/install_autotst.sh
install-gcn:
bash $(DEVTOOLS_DIR)/install_gcn.sh
install-gcn-cpu:
bash $(DEVTOOLS_DIR)/install_gcn_cpu.sh
install-kinbot:
bash $(DEVTOOLS_DIR)/install_kinbot.sh
install-sella:
bash $(DEVTOOLS_DIR)/install_sella.sh
install-xtb:
bash $(DEVTOOLS_DIR)/install_xtb.sh
install-torchani:
bash $(DEVTOOLS_DIR)/install_torchani.sh
# UMA (fairchem MLIP). Not part of install-ci: the model is gated (Meta license + HuggingFace
# token) and heavy, so this is a manual, user-driven setup. See devtools/install_uma.sh.
install-uma:
bash $(DEVTOOLS_DIR)/install_uma.sh
install-ob:
bash $(DEVTOOLS_DIR)/install_ob.sh
install-goflow:
bash $(DEVTOOLS_DIR)/install_goflow.sh
install-rits:
bash $(DEVTOOLS_DIR)/install_rits.sh
lite:
bash $(DEVTOOLS_DIR)/lite.sh
clean:
bash $(DEVTOOLS_DIR)/clean.sh --all
@ python utilities.py clean
delete:
bash $(DEVTOOLS_DIR)/delete.sh
check-env:
@echo "Python binary:"; which python
@echo "Python version:"; python -V
@echo "PYTHONPATH:"; echo $$PYTHONPATH
compile:
@echo "Compiling ARC's Cython module (arc.molecule)…"
@ python utilities.py check-python
python setup.py build_ext main --inplace --build-temp .
@ python utilities.py check-dependencies
@echo "Compiling arc/species/_zmat_c_kernels.so…"
# No -march=native: the result must run on whatever CPU the user has, and a SIGILL from
# an unsupported instruction kills the interpreter outright (the ctypes loader cannot
# catch it -- CDLL() succeeds, the fault only comes at call time).
# No -ffast-math either: it implies -ffinite-math-only, which lets the compiler assume
# NaN never occurs and would silently defeat the collinearity guards that rely on a NaN
# dihedral propagating back to Python. -fno-math-errno and -fno-trapping-math keep the
# useful part (branch-free sqrt) without that.
$(CC) -O3 -fno-math-errno -fno-trapping-math -shared -fPIC \
-o arc/species/_zmat_c_kernels.so \
arc/species/_zmat_c_kernels.c -lm