Skip to content

Commit

Permalink
wip: fixing Co2O3
Browse files Browse the repository at this point in the history
  • Loading branch information
maurov committed Aug 9, 2023
1 parent 22ad257 commit 7a8834b
Showing 1 changed file with 7 additions and 32 deletions.
39 changes: 7 additions & 32 deletions larch/xrd/struct2xas.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ def _get_idx_struct(sym_site):

# Get multiples sites for absorber atom
for idx, sites in enumerate(sym_struct.equivalent_sites):
sites = sorted(
sites, key=lambda s: tuple(abs(x) for x in s.frac_coords)
)
#sites = sorted(
# sites, key=lambda s: tuple(abs(x) for x in s.frac_coords)
#)
site = sites[0]
abs_row = [idx, site.species_string]
abs_row.append([j for j in np.round(site.frac_coords, 4)])
Expand Down Expand Up @@ -341,32 +341,7 @@ def _get_idx_struct(sym_site):
return abs_sites

def get_abs_sites_info(self):
"""Get abs sites info and return pandas.DataFrame.
return pandas.DataFrame:
> idx_abs: The absorber index is the index that identifies the absorber site.
To change the absorber site being analyzed, the absorber index must
be set using the method set_abs_site().
> specie: The specie for absorber sites.
> frac_coords.: Fractionnal coodinatite position for absorber sites.
If the structure was created using xyz file, the frac. coords. are
arbitrary and the lattice param are is a=b=c=1
> wyckoff_site: Wyckoff site for absorber sites. For structures created from xyz
files, Wyckoff sites are always equal to 1a. (No symmetry)
> cart_coords: Cartesian coordinate position for absorber sites.
> occupancy: Occupancy for absorber sites. For structures created from xyz files,
occupancy are always equal to 1.
> idx_struct: Original index for absorber atoms in pymatgen structure. (Not necessary
for public methods)
"""
"""pretty print for self.get_abs_sites()"""
header = ["idx_abs", "specie", "frac_coords", "wyckoff_site", "cart_coords", "occupancy", "idx_in_struct"]
abs_sites = self.get_abs_sites()
if HAS_PANDAS:
Expand Down Expand Up @@ -765,9 +740,9 @@ def make_input_fdmnes(

unique_sites = []
for sites in analyzer.get_symmetrized_structure().equivalent_sites:
sites = sorted(
sites, key=lambda s: tuple(abs(x) for x in s.frac_coords)
)
#sites = sorted(
# sites, key=lambda s: tuple(abs(x) for x in s.frac_coords)
#)
unique_sites.append((sites[0], len(sites)))
sites = str()
if self.full_occupancy:
Expand Down

0 comments on commit 7a8834b

Please sign in to comment.