Git Product home page Git Product logo

mcpoly's Introduction

MCPoly

Some methods to deal with some manipulation of computational chemistry, mostly about mechanical properties of polymers.

Overview

MCPoly is a Python library to make some steps of computational chemistry easier. It includes some functions of drawing molecule structures, creating proper .xyz , .inp , .mol and .data file, which specialised for using ORCA and LAMMPS, and some functions for researching the mechanical property of some polymers.

Updated in v0.3.3 (26.05.23)

Fix some bugs about 'moldraw'.

Updated in v0.3.0 (19.05.23)

  1. BIG UPDATE: Now status package can be used to see energy and gibbs free energy by .energy and .gibbs.
  2. BIG UPDATE: The new Reaction Diagram GUI is included in this package. You can use it to merge some tables and sea the relevant reaction diagram as a reference.

3. Fix some bugs about availability of Stress-Strain Curve Output.

Updated in v0.2.1 (16.05.23)

  1. BIG UPDATE: Add GUI ORCA setting screens for multiple ORCA calculations and Stress-Strain Curve Output. You can use orca.mgui and sscurve.gui to learn more.
  2. BIG UPDATE: MCPoly.vis is created. Use MCPoly.vis() to directly show all four GUI screen.

3. Fix some bugs on mechanical calculations and stress-strain curve drawings.

Updated in v0.1.0 (11.05.23)

  1. BIG UPDATE: Add GUI ORCA setting screens for normal ORCA calculations and Mechanical ORCA calculation. You can use orcaset.gui and orcaset.ssgui to learn more.

2. Fix some bugs on mechanical calculations and stress-strain curve drawings.

Functions for ORCA

orcaset

Used to create ORCA input files and run it on ORCA. It's especially handy for researching mechanical property of polymers.

status

Because we can't use ORCA to visualize the geometry structure, this command can be used to see the optimisation status and the trait of geometry structure.

view3d

See the 3D structure of a normal .xyz file.

sscurve

With calculated .xyz file, we can draw the stress-strain curve of each polymer, and we can also calculate the Young's modulus of relevant polymers.

moldraws (Under Construction)

Used to build a simple molecule and save it under .xyz form.

Functions for LAMMPS

lmpset

Used to draw special patterns of polymers. Mostly in grids.

Installation

To get MCPoly, you can install it with pip: $ pip install MCPoly

If you want to get the latest version of MCPoly, you can see the latest release here:

https://github.com/Omicron-Fluor/MCPoly/release

There will be a corresponding release on pip for each release on GitHub, and you can update your MCPoly with:

$ pip install MCPoly --upgrade

How to cite

https://github.com/Omicron-Fluor/MCPoly

Outlook

We will add some new function about polymers based on ReaxFF.

mcpoly's People

Contributors

omicron-fluor avatar

Watchers

Warrick Ball avatar  avatar

Forkers

mkappas

mcpoly's Issues

A collection of issues that the RSG has identified

Hi. We are members of the Research Software Group within the Advanced Research Computing team at the University of Birmingham and, as part of an on-going project, we were requested to review the MCPoly repository and report any issues. Please find below a list of the things that we've identified:

  • It is not clear how to start the application. Based on the screenshots we found that you can run
     from MCPoly import vis
     vis()
    
    but this doesn't work from a python shell, where we get:
         Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "PATHTO/MCPoly/vis/vis.py", line 46, in vis
     gui1()
    File "PATHTO/MCPoly/vis/../orcaset/gui.py", line 289, in gui
     display(widgets.HBox([frame1,output,output2]))
     NameError: name 'display' is not defined
    
    Maybe we are missing a from IPython.display import display or this is not the intended way to use the app. Some instructions in the README would be useful to the user.
  • From the same screenshots it seems that you are using the library from within a jupyter notebook. However, jupyter was not installed automatically from the requirements file as it is not included and also it is not a dependency of the other packages. You might want to include jupyterlab in the requirements.txt file, depending on how you want users to use the software.
  • The MCPoly release link from the Installation section doesn't work. It seems that you are missing an "s" in the end (should be releases not release). Even when you add it though, the releases is empty.
  • The How to cite just gives a link to the repo with no instructions on how to actually cite the repo and more info about the authors etc. Maybe adding a CITATION.cff file will help those who want to properly cite the software.
  • The MANIFEST.in file contains include src/MCPoly/* but there is no src/ directory in the repo. This is probably a remnant from older versions.
  • Code doesn't adhere to any specific style guide (see PEP8). For example, there are various if sth == True instead of the proper for Python if sth, there are no spaces after commas, no spaces before and after comparison operators, long lines, etc. There are many code formatters and linters that can help with this, and the most popular for Python are flake8, black and pylint.
  • pytest is also not in the requirements file. You might want to create a requirements-test.txt file and not add it in the main requirements file.
  • The only way to run the tests is from the parent of the root repo directory, with pytest MCPoly/tests because of various hardcoded relative paths in the form ./MCPoly/tests/.... Also, the tests return a few deprecation warnings.
  • A CI pipeline, using GitHub Actions, that will automatically run the code formatters/linters and the tests, for the Pull Requests or commits in the main branch, would really help with further developing the applications and more easily identifying bugs.
  • tests/__pycache__ shouldn't be committed and pushed to git. It will help a lot if you include a .gitignore file (one that works well for Python projects can be found here).
  • The version on PyPI do not match those on GitHub. For example, currently the latest version on PyPI is 0.5.1.3, released on 29/6/2023 but there is no branch nor release on GitHub that matches this version. Actually, there are no releases at all on GitHub. There are three branches though, a main, a 0.4.0 and a 0.5.0. However, those don't seem to match any of the versions on PyPI either. Furthermore, GitHub was last edited on 2/6/2023 but PyPI get continuously updated and it is not clear where those version are coming from. Finally, the 0.5.0 branch on GitHub is 11 commits ahead and 14 commits behind main.
  • There is a bug with how you call the orca executable. In the MCPoly/MCPoly/orcaset/orca.py module, in the definition of the orca() function there is the orcaloc input argument with a default value of './'. Later in the code if orcaloc=='./' then you call orca with its input arguments. However, since there is no ./ before the executable name, this means that the system launches the orca that is found in $PATH, which is not the intended behaviour. Furthermore, orca is also the screen reader in many Linux distributions that use the Gnome desktop environment, which means that this is launched instead of the orca from https://www.orcasoftware.de (this is actually what happened in one of the systems that we've tested the code from).

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.