Coder Social home page Coder Social logo

Comments (7)

FarnazH avatar FarnazH commented on June 15, 2024

@matt-chan, there is no Orbital class in iodata at this point, is there? I think this is relevant to the other thread regarding Orbital package vs. class.

from iodata.

matt-chan avatar matt-chan commented on June 15, 2024

Sorry for the delay @FarnazH. No, there's no orbital class right now. But even to instantiate an Orbital instance from meanfield or from another orbital package, it's too clunky I think. We should instead give it all the parameters needed as a dictionary. Right now a developer would need to use the first code-block just to create an orbital instance.

from iodata.

tovrstra avatar tovrstra commented on June 15, 2024

Re-introducing an Orbital class is certainly an option, but it should remain focussed on facilitating IOData, not too many adding computational features. I would suggest to have one class, with possibly two instances, one for alpha and one for beta orbitals. I still need to figure out how to make it the most convenient for chemtools and denspart.

from iodata.

tovrstra avatar tovrstra commented on June 15, 2024

Here is a new proposal: one mo attribute in IOData that is flexible enough to handle different cases (restricted, unrestricted, generalized, open-/closed-shells)

mo is an instance of type namedtuple('MolecularOrbitals', ['type', 'norba', 'norbb' 'energies', 'occupations', 'irreps', 'coefficients'])

where

  • type is any of 'generalized', 'restricted', 'unrestricted'.
  • norba and norbb are the number of alpha and beta orbitals. These can be set to None in case of generalized. In case of restricted (open or closed) these are always the same. In case of unrestricted, they may (but not must) be different.
  • energies is an array of orbital energies, with shape (norb,).
  • occupations is an array with occupation numbers, with shape (norb,). Normally in the range [0, 1], but can be [0, 2] for restricted.
  • irreps is a list of strings describing the irrep to which each orbital belongs, with length (norb,)
  • coefficients one array with orbital coefficients, with shape (nbasis, norb). Rows corresponding to basis functions and columns corresponding to orbitals. The number of rows equals the number of spatial basis functions, except for generalized where it is twice as large (once for alpha and once for beta). The number of columns equals the number of orbitals. In case of unrestricted, norb=norba+norbb, and all alpha orbitals come first, followed by the beta orbitals. In case of restricted, norb=norba=norbb. In case of generalized, norb just is what it is.

from iodata.

tovrstra avatar tovrstra commented on June 15, 2024

@FarnazH This is currently partially implemented. Do you have additional work on this in a local branch? If not, I could tackle this in the next few days.

from iodata.

FarnazH avatar FarnazH commented on June 15, 2024

@tovrstra I had a few small local commits and considering all the recent updates, there is nothing sitting there that isn't fully covered. Thanks for checking with me.

from iodata.

tovrstra avatar tovrstra commented on June 15, 2024

Fixed in #76.

from iodata.

Related Issues (20)

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.