McKenzie-Smith

# Capturing continuous, long timescale behavioral changes in Drosophila
melanogaster postural data

Grace C. McKenzie-Smith  Department of Physics, Princeton University,
Princeton, NJ, USA  These authors contributed equally  0000-0001-8428-0043
Scott W. Wolf  Lewis-Sigler Institute for Integrative Genomics, Princeton
University, Princeton, NJ, USA  These authors contributed equally
0000-0003-4397-1395 Julien F. Ayroles  Lewis-Sigler Institute for Integrative
Genomics, Princeton University, Princeton, NJ, USA  Department of Ecology and
Evolutionary Biology, Princeton University, Princeton, NJ, USA
0000-0001-8729-0511 Joshua W. Shaevitz  Department of Physics, Princeton
University, Princeton, NJ, USA  Lewis-Sigler Institute for Integrative
Genomics, Princeton University, Princeton, NJ, USA  0000-0001-8809-4723

###### Abstract

Animal behavior spans many timescales, from short, seconds-scale actions to
circadian rhythms over many hours to life-long changes during aging. Most
quantitative behavior studies have focused on short-timescale behaviors such
as locomotion and grooming. Analysis of these data suggests there exists a
hierarchy of timescales; however, the limited duration of these experiments
prevents the investigation of the full temporal structure. To access longer
timescales of behavior, we continuously recorded individual Drosophila
melanogaster at 100 frames per second for up to 7 days at a time in
featureless arenas on sucrose-agarose media. We use the deep learning
framework SLEAP to produce a full-body postural data set for 47 individuals
resulting in nearly 2 billion pose instances. We identify stereotyped
behaviors such as grooming, proboscis extension, and locomotion and use the
resulting ethograms to explore how the flies’ behavior varies across time of
day and days in the experiment. We find distinct circadian patterns in all of
our stereotyped behavior and also see changes in behavior over the course of
the experiment as the flies weaken and die.

###### keywords:

ethology | behavioral tracking | pose estimation | circadian rhythms | aging

Joshua W. Shaevitz<EMAIL_ADDRESS>
## Significance Statement

Animal behaviors exist on many timescales, ranging from the milliseconds
required for speaking individual words to the years of behavioral shifts due
to aging. Investigating the temporal structure of behaviors at longer
timescales is challenging, and requires continuous, high resolution data taken
over days. Here we present a data set of continuously captured high resolution
Drosophila melanogaster behavior recorded over 4-7 days. Our continuous, high
resolution data allows us to describe patterns in fine-grained behaviors such
as locomotion speed, proboscis extension, and grooming across minutes, hours,
and days. With this data we reveal detailed circadian cycles of behavior and
trends of behavior over the lifetime of the fly.

## Introduction

Figure 1: Experimental schematic showing tracking, lifespans, and behavioral
segmentations across timescales. A Image showing the experimental arena as
viewed from below. The behavior of 4 D. melanogaster is captured
simultaneously while giving each fly enough room to freely carry out all
behaviors except flight. B Magnified view of a single individual showing
tracks for each node of the SLEAP skeleton. Each color denotes a node and
circle sizes increase with time. C Survival curve of the 47 flies included in
the experiment. Death occurs on average after $\sim$119 hours, or almost 5
full days into the experiment. D Ethogram and egocentrized traces for each
tarsi and a raster denoting proboscis visibility. E Barplot showing the
geometric means of stereotyped behavior components across all flies and all
complete 24h periods. F Barplot showing the geometric means of stereotyped
behavior components across all flies and all hours grouped by experimental
day.

Uncovering the temporal structure of behavior has long been a topic of
theoretical interest and experimental challenge [Dawkins1976-xr, Brown2018-qj,
Berman2018-vy, Bialek2022-le]. Animals carry out sequences of behaviors on
many timescales, from the short timescales of the individual movements
required for grooming, eating, and social communication to the longer
timescales of hunger, arousal, circadian cycles, mating seasons, and the aging
process. The specifics of these behavior sequences determine much of what we
can characterize about an animal, such as its health, reproductive fitness,
and that idiosyncrasy of action that we might call ‘personality.’ These
behavior sequences also give us indirect ways to assess the internal processes
of the animal, such as neural activity, gene expression, and other internal
states like hunger or fatigue. Finding general principles that govern the
order of behaviors would be an exciting step forward in understanding how
animals interact with the world around them and how internal factors may shape
that interaction. This course of study requires data that covers the many
timescales over which animal behavior varies.

Historically, taking long-timescale data covering days or weeks of an animal’s
life has required balancing continuity, throughput, and dimensionality. In
Drosophila melanogaster, simple experimental setups, such as beam-break
assays, allow for continuous monitoring of activity levels over days
[Pfeiffenberger2010-qu, Harbison2017-cs], but fail to capture the high-
resolution data necessary for modern techniques of behavior analysis such as
MotionMapper [Berman2014-ee], B-SOiD [hsu2021b], VAME [luxem2022identifying],
or Keypoint-MoSeq [weinreb2023keypoint]. On the other hand, the acquisition of
high-resolution data has been restricted to short timescales by the
computational resources required to store and process the extremely large
imaging data, imposing an upper limit on the order of an hour. When studying
fine-grained behavioral variation at longer timescales, previous work utilized
short recordings taken from different individuals with ages distributed across
the lifespan of the animal [Overman2022-gk].

Here, we leverage recent computational advances to record a high-resolution
continuous data set of D. melanogaster behavior spanning 4-8 days. We recorded
47 freely moving D. melanogaster using constant IR illumination and an IR-
sensitive camera at a frame rate of 100Hz, with a 12-hour visible-light
day/night cycle. We tracked 14 body parts from each fly using SLEAP
[Pereira2022-as] and utilized MotionMapper to characterize stereotyped
behavioral states, such as grooming, locomoting, and feeding. Using techniques
of compositional data analysis [Aitchison_1986], we characterize the dynamics
of this behavioral repertoire across time of day and over the days of the
experiment. We find distinct circadian patterns in all measured behaviors,
including grooming, proboscis extension, and locomotion speed. We see an
overall decline in circadianicity, the difference in behavior between day and
night hours, across days in the experiment as flies weaken an die, and see
general declines in feeding and locomotion speed as the fraction of time spent
in an idle state increases. Overall, we find that our data captures both
expected and novel patterns of D. melanogaster behavior across multiple
24-hour periods. We also provide this data to the broader community as a
resource to study D. melongaster behavior as it evolves along timescales
beyond the scope of previous research.

## Results and discussion

Figure 2: Principal component analysis of stereotyped behavioral components of
all flies across all experimental hours. A Biplot showing the projections of
individual fly hours and loadings of each stereotyped behavioral component.
Dark gray dots show timepoints from when lights are off and light gray dots
show timepoints when lights are on. B Projection of PC1 against time of day
for all complete 24h periods of all flies. C Projection of PC2 against time of
day for all complete 24h periods of all flies. D Circadianicity vs day of
experiment as measured by the difference between the average projection onto
PC1 during night hours minus the projection onto PC1 during day hours.

We designed a recording apparatus to allow for continuous capture of D.
melanogaster behavior over the course of days (see Methods for details and
Figure S1A). D. melanogaster were constantly illuminated from above with IR
light, to which they have minimal visual sensitivity [De_Salomon1983-ip],
while LED panels provided a 12-hour visible-light day/night cycle with the
same on/off times under which the animals were raised. We made arenas by
layering pieces of transparent laser-cut acrylic to create cylindrical
chambers in which flies lived and behaved over the course of our experiments
(Figure S1B). We limited the arenas to 1.5mm in height to prevent flying and
to decrease the incidence of wall walking and ceiling walking, which lower
tracking quality. We provided the flies with a base gel layer of sucrose-
agarose, which permitted survival of up to 7 days while preventing the
significant fungal growth observed when yeast extract was included. We
recorded four freely behaving D. melanogaster in individual chambers per
camera at 100 Hz with a resolution of 28.25 pixels/mm (Figure 1A). This is
sufficient to resolve relevant features of the D. melanogaster body such as
the tarsi (leg tips) and proboscis (Figure 1B).

For each experiment, we imaged male $\textit{iso}^{KH11}$ D. melanogaster from
two days post-eclosion (emergence from the pupa as an adult insect) until
death, yielding 4-8 days of continuous recording with half the flies dying by
Day 5 (Figure 1C), for a total of 5,584 fly-hours. Note that this lifespan is
shorter than conventional assays due to the nutrient-limited sucrose-based
food source we used to avoid fungal growth [hassett1948utilization].

In the natural world, daytime conditions increase lighting and temperature,
but in the lab, the D. melanogaster circadian cycle can be maintained by these
factors in isolation, with a day/night lighting cycle under constant
temperature or a temperature cycle under constant lighting conditions
[glaser2005temperature, zhang2010light, vanin2012unexpected]. Our experiments
have both a change in light intensity and temperature conditions between day
and night, with daytime temperature levels varying between different
experiments ($\sim$28-29 ∘C for experiments 1-2, and $\sim$ 30-31 ∘C for
experiments 3-4) and nighttime temperatures settling to $\sim$27 ∘C for all
experiments (see Methods and Figure S9). We provide temperature and humidity
recordings with our dataset.

To extract postural information from our data, we used SLEAP, a deep-learning-
based framework that can infer animal posture based on user-generated training
data [Pereira2022-as] (See Methods for details). We tracked a 14-point
skeleton comprised of the head, eyes, thorax, abdomen, wing tips, tarsi, and
proboscis of each individual (Figure 1B). While our mean localization error
was less than .1mm (Figure S2), the quality of the tracks decreased when
animals walked along the edges of the arenas. Accordingly, we built a
classifier to identify the time points when flies walked on the edges (Figure
S3), and excluded these time points from the portions of our analysis reliant
on accurate tracking of any body part but the thorax.

In order to quantify discrete, stereotyped behaviors, we modified the
MotionMapper pipeline [Berman2014-ee] to parallelize more steps and optimize
use for postural data instead of raw images (Figure S4). We used the Lomb-
Scargle periodogram rather than a continuous Morlet wavelet transform to
generate power spectra for each body part as this algorithm does not require
interpolation of missing data. As a first step, we classified all time points
with a total power of less than $0.5012mm^{2}$, summed over all tracked
positions, as ‘idle’, i.e. times where the flies are not moving at all. We
exclude all time points classified as idle and all non-idle edge time points
from the spectral analysis that follows. ‘Idle’ and ‘non-idle edge’ then
become their own behavioral categories.

