sith.g09_stretching package
Subpackages
Submodules
- sith.g09_stretching.change_dofs.change_def(new_i, element, atoms, file)[source]
Changes the definition of a given DOF and updates the comfile including the value of the DOFs.
- Parameters:
new_i (list) – list of four indexes (1-based) defining the distance (between the first two indices), angle (between the first three indices) and dihedral (the four indices) you want to define.
element (str) – element of the atom you want to define. E.g. ‘C’, ‘H’, ‘O’, etc.
atoms (ase.Atoms) – atoms of a given configuration.
file (str) – gaussian input comfile that you want to modify. Be sure to back up the original file.
- Returns:
(None) However, it changes the comfile. Be sure to back up the original
file.
- sith.g09_stretching.change_dofs.change_prolines_dofs(comfile, molecule, pdb_template, option)[source]
Changes the definition of the degrees of freedom in prolines such that the missed bond is always different.
- Parameters:
comfile (str) – gaussian input comfile that you want to modify.
molecule (str) – xyz file representing the molecule.
pdb_template (str) – pdb with the peptide information.
option (str) – ‘1’ misses Cgamma Cdelta. ‘2’ misses Cbeta Cgamma. ‘3’ misses Calpha Cbeta. ‘4’ misses Cdelta N.
- Returns:
(None) However, it changes the comfile. Be sure to back up the original
file.
Note
This function only works when the prolines are not next to capping groups.
- sith.g09_stretching.change_dofs.def_line(indexes, element)[source]
Creates a line defining an atom in a gaussian input comfile.
- Parameters:
indexes (list) – list of four indexes (1-based) defining the distance (between the first two indices), angle (between the first three indices) and dihedral (the four indices).
element (str) – element of the atom you want to define. E.g. ‘C’, ‘H’, ‘O’, etc.
- Return type:
(str) line defining the atom in a gaussian input comfile.
- sith.g09_stretching.change_dofs.extract_dofs(indexes, atoms)[source]
Extracts the distance, angle and dihedral defined by the given indexes.
- Parameters:
indexes (list) – list of four indexes (1-based) defining the distance (between the first two indices), angle (between the first three indices) and dihedral (the four indices) you want to compute.
atoms (ase.Atoms) – atoms of a given configuration.
- Return type:
(tuple) distance, angle and dihedral defined by the given indexes.
- sith.g09_stretching.change_dofs.permute_atoms(atoms, indexes)[source]
Permutes two atoms in an Atoms object.
- Parameters:
atoms (ase.Atoms) – atoms object to be permuted.
indexes (list) – list of two indexes to be permuted (1-based).
- Return type:
(ase.Atoms) permuted atoms object.
- sith.g09_stretching.change_dofs.reorder_prolines_atoms(comfile, molecule, pdb_template, option)[source]
Changes the definition of the degrees of freedom in prolines such that the missed bond is always different.
- Parameters:
comfile (str) – gaussian input comfile that you want to modify.
molecule (str) – xyz file representing the molecule.
pdb_template (str) – pdb with the peptide information.
option (str) – ‘1’ misses Cgamma Cdelta. ‘2’ misses Cbeta Cgamma. ‘3’ misses Calpha Cbeta. ‘4’ misses Cdelta N.
- Returns:
(None) However, it changes the comfile. Be sure to back up the original
file.
- sith.g09_stretching.change_dofs.set1(N_i, Cd_i, Cg_i, Cb_i, Ca_i, C_i, O_i, HB1_i, HB2_i, HG1_i, HG2_i, HD1_i, HD2_i, atoms, comfile)[source]
- sith.g09_stretching.change_dofs.set2(N_i, Cd_i, Cg_i, Cb_i, Ca_i, C_i, O_i, HB1_i, HB2_i, HG1_i, HG2_i, HD1_i, HD2_i, atoms, comfile)[source]
- sith.g09_stretching.change_dofs.set3(N_i, Cd_i, Cg_i, Cb_i, Ca_i, C_i, O_i, HB1_i, HB2_i, HG1_i, HG2_i, HD1_i, HD2_i, atoms, comfile)[source]
- sith.g09_stretching.change_dofs.set4(Cd_i, Cg_i, Cb_i, Ca_i, C_i, O_i, HB1_i, HB2_i, HG1_i, HG2_i, HD1_i, HD2_i, atoms, comfile)[source]
- sith.g09_stretching.change_dofs.set_backbone(N_i, Ca_i, HA_i, C_i, O_i, previous, atoms, comfile, starting)[source]
- sith.g09_stretching.change_dofs.swaps_to_transform(initial, final)[source]
Return a list of swaps (i, j) that transform initial into final. Each swap is applied to initial in sequence.
- sith.g09_stretching.change_dofs.test_dofs(atoms, index, file)[source]
” Tests that the distance, angle and dihedral defined by the given indexes correspond to those in the given file.
- Parameters:
atoms (ase.Atoms) – atoms of a given configuration.
indexes (list) – Indexes (1-based) of an atom in the z-matrix that contains the distance, angle and dihedral.
file (str) – file where the distance, angle and dihedral are stored.
- Returns:
(bool) True if the test passes. It raises an assertion error if the values
do not
- sith.g09_stretching.g09_xyz.log2xyz(finput, foutput=None, indexes=None)[source]
Extract the configuration of minumum energy from a .log gaussian file of an optimization process in a xyz file.
- Parameters:
finput (str) – path to the log file.
foutput (str. Default=None # TODO: check default value) – name of the output file without extension.
- Returns:
# TODO (add return information)
Note (if foutput is not given, the name output will be the same than the)
input but with xyz extension.
- class sith.g09_stretching.protonate.Protonize(pdb)[source]
Bases:
objectProtonize charged amino acids to make them more stable in QM.
- Parameters:
pdb (str.) – pdb file of the peptide.
- sith.g09_stretching.protonate.protonate(pdb, output)[source]
Add or remove the H atoms neccessary to neutralize charges in the atoms charged amino acids.
- Parameters:
pdb (str) – name of the pdb file with the amino acids.
output – name of the output file.
- Return type:
(ase.Atoms) new structures.
- sith.g09_stretching.sith_tools.gen_randpep(n)[source]
Function that returns the command line to run JEDI analysis using for a random peptide
- Parameters:
n (int) – number of peptides to be picked randomly.
- Return type:
(str) Chain of n aminoacis.
- sith.g09_stretching.sith_tools.proline_state(pdb, state, outputwoext=None)[source]
Changes the state of all prolines to endo or exo. There is also de option to set it randomly but always the final state of one proline will be one of those.
- Parameters:
pdb (str) – path to the pdb file that contains the prolines to be modified.
state (str) – state to set up the prolines. It could be ‘endo’, ‘exo’ or ‘random’.
outputwoext (str. Default=None) – name of the output without extension. If None, this argument will be set as pdv argument (without the extension).
- Returns:
(list) [#prolines(str)] list of proline states. In between it creates
<outputwoext>modpro.pdb.
Module contents
stretching
[script] sith/g09_stretching/stretching.sh
swap_atoms_in_com
[script] sith/g09_stretching/swap_atoms_in_com.sh
create_peptide
[script] sith/g09_stretching/create_peptide.sh
extract_forces
[script] sith/g09_stretching/extract_forces.sh
proline_mod
[script] sith/g09_stretching/proline_mod.sh
find_forces
[script] sith/g09_stretching/find_forces.sh
workflow
[script] sith/g09_stretching/workflow.sh
simplify_path
[script] sith/g09_stretching/simplify_path.sh
restart_g09
[script] sith/g09_stretching/restart_g09.sh