Giter VIP home page Giter VIP logo

pqanalysis's Introduction

PQAnalysis

CI Docs codecov License: MIT

The main purpose of this package is to provide useful tools for the analysis of the Molecular Dynamics software package PQ. Furthermore, the intent of this package is to enable straightforward implementations of newly developed analysis tools on top of the provided API.

The future development of this package focuses on two main goals. On the one hand the enhancement of the provided analysis tools and extending its API to be compatible with many other different Molecular Dynamics engines. As this project is only a hobby project of the maintainers, any contributions considering enhancement or bug fixes are highly welcomed.

pqanalysis's People

Contributors

97gamjak avatar galjos avatar github-actions[bot] avatar claryamy avatar

Stargazers

Stefanie Kröll avatar  avatar

Watchers

 avatar Stefanie Kröll avatar

Forkers

stkroe

pqanalysis's Issues

Add box reader

BoxReader for .box file. Needed in PQEnalyzer box plotting feature.

Add pylint as dependency?

Pylint is not set as a dependency. You have to install it manually. Should it be a dependency at all?

Test empty rule Handling of all readers

BaseReader does not check for empty files. In my opinion, since function such as calculate_number_of_frames fail when files are empty, I would raise an Exception to ensure that the function to work properly.

Throw error when wrong input

I did not enter the log file name after the --log-file flag:

$ build_nep_traj zif8-md-03 zif8-md-06 zif8-md-09 --use-forces --use-virial -o zif8_out.traj --log-file --total-ratios 80:10:10 

***header ***

Traceback (most recent call last):
  File "/home/bre/.conda/envs/pq/bin/build_nep_traj", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/bre/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/cli/build_nep_traj.py", line 82, in main
    writer = NEPWriter(filename=args.output, mode=args.mode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<@beartype(PQAnalysis.io.nep.NEPWriter.NEPWriter.__init__) at 0x7fa4223cc5e0>", line 59, in __init__
  File "/home/bre/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/io/nep/NEPWriter.py", line 55, in __init__
    self.logger = setup_logger(self.logger)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bre/.conda/envs/pq/lib/python3.12/site-packages/PQAnalysis/utils/custom_logging.py", line 47, in setup_logger
    print_header(stream=file)
TypeError: print_header() got an unexpected keyword argument 'stream'

Maybe provide a more detailed error description or check if string of log file is given.

Rewrite frame_generator

Build a more efficient version of frame_generator:

  • Directly skip the non-indexed frames
  • Build benchmark for this method

PyTest not working in dev

Describe the bug
pytest does not start in dev, since it could not recognize arguments.

To Reproduce
Steps to reproduce the behavior:

  • Clean environment with Python 3.12.3: python -m venv venv
  • Activate env: source venv/bin/activate
  • Install project: pip install .
  • Try testing: pytest (Maybe add as depedency, for easy use)
$ pytest
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --cov=PQAnalysis --cov-report=html
  inifile: /home/jog/projects/PQAnalysis/pytest.ini
  rootdir: /home/jog/projects/PQAnalysis

Expected behavior
Should result in test execution.

Extend FrameReader to be only a special case of a base class

Is your feature request related to a problem? Please describe.
In order to read in multiple file formats it would really make sense to have multiple subclasses from FrameRead to make it much cleaner implementationwise. So depending on the input the TrajectoryReader class can decide which one to call.

Molecular selection for the use of the center of mass as target in the MSD

Is your feature request related to a problem? Please describe.
The MSD routine would need a possibility to choose the center of mass of a molecule as a target.

Describe the solution you'd like
The grammar could be adapted for molecular selection.

Additional context
If it is possible to select by molecules e.g. H 2 the center of mass can be used as target. The selection is using AtomicSystem which can call the property center of mass.

Reraise Beartype Exceptions

Is your feature request related to a problem? Please describe.
The beartype exceptions are quiet difficult to read and in general not applicable for API usage. Therefore, it would be best to catch them on package level and reraise them.

Describe the solution you'd like
sys.excepthook

Nep needs uppercase atom names

Since nep needs uppercased atom names build_nep_traj should generate output including the atomnames as their uppercase version.

To Reproduce
Run nep with test.xyz and train.xyz files with unchanged output files from build_nep_traj. Generates an input error when trying to read train.xyz

Combine CLIs

Combine all the CLIs into a single pq CLI that would allow the different tools to be called from a single tool. This way users can see the different tools that have been built into the project.

Logger Stacktrace

Describe the bug
Logger printing stacktrace for type checking.

To Reproduce

from PQAnalysis.analysis import RDF

RDF(1,1,1)

Expected behavior
If environment variable PQANALYSIS_BEARTYPE_LEVEL is not set to DEBUG it shouldn't print any stacktrace

Energy should contain base-filename

Energy should, in my opinion, contain the base name of the original energy_filename, so that it can be distinguished from other Energy classes

Implement ExtXYZ Reader

Describe alternatives you've considered
Use either ase as dependency or custom frame reader

Window Frames Generator from File

Is your feature request related to a problem? Please describe.
In order to work with large trajectories that do not fit into the RAM, as window generator function directly from a trajectory would be really helpful.

Describe the solution you'd like
Add new method to TrajectoryReader, which calls the frame_generator method.

Units package

Is your feature request related to a problem? Please describe.
There are some unit package out there. Haven't had the time to test them all.
But the units handling is still to much hardcoding at the moment.

Describe the solution you'd like
Either find a nice external package or build one specialized for PQAnalysis

RDFLogFile

Is your feature request related to a problem? Please describe.
Rewrite RDFLogfile with a logger to make output format consistent

Describe the solution you'd like
Probably the best way would be to implement a new logger for all analysis submodukes to maje output of PQanalysis consistent

Describe alternatives you've considered
maybe inherit from a AnalysisLogFilelogger to customize RDFlogFile writing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.