restraintmaker.io.Files package

Submodules

restraintmaker.io.Files.Gromacs_files module

Gromacs_files TODO:write DOCU! and code :)

class restraintmaker.io.Files.Gromacs_files.Gromacs_distanceRestraint_file(disres_funct: int = 1, disres_factor: int = 1, standard_up1: bool = False, standard_up2: bool = False)[source]

Bases: object

block_name = 'distance_restraints'
build_disres(selected_restraints: List)[source]
disres = []
header: List[str] = ['i', 'j', 'type', 'index', "type'", 'low', 'up1', 'up2', 'fac']
static load(in_path: str) List[Tuple[int, int]][source]

This function is a very simple loading function, that gets the atom IDs of selected restratins in the in_file.

std_index: int = 1
std_low: float = 0.0
std_up1: float = 0.0
std_up2: float = 0.15
write(out_path: str) str[source]
class restraintmaker.io.Files.Gromacs_files.Gromacs_positionRestraint_file(std_funct: int = 1, std_fc: float = (1000, 1000, 1000))[source]

Bases: object

block_name = 'position_restraints'
build_posres(selected_restraints: List)[source]
header: List[str] = ['ai', 'funct', 'fc']
static load(in_path: str) List[Tuple[int, int]][source]

This function is a very simple loading function, that gets the atom IDs of selected restratins in the in_file.

posres = []
std_fc: float = (1000, 1000, 1000)
std_funct: float = 0.0
write(out_path: str) str[source]
restraintmaker.io.Files.Gromacs_files.gmx_disres

alias of restraintmaker.io.Files.Gromacs_files.distanceRestraint

restraintmaker.io.Files.Gromacs_files.gmx_posres

alias of restraintmaker.io.Files.Gromacs_files.positionRestraint

restraintmaker.io.Files.Gromos_blocks module

THIS CODE WAS BORROWED FROM PYGROMOSTOOLS - Check it out :)

class restraintmaker.io.Files.Gromos_blocks.atomP(resID, resName, atomType, atomID, xp, yp, zp)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_field

__init__(resID, resName, atomType, atomID, xp, yp, zp)[source]
Args:

resID: resName: atomType: atomID: xp: yp: zp:

to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.atomV(resID, resName, atomType, atomID, xv, yv, zv)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_field

__init__(resID, resName, atomType, atomID, xv, yv, zv)[source]
Args:

resID: resName: atomType: atomID: xv: yv: zv:

