def __init__(self, comsystem, scaling=None): ForcePart.__init__(self, 'valence_com', comsystem) #ForcePartValence.__init__(self, system) self.comlist = comsystem.comlist self.gpos = np.zeros((comsystem.gpos_dim, 3), float) self.dlist = DeltaList(self.comlist) self.iclist = InternalCoordinateList(self.dlist) self.vlist = ValenceList(self.iclist) self.scaling = scaling if log.do_medium: with log.section('FPINIT'): log('Force part: %s' % self.name) log.hline() self.term = None # volume term
def __init__(self, system): ''' **Arguments:** system An instance of the ``System`` class. ''' ForcePart.__init__(self, 'valence', system) self.dlist = DeltaList(system) self.iclist = InternalCoordinateList(self.dlist) self.vlist = ValenceList(self.iclist) if log.do_medium: with log.section('FPINIT'): log('Force part: %s' % self.name) log.hline()
def __init__(self, system): ''' Parameters ---------- system An instance of the ``System`` class. ''' ForcePart.__init__(self, 'valence', system) # override self.gpos to the correct size! # natom of COMSystem object will return number of beads # but gpos has to have the size (n_atoms, 3), to be consisten # with the other parts of the force field self.dlist = DeltaList(system) self.iclist = InternalCoordinateList(self.dlist) self.vlist = ValenceList(self.iclist) if log.do_medium: with log.section('FPINIT'): log('Force part: %s' % self.name) log.hline()
def __init__(self, system, comlist=None): ''' Parameters ---------- system An instance of the ``System`` class. comlist An optional layer to derive centers of mass from the atomic positions. These centers of mass are used as input for the first layer, the relative vectors. ''' ForcePart.__init__(self, 'valence', system) self.comlist = comlist self.dlist = DeltaList(system if comlist is None else comlist) self.iclist = InternalCoordinateList(self.dlist) self.vlist = ValenceList(self.iclist) if log.do_medium: with log.section('FPINIT'): log('Force part: %s' % self.name) log.hline()