@@ -50,7 +50,7 @@ Install the required Julia packages in the ase-ace Julia environment:
5050
5151``` bash
5252# Navigate to the ase-ace directory
53- cd path/to/ACEpotentials.jl/ase-ace
53+ cd path/to/ACEpotentials.jl/export/ ase-ace
5454
5555# Install Julia dependencies
5656julia --project=julia -e '
@@ -85,10 +85,9 @@ pip install -e ".[dev]"
8585```
8686
8787** Installation options:**
88- - ` ase-ace ` - Base package only
88+ - ` ase-ace ` - Base package only (includes ` ACECalculator ` )
8989- ` ase-ace[julia] ` - Adds ` juliacall ` and ` juliapkg ` for ` ACEJuliaCalculator `
9090- ` ase-ace[lib] ` - Adds ` matscipy ` for ` ACELibraryCalculator `
91- - ` ase-ace[ipi] ` - For ` ACECalculator ` (no extra Python deps, just Julia)
9291- ` ase-ace[all] ` - All optional dependencies
9392
9493## Quick Start
@@ -169,21 +168,75 @@ print(f"Energy: {energy:.4f} eV")
169168
170169** Note** : Install with library support: ` pip install ase-ace[lib] `
171170
171+ ## Computing ACE Descriptors
172+
173+ The ` get_descriptors() ` method returns the raw ACE basis vectors for each atom,
174+ useful for fitting, analysis, and transfer learning.
175+
176+ ** Availability:** ` ACEJuliaCalculator ` and ` ACELibraryCalculator ` only.
177+ ` ACECalculator ` does not support descriptors (socket protocol limitation).
178+
179+ ### Example
180+
181+ ``` python
182+ from ase.build import bulk
183+ from ase_ace import ACELibraryCalculator
184+
185+ atoms = bulk(' Si' , ' diamond' , a = 5.43 ) * (2 , 2 , 2 )
186+ calc = ACELibraryCalculator(" deployment/lib/libace_model.so" )
187+
188+ # Get descriptors for all atoms
189+ descriptors = calc.get_descriptors(atoms)
190+ print (f " Shape: { descriptors.shape} " ) # (natoms, n_basis)
191+
192+ # Access model properties
193+ print (f " Cutoff: { calc.cutoff} Å " )
194+ print (f " Species: { calc.species} " ) # Atomic numbers
195+ print (f " Basis size: { calc.n_basis} " )
196+ ```
197+
198+ ### Properties
199+
200+ | Property | Type | Description |
201+ | ----------| ------| -------------|
202+ | ` cutoff ` | float | Cutoff radius in Angstroms |
203+ | ` species ` | List[ int] | Supported atomic numbers |
204+ | ` n_basis ` | int | Number of basis functions per atom |
205+
206+ ### Use Cases
207+
208+ - ** Linear model verification** : For linear ACE, ` E = sum(descriptors @ weights) `
209+ - ** Transfer learning** : Use descriptors as features for other ML models
210+ - ** Analysis** : Examine local atomic environments
211+
172212## Configuration
173213
174- ### Constructor Parameters
214+ ### ACECalculator Parameters
175215
176216| Parameter | Type | Default | Description |
177217| -----------| ------| ---------| -------------|
178218| ` model_path ` | str | required | Path to ACE model JSON file |
179- | ` num_threads ` | int/str | 'auto' | Julia threads: 1, 2, 4, 8, or 'auto' |
180- | ` port ` | int | 0 | TCP port (0 = auto-assign ) |
181- | ` unixsocket ` | str | None | Unix socket name (faster for local) |
182- | ` timeout ` | float | 60.0 | Connection timeout in seconds |
183- | ` julia_executable ` | str | 'julia' | Path to Julia executable |
184- | ` julia_project ` | str | None | Julia project path (default: bundled) |
219+ | ` num_threads ` | int/str | 'auto' | Julia threads |
220+ | ` port ` | int | 0 | TCP port (0 = auto) |
221+ | ` unixsocket ` | str | None | Unix socket name |
222+ | ` timeout ` | float | 60.0 | Connection timeout ( seconds) |
223+ | ` julia_executable ` | str | 'julia' | Path to Julia |
224+ | ` julia_project ` | str | None | Julia project path |
185225| ` log_level ` | str | 'WARNING' | Logging level |
186226
227+ ### ACEJuliaCalculator Parameters
228+
229+ | Parameter | Type | Default | Description |
230+ | -----------| ------| ---------| -------------|
231+ | ` model_path ` | str | required | Path to ACE model JSON file |
232+ | ` num_threads ` | int/str | 'auto' | Julia threads |
233+
234+ ### ACELibraryCalculator Parameters
235+
236+ | Parameter | Type | Default | Description |
237+ | -----------| ------| ---------| -------------|
238+ | ` library_path ` | str | required | Path to compiled .so file |
239+
187240### Threading
188241
189242The calculator uses Julia's multi-threading for parallel ACE evaluation:
@@ -360,6 +413,29 @@ If using a specific port that's in use:
360413calc = ACECalculator(' model.json' , port = 0 ) # Auto-assign port
361414```
362415
416+ ## Utility Functions
417+
418+ The ` ase_ace.utils ` module provides helper functions for Julia setup:
419+
420+ ``` python
421+ from ase_ace.utils import find_julia, check_julia_version, setup_julia_environment
422+
423+ # Find Julia executable
424+ julia_path = find_julia()
425+
426+ # Check Julia version
427+ major, minor, patch = check_julia_version()
428+
429+ # Set up Julia environment with required packages
430+ setup_julia_environment(verbose = True )
431+ ```
432+
433+ ** Available functions:**
434+ - ` find_julia() ` - Locate Julia executable in PATH
435+ - ` check_julia_version(julia_executable) ` - Get Julia version as (major, minor, patch) tuple
436+ - ` check_julia_packages(julia_executable, julia_project) ` - Check if required packages are installed
437+ - ` setup_julia_environment(julia_executable, julia_project, verbose) ` - Install and configure Julia dependencies
438+
363439## Running Tests
364440
365441``` bash
0 commit comments