Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to switch off print of ChemEnv citation #2448

Merged
merged 4 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"Statistical analysis of coordination environments in oxides",
Chem. Mater., 2017, 29 (19), pp 8346–8360,
DOI: 10.1021/acs.chemmater.7b02766
D. Waroquiers, J. George, M. Horton, S. Schenk, K. A. Persson, G.-M. Rignanese, X. Gonze, G. Hautier
"ChemEnv: a fast and robust coordination environment identification tool",
Acta Cryst. B 2020, 76, pp 683–695,
DOI: 10.1107/S2052520620007994
"""

__author__ = "David Waroquiers"
Expand Down Expand Up @@ -376,12 +380,18 @@ def __init__(
debug_level=None,
plane_safe_permutations=False,
only_symbols=None,
print_citation=False,
):
"""
Constructor for the LocalGeometryFinder, initializes the list of coordination geometries
:param permutations_safe_override: If set to True, all permutations are tested (very time-consuming for large

Args:
permutations_safe_override: If set to True, all permutations are tested (very time-consuming for large
coordination numbers!)
:param plane_ordering_override: If set to False, the ordering of the points in the plane is disabled
plane_ordering_override: If set to False, the ordering of the points in the plane is disabled
debug_level: decides the level of debugging
permutations_safe_override: Whether to use safe permutations.
only_symbols: Whether to restrict the list of environments to be identified.
print_citation: If True, the ChemEnv citation will be printed
"""
self.allcg = AllCoordinationGeometries(
permutations_safe_override=permutations_safe_override,
Expand All @@ -396,7 +406,8 @@ def __init__(
bva_distance_scale_factor=None,
structure_refinement=self.STRUCTURE_REFINEMENT_NONE,
)
print(chemenv_citations())
if print_citation:
print(chemenv_citations())

def setup_parameters(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def setUp(self):
centering_type="standard",
structure_refinement=self.lgf.STRUCTURE_REFINEMENT_NONE,
)
self.lgf2 = LocalGeometryFinder(print_citation=True)

# self.strategies = [SimplestChemenvStrategy(), SimpleAbundanceChemenvStrategy()]

Expand Down
9 changes: 7 additions & 2 deletions pymatgen/analysis/chemenv/utils/defs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
)

STATS_ENV_PAPER = (
"David Waroquiers, Xavier Gonze, Gian-Marco Rignanese, Cathrin Welker-Nieuwoudt, Frank Rosowski,\n"
"Michael Goebel, Stephan Schenk, Peter Degelmann, Rute Andre, Robert Glaum, and Geoffroy Hautier,\n"
"D. Waroquiers, X. Gonze, G.-M. Rignanese, C. Welker-Nieuwoudt, F. Rosowski,\n"
"M. Goebel, S. Schenk, P. Degelmann, R. Andre, R. Glaum, and G. Hautier,\n"
'"Statistical analysis of coordination environments in oxides",\n'
"Chem. Mater., 2017, 29 (19), pp 8346-8360,\n"
"DOI: 10.1021/acs.chemmater.7b02766\n"
"\n"
"D. Waroquiers, J. George, M. Horton, S. Schenk, K. A. Persson, G.-M. Rignanese, X. Gonze, G. Hautier,\n"
'"ChemEnv: a fast and robust coordination environment identification tool",\n'
"Acta Cryst. B 2020, 76, pp 683–695\n."
"DOI: 10.1107/S2052520620007994\n"
)


Expand Down