{'fraction_non_alphanumeric': 0.016923076923076923, 'fraction_numerical': 0.0, 'mean_word_length': 5.320388349514563, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Full canonical information from grand-potential density-functional theory.

We present a general and formally exact method to obtain the canonical one-body density distribution and the canonical free energy from direct decomposition of classical density functional results in the grand ensemble. We test the method for confined one-dimensional hard-core particles for which the exact grand potential density functional is explicitly known. The results agree to within high accuracy with those from exact methods and our Monte Carlo many-body simulations. The method is relevant for treating finite systems and for dynamical density functional theory.