Bugfix for recode ligand atom set as Python int list
@@ -240,7 +240,7 @@ class AbsoluteAlchemicalFactory(object):
"""
# Factory initialization.
- def __init__(self, reference_system, ligand_atoms=list(), receptor_atoms=list(),
+ def __init__(self, reference_system, ligand_atoms=None, receptor_atoms=None,
alchemical_torsions=None, alchemical_angles=None, alchemical_bonds=None,
annihilate_electrostatics=True, annihilate_sterics=False,
softcore_alpha=0.5, softcore_beta=1.0, softcore_a=1, softcore_b=1, softcore_c=6, softcore_d=1, softcore_e=1, softcore_f=2,
@@ -255,8 +255,11 @@ class AbsoluteAlchemicalFactory(object):
---------
reference_system : simtk.openmm.System
The reference system that is to be alchemically modified.
- ligand_atoms : list of int, optional, default = []
+ ligand_atoms : list of int, optional, default = None
List of atoms to be designated as 'ligand' for alchemical modification; everything else in system is considered the 'environment'.
+ receptor_atoms : list of int, optional, default = None
+ List of atoms to be designated as 'receptor' for alchemical modification.
+ UNUSED; WILL BE DEPRECATED
alchemical_torsions : list of int, optional, default = None
If a list of torsion indices are specified, these PeriodicTorsionForce entries are softened with 'lambda_torsions'.
If set to True, this list is autogenerated to include al proper torsions involving any alchemical atoms; improper torsions are not softened.
@@ -305,6 +308,8 @@ class AbsoluteAlchemicalFactory(object):
* Can we collect related parameters (e.g. softcore parameters) into a dict?
"""
+ # Ligand atoms must be list of numpy int type
+ ligand_atoms = [ int(index) for index in ligand_atoms ]
# Store annihilation/decoupling information.
self.annihilate_electrostatics = annihilate_electrostatics