to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.atom_pair_distanceRes(i1: int, j1: int, k1: int, l1: int, type1: restraintmaker.io.Files.Gromos_blocks.geometric_code, i2: int, j2: int, k2: int, l2: int, type2: restraintmaker.io.Files.Gromos_blocks.geometric_code, r0: float, w0: float, rah: restraintmaker.io.Files.Gromos_blocks.distant_Restraint_Type, comment: str = '')[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_field

__init__(i1: int, j1: int, k1: int, l1: int, type1: restraintmaker.io.Files.Gromos_blocks.geometric_code, i2: int, j2: int, k2: int, l2: int, type2: restraintmaker.io.Files.Gromos_blocks.geometric_code, r0: float, w0: float, rah: restraintmaker.io.Files.Gromos_blocks.distant_Restraint_Type, comment: str = '')[source]

..function: Constructor of Gromos atom_pair_distanceRes

Args:

i1 (int): id of atom i of first molecule j1 (int): id of atom j of first molecule k1 (int): id of atom k of first molecule l1 (int): id of atom l of first molecule type1: geometric restraintype of first molecule i2 (int): id of atom i of second molecule j2 (int): id of atom j of second molecule k2 (int): id of atom k of second molecule l2 (int): id of atom l of second molecule type2: r0 (float): radius_0 of restraint w0 (float): weighting of restraint rah: restraint_type comment (str):

to_string()[source]
class restraintmaker.io.Files.Gromos_blocks.atom_pos_block(content: List[restraintmaker.io.Files.Gromos_blocks.atomP])[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(content: List[restraintmaker.io.Files.Gromos_blocks.atomP])[source]
Args:

content:

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.atom_ref_pos_block(content: list)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(content: list)[source]
Args:

content (list):

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.atom_vel_block(content: List[restraintmaker.io.Files.Gromos_blocks.atomV])[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(content: List[restraintmaker.io.Files.Gromos_blocks.atomV])[source]
Args:

content:

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.distance_res_spec_block(KDISH: int, KDISC: int, RESTRAINTHEADER: list, RESTRAINTS: list)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(KDISH: int, KDISC: int, RESTRAINTHEADER: list, RESTRAINTS: list)[source]
Args:

KDISH (int): KDISC (int): RESTRAINTHEADER (list): RESTRAINTS (list):

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.distant_Restraint_Type(value)[source]

Bases: enum.Enum

An enumeration.

full_harmonic_distance_restraint = 0
half_harmonic_attractive = 1
half_harmonic_repulsive = -1
class restraintmaker.io.Files.Gromos_blocks.genbox_block(pbc: enum.Enum, length: list, angles: list, euler: list, origin: list)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(pbc: enum.Enum, length: list, angles: list, euler: list, origin: list)[source]
Args:

pbc (Enum): length (list): angles (list): euler (list): origin (list):

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.geometric_code(value)[source]

Bases: enum.Enum

An enumeration.

pseudo_H_atom_goc_H_atoms_CH3 = 5
pseudo_H_atoms_goc_of_three_CH3 = 7
pseudo_H_atoms_goc_of_two_CH3 = 6
real_atom = 0
virtual_H_atom_aliphaticC = 1
virtual_H_atom_aliphaticC_strange = 4
virtual_H_atom_aromaticC = 2
virtual_H_atoms_goc_aliph = 3
virtual_atoms_cog = -1
virtual_atoms_com = -2
class restraintmaker.io.Files.Gromos_blocks.lattice_shift(atomID, x, y, z)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_field

__init__(atomID, x, y, z)[source]
Args:

atomID: x: y: z:

to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.lattice_shifts_block(content: List[restraintmaker.io.Files.Gromos_blocks.lattice_shift])[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(content: List[restraintmaker.io.Files.Gromos_blocks.lattice_shift])[source]
Args:

content:

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.timestep_block(t: float, step: int, subcontent=False)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(t: float, step: int, subcontent=False)[source]
Args:

t (float): step (int): subcontent:

block_to_string() str[source]
class restraintmaker.io.Files.Gromos_blocks.title_block(content)[source]

Bases: restraintmaker.io.Files.Gromos_blocks._generic_gromos_block

__init__(content)[source]
Args:

content:

block_to_string() str[source]
order = [[['content']]]

restraintmaker.io.Files.Gromos_files module

THIS CODE WAS BORROWED FROM PYGROMOSTOOLS - Check it out :)

class restraintmaker.io.Files.Gromos_files.disres(in_path: Optional[str] = None)[source]

Bases: restraintmaker.io.Files.Gromos_files.general_gromos_file

__init__(in_path: Optional[str] = None)[source]
Args:

in_path:

parse_disres_file(path: str) dict[source]
Args:

path (str):

read_disres_file(path: str)[source]
Args:

path (str):

required_blocks: List[str] = ['TITLE', 'DISTANCERESPEC']
class restraintmaker.io.Files.Gromos_files.general_gromos_file(in_path: Optional[str] = None)[source]

Bases: object

__init__(in_path: Optional[str] = None)[source]
Args:

in_path:

_read_gromos_block(lines: list)[source]
Args:

lines (list):

add_block(blocktitle: str, content: dict, verbose: bool = False)[source]
Args:

blocktitle (str): content (dict): verbose (bool):

blocksset: List[dict] = []
content: Dict[str, Any]
path: str
required_blocks: List[str] = ['TITLE']
write(path)[source]
Args:

path:

Module contents