pylift.reader
pylift.reader module
License: The MIT License (MIT)
Copyright (c) 2024 Brandon C. Tapia
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Functions
|
pylift.reader.read_mol2 |
|
pylift.reader.read_topo |
|
pylift.reader.read_gaff2 |
|
pylift.reader.read_frcmod |
Module Contents
- pylift.reader.read_mol2(mol2_in: str, out_json: str | None = None) dict[source]
pylift.reader.read_mol2
Extracts all information from a provided mol2 file
- Parameters:
mol2_in (str) – mol2 input file
out_json (str) – JSON file with mol2 information in PyLIFT-parsable dictionary
- Returns:
mol2 information in PyLIFT-parsable dictionary
- Return type:
dict
- pylift.reader.read_topo(topo_in: str = 'topo.tmp.lmps', linker_identifier: str | None = 'L', pseudoatoms: str = None, out_json: str | None = None) dict[source]
pylift.reader.read_topo
Extracts information from a skeleton LAMMPS output file provided from the TopoTools program
- Parameters:
topo_in (str) – input LAMMPS file from TopoTools
linker_identifier – same as linker_identifier previously defined in builder.assign_linkers() Otherwise, set linker_identifier = None
Pseudoatoms – Determines wether there is the hydrogen count appended to the atoms type. If builder.convert_to_pseudo() was used, pseudoatoms = True Otherwise, pseudoatoms = False
out_json (str) – JSON file with information from TopoTools file in PyLIFT-parsable dictionary
- Returns:
TopoTools information in PyLIFT-parsable dictionary
- Return type:
dict
- pylift.reader.read_gaff2(gaff2_in: str | None = 'gaff2.dat', default_loc=True, out_json: str | None = None, verbose: bool | None = True) dict[source]
pylift.reader.read_gaff2
Read in a GAFF2 molecule file.
- Parameters:
gaff2_in (str) – gaff2 filename if default_loc=True, or gaff2 filepath otherwise
default_loc (bool) – if GAFF2 file can be found in default Amber location: ~/amber24/dat/leap/parm/
out_json (str) – name of the GAFF2 information translated to a PyLIFT-readable JSON file
verbose (bool) – Print out optional information
- Returns:
GAFF2 information translated to a PyLIFT-readable dictionary
- Return type:
dict
- pylift.reader.read_frcmod(frcmod_file: str, out_json: str | None = None) dict[source]
pylift.reader.read_frcmod
Read in a FRCMOD file from the AmberTools prmchk or prmchk2 utilities.
- Parameters:
frcmod_file (str) – name of the FRCMOD file
out_json (str) – name of the FRCMOD information translated to a PyLIFT-readable JSON file
- Returns:
FRCMOD file contents in a PyLIFT-readable dictionary
- Return type:
dict