Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Input parsing cleaning and PhysConsts from QCelemental (#404)
* Added predicate for ensuring positive spin multiplicities * Moved the molecule validation out of the api file, to make the structure cleaner. * Simplified write_molecule function * Removed method for writing to program syntax. might as well do this in api.py to keep the code consistent there * Removed import of weird package that was sneaked in somehow * Cleanup and doc * Not use walrus operator to avoid having to change python version requirement. * fix comment typo * Removed unnecessary todo * Removed __init__ file in input parsing plumbing * Cleaned up the imports, moved constants to separate file temporarily to * Converted test input to json * Removed duplicated cavity sphere in ref input and reran test. The test now passes. * Added short docstring * Sketched the handling of physical constants to use qcelemental on the python side. * Write constants to program.json * Singleton class providing access to the constants. * clang format * clang format * clanga format * Added default constants to constructor. will be accessed if no data has been set, so that unit tests can pass. * Added qcelemental as python dep * Now only a subset of the constants relevant for MRChem are added to the program input. * Added qcelemental to let tests run via github actions pass. * Fixed bug in the case of constants name. all constants passed to cpp are lower_case * Added qcelemental to make codecoverage pass * Minor style fixes. * Removed unused import. * Comment docs * Redesigned MRChemConstants. No longer inherits from qcelemental, but instantiates a PhysicalConstantsContext in __init__. This cleans up the class namespace a bit. * Fixed indendation * Added qcelemental to dev packages * Updated singleton design, and the calls for fetching constants. * Updated call to MRChemConstants * Fix symbols not found error during linking. * Remove explicitly defined constants. will fix unit tests later * clang format * Script that can update the constants section in template.yml, execute parselglossy to update the input parser, and copy the new user ref to doc/users/ * Added description to CLI interface * Update to match name for light speed constant * Minor style changes * Small bug fixes * Now fetch constants from user_dict * Added instructions for updating constants and the input parser with the new script. * Updated template and input parser to allow the user to overwrite constant defaults * Updated README * Added dryrun option to CLI * Store constants explicitly in cpp to make unit tests pass. * Remove qcelemental dependency from input parsing. * Clarify instructions on updating the input parser * Updated the way constants are defined. Removed unused constants. Added a try-catch clause when getting constants, to help debugging when using incorrect constant names. Added more detailed docstrings to the constants, indicating areas of the code affected by changing the default of a constant. * Updated constant docstrings plus some minor cleanups * Removed sqrt(pi) as a separate constant * Removed light_speed keyword from ZORA input section. This is taken care of in the new Constants input section * Removed light_speed keyword from ZORA input section. This is taken care of in the new Constants input section * Added a print function to PhysicalConstants. Prints at printlevel 0. * Bug fixes related to the light speed keyword being moved from ZORA to Constants * Removed pi from mrchem constants. Now mrcpp::pi is used for all calls to pi. * Added constants section to input schema * Made constants being printed at printlevel 1 and above * Added keyword to printer so that the user can choose when to print the constants. Also made the spacing adaptive to the constant names. * Fix error from conflic resolution * Minor cleanups * Increased distance to colon to allow for printing longer strings * Ensure the indentation scheme in the input template. * Added json print helper method to print_utils. Use this to print physical constants. Removed print precision option, now print constants exactly as given. * Undo modification to print widths. * Removed unused parameters. * Added ruamel.yaml to dev packages * Updated json printer to newest version. * Fix colon shift * Add cavity input section only when used * Update input schema with cavity changes Co-authored-by: Stig Rune Jensen <[email protected]> Co-authored-by: Stig Rune Jensen <[email protected]> Co-authored-by: Stig Rune Jensen <[email protected]>
- Loading branch information