ForceBalance API  1.1
Automated optimization of force fields and empirical potentials
 All Classes Namespaces Files Functions Variables Pages
Classes | Namespaces | Functions | Variables
nifty.py File Reference

Go to the source code of this file.

Classes

class  nifty.Pickler_LP
 A subclass of the python Pickler that implements pickling of _ElementTree types. More...
 
class  nifty.Unpickler_LP
 A subclass of the python Unpickler that implements unpickling of _ElementTree types. More...
 

Namespaces

 nifty
 
 forcebalance.nifty
 Nifty functions, intended to be imported by any module within ForceBalance.
 

Functions

def nifty.pvec1d
 Printout of a 1-D vector. More...
 
def nifty.pmat2d
 Printout of a 2-D matrix. More...
 
def nifty.encode
 
def nifty.segments
 
def nifty.commadash
 
def nifty.uncommadash
 
def nifty.printcool
 Cool-looking printout for slick formatting of output. More...
 
def nifty.printcool_dictionary
 See documentation for printcool; this is a nice way to print out keys/values in a dictionary. More...
 
def nifty.isint
 ONLY matches integers! If you have a decimal point? None shall pass! More...
 
def nifty.isfloat
 Matches ANY number; it can be a decimal, scientific notation, what have you CAUTION - this will also match an integer. More...
 
def nifty.isdecimal
 Matches things with a decimal only; see isint and isfloat. More...
 
def nifty.floatornan
 Returns a big number if we encounter NaN. More...
 
def nifty.col
 Given any list, array, or matrix, return a 1-column matrix. More...
 
def nifty.row
 Given any list, array, or matrix, return a 1-row matrix. More...
 
def nifty.flat
 Given any list, array, or matrix, return a single-index array. More...
 
def nifty.orthogonalize
 Given two vectors vec1 and vec2, project out the component of vec1 that is along the vec2-direction. More...
 
def nifty.invert_svd
 Invert a matrix using singular value decomposition. More...
 
def nifty.get_least_squares
 
def nifty.statisticalInefficiency
 Compute the (cross) statistical inefficiency of (two) timeseries. More...
 
def nifty.lp_dump
 Use this instead of pickle.dump for pickling anything that contains _ElementTree types. More...
 
def nifty.lp_load
 Use this instead of pickle.load for unpickling anything that contains _ElementTree types. More...
 
def nifty.getWorkQueue
 
def nifty.getWQIds
 
def nifty.createWorkQueue
 
def nifty.destroyWorkQueue
 
def nifty.queue_up
 Submit a job to the Work Queue. More...
 
def nifty.queue_up_src_dest
 Submit a job to the Work Queue. More...
 
def nifty.wq_wait1
 This function waits ten seconds to see if a task in the Work Queue has finished. More...
 
def nifty.wq_wait
 This function waits until the work queue is completely empty. More...
 
def nifty.GoInto
 
def nifty.allsplit
 
def nifty.Leave
 
def nifty.MissingFileInspection
 
def nifty.LinkFile
 
def nifty.CopyFile
 
def nifty.link_dir_contents
 
def nifty.remove_if_exists
 Remove the file if it exists (doesn't return an error). More...
 
def nifty.which
 
def nifty.warn_press_key
 
def nifty.warn_once
 Prints a warning but will only do so once in a given run. More...
 
def nifty.concurrent_map
 Similar to the bultin function map(). More...
 
def nifty.multiopen
 This function be given any of several variable types (single file name, file object, or list of lines, or a list of the above) and give a list of files: More...
 

Variables

tuple nifty.logger = getLogger(__name__)
 
float nifty.kb = 0.0083144100163
 Boltzmann constant. More...
 
float nifty.eqcgmx = 2625.5002
 Q-Chem to GMX unit conversion for energy. More...
 
float nifty.fqcgmx = -49621.9
 Q-Chem to GMX unit conversion for force. More...
 
float nifty.bohrang = 0.529177249
 One bohr equals this many angstroms. More...
 
string nifty.XMLFILE = 'x'
 Pickle uses 'flags' to pickle and unpickle different variable types. More...
 
 nifty.WORK_QUEUE = None
 
tuple nifty.WQIDS = defaultdict(list)
 
list nifty.specific_lst
 
tuple nifty.specific_dct = dict(list(itertools.chain(*[[(j,i[1]) for j in i[0]] for i in specific_lst])))