Our total amount of data is too large to allow for direct classification of
behaviors from all time points. Instead, we generated a set of 141 one-hour
videos sampled evenly across flies, time of day, and day of experiment. From
this subset of the videos, we selected 64,014 time points representative of
the full suite of observed dynamics via an importance-sampling algoirthm
[Berman2014-ee], and embed the power spectra from these points into two
dimensions using the UMAP algorithm.

We then embedded all time points from the 141 hour subset and found well-
separated peaks of high density using an adaptive threshold (Figure S5). We
assigned behavior labels to these regions by looking at randomly selected
clips from time points where the flies’ dynamics fell within a given region’s
boundaries for a reasonable length of time. We grouped together regions of
similar dynamics, and identified seven well-defined behaviors: idle, proboscis
extension, fore grooming (of the eyes or forelegs), hind-grooming (of the
abdomen or hindlegs), wing grooming, altered locomotion (often involving
slipping or limping), and locomotion. The idle behavior state includes all
points assigned as idle using the total power cutoff as well as several
regions of the spectral embedding that contained idle behaviors with single-
limb tracking errors. In addition to these well defined behaviors, $\sim$15%
of all time points represent unstereotyped dynamics, where the fly is either
on the edge and non-idle, or where its dynamics fall outside the boundaries of
the identified peaks of stereotyped behaviors. We exclude these time points
from later analyses. Finally, we project the full data set into the two-
dimensional space and use the behavioral boundaries from the training set to
classify each time point as one of the six stereotyped behaviors, idle, non-
idle edge, or unstereotyped.

We used 5 frames (1/20 of a second) as a minimum bout length for each
stereotyped behavior, and forward-filled each fly’s behavior sequence with
this bout length, assigning any bout of 4 frames or less to the previous
region of long duration. The resulting ethograms permit analysis of patterns
in locomotion, feeding, and grooming (Figure 1D). Because our data is
continuous over multiple 24-hour periods, we can look at how behavior varies
with time of day and across days of the experiment.

Our data is closed (i.e. the fraction of time spent in all behaviors must add
up to one) requiring us to use methods of compositional data analysis to
examine changes across flies, hours, and days [Aitchison_1986, matcomp].
Averages of closed data are best calculated as geometric means, which we
denote ‘behavior components’. To discuss circadian behavioral effects, we use
Zeitgeber time (ZT), where time is measured from the onset of a periodic
stimulus rather than from midnight on a clock, to capture the cyclic nature of
circadian effects. For this set of experiments, ZT = 0h corresponds to the
visible lights coming on, and ZT = 12h corresponds to lights turning off.

Looking across all fly hours and all days, we see a distinct circadian pattern
of behavior with higher levels of idle during the dark hours, and more
locomotion and grooming during the light hours (Figure 1E). The first hour
after the lights turn on is particularly distinct, with comparatively high
levels of locomotion and grooming. The locomotion and grooming behavior
components increase in the hours leading up to lights on and lights off,
indicating anticipation of the change in lighting condition. Over the course
of the experiment, the flies’ behaviors start changing significantly after Day
3 (Figure 1F). Time spent in idle increases over Days 4 through 6 as flies
begin dying on the nutritionally incomplete food used for this experiment.

To examine overall behavior variation across hours of the day, we carried out
a principal components analysis of the compositional data
[aitchison2002biplots, filzmoser2009principal] using the compositions package
in R [van_den_boogaart_compositions_2008]. We used the isometric log-ratio
transformed behavior compositions to carry out robust principal components
analysis using the Minimum Covariance Determinant (MCD) method, and then
backtransformed the result into centered log-ratio loadings. The first three
principal components (PCs) explain $\sim$85% of the variance across all fly
hours (Figure S6).

As can be seen in the biplot of the first two PCs (Figure 2A), PC1 largely
weights the locomotion behaviors, locomotion and altered locomotion, against
idle and proboscis extension. This PC describes the main differences between
day and night, with positive projection averages during the day, corresponding
to more locomotion/grooming, and negative values at night when the animals are
idle (Figure 2B). The average projection along PC1 begins to increase before
the lights turn on, indicating that the animals anticipate the rise of the
sun. Peak amplitude along this PC occurs just after the lights turn on,
potentially indicating a slow morning transition from nighttime behaviors to
daytime activity. The level of this projection stays roughly constant
throughout the day, but then increases and peaks just before the lights turn
off at 12h ZT. This is followed by a slow decline in the amplitude after dark
until reaching a steady night level.

Previous behavioral studies of the D. melanogaster circadian cycle have used
relatively coarse metrics, such as the activity counts generated by Drosophila
Activity Monitors [Pfeiffenberger2010-qu]. These studies have shown that D.
melanogaster have peaks of locomotion activity around their subjective morning
and evening, with the increase in activity slightly anticipating the actual
change in lighting conditions [Chiu2010-qa, Dubowy2017-bg]. Our high-
resolution behavioral data and the projection along PC1 recapitulate these
general trends, but show quantitative difference when the lights change. In
particular, we see gradual change in amplitude after lights turn off that last
several hours whereas this previous work sees a more abrupt sesation of
locomotion at this time.

The second principle component weights the three grooming behaviors (fore,
hind, and wing) against the locomotion behaviors and proboscis extension. The
average projection onto PC2 has a distinct peak during the hour just after
lights turn on, separating this unique part of the circadian pattern from the
more general day vs. night changes in behavior picked up by PC1 (Figure 2C).
PC3 largely separates the first two experiments (begun 02/17/2022 and
03/13/2022) from the second set of experiments (begun 03/26/2022 and
04/18/2022) (Figure S7). The second set of experiments took place at higher
temperatures (Figure S9). The difference in the projections of each fly-hour
along PC3 between the two sets of experiments is lowest on Day 1, and
increases over experimental days.

Since the amplitude along PC1 largely follows the day-night cycle and
describes the circadian change in behaviors, we use the difference between the
average value of PC1 during light and dark hours to define a ‘circadianicity’
value for each fly day. We find that circadianicity decreases steadily over
days in the experiment (Figure 2D). Previous studies have found that the
sleep/wake cycles of behavior in D. melanogaster weaken as they age
[koh2006drosophila]. While the flies in our experiment were all comparatively
young (all died before 10 full days, whereas life expectancy is 2-3 months
under ideal conditions), they were living in very harsh conditions of
relatively high temperature, low humidity, and poor nutrient availability. The
gradual weakening over the course of the experiment is in some ways similar to
an accelerated aging, and the steady decline in circadianicity over 6 days is
similar to the decline in the strength of the sleep/wake cycle seen in over
experiments over 60 days [koh2006drosophila].

Figure 3: Circadian patterns of behavior on experimental Day 1. A Barplot
showing the geometric means of stereotyped behavioral components of the first
experimental day across all flies. B Ternary plot showing the geometric means
of condensed behavioral components across all flies for each circadian hour of
Day 1. Directions along PC1 (dashed) and PC2 (solid) as calculated by
perturbing the geometric mean of the displayed data points
[billheimer2001statistical]. The ternary plot was generated using the Ternary
Plots package in MATLAB [mattern]. C Grooming enrichment with respect to the
geometric mean of the condensed grooming behavioral component of the first
experimental day for each fly with bootstrapped confidence intervals. D Mean
proboscis bout length by hour of the first experimental day. The shaded region
is the standard error. E Mean locomotion speed (mm/s) during stereotyped
locomotion state by hour of the first experimental day. The shaded region is
the standard error.

We leveraged our high-resolution behavior data to carry out an in-depth
analysis of D. melanogaster circadian patterns of behavior, focusing our
analysis on the first day of the experiment when circadianicity was
strongest(Figure 2D). Flies were reared from embryos to two day old adults
with the same light/dark cycle time and phase as the experiments. Even before
eclosing, D. melanogaster exhibit circadian patterns of certain behaviors,
such as larval negative phototaxis [mazzoni2005circadian] or eclosion
[pittendrigh1954temperature], so it is unsurprising that even 2-3 day old
adults already have a strong circadian pattern.

The geometric means of behavior components across all flies versus ZT for Day
1 show the expected pattern of increased idle during the night and increased
locomotion during the day (Figure 3A). The hour just after lights on remains
the most distinct, with a very low idle behavior component. After lights off,
the flies take $\sim$2 hours to settle into their characteristic high idle,
low locomotion night state.

The temporal changes we observe in the two locomotion behaviors (altered
locomotion and locomotion) are similar, as are the changes in the different
grooming behaviors (fore, hind, and wing grooming). Using these strong
correlations, we condensed our seven stereotyped behavior components into
three categories, grouping together the grooming behaviors, the locomotion
behaviors, and idle and proboscis extension. This allowed us to plot the
average behavior composition for each circadian hour in a ternary plot to
visualize differences in overall behavior across circadian time and along the
previously identified PCs (Figure 3B). The day and night hours cluster
together and largely lie along PC1 as expected. The two hours just after
lights off fall between these clusters as the flies transition into their
night state of behavior. The hour just after lights on is an outlier, falling
well off the line of variance explained by PC1, with higher proportions of
grooming and locomotion behaviors compared to all other circadian hours. This
hour lies in the direction of increasing PC2, which explains $\sim$17% of the
variance in the data. This, combined with the peak in the projection of
behavior components along PC2 during the hour after lights on (Figure 2C)
indicates that this hour is a unique time point in the circadian cycle of
behavior.

To further investigate the circadian pattern of grooming, we looked at the
enrichment of grooming behaviors at each circadian hour compared to the
geometric mean of the grooming behavior component across all hours (Figure
3C). It has been shown that spontaneous grooming is under circadian control,
but no clear pattern of when grooming happens throughout the day has been
identified [qiao2018automated]. We find that grooming behaviors peak in the
hour after lights on, contributing to the uniqueness of that time point, in
agreement with our analysis of PC2. This temporary spike in grooming behavior
may come from a need to refresh the various sensory appendages that lie along
the body after a prolonged nighttime period without grooming.

Grooming remains enriched during the day, although this enrichment decreases
after the early morning hours. Of the specifically identified grooming states,
flies spend the most time grooming their fore limbs and eyes, with a lower
proportion of time spent in hind grooming and wing grooming. This follows the
flies’ hierarchy of grooming motor programs, where fore grooming is
prioritized, followed by abdomen grooming, which is captured in our hind
grooming state, and finally wing grooming [seeds2014suppression].

