sitator.misc package¶
sitator.misc.oldio module¶
-
sitator.misc.oldio.from_file(file)¶ Load a SiteNetwork from a tar file/file descriptor.
-
sitator.misc.oldio.save(sn, file)¶ Save this SiteNetwork to a tar archive.
Module contents¶
-
class
sitator.misc.GenerateAroundSites(n, sigma)¶ Bases:
objectGenerate
nnormally distributed sites around each site.Parameters: - n (int) – How many sites to produce for each input site.
- sigma (float) – Standard deviation of the spatial Gaussian.
-
run(sn)¶
-
class
sitator.misc.GenerateClampedTrajectory¶ Bases:
objectCreate a real-space trajectory with the fixed site/static structure positions.
Generate a real-space trajectory where the atoms are clamped to the fixed positions of the current site/their fixed static position.
Parameters: - wrap (bool) – If
True, all clamped positions will be in the unit cell; ifFalse, the clamped position will be the minimum image of the clamped position with respect to the real-space position. (This can generate a clamped, unwrapped real-space trajectory from an unwrapped real space trajectory.) - pass_through_unassigned (bool) – If
True, when a mobile atom is supposed to be clamped but is unassigned at some frame, its real-space position will be passed through from the real trajectory. If False, an error will be raised.
-
run¶ Create a real-space trajectory with the fixed site/static structure positions.
Generate a real-space trajectory where the atoms indicated in
clamp_mask– any mixture of static and mobile – are clamped to: (1) the fixed position of their current site, if mobile, or (2) the corresponding fixed position in theSiteNetwork’s static structure, if static.Atoms not indicated in
clamp_maskwill have their positions fromreal_trajpassed through.Parameters: clamp_mask (ndarray, len(sn.structure)) – Returns: ndarray (n_frames x n_atoms x 3)
- wrap (bool) – If
-
class
sitator.misc.NAvgsPerSite(n, error_on_insufficient=True, weighted=True)¶ Bases:
objectGiven a
SiteTrajectory, return aSiteNetworkcontaining n avg. positions per site.The
site_typesof sites in the output are the index of the site in the input that generated that average.Parameters: - n (int) – How many averages to take
- error_on_insufficient (bool) – Whether to throw an error if n points cannot be provided for a site, or just take all that are available.
- weighted (bool) – Use
SiteTrajectoryconfidences to weight the averages.
-
run(st)¶ Parameters: st (SiteTrajectory) – Returns: A SiteNetwork.