Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Methods for converting to Pandas Dataframes (#524)
* add base functions for converting to dataframes * update atomtypes_to_dataframes so it can handle labels that need to be split at a '.' * add functions for plotting connection parameters * add docstrings for unit conversions, create a function that includes specified labels in the dataframes objest * apply black * add associated unyt tests * remove unused variable * fix charge output from bonds * Add unit tests for labels with a and parameter sites * fix bug with testing charges read into pandas df * update position values used in test__pandas_df * delete changes brought in for networkx visualization PR * fixes for testing bugs * delete requirements-test.txt * add generalization for parameters in different bonds, angles, dihedrals. Also, add a unyts_bool flag to allow someone to output numeric quantities as unyt quantities or floats * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * change function name from to_datatables to data_frame * address reviews and add a few modular functions to break up into smaller bits. Add improper support * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update gmso/core/topology.py Co-authored-by: Umesh Timalsina <umesh.timalsina@vanderbilt.edu> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use unyt_to_dict to handle printing units in tables * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix units on charge conversions * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * allow for optional pandas dependency * replace labels argument for to_dataframes function with site_attrs to make it more clear what is being output to the dataframe * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix bug in gmso/tests/test_topology.py test_to_dataframe * remove has_pandas import in test_topology.py * Push import_ for soft import of pandas directly into to_dataframe function within topology.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update gmso/tests/test_topology.py Co-authored-by: Umesh Timalsina <umesh.timalsina@vanderbilt.edu> * Add pandas dependency to environment-dev.yml for testing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * replace missing code in index connections function. * Update gmso/core/topology.py Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Suggestion from Co for reduction in code repeats Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use f string formatting Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * f string formatting Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * f string formatting Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * f string formatting Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * f string formatting Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> * Fixes for more f-string formatting, added default unit registry for conversion of elementary_charge units * Add tests for unit registry module adding new unit values * fixes to default registry calls --------- Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Justin Gilmer <justin.b.gilmer@vanderbilt.edu> Co-authored-by: Umesh Timalsina <umesh.timalsina@vanderbilt.edu>
- Loading branch information