We also looked at daily eating patterns, using proboscis visibility as a proxy
for feeding as proboscis extension is well correlated with food intake
[wong2009quantification]. Previous studies report peak feeding activity
centered around lights on and lights off in the mornings and evenings, with
more feeding concentrated in the evening [Xu2008-pe, ro2014flic]. Proboscis
extension comprises a very small fraction of our data, less than 1% of the
overall behaviors across all time points. Because it is such a small
component, using compositional data analysis techniques is challenging, as
many true zeros exist in the proboscis data. To get a better sense of the
circadian nature of proboscis extension (and feeding), we instead look at the
average duration of proboscis extension bouts over the course of the day
(Figure 3D). We find that flies typically leave their proboscis extended for
about three seconds during night bouts, and about 2 seconds during day bouts.
By this measure we do not see notable peaks of morning and evening feeding,
but instead a more general trend of more time spent feeding at night, and less
during the day.

Our observed trend of the locomotion behavior component with the time of day
differs from results from previous studies using activity counts to measure
overall movement levels. While there is a slight increase in the locomotion
behavior component in anticipation of lights on in our study, it is less
dramatic than the increase in activity counts observed in previous work
[Chiu2010-qa], and we see no peak in locomotion around lights off compared to
the locomotion behavior component throughout the day hours. However, the
circadian pattern of locomotion speed (the mean speed of flies only when they
are in the ‘locomotion’ state, calculated with the mean on a 5 frame rolling
window) has peaks around each change in lighting conditions, along with
anticipatory increases, particularly for lights on (Figure 3E). In Drosophila
Activity Monitors, activity counts are recorded each time a fly crosses an
infrared beam [Pfeiffenberger2010-qu]. These counts could increase due to a
combination of increased movement time and increased movement speed. Our
results indicate that it is an increase in movement speed, rather than time
spent moving, that is responsible for the larger activity count peaks around
lights on and lights off. The increase in locomotion speed before lights on,
and the gradual falling off after lights off, indicates that flies are
modulating their movement speed partially due to internal cues, rather than
only as a startle response or some other reaction to lights on.

In addition to circadian patterns of behavior, the flies’ behavior changed
across experimental days as they weakened and died. Because of the
nutritionally incomplete food and the relatively high temperature and low
humidity, flies in our experiment all died within 8 days. The behavioral
composition remained relatively constant across the first 3 days of the
experiment, but starting at Day 4 the idle component began to increase (Figure
1F). This is similar to the increase in the proportion of time male flies
spend idle near the end of their lives in a more natural aging paradigm
[Overman2022-gk]. Flies also show a reduction in the propensity to spend more
time near the edge of the arena rather than the center after the first 3 days
of the experiment (Figure S8A). The wall following behavior of D. melanogaster
likely arises from boundary exploration, possibly as a means of seeking escape
from a given enclosure [Soibam2012-wq]. Over the course of the experiment,
flies decrease wall following behavior as habituation to an unchanging
environment decreases exploration activities [Liu2007-gt]. However, the edge
preference is difficult to disentangle from the differences in the fraction of
time spent in other stereotyped behaviors at different radii (Figure S8B).
Flies spend an increased fraction of time in locomotion near the edge of the
area and a increased fraction of idle near the center of the arena, and these
differences may drive the observed changes in edge preference.

Figure 4: Day wise behavioral changes throughout the experiment. A Ternary
plot showing the geometric mean of the condensed stereotyped behavioral
components of the first hour after lights on across all surviving flies for
each complete 24h period. Directions of PC1 (dashed) and PC2 (solid) are also
shown, as calculated based on perturbation of the geometric means of all
circadian hours from Day 1. B Mean proboscis bout length by day of experiment.
The shaded region is the standard error. C Mean locomotion speed (mm/s) during
the stereotyped locomotion state by day of experiment. The shaded region is
the standard error.

Since the hour after the lights turn on is such a unique time point in the
circadian pattern of behavior, we were curious how the behavior components
during that hour change over the days of the experiment. The geometric means
of the relative proportions of the grooming behaviors, idle behaviors, and
locomotion behaviors across all surviving flies in the hour after dawn remain
similar for the first 3 days of the experiment, lying in a cluster offset from
PC1 in the ternary plot (Figure 4A). Starting at Day 4, however, the hour
after dawn components begin falling onto PC1, and are much more similar to
other circadian time points. This behavioral composition moves towards lower
values of PC1 with age and becomes more similar to the nighttime composition.
Thus, as the flies in our experiment weaken and die, not only do their day and
night behavior patterns begin to look more similar, they also lose the
distinctive behavioral character of the hour after dawn.

We also asked how feeding and locomotion change with age in our experiments.
We find that proboscis bout duration decreased steadily through Day 3 and then
plateaued (Figure 4B). It has been reported that flies eat more as they age
[driver1980metabolic], but the limited food source and harsh environmental
conditions may change this trend for the flies in our experiment. In contrast,
the average locomotion speed remained steady through Day 3 and then began
decreasing with age (Figure 4C). The combination of steady locomotion speed
and no increase in the fraction of time spent locomoting means that overall
‘locomotion activity’, comparable to traditional activity counts, does not
appreciably change over the first 3 days of the experiment after which there
is a decline. Previous studies have shown that male flies in a natural aging
context have an increase in locomotion activity during early life, before a
decrease leading up to death [Le_Bourg1987-bx, Overman2022-gk]. We do not see
this increase at young age in our experiment, however, lifelong locomotion
patterns are genotype-dependent [fernandez1999differences], so results from
the$\textit{iso}^{KH11}$ flies used here may not be not directly comparable to
these previous studies.

## Conclusion

We report the first measurements of high resolution D. melanogaster behavior
recorded over many days with high temporal bandwidth. By leveraging recent
advances in GPU-based video processing and postural inference, we captured the
behavior of freely moving D. melanogaster over the course of multiple days,
encompassing the behavioral effects of circadian rhythms, starvation, aging,
and habituation at continuous high resolution. Our data recapitulates many
previously described trends in D. melanogaster circadian and aging/dying
patterns of behavior. We also leveraged high resolution postural data in
combination with fine-grained ethograms to characterize changes in proboscis
extension bout duration and locomotion speed across time of day and over the
days of our experiment. With compositional data analysis techniques, we
identified the hour after lights on as a uniquely distinctive time point in
the circadian pattern of behavior.

Our data addresses several limitations of the high-quality ethological data
currently available. Previous work on the temporal structure of behavior has
found correlations extending beyond the length of the available data,
typically 30-60 minutes [Berman2016-gk, Bialek2023-na]. The data presented
here extends these time scales by more than two orders of magnitude. This data
set is also the first to continuously capture high dimensional, high-
resolution behavioral data across a circadian cycle, allowing us to
investigate how changes in internal state related to time of day affect
behavior. By recording when flies feed (as measured by proboscis extension),
this data may also provide new insights into the effects of hunger and
satiety. We provide both high-resolution recordings and our postural tracking
output to facilitate further data analysis. The analyses presented here
leverage only a fraction of the resolution and dimensionality provided by our
data, and we hope this 100-fold increase in the amount of high-quality
ethological data available will give rise to yet more tools and techniques.
Finally, aging in our experiments was significantly accelerated due to
nutrient limitation. Future work with new kinds of arenas and food sources may
extend this type of high-resolution behavioral recordings to cover the full
natural lifespan of a fly.

## Methods

### Fly rearing

To control for possible genetic effects, we used the highly inbred wild-type
$\textit{iso}^{KH11}$ strain. $\textit{iso}^{KH11}$ flies were raised on
standard cornmeal media (see github.com/shaevitz-lab/long-timescale-analysis
for complete recipe) at $25^{\circ}$C under humidity 60% with a 12-hour
light/dark cycle, with visible light of $\sim$1300lux. Before each experiment,
we performed egg lays and, on eclosion, flipped flies into new vials. We
allowed the flies to age for two days, yielding 2-3 day-old flies, which we
anesthetized using $\text{CO}_{2}$ and distributed males to arenas to be
imaged.

### Media

During experiments, flies were allowed to feed ad lib from a pad of optically
clear media (10% sucrose, 1.5% agarose). We were not able to include a protein
source, such as yeast extract, as this led to high levels of fungal growth
within 1-2 days that obscured imaging.

### Arena

We constructed experimental arenas out of laser-cut acrylic using acrylic
cement (McMaster 7517A4) to adhere layers together (Figure S1B). The bottom
layer of each arena consisted of a 3mm layer of food (described above). Each
individual fly was able to freely move about within a 25mm diameter cylinder
of height 1.5mm. Because these arenas have straight walls, flies are able to
walk along the sides, which can cause limb occlusions that pose difficulties
to downstream postural tracking. To address this, we used a low arena height
that impedes flies from easily maneuvering off the base layer. We also coated
the top and walls with Sigmacote (Sigma-Aldrich SL2), which discourages flies
from walking on the ceiling of the arena but does not fully restrict them from
walking on the edges of the arenas.

### Imaging and illumination

The arenas are lit from above using 880nm IR LED pads (Advanced Illumination
BL040801-880-IC). Below each arena, we placed high-resolution, high frame-rate
cameras (FLIR BFS-U3-32S4M-C) paired with 880nm band-pass filters (ThorLabs
FB880-70) (Figure S1A). This combination allows bright, uniform lighting
across the arenas permitting extremely short exposure times to reduce motion
blur. Imaging from above and recording from below also eliminates condensation
in the arenas. We found that the ideal balance between contrast and motion
blur was at 1 ms exposure time. In addition, we used a pair of visible light
LED panels at the top of the tent enclosing the experimental setup to provide
a 12-h visible light ($\sim$ 6500lux) and 12-h darkness cycle (< 6lux),
matching the timing of the light/dark cycle under which experimental flies
were reared. This visible light cycle did not appreciably affect the IR
imaging.

### Temperature and humidity

We recorded temperature and humidity within the imaging enclosure throughout
the trials (Supplemental Figure 2) with a Extech RHT10 datalogger. As
temperature and humidity have known effects on fly behavior
[sayeed1996behavioral, Soto-Padilla2018-ff], these data are provided with the
behavioral data set so that they may be taken into account (Figure S9). The
environmental controls of the room in which our experiments were housed cycle
on and off, leading to $\sim 1^{\circ}$ C temperature fluctuations with a
period of $\sim$1 hour.

### Acquisition software

We used a modified version of campy (github.com/Wolfffff/campy) forked from
github.com/ksseverson57/campy which was developed by Kyle Seversson. We
altered the package to suit our specific use-case, including chunking videos
and adjusting the exception handling. Campy pipes frames from FLIR’s Spinnaker
SDK (PySpin) to FFmpeg. The flexibility of FFmpeg allows us to drastically
reduce the file size of our videos by utilizing hardware-based compression.
Specifically, we use Nvidia NVENC (hevc_nvenc) paired with the segment_time
flag to produce hour-long chunks. This increased compression makes it feasible
to perform high-throughput recordings of 8 flies simultaneously on a single
computer. To facilitate ease of use in analysis and distribution, we merge
these videos into long videos; however, because loading tens of millions of
frames and instances can cause IO issues, we use hour long segments for
training.

