Skip to content

typo and inaccurate description in docstrings of pymatgen.analysis.ferroelectricity.polarization module #4644

@QuantumUniversesSteel

Description

@QuantumUniversesSteel

Hi maintainers, thanks for this great library! While reading through the source I noticed a couple of minor documentation issues in src/pymatgen/analysis/ferroelectricity/polarization.py.

1. Typo in docstring

Location: In docstring for get_nearest_site [Link to L119]

Given coords and a site, find closet site to coords.

"closet""closest"

2. Docstring describes center and tiny parameters that does not exist

Location: In docstring for get_total_ionic_dipole [Link to L97-L104]

def get_total_ionic_dipole(structure, zval_dict):
"""Get the total ionic dipole moment for a structure.
structure: pymatgen Structure
zval_dict: specie, zval dictionary pairs
center (np.array with shape [3,1]) : dipole center used by VASP
tiny (float) : tolerance for determining boundary of calculation.
"""

The docstring mentions center and tiny arguments, but the function signature and implementation do not include it.

If the feature was intentionally removed, the docstring should probably be updated to avoid confusion. If it's planned for a future release, maybe a comment would help clarify the status.

(I'm not in a position to open a PR for this right now, but I wanted to flag it in case it's helpful.)

Thanks again for your work on this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions