sampledoc

Angle Class API

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

class angles.Angle(pgid1=0, pgid2=0, pgid3=0, theta0=0.0, type='blank')[source]

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

get_g_indx()[source]

Return bond type index for gromacs

get_lmpindx()[source]

Return bond type index for lammps

set_g_indx(g_indx)[source]

Set bond type index for gromacs

set_lmpindx(lmpindx)[source]

Set bond type index for lammps

class angles.AngleContainer(idList=[], verbose=False)[source]

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

clear()[source]

Clears angles out of AngleContainer

getTypeInfoDict()[source]

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

Returns:
dictionary
hasAngle(angleList)[source]

Check the ptcl IDs in angleList for any angle in container that is similar eg angle 1-2-3 is same as angle 3-2-1

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

Returns: (bool) is angle in container

keys()[source]

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

put(angle)[source]

Append ‘Angle’ 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 angles 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