Comments (5)
Thanks for raising the issue.
Could you be a bit more specific on the output that you get? For example, if you are using the cation-anion modus in the analysis, I would expect the anion neighbor lists to be empty.
from pymatgen.
Hello. I am using all the default settings of the ChemEnv module. This error also occurs for cations. For example in the code below, ChemEnv shows an empty list for the site 2, which is Na atom:
from pymatgen.core.structure import Structure
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import LocalGeometryFinder
from pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies import SimplestChemenvStrategy, MultiWeightsChemenvStrategy
from pymatgen.analysis.chemenv.coordination_environments.structure_environments import LightStructureEnvironments
cif_file='030a7f2455.CIF'
structure = Structure.from_file (cif_file)
lgf = LocalGeometryFinder()
lgf.setup_parameters(centering_type="centroid", include_central_site_in_centroid=True)
lgf.setup_structure(structure=structure)
se = lgf.compute_structure_environments(maximum_distance_factor=1.41)
strategy = MultiWeightsChemenvStrategy.stats_article_weights_parameters()
lse = LightStructureEnvironments.from_structure_environments(strategy=strategy, structure_environments=se)
species = {}
for i in range(len(lse.as_dict()['structure']['sites'])):
species[i] = (lse.as_dict()['structure']['sites'][i]['label'])
print (species)
print (lse.coordination_environments[2])
from pymatgen.
Will need to check in more detail.
My ideas:
- remove "maximum_distance_factor" to see what happens
- check what happens if you look at all bonds instead of cation-anion ones.
from pymatgen.
If you provide the valences with the bond valence analyser, everything works as expected:
from pymatgen.core.structure import Structure
from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import LocalGeometryFinder
from pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies import SimplestChemenvStrategy, \
MultiWeightsChemenvStrategy
from pymatgen.analysis.chemenv.coordination_environments.structure_environments import LightStructureEnvironments
from pymatgen.analysis.bond_valence import BVAnalyzer
cif_file = '030a7f2455.CIF'
structure = Structure.from_file(cif_file)
bva = BVAnalyzer()
valences = bva.get_valences(structure)
lgf = LocalGeometryFinder()
lgf.setup_structure(structure=structure)
se = lgf.compute_structure_environments(valences=valences)
strategy = MultiWeightsChemenvStrategy.stats_article_weights_parameters()
lse = LightStructureEnvironments.from_structure_environments(strategy=strategy, structure_environments=se)
for isite, (site,ce) in enumerate(zip(structure, lse.coordination_environments)):
if ce is not None:
print(site.species_string+str(isite)+': '+str(ce[0]["ce_symbol"]))
ChemEnv cannot deal with coordination numbers larger 13. The coordination numbers get larger 13 if you consider all bonds.
Output from the code above is:
Na0: DDPN:8
Na1: DDPN:8
Na2: BO_2:8
Na3: T:6
Na4: BO_2:8
Na5: DDPN:8
Na6: T:6
Na7: DDPN:8
Na8: T:6
Na9: BO_2:8
Na10: BO_2:8
Na11: T:6
Eu12: SBT:8
Eu13: SBT:8
Eu14: SBT:8
Eu15: SBT:8
B16: TL:3
B17: TL:3
B18: TL:3
B19: TL:3
B20: TL:3
B21: TL:3
B22: TL:3
B23: TL:3
from pymatgen.
I think it is resolved. I am therefore closing the issue. Let me know if there are further issues.
from pymatgen.
Related Issues (20)
- POTCAR setting problem HOT 1
- Bug in `ResWriter._ions_from_sites` in `pymatgen.io.res` HOT 5
- get_pmg_structure returns magnetic moments under site_properties key "magnetic_moments" instead of "magmom" HOT 2
- Create monolayer MoS2 from the bulk.
- Has the `CoherentInterfaceBuilder` class considered the issue of deduplication for equivalent structures?
- [Dev] Multiple dependencies for CI missing HOT 5
- Fatband plot with lobster: not only vasp should be supported
- Ion.oxi_state_guesses fails for 'Br' or 'Br(aq)'
- [Dev] Unify all docstrings to Google-Styled HOT 2
- All the Potentials are not written properly HOT 4
- adding structure's MP ID to web site structure export files HOT 2
- Incorrect Parsing of OSZICAR with VASP 6.3.2
- printing labels from PeriodicSite in cif file
- [Dev] Some methods do not have proper types or names HOT 2
- Default settings of `Structure.relax()` fails to synchronize tensor locations (CPU/GPU) on GPU-enabled environments HOT 1
- Unexpected Tokenizing error when using `parse_lammps_dumps`
- The inconsistent results when finding the transformatoin matrix between two space groups using StructureMatcher and Bilbao Crystallographic Server IDENTIFY GROUP. HOT 5
- Duplicate atom generated with Structure.from_spacegroup
- KPOINTS_OPT based one-shot calculation input files generation and the corresponding post-processing. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymatgen.