Package schrodinger :: Package application :: Package matsci :: Module amorphous :: Class PolymerFragment
[hide private]
[frames] | no frames]

Class PolymerFragment

object --+
         |
        PolymerFragment

Instance Methods [hide private]
 
__init__(self, resnum, generation, pre_frag=None, is_branching=False, pre_backbone=[], template_frag=None, molnum=None)
PolymerFragment class stores the connectivity, dihedral angle, and anthoer other information for polymer in-cell grow.
 
preDeepCopy(self, next_original_frag, molnum)
Deep copy the fragment attributes except those linking different fragments.
PolymerFragment
deepCopy(self, molnum)
Deep copy the fragment class from the INI fragment.
 
setFragDihedralPool(self, dihe_min, dihe_max, dihe_num, dihe_exclude)
Set the dihedral angle pool and rand for each fragment.
 
markSidegroupFrag(self, template_polymer)
Mark the side group polymer fragment, if the 3rd atom in the dihedral angle is in side group (not backbone atom).
 
resetFragDihedralPool(self)
Reset the dihedral angle pool of all following fragment according to rand in each fragment.
iterator to generate PolymerFragment
fragments(self, next_frags)
Yield the first fragment of next_frags and append the children of that fragment to next_frags for recursion.
 
adjustAtomIds(self, pre_atomnum)
Adjust atom ids in PolymerFragment when multipe chains are added into the cell.
 
markBranchingFrag(self)
Mark the branching fragments.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, resnum, generation, pre_frag=None, is_branching=False, pre_backbone=[], template_frag=None, molnum=None)
(Constructor)

 

PolymerFragment class stores the connectivity, dihedral angle, and anthoer other information for polymer in-cell grow.

Parameters:
  • resnum (int) - the resnum of the 3rd atom in dihedral angle
  • generation (int) - the generation of the fragment
  • pre_frag (PolymerFragment) - The parent fragment
  • is_branching (bool) - True, if current fragment has more than children
  • pre_backbone (list of int) - the last atom in pre_backbone is the 3rd dihedral atom
  • template_frag (PolymerFragment or None) - the polymer fragment to be copied
  • molnum (int) - molecule number
Overrides: object.__init__

preDeepCopy(self, next_original_frag, molnum)

 

Deep copy the fragment attributes except those linking different fragments.

Parameters:
  • next_original_frag (PolymerFragment) - Polymerfragment object to be copied
  • molnum (int) - molecule number

deepCopy(self, molnum)

 

Deep copy the fragment class from the INI fragment.

Parameters:
  • molnum (int) - molecule number
Returns: PolymerFragment
new INI fragment directing to all copied fragments

setFragDihedralPool(self, dihe_min, dihe_max, dihe_num, dihe_exclude)

 

Set the dihedral angle pool and rand for each fragment. dihedral angle pool and rand are lists of possible dihedral angles. When the polymer chain grows, move to next polymer fragment and set the dihedral angle using a value randomly picked from rand; When the polymer growing site dies, move to previous polymer fragment, pop up the used dihedral angle from the pool, and randomly pick a new one from the left dihedral values in pool.

Parameters:
  • dihe_min (float) - the lower limit of dihedral range
  • dihe_max (float) - the upper limit of dihedral range
  • dihe_interval - the number of possible dihedral angle value
  • dihe_exclude (bool) - use (0, dihe_min) and (dihe_max, 360), if True; else use (dihe_min, dihe_max) as the dihedral angle range
  • dihe_num (int)

markSidegroupFrag(self, template_polymer)

 

Mark the side group polymer fragment, if the 3rd atom in the dihedral angle is in side group (not backbone atom).

Parameters:

fragments(self, next_frags)

 

Yield the first fragment of next_frags and append the children of that fragment to next_frags for recursion.

Parameters:
  • frags (list of PolymerFragment) - loop over the polymer fragments and all their children
Returns: iterator to generate PolymerFragment
one child polymer fragment

adjustAtomIds(self, pre_atomnum)

 

Adjust atom ids in PolymerFragment when multipe chains are added into the cell.

Parameters:
  • pre_atomnum (int) - number of atoms before adding current molecule