The machines used for recording were running Windows 10 with 64GB RAM,
Intel(R) Core(TM) i7-8700K CPU processor, and either Nvidia Quadro RTX 4000,
Quadro P2000, or GeForce RTX 2080 GPU.

### SLEAP tracking

After imaging, SLEAP [Pereira2022-as] was used to estimate the pose of each
individual and maintain identity across videos. We used a 14 node skeleton:
head, eyes (eyeL, eyeR), proboscis, thorax, abdomen, fore legs (forelegL,
forelegR), mid legs (midlegL, midlegR), and the hind legs (hindlegL,
hindlegR). We labeled 1930 individuals across 482 frames. 434 frames (1738
instances) were used for training, with 48 frames (192 instances) reserved for
validation. We trained a U-Net based model with a receptive field size of 76
pixels ($2.\overline{6}$mm) on Nvidia A100 GPUs. The complete hyperparameter
set is provided along with the model. We include some training data from
recordings not included in the final data set due to early truncation but with
identical frame rates and resolution. To facilitate dealing with the more than
500 million frame dataset, we use SLURM to distribute our inference across 30
Nvidia P100 GPUs at approximately 20 fps yielding approximately 600fps – 6x
speed – tracking. After inferring locations with identity, we merged the
resulting .slp files together and ran SLEAP’s identity tracking script to
preserve identity over time. For convenience of analysis and storage, we
convert each .slp file to HDF5. Since individuals are in separate chambers, we
can validate these identity tracks by the amount of time spent in each
quadrant of the arena. The pipeline for sectioning, merging, and tracking can
be found on the associated GitHub repository.

### Edge detection

While flies spend the majority of their time in the flat bottoms of the
arenas, there is a small proportion of time ($\sim$5%) when they are oriented
sideways with respect to the cameras with their tarsi on the walls of the
arenas. In this position the legs are often occluded and difficult to
identify, leading to SLEAP tracking errors. In order to provide a flag for
time points when the flies are on the edge and tracking fidelity is
compromised we used the MATLAB Classification Learner App to train an SVM to
identify whether flies are on or off the edge based on the all-by-all
distances between tracked body coordinates (excluding the proboscis), the
speed of each body coordinate, and the distance between each body coordinate
and the edge of the arena. We used 2788 training points equally split between
on and off edge instances, and sampled evenly across all experimental flies.
Our final model accurately labeled 95% of held out validation points (Figure
S3).

### Unsupervised behavioral classification

To identify stereotyped behaviors from body-part dynamics, we adapted the
previously described MotionMapper pipeline [Berman2014-ee] for our data
(Figure S4). We first partially filled in missing data, interpolating all
missing data for head and thorax points using Piecewise Cubic Hermite
Interpolating Polynomial (PCHIP), to allow for subsequent egocentrizing. For
all other nodes, we performed PCHIP interpolation with a limit of filling 5
consecutive missing values. Further, for the proboscis node, we replaced all
missing values with the location of the had, representing a retracted
proboscis. Further, we performed a median filter on all nodes with a window
size of 5 and Gaussian filtering with standard deviation 1 and window size 5.
Following this, we egocentrized the data by shifting all individuals so that
the thorax is at (0, 0) and rotating each node location so that the thorax-
head connection falls along the positive x-axis. After this, we calculated the
Lomb-Scargle periodogram on rolling windows for each coordinate of each node.
Because the Lomb-Scargle periodogram allows the utilization of unevenly
sampled data and avoids the necessity of providing fully interpolated data.
Further, by adjusting the window size based on our frequency of interest, we
are able to capture behaviors across timescales similar to the envelope size
in continuous wavelet transforms.

We compiled a representative subsample of our data by selecting 141 fly hours
evenly across flies and time of day. Because flies are dying throughout the
course of the experiment our sample set is slightly skewed towards earlier
days to maintain even sampling across flies. We filtered training points from
this subsample of data by removing time points where the flies were on the
edge. We also removed time points we classified as idle where the total
amplitude of the wavelets was less than $0.5012mm^{2}$, a threshold we
empirically determined to separate the majority of idle instances where the
fly was largely motionless. From these, we sampled 36000, or the maximum
number of unfiltered time points, from each fly-hour. From each of the these
groups, we importance sampled 454 time points for a total of 64,014 training
points.

We embedded our importance-sampled training set into two dimensions using UMAP
and used this map for behavioral segmentation. We found that UMAP resulted in
superior separation into unique clusters for the total training set when
compared with t-SNE. We used kernel density estimation to create a 2D
probability distribution of our training points. To identify distinct peaks in
the density of training points we eliminated points of extreme low density and
utilized adaptive thresholding on the resulting distribution. We adjusted
parameters by eye to achieve distinct clusters for obviously separate peaks of
density while aiming to avoid oversegmentation.

In order to assign specific discrete behaviors to each region of stereotyped
power spectra we randomly selected clips from our sample set (141 fly hours)
corresponding to each region. We imposed a minimum duration based on the dwell
time distribution for each region to avoid very short bouts where behaviors
might be difficult to identify. We identified six well-defined stereotyped
behaviors (proboscis extension, fore grooming, hind grooming, wing grooming,
altered locomotion, and locomotion) as well as many clusters that corresponded
to idle behaviors with single-joint SLEAP tracking errors.

We then embedded our entire dataset into the same two dimensional space. Using
the boundaries defined on the training set we assigned all time points to one
of our six well-defined stereotyped behaviors, idle, edge (as called by our
edge detector), or unstereotyped. With this method, only $\sim$15% of our data
is classified as unstereotyped behavior.

Dwell times within these behavior states can vary from single frames to many
hundreds of frames. To identify a reasonable minimum bout length we fit two
geometric distributions to the total dwell time histogram. We selected 5
frames ($\sim$1/20 of a second) as a minimum bout duration, as this excludes
$\sim$95% of bouts from the distribution dominated by shorter bouts, and only
$\sim$14% of bouts from the distribution of longer bouts, which we take to
include legitimate behavior bouts. We forward-filled ethograms with this bout
duration, assigning any bout of 4 frames or less to the previous behavior of
long duration.

## Data availability

The data repository associated with this paper can be found at
doi.org/10.34770/1sab-8845. For each individual, we provide a single HDF5 file
that includes datasets for the tracked body parts, stereotyped behaviors,
on/off edge classification, temperature and humidity data, along with
experimental metadata such as start date and time and lights on and off times.
Videos cropped to contain individual flies are also provided. The original
uncropped videos and the full postural tracking data, as .slp files with
prediction scores for each body part of each individual, are available upon
request.

## Code availability

The source code for the data analysis is publicly available. The code can be
found on GitHub (github.com/shaevitz-lab/long-timescale-analysis). The
repository includes the scripts used in this paper along with other pragmatic
tools and examples.

The modified version of MotionMapperPy [Berman2014-ee] we use can be found at
https://github.com/Wolfffff/motionmapperpy and included as a git submodule in
the primary repository.

## Acknowledgements

The authors acknowledge the Aspen Center for Physics where this work was first
conceptualized, Gordon Berman, Ugne Klibaite, and Greg Stephens for
inspirational discussion, and Diogo Melo for insightful comments on how to
speed up our processing pipeline. This work was supported in part by the NSF
through the Center for the Physics of Biological Function (PHY-1734030). SWW
is supported by the NSF Graduate Research Fellowship Program (DGE-2039656).
GCM-S is supported by the Paul F. Glenn Laboratories For Aging Research at
Princeton University. JFA is funded by grants from the NIH: National Institute
of Environmental Health Sciences (R01-ES029929) and National Institute of
General Medical Sciences (R35GM124881). We also acknowledge that the work
reported in this paper was substantially performed using the Princeton
Research Computing resources at Princeton University, which is a consortium of
groups led by the Princeton Institute for Computational Science and
Engineering (PICSciE) and the Office of Information Technology’s Research
Computing group.

## Author contributions statement

Conceptualization, JWS and SWW; Initial methodology, SWW; Methodology
development, SWW and GCM-S; Investigation, SWW and GCM-S; Formal analysis, SWW
and GCM-S; Resources, JFA and JWS; Writing-Original draft, SWW and GCM-S;
Writing-Review & Editing, SWW, GCM-S, JFA and JWS; Funding Acquisition, SWW,
JFA, and JWS.

## Competing interests

The authors declare no competing interests.

format=largeformat

## Supplementary Information

## Tables

Date | Experiment | Camera | Start Time (UTC) | File
---|---|---|---|---
2/17/2022 | exp1 | Camera 1 | 2022/02/17 17:37:18 | 20220217-lts-cam1
2/17/2022 | exp1 | Camera 2 | 2022/02/17 17:37:18 | 20220217-lts-cam2
2/17/2022 | exp1 | Camera 3 | 2022/02/17 17:46:39 | 20220217-lts-cam3
2/17/2022 | exp1 | Camera 4 | 2022/02/17 17:46:39 | 20220217-lts-cam4
3/13/2022 | exp2 | Camera 3 | 2022/03/13 02:14:15 | 20220313-lts-cam3
3/13/2022 | exp2 | Camera 4 | 2022/03/13 02:14:15 | 20220313-lts-cam4
3/26/2022 | exp3 | Camera 3 | 2022/03/26 19:50:45 | 20220326-lts-cam3
3/26/2022 | exp3 | Camera 4 | 2022/03/26 19:50:45 | 20220326-lts-cam4
4/18/2022 | exp4 | Camera 1 | 2022/04/18 19:06:00 | 20220418-lts-cam1
4/18/2022 | exp4 | Camera 2 | 2022/04/18 19:06:00 | 20220418-lts-cam2
4/18/2022 | exp4 | Camera 3 | 2022/04/18 19:07:28 | 20220418-lts-cam3
4/18/2022 | exp4 | Camera 4 | 2022/04/18 19:07:28 | 20220418-lts-cam4

Table 1: Metadata table outlining the data collected. Each row represents a
single camera recording on a single day covering 4 wells. Here, we show the
composition of experiments starting from mid day to evening. The provided File
column corresponds to the H5 file containing tracks of each recording.
Complete metadata at the per-fly level is provided in the associated data
repository.

## Figures

