Code Monkey home page Code Monkey logo

Comments (4)

acrobat118 avatar acrobat118 commented on August 27, 2024 1

Thank you very much for your quick reply and help. I figured out the problem. Issue was not with my loops or calling of atomic masses as I posted in question. I was allocating less space than required to an array. But thanks for your help and above all, again much thanks for posting these learning projects.

from programmingprojects.

bgpeyton avatar bgpeyton commented on August 27, 2024

Hi @acrobat118 , where specifically are you having a problem? We generally try not to share too many extra code snippets, as we encourage people to use their own style.

Have you reshaped the Hessian matrix properly?

from programmingprojects.

acrobat118 avatar acrobat118 commented on August 27, 2024

Actually, I am using FORTRAN for these projects. I read the Hessian and trying to convert each element into mass-weighted inside the reading loop. I could not figure out the sequence of masses mi and mj to be used for each element. I am able to get all elements of mass-weighted correct except elements of row 5 (i.e. 51, 52, 53 ...... 59) for water example. Your solutions tips are very helpful but unfortunately I do not have solution code for this step. Your help will be much appreciated.

from programmingprojects.

bgpeyton avatar bgpeyton commented on August 27, 2024

I don't have any FORTRAN code snippets on hand, but perhaps let's take a look at an example from your problem row to start off.

When building your (square) Hessian, how have you ordered your row/columns? You should have, e.g., 9 rows/columns for water, where a row keeps the first derivative constant and the second derivative varies (x1x1, x1y1, x1z1, x1x2, x1y2, x1z2, etc). You then have natom such rows, where the first derivative moves to the next coordinate (y1x1, y1y1, y1z1, y1x2, etc).

If this is the structure, then row 5 (taking your indexing to start at 1 for FORTRAN) should correspond to the second row of the second atom's coordinates, e.g. Hydrogen's y-coordinate with the various coordinates of the other atom. This should let us track down these values.

The second derivative of the energy wrt y(H)x(O) is 0, so we'll move to the next value. The second derivative wrt y(H)y(O) is (-0.1585663567), while the corresponding masses for O and H are (15.9949146196) and (1.0078250322) a.u., respectively. Using the mass-weighting formula gives us (-0.0394936719), which corresponds to row 5 column two of the Hint for Step 2.

Please let me know if/where you'd like me to go into more detail.

from programmingprojects.

Related Issues (13)

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.