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

Improve gradient printout #283

Open
agoetz opened this issue Feb 20, 2023 · 5 comments · May be fixed by #288
Open

Improve gradient printout #283

agoetz opened this issue Feb 20, 2023 · 5 comments · May be fixed by #288
Assignees
Labels
enhancement New feature or request

Comments

@agoetz
Copy link
Collaborator

agoetz commented Feb 20, 2023

Currently the gradient is printed in a single column and there is a typo, VARIABLES is missing an A.

 ANALYTICAL GRADIENT: 
------------------------
 VARIBLES    NEW_GRAD
------------------------
    1X    -0.0066581453
    1Y    -0.0235117742
    1Z     0.0041963421
    2X     0.0014871380
    2Y     0.0212612260
    2Z    -0.0069824337
...

I suggest to print it by atom. Renaming to ATOM will also fix the typo.

 ANALYTICAL GRADIENT: 
---------------------------------------------------------
   ATOM         X                Y                Z
---------------------------------------------------------
    1    -0.0066581453    -0.0235117742     0.0041963421
    2     0.0014871380     0.0212612260    -0.0069824337
...

I can fix it but I don't know when I find time. It might required updating tests and/or test scripts. If someone works on this please comment and mention others so we don't have two people working on it.

@agoetz agoetz added the enhancement New feature or request label Feb 20, 2023
@akhilshajan
Copy link
Collaborator

I can work on this one.

@agoetz
Copy link
Collaborator Author

agoetz commented Feb 20, 2023

Thanks @akhilshajan . @Madu86 please let Akhil know what else we need to keep in mind when changing output format (your test scripts, QUICK tests reference output, Amber tests reference output etc). Thanks.

@Madu86
Copy link
Collaborator

Madu86 commented Feb 21, 2023

Good suggestion but not sure if we want to do this as we approach a release. You will have to change runtest script, reference test output files and file based QM/MM interface in AMBER. @agoetz Can you please confirm the last one? Is this quick_module.f90? Separate reference output files are no longer available for AMBER tests.

@agoetz
Copy link
Collaborator Author

agoetz commented Feb 22, 2023

This is a good point to avoid large changes right before a release. On the other hand more people are starting to use QUICK and it would be good to make changes in output format sooner than later to avoid breaking any interfaces people may write.

@agoetz
Copy link
Collaborator Author

agoetz commented Feb 22, 2023

The file based QM/MM interface in AMBER is in qm2_extern_quick_module.F90. Relevant is subroutine read_results(). Specifically, gradients are read in the code block starting at line 544

       ! look for QM gradients and read into dxyzqm                                                               
       if ( do_grad ) then

          if (read_buffer(1:21) == ' ANALYTICAL GRADIENT:' ) then
             do i = 1, 3
		read (iunit, '(a)', iostat = ios) read_buffer
             end do
             do iqm = 1, nqmatoms
                do ixyz = 1, 3
                   read (iunit, '(a)', iostat = ios) read_buffer
                   if (ios < 0) then
                      call sander_bomb('read_results (qm2_extern_quick_module)', &
                           'Error reading Quick output from file '//outfile, &
                           '(Problem reading QM gradient.)')
                   end if
                   read (read_buffer(24:),*) dxyzqm(ixyz,iqm)
                end do
             end do
          end if

       end if

@akhilshajan akhilshajan linked a pull request Jun 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants