PDB2GMXParameters

Module

viennaptm.gromacs.pdb2gmx
class PDB2GMXParameters(*, input: Path, output_gro: Path = PosixPath('conf.gro'), topology: Path = PosixPath('topol.top'), posre_itp: Path | None = PosixPath('posre.itp'), index_file: Path | None = None, clean_pdb: Path | None = None, forcefield: str | None = None, water: str | None = None, chainsep: str | None = None, merge: str | None = None, ignore_h: bool = False, verbose: bool = False)

Bases: BaseModel

Parameter model for the GROMACS pdb2gmx command.

This model defines all input and output paths as well as optional command-line flags controlling force-field selection, water model, chain handling, and verbosity.

All path-like parameters are normalized to pathlib.Path instances after validation.

Parameters:
  • input (pathlib.Path) – Input PDB structure file.

  • output_gro (pathlib.Path) – Output GRO structure file.

  • topology (pathlib.Path) – Output topology file.

  • posre_itp (pathlib.Path or None) – Position restraint include file.

  • index_file (pathlib.Path or None) – Optional index file.

  • clean_pdb (pathlib.Path or None) – Optional cleaned PDB output file.

  • forcefield (str or None) – Force-field identifier passed to pdb2gmx.

  • water (str or None) – Water model identifier.

  • chainsep (str or None) – Chain separation mode.

  • merge (str or None) – Chain merge behavior.

  • ignore_h (bool) – Ignore hydrogen atoms present in the input structure.

  • verbose (bool) – Enable verbose output.

chainsep: str | None
clean_pdb: Path | None
classmethod ensure_paths(v)
forcefield: str | None
ignore_h: bool
index_file: Path | None
input: Path
merge: str | None
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_gro: Path
posre_itp: Path | None
topology: Path
verbose: bool
water: str | None

Methods

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

construct([_fields_set])

copy(*[, include, exclude, update, deep])

Returns a copy of the model.

dict(*[, include, exclude, by_alias, ...])

ensure_paths(v)

from_orm(obj)

json(*[, include, exclude, by_alias, ...])

model_construct([_fields_set])

Creates a new instance of the Model class with validated data.

model_copy(*[, update, deep])

!!! abstract "Usage Documentation"

model_dump(*[, mode, include, exclude, ...])

!!! abstract "Usage Documentation"

model_dump_json(*[, indent, ensure_ascii, ...])

!!! abstract "Usage Documentation"

model_json_schema(by_alias, ref_template, ...)

Generates a JSON schema for a model class.

model_parametrized_name(params)

Compute the class name for parametrizations of generic classes.

model_post_init(context, /)

Override this method to perform additional initialization after __init__ and model_construct.

model_rebuild(*[, force, raise_errors, ...])

Try to rebuild the pydantic-core schema for the model.

model_validate(obj, *[, strict, extra, ...])

Validate a pydantic model instance.

model_validate_json(json_data, *[, strict, ...])

!!! abstract "Usage Documentation"

model_validate_strings(obj, *[, strict, ...])

Validate the given object with string data against the Pydantic model.

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

update_forward_refs(**localns)

validate(value)