-
Notifications
You must be signed in to change notification settings - Fork 17
Amber #62
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
base: amber
Are you sure you want to change the base?
Amber #62
Conversation
Add a progress bar while import modules for aesthetical. In the tests I did, it didn't added any computational cost.
Also removed the logo print as it is printed now in the bin/qforce.
|
Hi Mateusz, |
|
Oh, i will look into it! |
|
I believe it was only missing the misc.py with the logo with # on front, for the .mol2 files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Mateus,
Sorry for the delay in answering, was a bit busy with the move!
Thanks a lot for the additions.
The amber part seems to work well, well done!
I haven't managed to get the loading bar working, but I'll check this a bit more... Maybe some problem on my end.
In the meanwhile please have a look at the comments I made.
Cheers,
Selim
qforce/forcefield.py
Outdated
| def get_atom_types(self, topo, non_bonded): | ||
| atom_ids={} #dictonary containing original atom types | ||
| unique_at={} #dictonary containing new unique atom types | ||
| unique_masses={} | ||
|
|
||
| ascii_lowercase = list(string.ascii_lowercase) | ||
| ascii_digits = list(string.digits) | ||
| ascii_uppercase = list(string.ascii_uppercase) | ||
|
|
||
| for i, (lj_type, a_name) in enumerate(zip(non_bonded.lj_types, self.atom_names), start=1): | ||
| atom_ids[i]=lj_type | ||
| if self.n_atoms < 36: | ||
| if i <= 10: | ||
| unique_at[i]={atom_ids[i] : "Q{}".format(ascii_digits[i-1])} | ||
| elif i > 10: | ||
| unique_at[i]={atom_ids[i] : "Q{}".format(ascii_lowercase[i-11])} | ||
| else: | ||
| unique_at[i]={atom_ids[i] : "{}{}".format(ascii_uppercase[i-1], ascii_lowercase[i-1])} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you explain what is happening here? I didn't fully understand what you did with the ascii characters and why you needed that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Amber, if there are two CA-CA bonds, the second CA-CA entry overwrites the parameters for the first.
Because of that, we used ascii characters to create unique atom types for each bond
|
Hi Selim, |
|
Hi Selim, |
|
They seem to have figured out the conversion in Parmed: https://github.com/ParmEd/ParmEd/pull/837/files More specifically: Perhaps this is something we can adapt? |
|
Hi @mateuszanotto , |
Conversion of RB terms
|
3 questions:
|
|
Hi @selimsami Answering your questions:
The .frcmod files are being written with the divider=1 and the c = dihed.equ/2, but I can switch it so it's less confusing.
|
|
Hmm, I'm starting to think that we have more issues than just the dihedral potential. Here are the results I get from GROMACS with and without a dihedral function. The mean absolute error (MAE) is 3.5% and 8% with and without the dih. function. You see that the dihedral function only affects the lowest frequencies in my case. For you it seems to affect everything? Even the C-H bond stretch freq. seems to be somewhat off in your case at ~3000 cm-1. You could perhaps turn off all dihedral functions and show what kind of a plot and MAE you get? Could you also share the final force field files you get that is printed by qforce? |
|
Hi @selimsami, These are the results I get from AMBER with and without a dihedral function. With dihedral function (4 terms): Without dihedral function (potential=0): The (MAE) is 9.2% and 6.6% with and without the dih. function. So using Fourier transforms increases the error. I'm usually calculating the frequency analysis on 5 frames as I'm using my notebook to do it. I have it running now with 50 frames to to rule out if it's not a statistical problem, but it should take a few days. This is the force field file printed by qforce but in order to build the topology I have to write the dihedrals with wild cards: A default frcmod is like this: |
Replaced unique_at[] with ids[]
|
Hi Mateus, thanks for the update! |
|
Amber has two tools to calculate the vibrational frequency. |
|
Considering the referece (QM Hessian calculation), the second options seems like a more similar comparison indeed. There are no entropic contributions there. One advice regarding that - make sure you have really good optimized structure. use high convergence criteria and double precision if it's possible. That makes a big difference on the results. And I would not use any of the "quasi-harmonic analysis at a set temperature", There are no temperature effects on the reference vibrational spectra |
|
Hello @selimsami, I investigated further the vib. freq. methods inside amber and they call the same routine internally, which uses the hessian.
I'll work on converting the .itp to CHARMM FF with ParmEd to check how it performs on AMBER. Once it's validated, I thought that I can implement support to .psf files as it would make QForce available for CHARMM and AMBER at the same time. I didn't want to waste the .frcmod implementation but AMBER seems more stiff with this format than we first thought. |
|
Hi Mateus,
|
dihedrals converted from kJ to kcal/mol
Set a note to turn off urey if using amber
|
Oh, it is excellent that the AMBER and GROMACS results are so close without urey. Good to know things are working the way they should. Still removing the 2 lowest freqs, I get: Indeed, shutting off UB is not the best solution, and the lowest freqs are still off. Amber's manual says it has support for UB terms using PSF files directly, but I've never used it. |
|
Hi, I'm interested in using Qforce for my amber simulations. I wonder what is the state of the PR? I could offer some help as well? |
|
I think it was getting close but some of the discrepancies were not corrected in the end. |
|
Ok, I had a go but it seems that if I tried to generate the parameters in this way Then I got message saying that some of the torsions are missing. Then I checked the Gromacs topology and these torsions are missing as well. I guess in Gromacs as long as any atom is connected via a bond, it is fine. But for amber, it demand all dihedrals need to be present. |
|
And the parmed seems to be using a different conversion factor now? |
|
Also it seems that all the improper torsions are missing from the frcmod |
| frcmod.write(f" 1 {fc[0]:>15.2f} {0.00:>15.2f} 1\n") | ||
|
|
||
|
|
||
| # improper dihedrals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this part is indented incorrectly
|
Indeed I was struggling with improper torsions, but I didn't catch the mistake |
| frcmod.write("\nIMPROPER\n") | ||
| for dihed in terms['dihedral/improper']: | ||
| ids = dihed.atomids + 1 | ||
| equ = np.degrees(dihed.equ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amber only accept 180 as the equilibrium value for improper
Warning: Expected Improper Torsion PHASE=180 (0.000000)





















Added amber file format support (.itp)
Added a progress bar while qforce is being initialized (importing modules)
(there are more commits than necessary 'cause I was still figuring it out how to do it properly)