Figure S1: A Schematic of imaging setup. Experimental arenas were illuminated
from above with 880nm LED pads to permit constant recording and two visible
LED panels (only one shown) on a 12-hour light/dark cycle. Flies were recorded
from below using 880nm bandpass filters on each camera to ensure uniformity
across visible light changes. B Experimental arena schematic. Arenas were
constructed from layers of transparent laser-cut acrylic, with a 3mm deep pad
of sucrose-agarose media beneath a 1.5mm deep chamber enclosed by a solid
layer of acrylic. Arena layers were held together by lab tape, which prevented
escape while also permitting airflow. Figure S2: Prediction error plot. The
average error distance is approximately 2.22px, corresponding to 78.5µm. Our
model’s mean average precision (mAP) is 0.70, and the error distance 95th
percentile is 4.14px. More metrics and complete models are available in the
main dataset. Figure S3: Illustration of edge detection method. An SVM
classifier uses the all-by-all distances between all body part coordinates,
except for the proboscis, the speed of each body part, and the distance for
each body part from the edge to classify time points as ’off edge’ (example
shown on left) or ’on edge’ (example shown on right). Points directly on the
edge, such as some of the tarsi in these images, have an edge distance of 0,
which naturally cannot be shown. Figure S4: Schematic of behavioral
classification pipeline. The behavioral pipeline shows the flow of data from
pose estimation from SLEAP through behavioral bout assignment. Figure S5: Plot
showing the density map of 2D embedding values from UMAP along with the region
assignments. Regions 2, 3, 4, 5, 9, 12, 15, 16, 18, 20, 23, 25, 28, 31, and 32
were assigned to idle behavior, 14 was assigned to proboscis extension.
Regions 1, 6, 7, 8, 10, and 11 were assigned to foreleg grooming. Regions 26,
27, and 30 were assigned to hind grooming. Regions 22, 24, and 29 were
assigned to wing grooming behavior. Regions 17, 19, and 21 were assigned to
altered locomotion. Finally, region 13 was assigned to locomotion. Figure S6:
Line plot showing the cumulative variance explained by PCs of behavioral
components on the complete data set. Figure S7: Box plots showing PC3 of
behavioral components PCA. Experimental group 1 (experiments 1 and 2) is shown
in blue and experimental group 2 (experiments 3 and 4) are shown in red. PC3
separates our experimental groups and this separation becomes more significant
farther into the experiments.  Figure S8: Behavioral characteristics by radial
position and radial position distributions by day of experiment. A Violin plot
showing the distributions of radial position by day of experiment. B Barplot
of behavioral components by radial position. Figure S9: Line plots showing
temperature and humidity measured throughout the experiments. All measurements
were taken a 1 minute intervals and have been trimmed to only include points
where at least one fly in the experiment is alive. A Line plot showing the
variation in temperature across experiments and zeitgeber time. The shaded
region is the standard error. B Line plot showing the variation in humidity
across experiments and zeitgeber time. The shaded region is the standard
error.


# Electronic structure of the magnetic halide double perovskites
Cs2(Ag,Na)FeCl6rom first-principles

Johan Klarbring<EMAIL_ADDRESS>Theoretical Physics Division,
Department of Physics, Chemistry and Biology (IFM), Linköping University,
SE–581 83, Linköping, Sweden  Utkarsh Singh  Theoretical Physics Division,
Department of Physics, Chemistry and Biology (IFM), Linköping University,
SE–581 83, Linköping, Sweden  Sergei I. Simak  Theoretical Physics Division,
Department of Physics, Chemistry and Biology (IFM), Linköping University,
SE–581 83, Linköping, Sweden  Department of Physics and Astronomy,
Uppsala University, SE–75120 Uppsala, Sweden  Igor A. Abrikosov  Theoretical
Physics Division,
Department of Physics, Chemistry and Biology (IFM), Linköping University,
SE–581 83, Linköping, Sweden

###### Abstract

A family of magnetic halide double perovskites (HDPs) have recently attracted
attention due to their potential to broaden application areas of halide double
perovskites into e.g. spintronics. Up to date the theoretical modelling of
these systems have relied on primitive approximations to the density
functional theory (DFT). In this paper, we study structural, electronic and
magnetic properties of the Fe3+-containing HDPs Cs2AgFeCl6 and Cs2NaFeCl6
using a combination of more advanced DFT-based methods, including DFT+U,
hybrid-DFT and treatments of various magnetic states. We examine the effect of
varying the effective Hubbard parameter, Ueff, in DFT+U and the mixing-
parameter, $\alpha$, in hybrid DFT on the electronic structure and structural
properties. Our results reveal a set of localized Fe(d) states that are highly
sensitive to these parameters. Cs2AgFeCl6 and Cs2NaFeCl6 are both
antiferromagnets with Neél temperatures well below room temperature and are
thus in their paramagnetic (PM) state at the external conditions relevant to
most applications. Therefore, we have examined the effect of disordered
magnetism on the electronic structure of these systems and find that while
Cs2NaFeCl6 is largely unaffected, Cs2AgFeCl6 shows significant renormalization
of its electronic band structure.

##  I  Introduction

Research into metal halide perovskite (MHP) semiconductors have steadily
increased over the last decade to where it is currently one of the most active
fields in materials science [1]. While lead-containing MHPs have been at the
forefront of this research, a number of lead-free derivatives have emerged as
interesting alternatives [2]. These sub-classes often aim to address
deficiencies, not just related to the toxicity of lead, but also in terms of
poor stability of several MHPs. The so-called lead-free halide double
perovskites (HDPs), where the Pb2+ ions are replaced with a pair of mono- and
trivalent cations, is one such class of materials which has emerged over the
last years [3].

Very recently, a set of Fe3+based HDPs, including Cs2NaFeCl6 and Cs2AgFeCl6,
have garnered attention [4, 5, 6]. While Cs2NaFeCl6 was synthesized at least
as early as 1976 [7], renewed attention has been gained just in the last few
years. In addition to Cs2NaFeCl6 and Cs2AgFeCl6, related alloys have also been
synthesized [6]. These systems contain magnetic Fe3+ ions with a 3d5
electronic configuration and initial experiments indicate that they are in
their high-spin (HS) configuration, yielding a large magnetic moment [8]. As
such, an associated set of physical phenomena related to their magnetism,
become of relevance. Cs2NaFeCl6 and Cs2AgFeCl6 both crystallize in the ideal
cubic double perovskite structure with space group Fm$\overline{3}$m (No. 225)
at ambient conditions. They are further found to be antiferromagnets (AFM)
with low Néel temperatures of 3 K and 18 K, respectively [8]. As such, they
are both deep in their paramagnetic (PM) states at ambient conditions.

The presence of the partially filled 3d shell differentiates Cs2NaFeCl6 and
Cs2AgFeCl6 from the majority of MHPs studied in the literature. These Fe(3d)
states are expected to be highly localized and an accurate treatment typically
requires consideration beyond standard semi-local DFT. In this work, we
explore two such approaches. The first is the DFT+U method [9], where an
(effective) onsite Hubbard term, Ueff, is added to the effective Kohn-Sham
potential of the localized states. This method is advantageous in that it adds
negligible computational effort compared to standard semi-local DFT. However,
a choice needs to be made on the value of the effective Ueff parameter. While
this can in principle be estimated from first principles [10], often a value
is taken to match some experimentally determined property. The second approach
is hybrid DFT, where a fraction of exact exchange is mixed in with the semi-
local DFT exchange. This approach is often chosen for semiconductors and
insulators when accurate electronic structures are desired. Although it acts
in a similar way to DFT+U on highly localized states[11], it is not as popular
for studies of such systems. Computationally, hybrid DFT is significantly more
expensive than DFT+U and suffers from a similar problem as DFT+U when it comes
to choosing the amount, $\alpha$, of exact exchange to mix in.

A second challenge in modelling these systems, also rarely encountered for
MHPs, is that they are in the paramagnetic (PM) state at the relevant external
conditions. The PM state is sometimes modeled as non-magnetic, without the
presence of local magnetic moments, which could lead to erroneous conclusions
[12].

Previous DFT studies on Cs2NaFeCl6 and Cs2AgFeCl6 [13, 4, 14] have either been
performed with a NM or FM state and have not directly addressed the issue of
the modelling of the strongly localized Fe(d) states. In the current paper, we
therefore aim to explore how DFT+U and hybrid-DFT behave in modelling these
systems and study the influence of varying values of U and the mixing
parameter, $\alpha$, respectively. Moreover, we use a description of the PM
state in the framework of the disordered local moment (DLM) picture [15] using
a DLM-supercell approach [16], to explore how the disordered PM state
influences structural and electronic structure properties.

##  II Computational details

All computations were performed using plane-wave Kohn-Sham DFT and the PAW
method [17] as implemented in VASP [18, 19, 20]. We have used the PBEsol [21]
form of the exchange-correlation functional augmented with an effective on-
site Ueff correction in the form according to Dudarev et al.[22], as well as
range-separated hybrid DFT [23] with varying values of the mixing-parameter
$\alpha$. For the majority of the calculations we have used a 450 eV cutoff
energy, and an 8$\times$8$\times$8 sampling of the first Brillouin zone (BZ)
of the 10 atom primitive unit cell and a 10-6 eV convergence criterion for the
self-consistent field (SCF) cycles and the ”PREC = Accurate” mode in VASP.
Full structural relaxations (lattice vectors and internal coordinates) were
performed until all the atomic forces were $<$ 5 meV/Å. For relaxations with
hybrid-DFT we have used a less dense 4$\times$4$\times$4 k-point grid. We
confirmed that yielded forces $<$ 6 meV/Å different compared with the
8$\times$8$\times$8 grid used for calculations of densities of states (DOS).
The employed PAW potentials treated the Cs(5s5p6s), Ag(4d5s), Na(2p3s),
Fe(3p3d4s) and Cl(3s3p) states as valence. Details on chemical bonding was
obtained from a Crystal Orbital Hamiltonian Population (COHP) [24] analysis,
using the LOBSTER[25, 26, 27] package.

The PM state was modelled with special quasirandom structure (SQS) [28]
distributions of the spin-up and spin-down Fe magnetic moments in a
disordered-local moment (DLM) fashion [16]. For the calculations of energies
of different magnetic states we used a 320 atom supercell, constructed as a
2$\times$2$\times$2 repetition of the 40 atom conventional cubic unit cell,
and $\Gamma$-point sampling of the BZ. Effective band structures (EBS) in the
BZ of the primitive unit cell were obtained using band unfolding [29] as
implemented in the BandUP code [30]. For these calculations we used a
4$\times$4$\times$4 supercell of the primitive fcc unit cell (640 atoms). In
order to make these calculations computationally feasible, the accuracy
settings were slightly reduced as follows: cutoff energy 300 eV, energy
convergence criterion 10-5 eV and ”PREC = Normal”. We have recalculated the
band structures of the FM unit cell with these settings to confirm that band
structures agree almost within the width of the line in the displayed band
structures.

##  III Results

