gro_lib package

Submodules

gro_lib.gro module

class gro_lib.gro.Gro(system_name=None, num_of_atoms=None, residue_id=None, residue_name=None, atom_name=None, atom_id=None, x=None, y=None, z=None, v_x=None, v_y=None, v_z=None, box=None)[source]

Bases: object

the central class in gropy

copy_atom_entry(another_gro_object, i_atom)[source]

copy the i-th atom entry from another gro object and append to the end of current gro object

copy_atoms(another_gro_object, atom_name_list)[source]

copy atoms with the provided atom names from another gro object and append to the end of current gro object

copy_residue_entry(another_gro_object, residue_id, residue_name)[source]

copy atoms of the specified residue from another gro object and append to the end of current gro object

copy_residues(another_gro_object, residue_name_list)[source]

copy atoms with the provided residue names from another gro object and append to the end of current gro object

read_gro_file(file_name)[source]

read a gro file and store information in a Gro object

remove_atom_entry(i_atom)[source]

remove the i-th atom entry from current gro object

remove_atoms(atom_name_list)[source]

remove atoms with the provided atom names

remove_residue_entry(residue_id, residue_name)[source]

remove atoms of the specified residue

remove_residues(residue_name_list)[source]

remove atoms with the provided residue names

rename_atoms(old_atom_names, new_atom_names)[source]

rename atoms from the old_atom_names to the new_atom_names

rename_residues(old_residue_names, new_residue_names)[source]

rename residues with an old_residue_name to a new_residue_name

renumber_atoms(renumber_residues=True, renumber_residues_per_chain=True)[source]

renumber residue_id and atom_id starting from 1; the original composition of each resdiue is maintained

replace_atom_entry(i_atom, another_gro_object, j_atom)[source]

replace the i-th atom of the current gro object with the j-th atom of another gro object

select_atoms(regular_expression_pattern)[source]
sort_residues(residue_name_list)[source]

sort residues in the provided order, attaching other unspecified residues to the end

sort_residues2(residue_name_list)[source]

sort residues in the provided order, attaching other unspecified residues to the end

write_gro_file(file_name)[source]

write a gro file based on a Gro object