# This file contains all API version specific info.  Should only need editing
# for major changes in the OpenMM API.

# Add base classes missing from the XML input file
MISSING_BASE_CLASSES = {'OpenMMException':'std::exception'}

# Doc strings to replace some fo the confusing ones generaged by swig
# Indexed by (className, methodName)
DOC_STRINGS = {("Context", "setPositions") :
                "setPositions(self, positions)",
               ("Context", "setVelocities") :
                "setVelocities(self, velocities)"}

# Do not generate wrappers for the following methods.
# Indexed by (className, [methodName [, numParams]])
SKIP_METHODS = [('State',),
                ('Stream',),
                ('Vec3',),
                ('AndersenThermostatImpl',),
                ('AngleInfo',),
                ('ApplyAndersenThermostatKernel',),
                ('BondInfo',),
                ('CalcCustomNonbondedForceKernel',),
                ('CalcForcesAndEnergyKernel',),
                ('CalcGBSAOBCForceKernel',),
                ('CalcGBVIForceKernel',),
                ('CalcHarmonicAngleForceKernel',),
                ('CalcHarmonicBondForceKernel',),
                ('CalcKineticEnergyKernel',),
                ('CalcNonbondedForceKernel',),
                ('CalcPeriodicTorsionForceKernel',),
                ('CalcRBTorsionForceKernel',),
                ('CMMotionRemoverImpl',),
                ('ConstraintInfo',),
                ('ContextImpl',),
                ('CudaKernelFactory',),
                ('CudaStreamFactory',),
                ('CustomNonbondedForce',),
                ('CustomNonbondedForceImpl',),
                ('ExceptionInfo',),
                ('ForceImpl',),
                ('FunctionInfo',),
                ('GBSAOBCForceImpl',),
                ('GBVIForceImpl',),
                ('GlobalParameterInfo',),
                ('HarmonicAngleForceImpl',),
                ('HarmonicBondForceImpl',),
                ('InitializeForcesKernel',),
                ('IntegrateBrownianStepKernel',),
                ('IntegrateLangevinStepKernel',),
                ('IntegrateVariableLangevinStepKernel',),
                ('IntegrateVariableVerletStepKernel',),
                ('IntegrateVerletStepKernel',),
                ('Kernel',),
                ('KernelFactory',),
                ('KernelImpl',),
                ('NonbondedForceImpl',),
                ('ParameterInfo',),
                ('ParticleInfo',),
                ('PeriodicTorsionForceImpl',),
                ('PeriodicTorsionInfo',),
                ('PlatformData',),
                ('RBTorsionForceImpl',),
                ('RBTorsionInfo',),
                ('RemoveCMMotionKernel',),
                ('StreamFactory',),
                ('StreamImpl',),
                ('UpdateTimeKernel',),
                ('Context',  'getState'),
                ('CudaPlatform',),
                ('Force',    'Force'),
                ('Platform', 'createStream'),
                ('Platform', 'getDefaultStreamFactory'),
                ('Platform', 'registerStreamFactory'),
                ('Platform', 'contextCreated'),
                ('Platform', 'contextDestroyed'),
                ('Platform', 'createKernel'),
                ('Platform', 'registerKernelFactory'),
]

# The build script assumes method args that are non-const references are
# used to output values. This list gives excpetions to this rule.
NO_OUTPUT_ARGS = [('System', 'getPeriodicBoxVectors', 'a'),
                  ('System', 'getPeriodicBoxVectors', 'b'),
                  ('System', 'getPeriodicBoxVectors', 'c'),
                  ('Platform',       'setPropertyValue', 'context'),
]

# SWIG assumes the target language shadow class owns the C++ class
# so by default, when the  shadow class is deleted, the C++ class is also.
# However, if a class is passed to another class, it may be appropriate to
# change this.  The following dict lists the (Class,Methods) for which the
# shadow class should *lose* ownership of the C++ class.
# The list is the argument position(s).
STEAL_OWNERSHIP = {("Platform", "registerPlatform") : [0],
                   ("System", "addForce") : [0],
}

