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

Action for reading masses and charges from a PDB file #1087

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

gtribello
Copy link
Member

Description

While creating all the stuff for the test centre I realised that some codes (I-Pi) don't have any mechanism for passing masses and charges of atoms to PLUMED. Furthermore, I'm told it would be difficult to add the code to pass masses and charges to PLUMED using these codes. I thus created this action that allows you to set the values of the masses and charges from the PLUMED input. To set the masses and charges you just give the action a PDB file with the masses and charges in the beta and occupancy columns in the usual way.

Target release

I would like my code to appear in release 2.10

Type of contribution
  • changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
  • changes to a module not authored by you
  • new module contribution or edit of a module authored by you
Copyright
  • I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
  • the module I added or modified contains a COPYRIGHT file with the correct license information. Code should be released under an open source license. I also used the command cd src && ./header.sh mymodulename in order to make sure the headers of the module are correct.
Tests
  • I added a new regtest or modified an existing regtest to validate my changes.
  • I verified that all regtests are passed successfully on GitHub Actions.

Gareth Aneurin Tribello added 2 commits June 13, 2024 17:52
… file in the plumed.dat input file

This is useful for i-Pi as with this code it is not straightforward to pass the masses and charges to PLUMED.
@GiovanniBussi
Copy link
Member

@gtribello I think this is useful, but I would not use PDB format. In PLUMED we only use PDBs when we have to provide coordinates (for RMSD) or names / residues (for MOLINFO). Here it's just reading a vector, I would save the user from the potential issues with misformatted files.

Why not using the same format that you can now write (with DUMPMASSCHARGE) and read (with driver --mcfile)?

In addition, I would call the action READMASSCHARGE for consistency.

If you like the PDB, we can add the option of writing a PDB with charges in DUMPMASSCHARGE and reading it in READMASSCHARGE, but I am not sure it is a good idea.

Gareth Aneurin Tribello added 2 commits June 14, 2024 14:23
@gtribello
Copy link
Member Author

Thanks for these comments @GiovanniBussi. I have changed the name as you suggest now and have also added the option to read either a pdb file or the mass charge file. This is the same as what we allow with driver so I think it makes more sense.

Thanks again.

@GiovanniBussi
Copy link
Member

This is the same as what we allow with driver
True, I didn't remember this... Thanks!

@gtribello
Copy link
Member Author

did we merge this? I can't remember why we didn't. Do you remember @GiovanniBussi?

@GiovanniBussi GiovanniBussi merged commit 54eee30 into master Sep 3, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants