Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DL-FIND constrained geometry optimization #366

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

akhilshajan
Copy link
Collaborator

@akhilshajan akhilshajan commented May 2, 2024

I have added DL-Find feature for constrained geometry optimization.

# Example input for DL-FIND constraint integration in QUICK
HF BASIS=3-21G CONSTRAIN OPTIMIZE

C         -4.13498124  0.70342204  0.00000000
H         -3.53650966  -0.16516720  -0.17967886
H         -4.07172084  1.36057017  -0.84205371
H         -5.15338585  0.41046458  0.14808100
C         -3.62163902  1.42937832  1.25740497
H         -3.68306794  2.48719615  1.10858318
H         -4.22133413  1.15219316  2.09909028
H         -2.60384227  1.15314360  1.43819258

DIHEDRAL 2 1 5 6

The syntax for implementing constraints within QUICK closely mirrors established conventions in other QM packages:

FREEZEXY atom_no_1
DISTANCE atom_no_1 atom_no_2
ANGLE atom_no_1 atom_no_2 atom_no_3
DIHEDRAL atom_no_1 atom_no_2 atom_no_3 atom_no_4

Commands such as DISTANCE, ANGLE, and DIHEDRAL enable straightforward specification of constraints, streamlining the optimization process. These constraints operate within the default internal coordinate system (ICOORD=3) of QUICK, simplifying the setup process for users familiar with similar packages.

The freeze atom commands (FREEZE, FREEZEX, FREEZEY, FREEZEZ, FREEZEXY, FREEZEXZ, FREEZEYZ) provide fine-grained control over molecular configurations, enhancing the precision and accuracy of simulations. The freeze atom functionality is compatible with Cartesian coordinate systems (ICOORD=0)of QUICK.

@akhilshajan akhilshajan self-assigned this May 2, 2024
@akhilshajan akhilshajan requested review from agoetz and Madu86 May 2, 2024 18:10
@Madu86
Copy link
Collaborator

Madu86 commented May 2, 2024

@akhilshajan , I just tested this branch. Serial CPU and CUDA versions work fine; but not the MPI versions. Please check the attached zip file below.
ethane.zip

@Madu86
Copy link
Collaborator

Madu86 commented May 2, 2024

Can you also add a test case to the test suite?

@akhilshajan
Copy link
Collaborator Author

Thank you Madu. I will check the error with MPI and add the test case with the test you tried out for constrained geometry optimization.

@Madu86
Copy link
Collaborator

Madu86 commented May 22, 2024

Hi @akhilshajan, were you able to find this issue in the MPI version? Let me know if you need help.

@akhilshajan akhilshajan force-pushed the QUICK_Constrained_Optimization branch from 9979703 to c7e8767 Compare July 9, 2024 20:03
@akhilshajan
Copy link
Collaborator Author

akhilshajan commented Jul 9, 2024

Hi @Madu86, thanks with the help for MPI. I have tested with CUDA and CUDA-MPI. It is working perfectly now. I believe we can merge this branch.

ethane.zip

@Madu86
Copy link
Collaborator

Madu86 commented Jul 10, 2024

Thanks @akhilshajan. We will test this soon.

@dacase
Copy link

dacase commented Nov 15, 2024

I've had less success here. I grabbed the code from [akhilshajan:QUICK_Constrained_Optimization], built and tested it with the sample input above (and other sample inputs). It never seems to recognize the CONSTRAIN keyword, just doing an unconstrained optimization.

I can be patient. Perhaps I'll wait until this PR is merged in, then try again. But just seeing if this rings any bells. (I don't have time or expertise to dig into the code at this point.)

...thanks...dac

@Madu86
Copy link
Collaborator

Madu86 commented Nov 15, 2024 via email

@dacase
Copy link

dacase commented Nov 15, 2024

You are right to some extent. I had to update my LD_LIBRARY_PATH (doesn't seem to be done via quick.rc(?) Now, ldd shows I am using /usr/local/lib/libquick_cuda.so instead of the one from Amber24. But the results are the same: the CONSTRAIN keyword is apparently not recognized. Probably I am still doing something wrong, but I don't see it.

@Madu86
Copy link
Collaborator

Madu86 commented Nov 15, 2024

I still think this is a path issue. I have separate Amber24 and quick development (quick-const-opt) installations on my system.
This is what I compiled:

[madu@osprey quick-const-opt]$ git branch
* QUICK_Constrained_Optimization
[madu@osprey quick-const-opt]$ git log
commit 99797037c6309377b6f474bcc6bebbba78609cbf (HEAD -> QUICK_Constrained_Optimization, origin/QUICK_Constrained_Optimization)
Merge: 46ee0c15 1d6cf2d4
Author: Akhil Shajan <[email protected]>
Date:   Thu May 2 13:52:55 2024 -0400

    Merge branch 'merzlab:master' into QUICK_Constrained_Optimization

Running ldd on quick.cuda from Amber24 installation gives me this:

[madu@osprey bin]$ ldd /home/madu/Apps/amber24/install/bin/quick.cuda
	linux-vdso.so.1 (0x00007ffd9afb4000)
	libquick_cuda.so => /home/madu/Apps/amber24/install//lib/libquick_cuda.so (0x00007fe27e400000)

And this is from QUICK development installation:

[madu@osprey bin]$ ldd /home/madu/Apps/quick-const-opt/install/bin/quick.cuda 
	linux-vdso.so.1 (0x00007ffce49ce000)
	libquick_cuda.so => /home/madu/Apps/quick-const-opt/install//lib/libquick_cuda.so (0x00007f37c6c00000)

Ethane test:

. /home/madu/Apps/quick-const-opt/install/quick.rc 
quick.cuda ethane.in

I have attached my input and output below.
ethane-rtx3080ti.tar.gz

@dacase
Copy link

dacase commented Nov 15, 2024

Ah...my fault. I had built from the master branch, and not from Quick_Constrained_Optimization. Thanks for your help; apologies for the noise. Everything now seems to work as I expected.

@Madu86
Copy link
Collaborator

Madu86 commented Nov 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants