fep
#
Prepare OpenMM systems for FEP calculations.
Functions:
-
apply_fep
–Generate a system whereby a number of the molecules can be alchemically
-
set_fep_lambdas
–Set the values of the alchemical lambdas on an OpenMM context.
apply_fep
#
apply_fep(
system: System,
alchemical_indices: list[set[int]],
persistent_indices: list[set[int]],
custom_alchemical_potential: str | None = None,
) -> System
Generate a system whereby a number of the molecules can be alchemically transformed from a base chemical system.
Notes
-
Currently only OpenMM systems that have:
-
vdW + electrostatics in a single built-in non-bonded force
- electrostatics in a built-in non-bonded force, vdW in a custom non-bonded force and vdW 1-4 interactions in a custom bond force
- all of the above sans any electrostatics
are supported.
* By default a soft-core version of the LJ potential with a-b-c of 1-1-6
and alpha=0.5 that can be scaled by a global lambda_sterics
parameter
will be used for alchemical-chemical vdW interactions embedded in an
OpenMM NonbondedForce
while the energy expression set on a
CustomNonbondedForce
will be be modified to have the form
"lambda_sterics*({original_expression})"
.
Parameters:
-
system
(System
) –The chemical system to generate the alchemical system from
-
alchemical_indices
(list[set[int]]
) –The atom indices corresponding to each molecule that should be alchemically transformable. The atom indices must correspond to all atoms in each molecule as alchemically transforming part of a molecule is not supported.
-
persistent_indices
(list[set[int]]
) –The atom indices corresponding to each molecule that should not be alchemically transformable.
-
custom_alchemical_potential
(str | None
, default:None
) –A custom expression to use for the potential energy function that describes the chemical-alchemical intermolecular interactions. See the Notes for information about the default value.
The expression must include
"lambda_sterics"
.
Source code in absolv/fep.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
|
set_fep_lambdas
#
set_fep_lambdas(
context: Context,
lambda_sterics: float | None = None,
lambda_electrostatics: float | None = None,
)
Set the values of the alchemical lambdas on an OpenMM context.
Parameters:
-
context
(Context
) –The context to update.
-
lambda_sterics
(float | None
, default:None
) –The (optional) value of the steric lambda.
-
lambda_electrostatics
(float | None
, default:None
) –The (optional) value of the electrostatics lambda.