Figure 1: Electronic DOS for Cs2NaFeCl6 in the FM state, for (a) varying
values of Ueff on the Fe(d) states in the PBEsol+U methodology and (b) varying
values of $\alpha$ in the hybrid DFT (default HSE06 range separation
parameter). The DOS are aligned to the VBM. Figure 2: (a) PBEsol+U(3eV)
density of states and (b) corresponding Fe-Cl partial COHP for the majority
(blue line) and minority (red line) spin-channels.The bonding states around -4
eV are of Fe(s)-Cl(p) character.  Figure 3: Schematic cartoon illustration of
Fe(d)-Cl(p) hybridization in Cs2NaFeCl6. Yellow and blue boxes indicate states
of predominately Fe(d) and Cl(p) character, respectively. Figure 4: Electronic
DOS for Cs2AgFeCl6 in the FM state, for (a) varying values of U on the Fe(d)
states in the PBEsol+U methodology and (b) varying values of $\alpha$ in the
hybrid DFT (default HSE06 range separation parameter). The DOS are aligned to
the VBM. Figure 5: Effective band structure (EBS) of (a) Cs2NaFeCl6 and (b)
Cs2AgFeCl6 in DLM state. The left panels shows the bands structure in the FM
state for comparison, with the majority and minority spin bands in black and
red, respectively. The right panels is the DOS in the DLM states. High and low
spectral weights are represented by bright and dark colors, respectively.

###  III.1 Basic electronic and structural properties

We start by examining the structural and magnetic properties, as well as the
electronic structure of Cs2NaFeCl6 and Cs2AgFeCl6 across a range of Ueff and
$\alpha$ values. Although, as mentioned in the introduction, Cs2NaFeCl6 and
Cs2AgFeCl6 are both AFM at low temperature and in their disordered PM state at
relevant external conditions, we will in this section primarily treat them in
their ferromagnetic (FM) state. This allows us to retain the symmetry of the
double perovskite structure and to most easily highlight basic features of
their electronic structure. The effect of different magnetic states on the
electronic structure will then be considered in more detail in Section III.2.

The double perovskite structure contains 2 degrees of freedom, the lattice
parameter, $a$, (or equivalently the unit cell volume) and the position of the
Cl atom along the (Ag/Na)-Cl-Fe bond. Table 1 lists these parameters for both
Cs2NaFeCl6 and Cs2AgFeCl6 for different U values in PBEsol+U and different
$\alpha$ values in the HSE methodology. To assess the importance of the
magnetic state on the structural parameters, we show results for the FM, PM
and NM states in the case of Ueff = 3 eV.

Generally, PBEsol+U gives the better structural parameters in comparison to
experiments, with HSE somewhat overestimating lattice constants. The
structural parameters are rather weakly influenced by varying the values of
Ueff and $\alpha$. It is, however, interesting to note that increasing Ueff
increases the Fe-Cl bond length and lattice constant, while increasing
$\alpha$ instead decreases the same bond length and lattice constant. We can
also see from Table 1 that, while the NM calculations clearly gives erroneous
results for the lattice constant and bond lengths, the precise nature of the
magnetic state, i.e. FM or PM, is not influential on the structural
parameters, as long as local magnetic moments are included in the
calculations.

Table 1: Lattice constant, $a$ and select bond-lengths (in units of Å), total magnetic moments in the unit cell, $\mu$(uc), and local magnetic moments on the Fe3+-ion, $\mu$(Fe). For the PM states, the average values of the bond lengths and $\mu$(Fe) are given. Experimental results are from Refs. [5, 4] |  | Cs2NaFeCl6 |  |  |  |
---|---|---|---|---|---|---
Method | Magnetic state | a | d(Fe-Cl) | d(Na-Cl) |  $\mu$(uc) |  $\mu$(Fe)
Experiment (80 K) [5] | PM | 10.2591 | 2.366 | 2.764 |  |
PBEsol+U |  |  |  |  |  |
U=0 eV | FM | 10.246 | 2.377 | 2.746 | 5.00 | 3.88
U=3 eV | FM | 10.258 | 2.381 | 2.747 | 5.00 | 4.06
| NM | 10.073 | 2.276 | 2.761 | 0 | 0
| PM | 10.258 | 2.381 | 2.748 | 5.00 | 4.06
U=6 eV | FM | 10.266 | 2.385 | 2.748 | 5.00 | 4.22
U=9 eV | FM | 10.271 | 2.388 | 2.748 | 5.00 | 4.38
HSE |  |  |  |  |  |
$\alpha$ = 0.125 | FM | 10.461 | 2.407 | 2.823 | 5.00 | 4.04
$\alpha$ = 0.250 | FM | 10.432 | 2.399 | 2.817 | 5.00 | 4.16
$\alpha$ = 0.375 | FM | 10.397 | 2.392 | 2.807 | 5.00 | 4.26
|  | Cs2AgFeCl6 |  |  |  |
Method | Magnetic state | a | d(Fe-Cl) | d(Na-Cl) |  $\mu$(uc) |  $\mu$(Fe)
Experiment (300 K) [4] | PM | 10.2023 | 2.382 | 2.719 |  |
PBEsol+U |  |  |  |  |  |
U=0 eV | FM | 10.079 | 2.387 | 2.652 | 4.53 | 3.67
U=3 eV | FM | 10.126 | 2.396 | 2.667 | 5.00 | 4.01
| NM | 9.93 | 2.295 | 2.668 | 0 | 0
| PM | 10.116 | 2.381 | 2.747 | 5.00 | 4.06
U=6 eV | FM | 10.139 | 2.400 | 2.669 | 5.00 | 4.16
U=9 eV | FM | 10.150 | 2.402 | 2.673 | 5.00 | 4.32
HSE |  |  |  |  |  |
$\alpha$ = 0.125 | FM | 10.377 | 2.416 | 2.773 | 5.00 | 4.01
$\alpha$ = 0.250 | FM | 10.364 | 2.405 | 2.778 | 5.00 | 4.13
$\alpha$ = 0.375 | FM | 10.348 | 2.395 | 2.779 | 5.00 | 4.24

Table 1 also shows the total magnetic moment in the unit cell and the local
magnetic moments on the Fe atoms for different values of Ueff and $\alpha$
111Using the default radius around the Fe atoms (RWIGS), as supplied by the
VASP PAW potentials. We see that in all cases, expect for U=0 eV in Cs2AgFeCl6
there is a total magnetic moment of 5 $\mu_{B}$ in the unit cell, as expected
from the 5 unpaired electrons of HS Fe3+. The local magnetic moment on the Fe
ions increases for increasing Ueff (or $\alpha$), due to the increased charge
localization.

Turning to the electronic structure, Fig. 1 shows the densities of states
(DOS) in the FM spin configuration for Cs2NaFeCl6, with Ueffvalues on the Fe
3d states varying from 0 to 6 eV.

The most eye-catching feature of the DOS is the highly localized Fe-d states.
These separate, as dictated by the octahedral coordination environment of the
Cl-p ligands, into states with eg and t2g symmetry. In a simple picture, the
eg and t2g orbitals have both Coulomb and covalent interactions with the
ligands. The eg orbitals point more directly towards the ligands and the
Coulomb repulsion is thus stronger than for the t2g orbitals, but the covalent
interaction also tends to be larger.

In general, increasing the value of Ueff has the effect of driving the
occupied and unoccupied states to which the Ueff is applied, Fe 3d states in
our case, down and up in energy, respectively. This can clearly be seen to be
the case for Cs2NaFeCl6 in Fig. 1. Importantly, however, the sharper t2g and
the broader eg states move with Ueff at different rates. This is particularly
true for the unoccupied eg/t2g states, where the t2g states are initially
lower in energy, but where a crossing with the eg states happens at Ueff
$\approx 6$ eV. This is because the eg states have, as mentioned above, a
stronger covalent interaction with the ligands and as such have a
counteracting effect to the increase in Ueff, while the more localized t2g
states move with Ueff at will.

There are two sets of Fe(d)-Cl(p) hybridized states in each spin-channel, one
of predominantly Fe(d) character and one with predominantly Cl(p) character.
In the majority spin-channel both sets are occupied, while the predominantly
Fe(d) states are unoccupied in the minority spin-channel. We see that the
predominantly Fe(d) peaks corresponding to occupied eg and t2g states and
unoccupied t2g states are very sharp, while the unoccupied eg band is more
disperse.

To get further insight into the electronic structure of Cs2NaFeCl6, Fig. 2
shows the Fe-d partial DOS for Ueff = 3 eV, along with the Fe-Cl partial
crystal orbital Hamiltonian population (COHP). Analysing the Fe(3d)-Cl(3p)
hybridised states, we see that the predominantly Fe(d) peaks are of bonding
and anti-bonding character in the majority and minority spin-channels,
respectively, and that the order of the t2g and eg states is opposite in the
two spin-channels. The predominantly Cl(p) states are instead anti-bonding in
the majority and bonding in the minority spin-channel. As expected, the
bonding-antibonding energy splitting is larger for the eg orbitals, resulting
in the opposite order of t2g/eg states for the bonding and antibonding
Fe(3d)-Cl(3p) combinations, for lower values of U.

Increasing the value of Ueff has the additional effect of localizing the Fe-d
states and thus reducing the covalent interaction with the ligands. The impact
of this is seen most clearly for the Fe(3d)-Cl(3p) anti-bonding states in the
majority spin-channel, where, upon increasing Ueff, the Fe(eg/t2g) weight
rapidly decreases and gets redistributed into the sharp bonding states. In
fact, the effect of adding Ueff is rather drastic on the top of the valence
band; for Ueff = 0 eV, antibonding Fe(eg)-Cl(p) states are separated out from
the rest of the VB in the majority spin-channel. This is a clear indication
that ”regular” semilocal DFT functionals, such as PBEsol, do not accurately
describe the electronic structure of Cs2NaFeCl6.

As can be seen in Fig. 1 b), the effect of increasing the mixing parameter
$\alpha$ has similar impact on the Fe(d) states as increasing Ueff. This is to
be expected as DFT+U and hybrid DFT can be shown to behave very similarly for
localized states [11]. An important difference, however, is that the
unoccupied t2g states move up in energy on increasing Ueff at a much larger
rate than the eg states, this rate difference is much smaller on increasing
$\alpha$. Indeed, the unoccupied t2g states stay below the eg states at least
up to $\alpha$=0.5. This difference in behavior could be related to different
spatial localization in hybrid DFT and DFT+U calculations resulting in
somewhat different splitting between Coulomb and covalent interactions [32].

