sampledoc

Improper Class API

Class data structures for 2, 3, 4 point groupings of Particle objects

class impropers.Improper(pgid1=0, pgid2=0, pgid3=0, pgid4=0, theta0=0.0, type='blank')[source]

Data structure for describing any 4-point associatiaon of Particle-s

get_g_indx()[source]

Return bond type index for gromacs

get_lmpindx()[source]

Return bond type index for lammps

get_type()[source]

Return bond type

set_g_indx(g_indx)[source]

Set bond type index for gromacs

set_lmpindx(lmpindx)[source]

Set bond type index for lammps

set_type(type)[source]

Set bond type

class impropers.ImproperContainer(idList=[], verbose=False)[source]

Main data structure for holding Improper Improper objects. Map of global improper ID (integer) to Improper object instances

clear()[source]

Clears impropers out of ImproperContainer

getTypeInfoDict()[source]

Return a map of type to typeIndex Method assigns a type index and checkes for consistency

Returns:
dictionary
hasImproper(improperList)[source]

Check the ptcl IDs in improperList for any improper in container that is similar eg improper 1-2-3-4 is same as improper 4-3-2-1

Args: (list) ptcl IDs defining improper to search for

Returns: (bool) is improper in container

keys()[source]

Return list of all ptcl IDs (keys) currently in container

put(improper)[source]

Append ‘Improper’ object to this container. Updates globalID for container by incrementing the maxgid member

Args:
ptcl (Particle) correctly initialized Particle object
NOTE:
  1. One can imagine extra conditions on impropers inserted
  2. This could check for uniqueness of all globalID’s and throw error for copies
replacePtclIDs(idFromTo)[source]

Replace ptclIDs given a dictionary of ID changes # eg {1:3, 3:5, 2:20...}

Args:
idFromTo (dict) map of ID changes