# This is a list of units to attach to return values and method args.
# Indexed by (ClassName, MethodsName)
UNITS = {
("*", "getConstraintTolerance") : ("unit.dimensionless", ()),
("*", "getCutoffDistance") : ("unit.nanometers", ()),
("*", "getDefaultCollisionFrequency") : ("unit.picosecond", ()),
("*", "getDefaultTemperature") : ("unit.kelvin", ()),
("*", "getErrorTolerance") : (None, ()),
("*", "getEwaldErrorTolerance") : (None, ()),
("*", "getFriction") : ("1/unit.picosecond", ()),
("*", "getIntegrator") : (None, ()),
("*", "getNumAngles") : (None, ()),
("*", "getNumBonds") : (None, ()),
("*", "getNumConstraints") : (None, ()),
("*", "getNumExceptions") : (None, ()),
("*", "getNumForces") : (None, ()),
("*", "getNumParticles") : (None, ()),
("*", "getNumPlatforms") : (None, ()),
("*", "getNumTorsions") : (None, ()),
("*", "getParticleMass") : ("unit.amu", ()),
("*", "getPeriodicBoxVectors")
 : (None, ('unit.nanometer', 'unit.nanometer', 'unit.nanometer')),
("*", "getPlatform") : (None, ()),
("*", "getRandomNumberSeed") : (None, ()),
("*", "getReactionFieldDielectric") : ("unit.dimensionless", ()),
("*", "getSoluteDielectric") : ("unit.dimensionless", ()),
("*", "getSolventDielectric") : ("unit.dimensionless", ()),
("*", "getStepSize") : ("unit.picosecond", ()),
("*", "getSystem") : (None, ()),
("*", "getTemperature") : ("unit.kelvin", ()),
("Context", "getParameter") : (None, ()),
("CMMotionRemover", "getFrequency") : (None, ()),
("GBSAOBCForce", "getNonbondedMethod") : (None, ()),
("GBSAOBCForce", "getParticleParameters")
 : (None, ('unit.elementary_charge',
           'unit.nanometer', 'unit.dimensionless')),
("GBVIForce", "getNonbondedMethod") : (None, ()),
("GBVIForce", "getParticleParameters")
 : (None, ('unit.elementary_charge',
           'unit.nanometer', 'unit.dimensionless')),
("HarmonicAngleForce", "getAngleParameters")
 : (None, (None, None, None, 'unit.radian',
           'unit.kilojoule_per_mole/(unit.radian*unit.radian)')),
("HarmonicBondForce", "getBondParameters")
 : (None, (None, None, 'unit.nanometer',
           'unit.kilojoule_per_mole/(unit.nanometer*unit.nanometer)')),
("NonbondedForce", "getExceptionParameters")
 : (None, (None, None,
           'unit.elementary_charge*unit.elementary_charge',
           'unit.nanometer', 'unit.kilojoule_per_mole')),
("NonbondedForce", "getNonbondedMethod") : (None, ()),
("NonbondedForce", "getParticleParameters")
 : (None, ('unit.elementary_charge',
           'unit.nanometer', 'unit.kilojoule_per_mole')),
("PeriodicTorsionForce", "getTorsionParameters")
 : (None, (None, None, None, None,
           None, 'unit.radian', 'unit.kilojoule_per_mole')),
("Platform", "getDefaultPluginsDirectory") : (None, ()),
("Platform", "getPropertyDefaultValue") : (None, ()),
("Platform", "getPropertyNames") : (None, ()),
("Platform", "getPropertyValue") : (None, ()),
("RBTorsionForce", "getTorsionParameters")
 : (None, (None, None, None, None,
           None, None, None, None, None, None)),
("System", "getConstraintParameters")
 : (None, (None, None, 'unit.nanometer')),
("System", "getForce")
 : (None, ()),
}