Another interesting observation is that the sharp occupied bonding
Fe(eg)-Cl(p) states are lower in energy than the t2g states. This is contrary
to the predictions from simple crystal field theory (CFT) applied to an
octahedral coordination environment, where the opposite ordering of t2g and eg
states is expected. Indeed, if the atomic d orbitals are split simply by their
Coloumb interaction with the ligands, represented as negative point charges,
the eg orbitals have to lie above the t2g orbitals. This is, as mentioned
above, because eg orbitals point more directly towards the ligands and are
thus repelled more strongly. However, moving beyond CFT and considering also
covalent interactions between the eg/t2g orbitals and the ligands, things are
a bit less straightforward.

For the typical case where the transition metal d orbitals lie above the
ligand p levels, the anti-bonding combination of ligand p and TM d are the
ones which are predominately of TM d-character and which are often refereed to
as just the TM d-states. These states also show the ”normal” order of eg/t2g
orbitals [33]. However, in the opposite case where the TM d lie below the
ligand p levels, the predominantly d levels are the bonding orbitals which can
show the opposite t2g/eg ordering. In the present case, we propose that the
Fe(3d) and Cl(3p) hybridisation in Cs2NaFeCl6 can be schematically illustrated
as in Fig. 3.

Fig. 4 shows the DOS for different Ueff and $\alpha$ for Cs2AgFeCl6, which is,
in many ways, similar to Cs2NaFeCl6. Indeed, the Fe(eg/t2g) states behave in
much the same way, the primary difference being that the unoccupied eg band is
broader in Cs2AgFeCl6 than in Cs2NaFeCl6. This is due to a stronger Fe-Fe
interaction as will be discussed further below. The main difference between
the two systems, however, is the presence of Ag(d) states in the main valence
band. In particular bands of predominantly Ag(eg)-Cl(p) character are at the
top of the valence band in the majority spin-channel. It is thus clear that
beside the Fe3+-ions, also the Ag+ ions are spin-polarized, despite the fact
that the they have a full d10 electron configuration. As we will see below,
these Ag(eg) states are important in mediating the magnetic interaction
between Fe3+, and is responsible for the different magnetic energetics in
Cs2AgFeCl6 compared to Cs2NaFeCl6.

It is worth noting that for Ueff= 0 eV, the states at the top of the valence
band in the majority spin-channel overlap in energy with the sharp Fe(t2g)
peak in the minority spin-channel, resulting essentially in a metallic system.

###  III.2  Magnetic states

Table 2: Energies of different magnetic states, referenced to the FM configuration, in Cs2NaFeCl6 and Cs2AgFeCl6.  |  $\Delta E$ (meV/f.u.)
---|---
Magnetic state | Cs2NaFeCl6 | Cs2AgFeCl6
FM | 0 | 0
AFM-I | -8 | -56
PM | -6 | -49

While the initial investigation in the previous section was, for clarity and
simplicity, done primarily with a FM spin-configuration of the Fe atoms,
experiments indicate that both Cs2NaFeCl6 and Cs2AgFeCl6 have AFM ground-
states with low Neél temperatures [8]. Table. 2 lists the total energies of
the NM, FM, AFM-I 222The AFM-I consists of spin-up and spin-down layers of Fe
magnetic moments alternating in the z direction. and PM spin configurations.
The calculations used PBEsol+U(3eV), this Ueff was chosen since it gives the
same ordering of the unoccupied eg/t2g states as hybrid DFT for reasonable
values of $\alpha$. The relaxed FM lattice constant was used and internal
degrees of freedom were relaxed for each magnetic state.

We see that in both cases the AFM-I configuration is lowest in energy, in
agreement with the experimental results that these systems are AFM at low
temperatures. For Cs2NaFeCl6, however, the energies across all three spin
configurations are close to degenerate on the $\sim$1 meV/atom accuracy in our
calculations, indicating a weak interaction between Fe magnetic moments in
this system. This is in agreement with the very low experimental Neél
temperature of $\sim$3 K.

For Cs2AgFeCl6, the energy differences across the spin configurations are
larger, but the AFM-PM energy difference is still small, again in agreement
with a low Neél temperature of $\sim$18 K. The energy difference between the
AFM/PM and the FM state is however much larger in Cs2AgFeCl6 compared to
Cs2NaFeCl6, indicating some significant interaction between Fe magnetic
moments. This is likely due to the Ag d shell which can mediate the magnetic
interactions between the Fe spins to a larger degree than the mostly inert Na
ion. A detailed study into the magnetic interactions in magnetic halide double
perovskites is beyond the scope of the present work and will be reported
elsewhere.

Since the Neél temperatures of Cs2(Ag,Na)FeCl6 are low, the relevant magnetic
setting for any prospective applications at or around ambient temperature is
the PM phase. To model the electronic band structure in the PM state we employ
a DLM spin-configuration, and then use the band unfolding formalism [29] to
unfold the resulting band structure, yielding an effective band structure
(EBS) in the primitive BZ of the double perovskite structure. The results are
shown in Fig. 5 for Cs2NaFeCl6 and Cs2AgFeCl6, where we compare these EBSs to
their corresponding band structures in the FM state.

We see that for Cs2NaFeCl6 the band structure is rather weakly affected by the
different local spin environments that the Fe atoms experience and the EBS
resembles the FM band structure quite closely, with minor shifts and
broadening in certain bands with some Fe(eg/t2g) character.

The effects of the spin configuration on the band structure is significantly
larger for Cs2AgFeCl6. Firstly, we see that the PBEsol+U(3eV) bandgap is
significantly increased in the PM as compared to the FM spin configuration.
This follows from the decreased bandwidth in the PM state of the unoccupied Fe
eg band at the bottom of the conduction band and occupied Ag eg band at the
top of the valence band in the $\Gamma-X$ direction. This is a result of the
weaker Fe-Fe interaction in this direction upon introduction of magnetic
disorder and is present, although to a lesser extent, also for the unoccupied
Fe eg band in Cs2NaFeCl6.

Indeed, for Cs2AgFeCl6 all the states within $\sim$1 eV of the valence band
maximum, of Ag(eg)+Cl(p) character, are rather heavily broadened and shifted
in the EBS as a result of disordered spin configuration on the Fe ions. This
indicates that the bands of Ag(eg) character are significantly influenced by
the spin configuration of the neighboring Fe ions. This in turn suggests a
stronger interaction between Fe spins, mediated by Ag(eg) orbitals, which
explains the larger energy difference between the FM and AFM spin
configurations in Cs2AgFeCl6 compared to Cs2NaFeCl6.

It is important to note at this point that broadening effects in the EBS may
converge quite slowly with the size of the employed supercell [35].
Unfortunately, the computational complexity of employing larger supercells
than the 640 atom ones used in this work is prohibitively large. Nevertheless,
the presented result should be qualitatively accurate in terms of which states
are effected by the disordered magnetism.

Analysing the band structures of Cs2AgFeCl6 and Cs2NaFeCl6 for Ueff = 3 eV in
their FM states, we find that for spin-allowed transitions Cs2AgFeCl6 is an
indirect bandgap semiconductor in the minority spin-channel, with the VBM and
CBM at the $L$ and $X$-points, respectively. Cs2NaFeCl6 is also an indirect
semiconductor with VBM and CBM at the $\Gamma$ and $X$-points, respectively,
due to the almost dispersionless $\Gamma-X$ branch at the top of the valence
band, the direct bandgap is very close to the fundamental gap.

In the DLM state, where the two spin channels are equivalent, both Cs2AgFeCl6
and Cs2NaFeCl6 are practically direct band gap systems due to their flat
$\Gamma$-$X$ branches in the VB and the CBM at the $X$-point.

##  IV Discussion

We now provide some thoughts regarding the choice of $\alpha$ and $U_{eff}$.
As we have seen, basic structural properties are not strongly affected by
these parameters, whereas the electronic structure is. It might therefore be
tempting to attempt to tune Ueff or $\alpha$ to match the room temperature
experimental bandgap values, 2.07-2.2 eV [13, 36] and 1.55-1.6 eV [4, 6] for
Cs2NaFeCl6 and Cs2AgFeCl6. As can be judged from Figs. 1 and 4, this is
possible for both Cs2NaFeCl6 and Cs2AgFeCl6 in the hybrid DFT framework, and
for Cs2NaFeCl6 also in the PBEsol+U framework. We note, however, that this is
rather precarious since, as has been mentioned above, varying $U_{eff}$ or
$\alpha$ has multiple consequences, for instance in regards to the amount of
Fe(d) contributions to the top of the valence band.

In modelling the PM state we have chosen to use a Ueff value of 3 eV, since
this gives the same ordering of the unoccupied eg/t2g states as hybrid DFT for
reasonable values of $\alpha$. The ordering of these states is indeed
potentially important for e.g. the transport properties of these systems since
they provide very different effective electron masses. Indeed, the t2g states
are very flat, while the eg bands have some curvature, corresponding to lower
effective electron masses.

As the recent interest for Cs2AgFeCl6 and Cs2NaFeCl6 have emerged in the
context of their membership of the lead-free halide double perovskite class of
materials, it is instructive to point out similarities and differences of
their electronic structure to some prototypical members of this class. The two
prototypical members of this class are Cs2AgInCl6 and Cs2AgBi(Br/Cl)6. Indeed,
these systems both have relatively disperse conduction bands, very different
from the highly localized Fe(d)-based states of, in particular, Cs2NaFeCl6. A
possible implications of this is the self-localization of excess electrons,
i.e. the formation of small-electron polarons on Fe3+ lattice sites. Initial
exploratory calculations (not shown) indeed indicate that electron polaron
formation is likely, but a comprehensive investigation into this topic is
beyond the scope of this paper and is the subject of intended future work.

As has been mentioned throughout the paper, the presence of HS Fe3+ have
implications in regards to the computational techniques that have be used in
order to accurately model these systems. Indeed, we have demonstrated that
careful considerations regarding the magnetic state and strong correlation
effects have to be made in order for accurate results to be obtained. Such
considerations are not normally required in modelling systems within the class
of halide perovskites.

##  V Conclusion

To conclude we have studied the electronic structure of Fe3+containing double
halide perovskites Cs2NaFeCl6 and Cs2AgFeCl6. We have investigated the impact
on varying the effective on-site Hubbard interaction , $U_{eff}$, in DFT+U and
the impact of the fraction of exact exchange, $\alpha$, in the hybrid-DFT
framework. We find that while basic structural properties are relatively
insensitive to the choice of $U_{eff}$ or $\alpha$, several details of the
electronic structure vary strongly. In particular, we find a set of highly
localized Fe(d) states in the electronic structure of both Cs2NaFeCl6 and
Cs2AgFeCl6, which vary sensitively with Ueff and $\alpha$. A value of
$U_{eff}$ = 3 eV in DFT+U yields the same ordering of the Fe t2g and eg states
as in hybrid-DFT, for reasonable values of $\alpha$.

