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

How to use the symmetrize #37

Open
xiki-tempula opened this issue Jan 21, 2022 · 10 comments
Open

How to use the symmetrize #37

xiki-tempula opened this issue Jan 21, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@xiki-tempula
Copy link
Contributor

I wonder if I can have an example of the format of the symmetrize block, please? Thanks.

@selimsami
Copy link
Owner

selimsami commented Jan 21, 2022

Have a look at the documentation ([scan::symmetrize]) and let me know if something is not clear and I can elaborate (+extend the documentation).

Please keep in mind it's not a highly tested option, so use with care, double check your profiles and let me know if you encounter any issues.

@xiki-tempula
Copy link
Contributor Author

@selimsami Thank you. I have read it but it is still a bit unclear to me.
Say if I would like to do the same thing the documentation mentioned.

For symmetrizing the dihedral profile between atoms 77 and 80 where 0-180 is inversely
equivalent to 180-360:
77 80 = 0 180 360 : +- 

Is it like

[scan]
symmetrize = 77 80 = 0 180 360

@selimsami
Copy link
Owner

[scan::symmetrize]
77 80 = 0 180 360 : +-

Atom1 Atom2 = Region1 Region2 Region3 : relative_orientation_between_reg1_reg2 relative_orientation_between_reg1_reg2

@xiki-tempula
Copy link
Contributor Author

@selimsami I wonder if this would work?

[qm]
memory = 30000
n_proc = 12
[scan]
method = gromacs
gromacs_exec = gmx
[scan::symmetrize]
1 9 = 0 180 360 : +-
1 5 = 0 180 360 : +-

@selimsami
Copy link
Owner

It should

@xiki-tempula
Copy link
Contributor Author

It seems that it won't. Please find the attached file.
Archive.zip
which gives

          ____         ______
         / __ \       |  ____|
        | |  | |______| |__ ___  _ __ ___ ___
        | |  | |______|  __/ _ \| '__/ __/ _ \
        | |__| |      | | | (_) | | | (_|  __/
         \___\_\      |_|  \___/|_|  \___\___|

                     Selim Sami
            University of Groningen - 2020
            ==============================

Selected QM Software: "gaussian"
Necessary Hessian output files and the corresponding extensions are:
- out_file: ['.out', '.log']
- fchk_file: ['.fchk', '.fck']

NOTE: QM atomic charges are scaled by 1.2 to account for the condensed phase polarization.
      Set this value to 1 for gas phase simulations.

NOTE: Automatic atom-type determination (used only for LJ interactions) is new. 
      Double check your atom types or enter them manually.

Calculating the MD hessian matrix elements...
Fitting the MD hessian parameters to QM hessian values
Done!

There are 1 unique flexible dihedrals.
All scan data is available. Fitting the dihedrals...

Run 1/5, fitting dihedral 1/1: CN_H11C12N1_c5eace0d1ccbf515b6a0e1495ea48fe5~3
Traceback (most recent call last):
  File "/Volumes/GoogleDrive-108223189278844282544/My Drive/Simulations/sampl8/qforce_error/qforce_orca_sym/run.py", line 3, in <module>
    run_qforce(input_arg='test.pdb', config='settings')
  File "/Users/zhiyiwu/miniconda3_x86/envs/qforce/lib/python3.9/site-packages/qforce/main.py", line 55, in run_qforce
    DihedralScan(fragments, mol, job, config)
  File "/Users/zhiyiwu/miniconda3_x86/envs/qforce/lib/python3.9/site-packages/qforce/dihedral_scan.py", line 80, in __init__
    final_energy, params = self.scan_dihedrals(fragments, mol, all_config, all_dih_terms,
  File "/Users/zhiyiwu/miniconda3_x86/envs/qforce/lib/python3.9/site-packages/qforce/dihedral_scan.py", line 174, in scan_dihedrals
    _, md_energy = self.symmetrize_dihedral(frag.angles, md_energy,
AttributeError: 'Fragment' object has no attribute 'angles'

@selimsami
Copy link
Owner

selimsami commented Jan 21, 2022

I had a look at your example (thanks for that) and the code.

There are quite a few problems with the symmetrize module, it will take me some time to fix them. But I will work on it.

I will update here when I fix symmetrize

Might be more worthwhile to implement coupled dihedral scanning though (like 2D scans)...


In the meanwhile, you could also try providing multiple scan outputs with either reverse scan or the coupled dihedral at a different angle. The way to do this would be having:

  • CN_H11C12N1_c5eace0d1ccbf515b6a0e1495ea48fe5~1.out
  • CN_H11C12N1_c5eace0d1ccbf515b6a0e1495ea48fe5~1_rev.out (or whatever other name)
  • CN_H11C12N1_c5eace0d1ccbf515b6a0e1495ea48fe5~1_flip.out
  • etc...

just make sure to delete the corresponding qforce_fragments files, so it checks your job directory again.

Whenever you have a matching angle in the different files, it will take the lowest energy one.

@xiki-tempula
Copy link
Contributor Author

@selimsami Feel free to take your time. I will try to see if the torsion drive could be used somehow.

@selimsami
Copy link
Owner

yeah I just edited the comment to add "Might be more worthwhile to implement coupled dihedral scanning though (like 2D scans)..."

indeed torsiondrive would be the way to go for that.

@xiki-tempula
Copy link
Contributor Author

xiki-tempula commented Jan 21, 2022

@selimsami Sorry if you have seen it. I wonder if you have seen my email with regard to the coupled dihedral problem? I do understand if you felt that you need some time to think about it but I just want to make sure that the email didn't end up in the junk box.

@selimsami selimsami added the bug Something isn't working label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants