Code Monkey home page Code Monkey logo

Comments (7)

leeping avatar leeping commented on June 25, 2024

from geometric.

licheng-xu-echo avatar licheng-xu-echo commented on June 25, 2024

Thank you for your kind response. I appreciate your help. I've come across another minor issue while examining the document for the ASE API in xtb-python. It appears that the keywords "charge" and "mult" are not currently supported. I attempted to modify these parameters, but unfortunately, the changes didn't yield the desired results. It's possible that there might be a need for an update in the geomeTRIC documentation, specifically in the section where it's mentioned: "--ase-kwargs='{"method":"GFN2-xTB", "charge":0, "mult":1}'." Your assistance in resolving this matter would be greatly appreciated.

from geometric.

leeping avatar leeping commented on June 25, 2024

The codes I added to geomeTRIC for setting the charge and multiplicity in ASE/XTB was based on this discussion:

grimme-lab/xtb-python#58

The user cannot directly pass the charge and multiplicity to the calculator constructor, but one can pass an array of initial charges and spins. The workaround was to assign the total net charge and spin to the first atom in the system.

I tested this with a charged system and I thought it was working properly. Are you saying it's not working for you? Could you provide an example?

from geometric.

licheng-xu-echo avatar licheng-xu-echo commented on June 25, 2024

I have carefully reviewed the discussion you provided. However, it seems that resolving this issue might require modifications to the XTB class and related APIs within the xtb-python package.

Without modification of APIs in xtb-python package, I conducted an experiment using a benzene anion with one hydrogen removed to test the "charge" and "mult" parameters within the "ase-kwargs." I executed two geomeTRIC commands as follows:

  1. geometric-optimize --engine ase --ase-class xtb.ase.calculator.XTB --ase-kwargs='{"method":"GFN2-xTB","charge":-1,"mult":1}' benzene_noH.xyz
  2. geometric-optimize --engine ase --ase-class xtb.ase.calculator.XTB --ase-kwargs='{"method":"GFN2-xTB","charge":0,"mult":2}' benzene_noH.xyz

I approached these commands by treating the molecule as an anion and a radical, respectively. Unfortunately, the optimization process yielded identical 'log' files and '_optim.xyz' files for both cases. My suspicion is that the unsupported parameter within 'ase-kwargs' might not be generating an error but rather is failing to produce the intended differentiation.

For your reference, the molecule I utilized is described below:

11
benzene_noH
 C                 -4.82412325   -1.48754588    0.00068200
 C                 -3.42896325   -1.48754588    0.00068200
 C                 -2.73142525   -0.27979488    0.00068200
 C                 -3.42907925    0.92871412   -0.00051700
 C                 -4.82390425    0.92863612   -0.00099600
 C                 -5.52150525   -0.27956988    0.00000000
 H                 -5.37388225   -2.43986288    0.00113200
 H                 -2.87945525   -2.44005888    0.00199700
 H                 -1.63174525   -0.27971488    0.00131600
 H                 -5.37402625    1.88091712   -0.00194900
 H                 -6.62110925   -0.27938688   -0.00018000

I hope this detailed information assists you in understanding the issue more comprehensively. Your guidance in addressing this matter would be greatly appreciated.
benzene_noH.tar.gz

from geometric.

leeping avatar leeping commented on June 25, 2024

I'm not seeing the result you're seeing. Is it possible we are using different versions? The functionality I talked about might not be in the 1.0 release but instead the development version. I am running this with the latest commit (9981b39).

When I attempted to use your command, I got a TypeError: unsupported operand type(s) for -: 'str' and 'int'. I then removed the quotes around the numbers for charge and mult, and the job ran successfully.

My outputs are attached. The results seem different for the anion and radical cases.

These are the relevant packages:

(main) leeping@libra:~/temp/geometric-test/benzene-noH-ase/0_anion$ conda list | grep -i "ase\|xtb"
ase                       3.22.1             pyhd8ed1ab_1    conda-forge
gst-plugins-base          1.20.3               hf6a322e_0    conda-forge
libwebp-base              1.2.4                h166bdaf_0    conda-forge
matplotlib-base           3.6.0            py39hf9fd14e_0    conda-forge
xtb                       6.3.3                h323e27b_1    conda-forge
xtb-python                20.2             py39hbd71b63_2    conda-forge

benzene-noH-ase.tar.gz

from geometric.

licheng-xu-echo avatar licheng-xu-echo commented on June 25, 2024

Thank you for your kind attention! I have uploaded the log file and corrected the command for the previous comment. With the previous package version, the log file are just identical. I install the latest geomeTRIC from the source and the ase-related package just as you provide, the log file are different for the anion and radical cases!

from geometric.

leeping avatar leeping commented on June 25, 2024

That's great! I apologize that the features in the documentation aren't consistent with the release. It probably means we should do a new release very soon. :)

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.