Code Monkey home page Code Monkey logo

Comments (3)

leeping avatar leeping commented on July 23, 2024

Thanks for the issue report, you are correct that this line contains a mistake:

IC1 = self.IC.__class__(newmol, connect=self.IC.connect, addcart=self.IC.addcart, build=False, conmethod=self.IC.conmethod)

The context is that

  1. coordsys="prim" is mainly implemented for reference in geomeTRIC and is not as high-performing as other options such as coordsys="tric" or coordsys="dlc". Therefore it is recommended that you use the default coordinate system or one of the two latter options.

  2. The conmethod keyword refers to the algorithm for constrained optimization, and constrained optimizations are only possible when using coordsys="tric" or coordsys="dlc". The conmethod attribute does not exist in the other coordinate systems. Therefore, line 219 of optimize.py is a bug that causes errors only when using coordinate systems other than "tric" or "dlc". I missed this bug because I seldom use any coordinate system other than those two.

To fix the bug, you should be able to change the code to something like this:

IC1 = self.IC.__class__(newmol, connect=self.IC.connect, addcart=self.IC.addcart, build=False, conmethod=self.IC.conmethod if hasattr(self.IC, 'conmethod') else 0) 

It will first check to see if the conmethod attribute exists before using its value. If the attribute does not exist then it will use zero and the PrimitiveInternalCoordinates class should ignore it. You can submit a PR with this fix or I can fix it myself when I have a free moment.

Thanks,

  • Lee-Ping

from geometric.

jsjyhzy avatar jsjyhzy commented on July 23, 2024

Thank you for your comprehensive explanation, the PR #161 is submitted, and I thought this would be a little bit more elegant.

from geometric.

leeping avatar leeping commented on July 23, 2024

Thank you. :) I merged your changes. Thanks for your patience.

from geometric.

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.