Skip to content

options

PowerfitOptions dataclass

Options for the Powerfit command.

Parameters:

Name Type Description Default
target Path

Path to the density map file.

required
resolution float

Resolution of the density map.

required
angle float

Angle for the fitting.

10
laplace bool

Whether to use Laplace smoothing.

False
core_weighted bool

Whether to use core weighted fitting.

False
no_resampling bool

Whether to disable resampling.

False
resampling_rate float

Rate of resampling.

2
no_trimming bool

Whether to disable trimming .

False
trimming_cutoff float | None

Cutoff for trimming.

None
gpu int

Number of workers per GPU. If > 0 then Powerfit will use GPU acceleration otherwise CPU.

0
nproc int

Number of processes to use. Ignored if GPU is used.

1

from_args(parsed_args) staticmethod

Create PowerfitOptions from parsed command line arguments.

Parameters:

Name Type Description Default
parsed_args Namespace

Parsed command line arguments.

required

Returns:

Name Type Description
PowerfitOptions PowerfitOptions

An instance of PowerfitOptions populated with the parsed arguments.

to_command(density_map, template, out_dir, powerfit_cmd='powerfit', gpu_cycler=None)

Generate command from options and given arguments.

Parameters:

Name Type Description Default
density_map Path

Path to the density map file.

required
template Path

Path to the template PDB file.

required
out_dir Path

Directory to save the output files.

required
powerfit_cmd str

Command to run Powerfit (default is "powerfit").

'powerfit'
gpu_cycler Generator[int] | None

Generator to cycle through GPU indices.

None

Returns:

Type Description
str

A string representing the command to run Powerfit.