Giter Club home page Giter Club logo

Comments (5)

peterspackman avatar peterspackman commented on August 20, 2024

I'm a bit confused with the errors there, my guess is that your pip is a different version of python than when you run python (i.e. the difference between running pip and python -m pip.

I'd double check this with seeing if which pip and which python point within the same conda environment

More broadly my apologies, I haven't updated the wheels on pypi yet as I've been rewriting the build system after there were changes with python 3.12.

Installing from the repository should work i.e.:

pip install git+https://github.com/peterspackman/chmpy

I'll get onto uploading the latest wheels when I can.

from chmpy.

satish-oo1 avatar satish-oo1 commented on August 20, 2024

from chmpy.

peterspackman avatar peterspackman commented on August 20, 2024
  1. I'll try and figure out why those dependencies aren't resolved properly. My guess is it's to do with packages that are already installed.
  2. I have updated the README to point to the correct file location.
  3. I'm not quite sure what you exactly mean here. So I'll break down as I think there's been some confusion:

Are you trying to generate fingerprint plots? I think you may have some wires crossed between what a Hirshfeld surface is as they are not the same thing (though they are related).

I'm going to assume this is the case as that's very likely. There's no builtin single method to do it, but an example is here:

from chmpy import Crystal
from chmpy.crystal.fingerprint import fingerprint_histogram, plot_fingerprint_histogram

# change to your crystal structure file
c = Crystal.load("src/chmpy/tests/test_files/acetic_acid.cif")

# the default separation is only 0.2, but for a histogram this is a bit sparse
# obviousl you can tweak it depending on your use case
surfaces = c.hirshfeld_surfaces(separation=0.1)
for i, surf in enumerate(surfaces):
    hist = fingerprint_histogram(surf)
    plot_fingerprint_histogram(hist, filename=f"surface_{i}.png")

Should look something like the below:

surface_0

Naturally you can tweak this however you want with number of bins, etc. just take a look at the code in src/chmpy/crystal/fingerpint.png it's pretty straightforward

If you're trying to generate an actual 2D Hirshfeld surface (more of an isoline) then there's no built in code to do that, but you'd just have to evaluate the StockholderWeight function along the plane of interest.

As for the second part, there is no QM engine scripted in here? There's nothing really QM about the Hirshfeld surface, $d_e$, $d_i$ etc. The surfaces is done using the promolecule approximation i.e. sum of non-interacting spherical atoms and always has been. It's fine to use whatever CIF you wish to make surfaces for.

Also keep in mind if you're not doing this for molecules (or molecular crystals) you'll have to dig into the machinery a bit more as the convenience methods are only available for atomic environments or molecular environments.

from chmpy.

peterspackman avatar peterspackman commented on August 20, 2024

Also just saw you specifically wanted atom type breakdowns. There's no built in code to do that easily, but it's not too hard so if it's important I can make it easier when I get time.

It's completely possible to do with the existing code, you'd just have to dig in a bit beyond the convenience methods.

from chmpy.

satish-oo1 avatar satish-oo1 commented on August 20, 2024

from chmpy.

Related Issues (4)

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.