opls_typing

class biochar.opls_typing.AtomTyper[source]

Bases: object

Assign OPLS-AA atom types based on chemical environment.

assign_atom_types(mol)[source]

Assign OPLS-AA atom types to all atoms.

Parameters:

mol – RDKit molecule

Return type:

Dict[int, str]

Returns:

Dictionary of {atom_idx – opls_type}

Parameters:

mol (Mol)

get_bond_parameters(atom_type_1, atom_type_2)[source]

Get bond parameters for atom type pair.

Return type:

Optional[Tuple[float, float]]

Returns:

(force_constant_kcal_mol_A2, equilibrium_length_A)

Parameters:
  • atom_type_1 (str)

  • atom_type_2 (str)

get_angle_parameters(atom_type_1, atom_type_2, atom_type_3)[source]

Get angle parameters for atom type triple.

Return type:

Optional[Tuple[float, float]]

Returns:

(force_constant_kcal_mol_rad2, equilibrium_angle_deg)

Parameters:
  • atom_type_1 (str)

  • atom_type_2 (str)

  • atom_type_3 (str)

class biochar.opls_typing.ChargeAssigner[source]

Bases: object

Assign partial charges to atoms using OPLS-AA parameters.

Strategy: Use predefined OPLS charges, with adjustments for unusual groups.

assign_charges(mol, atom_types)[source]

Assign partial charges to all atoms.

Parameters:
  • mol – RDKit molecule

  • atom_types – Dictionary of {atom_idx: opls_type}

Return type:

Dict[int, float]

Returns:

Dictionary of {atom_idx – charge}

Parameters: