Skip to content

Commit dece8a5

Browse files
committed
fix access to internal fields
1 parent 19207ca commit dece8a5

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/miscellaneous_functions/bulk_coordination.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ function bulk_coordination(
140140
p = positions(frame)
141141
uc = unitcell(frame)
142142
# Compute all the minimum-distances between the reference molecule and the solute
143-
sys1.xpositions .= @view(p[solute_indices])
144-
sys1.ypositions .= @view(p[reference_solute_indices])
145-
sys1.unitcell = uc.orthorhombic ? diag(uc.matrix) : uc.matrix
143+
sys1.system.xpositions .= @view(p[solute_indices])
144+
sys1.system.ypositions .= @view(p[reference_solute_indices])
145+
sys1.system.unitcell = uc.orthorhombic ? diag(uc.matrix) : uc.matrix
146146
reference_list = minimum_distances!(sys1)
147147
# Now, we will run over the reference_list, and for each distances
148148
# to the reference, find the number of solvent atoms that are closer
@@ -151,9 +151,9 @@ function bulk_coordination(
151151
for (imol, md) in enumerate(reference_list)
152152
!(md.within_cutoff) && continue
153153
imol_atoms = _imol_atoms(imol, n_atoms_per_molecule_solute, solute_indices)
154-
sys2.xpositions .= @view(p[solvent_indices])
155-
sys2.ypositions .= @view(p[imol_atoms])
156-
sys2.unitcell = uc.orthorhombic ? diag(uc.matrix) : uc.matrix
154+
sys2.system.xpositions .= @view(p[solvent_indices])
155+
sys2.system.ypositions .= @view(p[imol_atoms])
156+
sys2.system.unitcell = uc.orthorhombic ? diag(uc.matrix) : uc.matrix
157157
solvent_distances = minimum_distances!(sys2)
158158
bin = max(1, ceil(Int, md.d / bin_size))
159159
nmols_in_bin[bin] += 1

src/miscellaneous_functions/coordination_number.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ function coordination_number(
8383
for (iframe, frame) in enumerate(sim)
8484
p = positions(frame)
8585
uc = unitcell(current_frame(sim))
86-
sys.xpositions .= @view(p[inds_solvent])
87-
sys.ypositions .= @view(p[inds_solute])
88-
sys.unitcell = uc.orthorhombic ? diag(uc.matrix) : uc.matrix
86+
sys.system.xpositions .= @view(p[inds_solvent])
87+
sys.system.ypositions .= @view(p[inds_solute])
88+
sys.system.unitcell = uc.orthorhombic ? diag(uc.matrix) : uc.matrix
8989
md_list = minimum_distances!(sys)
9090
cn[iframe] = count(md -> md.within_cutoff, md_list)
9191
next!(prg)

0 commit comments

Comments
 (0)