Exclusions and NB Scaling in EEX

Exclusions and nonbonded scaling (such as 1-2, 1-3, and 1-4 scaling) are handled in EEX using a nonbond scaling list. This list can be passed directly or built by setting 1-2, 1-3, 1-4 scaling.

Storing Scaling information

Relevant functions are:

dl.set_pair_scalings(scaling_df)

This function is used to directly set scaling parameters between atoms. scaling_df is a dataframe with mandatory columns atom_index1, atom_index2, that also contains at least one of the columns vdw_scale or coul_scale.

Example

# Build scaling dataframe scale_df = pd.DataFrame() scale_df["coul_scale"] = [0.0, 0.0, 0.0] scale_df["atom_index1"] = [1,1,2] scale_df["atom_index2"] = [2,3,3] scale_df["vdw_scale"] = [0.5, 0.5, 0.5]

# Add data to datalayer dl.set_pair_scalings(scale_df)

dl.set_nb_scaling_factors(nb_scaling_factors)

This function is used to set scaling factors for all atoms in a bond, angle or dihedral.

Here, nb_scaling_factors is a dictionary of the form:

nb_scaling_factors = { "coul":{ "scale12": "dimensionless", "scale13": "dimensionless", "scale14": "dimensionless", }, "vdw":{ "scale12": "dimensionless", "scale13": "dimensionless", "scale14": "dimensionless", } }

dl.build_scaling_list()

This function uses the scaling factors set in set_nb_scaling_factors to build a full list of the same format as scaling_df in set_pair_scalings and stores it in the datalayer.

Retrieving Scaling information

dl.get_pair_scalings(nb_labels)

Default for nb_labels is [vdw_scale, coul_scale] if no argument is given. This returns a pandas DataFrame with columns atom_index1, atom_index2, coul_scale and vdw_scale.

dl.get_nb_scaling_factors()

Returns dictionary from dl.set_nb_scaling_factors function


In [1]:
import eex

In [ ]:
# Write examples here

# For now, see test_datalayer.py (test_nb_scaling and test_set_nb_scaling_factors)