We have further investigated the impact of the magnetic state of these
compounds. We find both systems to be antiferromagnetic at low T, but with
rather small energy difference across different magnetic orderings. This is in
agreement with the rather low experimental Neél temperatures of 3 K and 18 K
for Cs2NaFeCl6 and Cs2AgFeCl6, respectively [8]. Furthermore, we have revealed
the effect of disordered magnetism on the electronic band structures of these
systems, finding that while Cs2NaFeCl6 is only weakly affected, Cs2AgFeCl6 is
substantially influenced by the disordered magnetic state.

##  VI Acknowledgments

This work was financially supported by Knut and Alice Wallenberg Foundation
(Dnr. KAW 2019.0082). SSI and IAA acknowledge support from the Swedish
Government Strategic Research Areas in Materials Science on Functional
Materials at Linköping University (Faculty Grant SFO-Mat-LiU No. 2009-00971).
S.I.S. acknowledges the support from Swedish Research Council (VR) (Project
No. 2019-05551) and the ERC (synergy grant FASTCORR project 854843). The
computations were enabled by resources provided by the Swedish National
Infrastructure for Computing (SNIC), partially funded by the Swedish Research
Council through grant agreement no. 2018-05973.

## References

  * Jena  _et al._ [2019] A. K. Jena, A. Kulkarni, and T. Miyasaka, Halide perovskite photovoltaics: Background, status, and future prospects, Chemical Reviews 119, 3036 (2019).
  * Ning and Gao [2019] W. Ning and F. Gao, Structural and Functional Diversity in Lead-Free Halide Perovskite Materials, Advanced Materials 31, 1900326 (2019).
  * Igbari  _et al._ [2019] F. Igbari, Z.-K. Wang, and L.-S. Liao, Progress of Lead-Free Halide Double Perovskites, Advanced Energy Materials 9, 1803150 (2019).
  * Yin  _et al._ [2020] H. Yin, Y. Xian, Y. Zhang, W. Chen, X. Wen, N. U. Rahman, Y. Long, B. Jia, J. Fan, and W. Li, An Emerging Lead-Free Double-Perovskite Cs2AgFeCl6:In Single Crystal, Advanced Functional Materials 30, 2002225 (2020).
  * Li  _et al._ [2021] W. Li, N. U. Rahman, Y. Xian, H. Yin, Y. Bao, Y. Long, S. Yuan, Y. Zhang, Y. Yuan, and J. Fan, Regulation of the order-disorder phase transition in a Cs2NaFeCl6 double perovskite towards reversible thermochromic application, Journal of Semiconductors 42, 072202 (2021).
  * Ji  _et al._ [2021] F. Ji, F. Wang, L. Kobera, S. Abbrent, J. Brus, W. Ning, and F. Gao, The atomic-level structure of bandgap engineered double perovskite alloys Cs2AgIn1-xFexCl6, Chemical Science 12, 1730 (2021).
  * Pebler  _et al._ [1976] J. Pebler, K. Schmidt, R. Haegele, and D. Babel, Untersuchung des MÖSSBAUER-effekts in elpasolithen A2INaFeF6, Zeitschrift für Naturforschung B 31, 1039 (1976).
  * Xue  _et al._ [2022] J. Xue, Z. Wang, A. Comstock, Z. Wang, H. H. Y. Sung, I. D. Williams, D. Sun, J. Liu, and H. Lu, Chemical Control of Magnetic Ordering in Hybrid Fe-Cl Layered Double Perovskites, Chemistry of Materials 34, 2813 (2022).
  * Himmetoglu  _et al._ [2014] B. Himmetoglu, A. Floris, S. de Gironcoli, and M. Cococcioni, Hubbard-corrected DFT energy functionals: The LDA+U description of correlated systems, International Journal of Quantum Chemistry 114, 14 (2014).
  * Cococcioni and de Gironcoli [2005] M. Cococcioni and S. de Gironcoli, Linear response approach to the calculation of the effective interaction parameters in the $\mathrm{LDA}+\mathrm{U}$ method, Phys. Rev. B 71, 035105 (2005).
  * Ivády  _et al._ [2014] V. Ivády, R. Armiento, K. Szász, E. Janzén, A. Gali, and I. A. Abrikosov, Theoretical unification of hybrid-DFT and $\text{DFT}+U$ methods for the treatment of localized orbitals, Phys. Rev. B 90, 035146 (2014).
  * Alling  _et al._ [2010a] B. Alling, T. Marten, and I. A. Abrikosov, Questionable collapse of the bulk modulus in CrN, Nature Materials 9, 283 (2010a).
  * Xian  _et al._ [2020] Y. Xian, H. Yin, Y. Bao, Y. Xiao, S. Yuan, N. U. Rahman, Y. Yuan, Y. Zhang, X. Meng, S. Jin, W. Li, and J. Fan, Engineered Electronic Structure and Carrier Dynamics in Emerging Cs2AgxNa1-xFeCl6 Perovskite Single Crystals, The Journal of Physical Chemistry Letters 11, 9535 (2020).
  * Radja  _et al._ [2022] K. Radja, B. L. Farah, A. Ibrahim, D. Lamia, I. Fatima, B. Nabil, A. Mohamed, Y. Al-Douri, and A. A. El-Rehim, Investigation of structural, magneto-electronic, elastic, mechanical and thermoelectric properties of novel lead-free halide double perovskite Cs2AgFeCl6: First-principles calcuations, Journal of Physics and Chemistry of Solids 167, 110795 (2022).
  * Gyorffy  _et al._ [1985] B. L. Gyorffy, A. J. Pindor, J. Staunton, G. M. Stocks, and H. Winter, A first-principles theory of ferromagnetic phase transitions in metals, Journal of Physics F: Metal Physics 15, 1337 (1985).
  * Alling  _et al._ [2010b] B. Alling, T. Marten, and I. A. Abrikosov, Effect of magnetic disorder and strong electron correlations on the thermodynamics of CrN, Phys. Rev. B 82, 184430 (2010b).
  * Blöchl [1994] P. E. Blöchl, Projector augmented-wave method, Phys. Rev. B 50, 17953 (1994).
  * Kresse and Furthmüller [1996] G. Kresse and J. Furthmüller, Efficiency of ab-initio total energy calculations for metals and semiconductors using a plane-wave basis set, Computational Materials Science 6, 15 (1996).
  * Kresse and Furthmüller [1996] G. Kresse and J. Furthmüller, Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set, Phys. Rev. B 54, 11169 (1996).
  * Kresse and Joubert [1999] G. Kresse and D. Joubert, From ultrasoft pseudopotentials to the projector augmented-wave method, Phys. Rev. B 59, 1758 (1999).
  * Perdew  _et al._ [2008] J. P. Perdew, A. Ruzsinszky, G. I. Csonka, O. A. Vydrov, G. E. Scuseria, L. A. Constantin, X. Zhou, and K. Burke, Restoring the density-gradient expansion for exchange in solids and surfaces, Phys. Rev. Lett. 100, 136406 (2008).
  * Dudarev  _et al._ [1998] S. L. Dudarev, G. A. Botton, S. Y. Savrasov, C. J. Humphreys, and A. P. Sutton, Electron-energy-loss spectra and the structural stability of nickel oxide: An lsda+u study, Phys. Rev. B 57, 1505 (1998).
  * Krukau  _et al._ [2006] A. V. Krukau, O. A. Vydrov, A. F. Izmaylov, and G. E. Scuseria, Influence of the exchange screening parameter on the performance of screened hybrid functionals, The Journal of Chemical Physics 125, 224106 (2006).
  * Dronskowski and Bloechl [1993] R. Dronskowski and P. E. Bloechl, Crystal orbital hamilton populations (COHP): energy-resolved visualization of chemical bonding in solids based on density-functional calculations, The Journal of Physical Chemistry 97, 8617 (1993).
  * Deringer  _et al._ [2011] V. L. Deringer, A. L. Tchougréeff, and R. Dronskowski, Crystal Orbital Hamilton Population (COHP) Analysis As Projected from Plane-Wave Basis Sets, The Journal of Physical Chemistry A 115, 5461 (2011).
  * Maintz  _et al._ [2013] S. Maintz, V. L. Deringer, A. L. Tchougréeff, and R. Dronskowski, Analytic projection from plane-wave and PAW wavefunctions and application to chemical-bonding analysis in solids, Journal of Computational Chemistry 34, 2557 (2013).
  * Nelson  _et al._ [2020] R. Nelson, C. Ertural, J. George, V. L. Deringer, G. Hautier, and R. Dronskowski, LOBSTER: Local orbital projections, atomic charges, and chemical-bonding analysis from projector-augmented-wave-based density-functional theory, Journal of Computational Chemistry 41, 1931 (2020).
  * Zunger  _et al._ [1990] A. Zunger, S.-H. Wei, L. G. Ferreira, and J. E. Bernard, Special quasirandom structures, Phys. Rev. Lett. 65, 353 (1990).
  * Popescu and Zunger [2012] V. Popescu and A. Zunger, Extracting $E$ versus $\vec{k}$ effective band structure from supercell calculations on alloys and impurities, Phys. Rev. B 85, 085201 (2012).
  * Medeiros  _et al._ [2014] P. V. C. Medeiros, S. Stafström, and J. Björk, Effects of extrinsic and intrinsic perturbations on the electronic structure of graphene: Retaining an effective primitive cell band structure by band unfolding, Phys. Rev. B 89, 041407 (2014).
  * Note [1] Using the default radius around the Fe atoms (RWIGS), as supplied by the VASP PAW potentials.
  * Zhao and Kulik [2018] Q. Zhao and H. J. Kulik, Where Does the Density Localize in the Solid State? Divergent Behavior for Hybrids and DFT+U, Journal of Chemical Theory and Computation 14, 670 (2018).
  * Ushakov  _et al._ [2011] A. V. Ushakov, S. V. Streltsov, and D. I. Khomskii, Crystal field splitting in correlated systems with negative charge-transfer gap, Journal of Physics: Condensed Matter 23, 445601 (2011).
  * Note [2] The AFM-I consists of spin-up and spin-down layers of Fe magnetic moments alternating in the z direction.
  * Wang  _et al._ [2021] Z. Wang, O. I. Malyi, X. Zhao, and A. Zunger, Mass enhancement in $3d$ and s-p perovskites from symmetry breaking, Phys. Rev. B 103, 165110 (2021).
  * Ji [2022] F. Ji, et al., In manuscript (2022).