Coder Social home page Coder Social logo

Comments (3)

jameskermode avatar jameskermode commented on August 19, 2024

I just started trying to fix this and it's not obvious how to proceed. We can't simply convert all 6-element vectors to 3x3 matrices on reading, as the Voigt convention for off-diagonal entries differs by a factor of two between stresses and strains, so we'd have to make some assumptions from the name of the key about how to convert the corresponding value. We could convert keys starting with (or containing?) "stress" as stresses and those starting with or containing strain as strains?

Alternative is to change the ASE writer to always write 3x3 matrices. I think this is probably a better solution.

Second part of request is fixed in commit 7b1e2f2, pushed to gc121repo and should make it to github overnight tonight.

from quip.

noambernstein avatar noambernstein commented on August 19, 2024

On Aug 12, 2015, at 10:05 AM, James Kermode [email protected] wrote:

I just started trying to fix this and it's not obvious how to proceed. We can't simply convert all 6-element vectors to 3x3 matrices on reading, as the Voigt convention for off-diagonal entries differs by a factor of two between stresses and strains, so we'd have to make some assumptions from the name of the key about how to convert the corresponding value. We could convert keys starting with (or containing?) "stress" as stresses and those starting with or containing strain as strains?

Alternative is to change the ASE writer to always write 3x3 matrices. I think this is probably a better solution.

I think this latter choice makes sense. From ASE's point of view, the stress is a special variable, not just some random field. In the same way that you had to pick particular field names for the other quantities, it's reasonable to assert that in extxyz the stress is 3x3 and called "stress", and promote it from ASE's 6x1 to 3x3 upon writing.

Thanks.
Noam

from quip.

jameskermode avatar jameskermode commented on August 19, 2024

Fix committed to ASE trunk - https://trac.fysik.dtu.dk/projects/ase/changeset/4654

from quip.

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.