Endonuclease PvuII (1PVI) DNA - GATTACAGATTACA
CAP - Catabolite gene Activating Protein (1BER)
DNA - GATTACAGATTACAGATTACA Endonuclease PvuII bound to palindromic DNA recognition site CAGCTG (1PVI) DNA - GATTACAGATTACAGATTACA TBP - TATA box Binding Protein (1C9B)
CAP - Catabolite gene Activating Protein (1BER)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
TBP - TATA box Binding Protein (1C9B)
 

° 

FillCellObj

-

Fill simulation cell with object


CommandArgumentDatatypeDefault Min Max
Format: FillCellObj Object selection,SELECTION ---
   Copies = Number of copies,INT-- -
   Density = Requested density in g/ml,FLOAT---
  Bumpsum = Initially allowed sum of all bumps per copy in ÅFLOAT 1.0 --
Python:FillCellObj(selection1,copies,density,bumpsum=None)
Menu:Simulation > Fill simulation cell
Related:FillCellWater, Cell , Experiment, PressureCtrl
Required:


The FillCellObj command fills the simulation cell with copies of the selected object. No additional objects are created, instead the copies become part of the original object.

The Copies and Density parameters allow you to request either a certain number of copies or a certain density, but not both at the same time. If a density is requested, YASARA will calculate the required number of copies according to the following formula (Density in [g/ml], Volumes in [A] and SolventMass in [g/mol]):


(1)

Contrary to FillCellWater , this command cannot make use of a predefined optimally packed example configuration and thus has to iteratively place the copies at random positions, trying to avoid bumps with the remaining atoms in the cell. BumpSum is the initially allowed sum of bumps, but will be increased automatically if needed to reach the requested number of copies. If too many bumps are present, it may become impossible to start a simulation. The solution is to start with a larger cell and then reduce its size during a simulation.

If you want to use FillCellObj to fill the simulation cell with a solvent other than water, follow these steps:


Example 1:
FillCellObj 1crn,Copies=3

Fill simulation cell with 3 randomly placed copies of object 1crn.


Example 2:
FillCellObj methanol,Density=0.7872,BumpSum=8

Fill simulation cell with randomly placed copies of object methanol, allowing bumps up to 8 A and trying to reach a density of 0.7872 g/mol.



Example macro 1:

# EXAMPLE FillCellObj
# Requires YASARA Dynamics
Clear
LoadPDB 1crn
Cell 100,100,100
PosAll Z=180
FillCellObj 1crn,Copies=14
Style Cartoon

Figure: Result of the example macro 1 above.



Example macro 2:

# EXAMPLE FillCellObj Vesicle
# Requires YASARA Dynamics
DelAll
# Set test to 1 for a quick test, 0 for the real vesicle modeling
test=1
# Radius of the lipid vesicle, measured at the boundary between outer and inner membrane
radius=40.
# Length of a lipid molecule
lipidlen=25.
# Area in A^2 occupied by a lipid molecule in the membrane (measured in its middle)
lipidarea=53.
# The composition of the membrane: an alternating list of percentages and corresponding
# lipid names (.yob files). The percentages should sum up to 100. Here we use
# 70% Phosphatidylcholine (dopc.yob) and 30% Phosphatidylserine (dops.yob)
composition=70,'dopc',30,'dops'
# Initial vesicle zoom factor, increase in case of a 'Search Grid Overflow' error message
zoom=1.6
# No changes needed below this point
types=count composition/2
# Calculate the number of lipids in inner(1) and outer(2) membrane
for i=1 to 2
  lipids(i)=0+sqr (radius+lipidlen*(-1.5+i))*Pi*4/lipidarea
