-
Notifications
You must be signed in to change notification settings - Fork 12
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
Questions about imitating your QM/MM interface #416
Comments
ASH is a pretty light-weight code in general and is meant to be a general approach to QM/MM. Bespoke standalone interfaces are in my opinion a thing to avoid. Why don't you just create a new interface within ASH to your group's QM program? Basically you would just create a MyQMcodeTheory class in a new file, make sure it has the basic init, run and cleanup methods. You can then add other methods or standalone functions within the same file. |
Thanks for your response! The reason I wanted to rewrite a short version is that to me the structure and logic of the ash code seemed complicated. But I am also not familiar with the use of OpenMM and its interface calls, so I wanted to keep the important code about OpenMM. Since you recommend me to create a new interface within ASH directly, I will do as you say and the code will be public! If I want to write a new interface to implement QM/MM single point energy, structure optimization and MD or metaMD, what parts of the code do you recommend I read at least first? Which parts of the code should I focus on and which can I familiarize myself with later? Do you have a document like a developer's manual? By the way, I see that your interface supports many QM programs, which is a feature not found in many popular QM/MM interface programs, so it might be a good idea to publish its description as a journal paper, so that we can cite your article when we use the interface added to ash in the future! |
I can understand that it may look complicated since ASH is trying to accomplish a lot of things but underneath it is actually quite simple and modular. Source-code comments may not always be that great, though. The key thing about ASH is that supporting a new QM code is really quite easy. You just need to create a new Class in a new Python source file, that mimics one of the existing classes and if everything is done right within the class (including the QM-pointcharge handling) then all the QM/MM coupling, geometry optimization, dynamics and metadynamics will work automatically without you having to touch any of the code behind those modules. If you want to understand how ASH works in a top-down fashion, take a look in those order:
This should give you a hint that supporting a new QM code within ASH would be as simple as creating a new file: interface_XXXX.py The interface_NWChem.py file: contains the following: What is the QM-code in question btw? |
Thanks for your help, I will fork your master branch and try to add a new interface, if in doubt I will ask you via email, thanks again! |
Sounds good, keep me posted. |
A very preliminary guide to writing a new QM-code interface: and: |
Dear Dr. Ragnar Bjornsson:
I am a PhD student in Theoretical Chemistry, and I would like to follow your program to provide an interface to OpenMM for our group's own QM program, but I don't want to write it as large as your Ash. We need to implement QM/MM single-point computation and QM/MM MD, on top of which we can add functions such as energy decomposition analysis. I would like to know what parts I need to keep from your code and what parts can be removed?
Thank you for your help!
The text was updated successfully, but these errors were encountered: