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)
- Check inputs provided to MPRester functions
- `.as_dict()` method on `VaspInput` causes an `AttributeError`
- A minor document error in `POTCAR Setup`.
- Incorrect letter cases for memory in `core.units`
- GaussianOutput.read_excitation_energies() method for obtaining TDDFT results ([(energie (eV), lambda (nm), oscillatory strength), ... ]) error
- Adapt LobsterSets to latest potcars
- Support parsing of NBANDS from a VASP OUTCAR file
- determine crystal space group error
- Incorrect SpaceGroup symbol attribute for 16 space group types HOT 7
- Why does OUTCAR only parse the final magnetic moments? HOT 1
- Species.full_electronic_structure is incorrect HOT 2
- electronic_structure energy ordering is incorrect HOT 1
- Slab termination in coherent_interfaces.py
- TypeError: deprecated() got an unexpected keyword argument 'deadline' HOT 5
- [CI] All unit tests failing perhaps related to lastest `chgnet` 0.3.7 release HOT 1
- Breaking change in "POTCAR" info with recent changes to `VaspInput` HOT 7
- Add from_space_group() class method to PointGroup
- SpaceGroup object init and string representation issues for space group types with screw axes in non-standard settings HOT 3
- Documentation inconsistent with code for Composition._get_oxi_state_guesses
- Missing structure files HOT 9
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.