intermol.forces.forcefunctions module


Create a paramlist specific for a given program.

intermol.forces.forcefunctions.build_unitvars(program, paramlist, dumself=None)[source]

Takes a string program name (one of the supported programs), and a ‘self’ object it looks like the keyword is not being used, but it is used in the line eval(unit). The test name ‘dumself’ needs to match what is in the force data arrays. Currently only used for lammps.


Return name of the class in camelCase.

intermol.forces.forcefunctions.create_kwd_dict(unitvars, paramlist, force_type_object, values, optvalues=None)[source]
intermol.forces.forcefunctions.create_kwds_from_entries(unitvars, paramlist, entries, force_type, offset=0)[source]

Create a keyword dictionary given an array of information from a file format

requires the master set of units, the master set of parameter lists, an object (either a force_class or force_type), the list of information to be converted into a keyword, and an offset.

Parameters:offset (int) – how far over from the first entry we translate
intermol.forces.forcefunctions.get_parameter_kwds_from_force(force, forceparams, paramlist)[source]
intermol.forces.forcefunctions.get_parameter_list_from_force(force, paramlist)[source]

Create a function that returns the paramters of a function type.

First, we need make some additions to the parameter list dictionary, which we do once when the forcedata script is imported. Useful to put the forces here as well. We won’t make this a function for now since it’s needed in this module.

intermol.forces.forcefunctions.get_parameter_list_from_kwds(force, kwds, paramlist)[source]
intermol.forces.forcefunctions.optforceparams(force_type, forcetype_object=None)[source]

Return the dictionary of optional paramters of an abstract force type.

If no object is given, we fill with blanks.


Given a force_type object, determine the key associated with the optional parameters.

intermol.forces.forcefunctions.optparamlookup(force_type_object, object_default=False)[source]

A wrapper for optforceparams that takes a force_type object and returns the optional parameter dictionary.

intermol.forces.forcefunctions.specify(program_units, unitset, dumself=None, shouldEval=True)[source]

Takes the dict of units, and a set of dimensions and replaces the dimensions with the appropriate units.