Skip to content

Commit f42184a

Browse files
committed
fix readme
1 parent 9a16081 commit f42184a

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is a small package, spun out of [`ACE.jl`](https://github.com/ACEsuit/ACE.j
1313
```julia
1414
using DecoratedParticles, StaticArrays, LinearAlgebra, Zygote
1515
using DecoratedParticles: PState, VState
16-
DP = DecoratedParticles
16+
import DecoratedParticles as DP
1717

1818
x1 = PState( 𝐫 = randn(SVector{3, Float64}), z = 14 )
1919
# 〖𝐫:[-0.74, -2.27, -0.83], z:14〗
@@ -57,17 +57,16 @@ p.𝐸 == DP.energy(p)
5757

5858
### Prototype AtomsBase system implementations
5959

60+
AtomsBase system implementations are provided via a package extension.
6061
Both AosSystem and SoaSystem are fully flexible regarding the
61-
properties of the particles. Both DecoratedParticles implementations
62-
have the same performance as `FastSystem` but both are fully flexibly
63-
regarding the types of particles.
62+
properties of the particles but have the same performance as `FastSystem`.
6463

6564
```julia
66-
using AtomsBuilder
65+
using AtomsBase, AtomsBuilder
6766
sys = rattle!(bulk(:Si, cubic=true) * 2, 0.1); # AtomsBase.FlexibleSystem
6867
fsys = FastSystem(sys); # AtomsBase.FastSystem
69-
aos = DP.AosSystem(sys);
70-
soa = DP.SoaSystem(sys);
68+
aos = DP.aos_system(sys);
69+
soa = DP.soa_system(sys);
7170

7271
x1 = aos[1] # PState, just sys.particles[1]
7372
x2 = soa[1] # PState, generated from the arrays in sys

test/_readme.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using DecoratedParticles, StaticArrays, LinearAlgebra, Zygote
22
using DecoratedParticles: PState, VState
3-
DP = DecoratedParticles
3+
import DecoratedParticles as DP
44

55
x1 = PState( 𝐫 = randn(SVector{3, Float64}), z = 14 )
66
# 〖𝐫:[-0.74, -2.27, -0.83], z:14〗
@@ -42,15 +42,15 @@ p.𝐩 == DP.momentum(p)
4242
p.𝐸 == DP.energy(p)
4343

4444
## ---------------------------------------------------
45-
# Prototype AtomsBase system implementations
45+
# AtomsBase system implementations are provided via a package extension.
4646
# Both AosSystem and SoaSystem are fully flexible regarding the
47-
# properties of the particles.
47+
# properties of the particles but have the same performance as `FastSystem`.
4848

49-
using AtomsBuilder
49+
using AtomsBase, AtomsBuilder
5050
sys = rattle!(bulk(:Si, cubic=true) * 2, 0.1); # AtomsBase.FlexibleSystem
5151
fsys = FastSystem(sys); # AtomsBase.FastSystem
52-
aos = DP.AosSystem(sys);
53-
soa = DP.SoaSystem(sys);
52+
aos = DP.aos_system(sys);
53+
soa = DP.soa_system(sys);
5454

5555
x1 = aos[1] # PState, just sys.particles[1]
5656
x2 = soa[1] # PState, generated from the arrays in sys

0 commit comments

Comments
 (0)