List of building and simulation cell manipulation functions

Contents

Version

2.11

Contact

Please report problems/bugs to michael.holmboe@umu.se

Specific atom struct functions

  1. add2atom(XYZ_labels,XYZ_data,varargin) % This function appends so-called XYZ atomtype labels and XYZ data to an existing atom struct
  2. xyz2atom(XYZ_labels,XYZ_data,Box_dim,resname,in_atom) % This function can be used to add XYZ data (like from a .xyz structure file)to the atom struct format
  3. analyze_atom(atom,Box_dim,max_H_dist,max_dist) % This function analyzes variofus things of the MMT atom struct
  4. concatenate_atom(atom_1,atom_2) % This function concatenats atom sections.
  5. composition_atom(atom) % This function looks at the composition of the atom struct
  6. fit2lattice_atom(atom_model,atom_ref,Box_dim_ref) % This is a special function imports a model structure of a single molecule like PO43- and tries to fit it into a crystal lattice possibly holding multiple such sites.
  7. molecule_atom(atom,varargin) % This function will set the molecule ID (MolId), residue name (Resname) of the atom struct, ie making the atom struct a single molecule, as well as optionally setting the atomtype names to the resp. elements.
  8. numer_type(atom,varargin) % This function numbers the atom types, like H1, H2, H3...
  9. rename_type(atom,atomtype,new_atomtype,varargin) % This function renames atoms in the atom
  10. reorder_atom_gro(atom,atomlist,Box_dim,filename_out) % This function reorders the atoms in a .gro file
  11. reorder_atom(atom,atomlist) % This function reorders the atoms in the atom struct
  12. resname_atom(atom) % This function tries to guess the resname of all atom types
  13. remove_H2O(atom,Box_dim) % This function removes H2O molecules, by searching for all water-like bonded H,O atoms within rmin, which optionally can be set manually.
  14. round_atom(atom,Box_dim,varargin) % This function rounds the coordinates in the atom struct
  15. sort_atom(atom) % sort_atom.m - This section orders to atoms with respect to z
  16. sort_molid(Molid) % This function sorts the molecular indexes in an ascending order
  17. scale_atom(atom,scale_vec,Box_dim,Resname) % This function scales the coordinates in the atom struct
  18. spiral_atomspiral_atom(atom,Box_dim,[0 0 90]) % This function spiral the atom randomly or by the angles given by the spiral vector
  19. tile_atom(atom,scale_vec,Box_dim,Resname) % This function tiles the atom struct similar to replicate atom, but with a translation along some direction. Triclinic version untestd but might work..
  20. tube_atom(atom,scale_vec,Box_dim,Resname) % * This quirky function can be used to create a nano-tube or nano-roll of the coordinates from an atom struct. It works best if the the input atom struct consists of one centered unit cell (to keep the number of atoms down).
  21. update_atom(atom) % This function updates the molid index and the atoms index in the atom struct

Add/create/replicate/overwrite atoms

  1. copy_atom(atom,atomtype,new_atomtype,new_resname,trans_vec,varargin) % This function copies and translates atoms in the atom struct
  2. copy_type(atom,atomtype,new_atomtype,new_resname,trans_vec,varargin) % This function copies and translates types in the atom struct
  3. create_atom(type,resname,limits,nmax,varargin) % Creates new atoms, good for adding ions to a system. Creates atoms within a certain region defined by limits
  4. create_grid_atom(atom_label,nM,limits,dim,varargin) % This old function puts ions on a grid plane and adds it to an atom struct
  5. duplicate_atom(atom,molID) % This function duplicates residue with molid MolID
  6. fit2lattice_atom(atom_model,atom_ref,Box_dim_ref) % This is a special function imports a model structure of a single molecule like PO43- and tries to fit it into a crystal lattice possibly holding multiple such sites.
  7. fuse_atom(atom,Box_dim,varargin) % This function tries to fuse all sites within a certain cutoff rmax, typically 0.85 Å
  8. grid2atom(atom_label,nM,limits,dim,varargin) %  grid2atom.m - This puts particles such as ions on a 2D grid (i.e. a plane)> % and adds it to an atom struct
  9. heal_atom(atom,Box_dim,ind,varargin) % This function heals sites in the atom struct given by the index vector ind, by adding a certain atomtype to a new atom struct called healed_atom. It does so by placing the new atom type opposite to the mean position of all neighbours within rcut [Å] of the healed site.
  10. ionize_atom(type,resname,limits,nmax,varargin) % This function adds ions within a certain region defined by limits or close to a surface in an exponential fashion
  11. merge_atom(atom1,Box1,atom2,type,Atom_label,r) % This function returns the atom2 struct with atoms in the atom2 struct with a distance r [1x1 or 1x2] away from the atoms in the atom1 struct. There is also a possibility to use a twin-range cutoff approach (suitable for OH2), by setting r(2) to a smaller value than r(1)
  12. overwrite_atom(In_atom,atomtype,resname) % This function overwrites the atom struct information with new information 
  13. protonate_atom(atom,Box_dim,varargin) % This function protonates the sites in the atom struct given by the index vector ind by adding a H's to a new H atom struct.
  14. remove_H2O(atom,Box_dim) % This function removes H2O molecules, by searching for all water-like bonded H,O atoms within rmin, which optionally can be set manually.
  15. replicate_atom(atom,Box_dim,replicate) %  replicate_atom.m This replicates the atom struct and the orthogonal box dimensions
  16. replace_atom(new_atom,prev_atom,molid_index) % This function replaces molid's in an atom struct with a new (single molid) atom struct by placing the latters COM in the formers place
  17. solvate_atom(limits,density,r,maxsol,solute_atom,varargin) % This function generates a certain region defined by limits with a solvent structure of density density
  18. substitute_atom(atom,Box_dim,NumOctSubst,O1,O2,minO2O2_dist,varargin) % This scripts performs isomorphous substitution, by replacing some O1->O2 atomtypes and optionally T1->T2 atomtypes

