Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial GOMC packages (phase 1 and 2) (#831)
* This is a restructured initial package for writing GOMC files, which includes the FF parameters, psf, and pdb files. This also comes with several options for writing the GOMC, psf, and pdb files. A quick summary of the files is provided below, with a more detailed explanation provided in the examples. * added the missing base_test.py file with the required testing molecules. * the base_test.py was changed since the last modification so I changed it to how it is currently. * the base_test.py was changed since the last modification so I changed it to how it is currently. * fixed issue in the test_print_ensemble_info section of the test_gomc_conf_writer.py file for error checking. * fixed issue that GOMC control file writer output nm units instead of Ang for the cellvectors. Also, fixed some warnings that were flagged from the previous push * fixed issue that GOMC control file writer output nm units instead of Ang for the cellvectors. Also, fixed some warnings that were flagged from the previous push * added a fix so the order of the user entered variables does not matter for Rcut, RcutLow, and Rswitch * fixed issue that GOMC control file writer output nm units instead of Ang for the cellvectors. Also, fixed some warnings that were flagged from the previous push rev1 * fixed but in specific_ff_to_residue.py where it was not reading the FF dictionary and residues properly if they were not in the same order. * removed print statements from specific_ff_to_residue.py * added the ability to create and empty pdb/psf file using mb.Compound() as the Compound input * added more testing for the charmm_writer * add more testing and added a check to ensure mixed 1-4 coul scalars are not used. * add more testing and added a check to ensure mixed 1-4 coul scalars are not used (forgot to update test_charmm_writer.py). * part 1 fixed to JG comments in the PR * part 1 fixed to JG comments in the PR * part 2 fixed to JG comments in the PR * WIP- Fix mbuild/utils/conversion.py * part 3 fixed to JG and RD comments in the PR * Changed the test_charmm_writer.py to test for the exact errors we expect, other than just a failure. * tried to remove 1500 lines from the test_gomc_conf_writer.py test code. I added checking for the exact error we expect in the test_gomc_conf_writer.py and test_charmm_writer.py * fixed a few errors in the previous commit * fixed a few errors in the previous commit rev 1 * rearrange the function description order (inputs are first instead of last now) in the gomc_conf_writer.py * made a more elegant solution for the residue and atom type pairing, which is not in a dictionary. This is output in the charmm_writer and used in the gomc_conf_writer.py * removed so unneeded print statements. * added back some of the test_gomc_conf_writer test cases, as I previously removed to many and reduced the coverage. * recommit to get codecov/patch to rerun * WIP- Consolidate digits(base-n) functions into one * WIP- Remove unnecessary print statement * WIP- Refactor conversion.py to use single function for conversion * fixed bug in all_atom_name_res_pairs_dict, which was adding all the atom names to the dictionary, not just the unique atom names. * modified the specific_ff_to_residue.py file to fail for specific bad inputs, instead of returning none's * modified the specific_ff_to_residue.py file to fail for specific bad inputs, instead of returning none's rev0 * modified the specific_ff_to_residue.py file to fail for specific bad inputs, instead of returning none's rev1 * modified the specific_ff_to_residue.py file to output a list of 4 variables instead of just 4 variables * fixed some of the alerts in the last revision * fixed typo * cleaned up alot of the formatting in all file, as well as removed all reasonable PEP formatting issues * cleaned up alot of the formatting in all file, as well as removed all reasonable PEP formatting issues Rev 1 * added more testing coverage for the added error catching for the specific_ff_to_residue.py file. * fix 8 is to == as requested by LGTIM analysis for the gomc_comf_writer.py file * Put the 'RunSteps' variable back to its original format. It was accidentialy set to run_steps, and it is not the proper name, which make errors in the GOMC control file. * The Charmm FF writer was writing the correct values but the warning checking was throwing and error and calculating it wrong. This was likely a bug I created during the overall cleanup. Any past system build would be correct, but you would always have gotten an error that said it was not. * Modified code to conform to the issues/request of the PR review team this week. I believe all the current issues at least addressed to date * Modified code to conform to the issues/request of the PR review team this week. I believe all the current issues at least addressed to date rev 1 * Modified code to conform to the issues/request of the PR review team this week. I believe all the current issues at least addressed to date rev 2 * Changed the allowable residue charachters from 3 to 4. Also, changed the Charmm Object flag from fix_res_bonds_angles to gomc_fix_bonds_angles, since it only is for gomc and not charmm or other engines in general * added doc strings to the remaining functions in the charmm_writer.py file and added duplicate impropers from being printed, whenever we add improper support. * All the docstrings are added to the Charmm_writer for the parameters, returns, and attributes. * reorganized some items to make it cleaner for the user. Mostly update all doc string and added all the attributes to the classes. I believe the doc strings are ready for review now. * removed the REMARKS from the pdb writer until a bug in GOMC is fixed. They are # out for now, and will be resinstated once the GOMC bug is fixed. * changed the error for Rswitch <= RcutLow or Rswitch >= Rcut to only error when the Potential = SWITCH is used. * Included the most of the the changes requested by Justin on 3-21-21. Added the with context manager to handle file open/closing when they are out of scope. Corrected a few typos and reworded a few sentences. * changed the code in charmm_writer.py specific_ff_to_residue.py from if not isinstance(structure, Compound) and not isinstance(structure, mb.Box): to --> if not isinstance(structure, (Compound, mb.Box)): of similar structure in charmm_writer.py * combined a few more isinstance and instance command * Made changes to allow non-case sensitive user input variable keys for the gomc file control writer. It fixes all wrongly cased keys to the proper cased keys so the program will run. NOTE: If the attrubute function is used to all these variable, they will need to be properly cased. The typical user will likley not be calling the attribute function from they command used since it is outside the class by design * added a more descriptive error for bad user variable inputs in the gomc writer * reset codecov * The gomc_conf_writer.py code section that changes any cased user input key to the proper cased key is moved higher up in the code, at the bottom of the variable assignments. * changed spacing in file. * updated test_charmm_writer.py * fixed spelling erro in the charmm test file and in the specific residue to FF file. * adjusted the test_charmm file as it is now giving an error on the server not on my Desktop. * adjusted the test_charmm file again. This is only now yeilding errors on the Server which I havenote changed until today when it is causing errors. I changed the values and retested on my Desktop and all is passing. I wonder if something is up on the Github version? * adjusted the test_charmm file again after git update * fixed spacing * Fixed the bleeding error from the charmm test file. Added checking for the gomc control file writer to fail with a better message if the NVT or NPT ensembles have 2 boxes in the charmm object, or the GEMC_NVT, GEMC_NPT, or GCMC emsembles only have 1 box in the charmm object. Co-authored-by: Brad Crawford <[email protected]> Co-authored-by: Umesh Timalsina <[email protected]>
- Loading branch information