# Load single lipid molecules, the terminal carbons in
# the two lipid tails must be named CM1 and CM2.
for i=1 to types
  lip = LoadYOB (composition(i*2))
  # Orient along the major (X-) axis
  NiceOriObj (lip)
  # Make sure the phosphate looks to the left side
  x=PosAtom Element P Obj (lip),CoordSys=global
  if x>0
    RotateObj (lip),Y=180
  # Freeze this orientation in the actual atom coordinates
  TransformObj (lip)
# Speed up the graphics, the lipid vesicle will be large
Style BallStick
HideAtom Element H
Antialias No
LightSource Shadow=0
Console Off
# Loop over inner and outer layer
for i=1 to 2
  # Now we want to equally distribute the lipids on a sphere
  # First get the next Fibonacci number after lipids(i)
  iqa=0
  iqb=1
  do
    iqc=iqa+iqb
    iqa=iqb
    iqb=iqc
  while iqb<lipids(i)
  r=(radius+lipidlen*(-1.5+i))
  if not test
    r=r*zoom
  # Finally, loop over all required lipids
  j=0
  for k=1 to iqb
    # Get coordinates of point j on the sphere, roughly equally distributed.
    # Mathematicians write papers about algorithms like this one.... ;-)
    ooiqb=1./iqb
    j=j+iqa
    if j>iqb
      j=j-iqb
    if rnd iqb<lipids(i)
      xb=ooiqb*k
      yb=ooiqb*j
      ph=yb*360
      ct=(xb*-2+1)
      st=sqrt (1.-ct*ct)*r
      # posxyz are the 3D coordinates on the sphere surface
      posx=st*cos ph
      posy=st*sin ph
      posz=ct*r
      # Get a new lipid molecule, chosen randomly according to membrane composition
      percent=rnd 100
      compsum=0.
      for l=1 to types
        compsum=compsum+composition(l*2-1)
        if compsum>percent
          break
      lip=DuplicateObj (l)
      # Orient the lipid normal to the sphere surface
      RotateObj (lip),Y=(-asin ct-180+i*180)
      RotateObj (lip),Z=(ph)
      # Move to the sphere surface
      MoveObj (lip),(posx),(posy),(posz+200)
    # Whenever we got 250 objects, join them together,
    # since YASARA's object limit is 250
    if Objects==250 or k==iqb-1
      JoinObj not 1-(types+i),(types+i)
    if k%25==0  
      ShowMessage 'Building layer (i), (k*100/iqb)% completed'
      Wait 1
RenameObj (types+1),Inner
RenameObj (types+2),Outer
DelObj not Inner Outer
CenterObj all
Console On
# Build a single sodium ion in the middle, this will be the fixed anchor
# for pulling the lipids together
na=BuildAtom Na
FixObj (na)
PosObj all,0,0,200
if test
  # Just a test, cut the vesicle open for visualization 
  DelRes globalX<0 globalY>0 globalZ<200
  ColorAtom Element C with 2 bonds to Element C Obj Inner,Green
  ColorAtom CM1 CM2 Obj Inner,Green
  Ori Alpha=-16.751, Beta=340.746, Gamma=3.521
  Antialias Yes
  LightSource Shadow=65
  HideMessage
else
  # Pull the lipids to their final position during a simulation
  # First remove bumps
  ShowMessage 'Removing bumps...'
  ForceField Amber99
  Cell Auto
  Cutoff 5.24
  TempCtrl SteepDes
  Sim On
  Wait SpeedMax<3000
  # Now pull the lipids to the final distance
  ShowMessage 'Starting energy minimization to reach final distance...'
  AddSpring Element N Obj Inner,Element Na,Len=(radius-lipidlen+3),SFC=(350./radius)
  AddSpring CM? Obj Outer,Element Na,Len=(radius+3),SFC=(350./radius)
  TempCtrl Anneal
  # Wait until the energy minimization converged, then pull stronger
  do
    Wait 100
    t=Temp
  while t>100
  ScaleForce Bond,5.0
  # This continues forever, if the temperature gets close to 0K, we are done

Figure: Result of the example macro 2 above.