Slice out a region of the box

  1. slice_atom(atom,limits,invert) % This function checks if the coordinates for each time record in XYZ_data is within the specified limits, and if not sets the x,y,z to nan,nan,nan.
  2. slice_molid(atom,limits,invert) % This function checks if the coordinates is within the specified limits, and if not sets the x,y,z to nan,nan,nan.
  3. slice_triclinic_atom(atom,limits,invert)

Translate or rotate functions

  1. bend_atom(atom,Box_dim,Radii) % This simple function tries to bend an atom struct
  2. center_atom(atom,Box_dim,resname,dim) % This function centers the atom with respect to the resname molecule
  3. condense_atom(atom,Box_dim,s) % This function tries to minimize the box size and remove gaps between molids?
  4. molid_rotate(atom,Box_dim,MolID,rotate_dim) % This function rotate the atom randomly
  5. molid_translate(atom,trans_vec,MolID) % This translates a certain molid
  6. place_atom(atom,position) % This function places the atom struct according to the position vector called position, trying to use the COM of the molecule
  7. position_molid(atom,position_vec,MolID) % This function movies a molid (COM)> % to a certain position
  8. rotate_atom(atom,Box_dim,alfa,beta,gamma) % This function rotate the atom randomly
  9. translate_atom(atom,trans_vec,Resname) % translate_atom.m - This translates the resname by a vector
  10. translate_molid(atom,trans_vec,molid) %  translate_molid.m - This translates the molid by a vector

Make triclinic/orthogonal box

  1. frac2atom(atom,Box_dim,angleparam,angletype) % This function transforms fractional coordinates to cartesian
  2. orto_atom(atom,Box_dim) % This transforms a triclinic atom struct to an orthogonal atom struct. Box_dim must look like [lx ly lz 0 0 xy 0 xz yz]
  3. triclinic_atom(atom,Box_dim,angleparam,angletype) %  triclinic_atom.m - This transforms an orthogonal atom struct to a triclinic with the angles alfa, beta, gamma or tilt factors xy, xz, yz

Wrap/unwrap functions

  1. wrap_atom(atom,Box_dim) % This wraps the atoms into the orthogonal box
  2. Wrap_Coord_func(XYZ_data,Box_dim) % This is an old function that wraps atoms 'sticking out' back into the box
  3. wrap_molid(atom,Box_dim) % This function wraps the atom struct into the box
  4. unwrap_atom(atom,Box_dim,dim) % This function unwraps the atom struct along the dimension dim

Keep/remove functions

  1. keep_atom(atom,resname) % keep_atom.m - This removes all but resname
  2. keep_resname(atom,resnames) % keep_resname.m - This removes all but the resnames
  3. remove_H2O(atom,Box_dim) % This function removes H2O molecules, by searching for all water-like bonded H,O atoms within rmin, which optionally can be set manually.
  4. remove_molid(atom,MolID) %  remove_molid.m - This removes residue with molid MolID = [1 2 3 .....]
  5. remove_occypancy_atom(atom) % This function removes all succeding particles in the atom struct that has identical coordinates to a preceding particle
  6. remove_residues(atom,resnames,lo,hi,dim) % This function section is used to remove residues in the simulation box between limits lo and hi
  7. remove_resname(atom,resnames) % This function removes residue with molid MolID, resnames = {'SOL' 'Protein'}
  8. remove_SOL(atom,atomname,lo,hi,dim) %  This section is used to remove residues in the simulation box between limits lo and hi
  9. remove_type(atom,typescell) % This function removes atomtypes with types as in typescell = {'OW' 'HW1' 'HW2'}
%

Version

2.11

Contact

Please report problems/bugs to michael.holmboe@umu.se