Complete list of all atom functions

Contents

Version

2.11

Contact

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

All 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. analyze_atom(atom,Box_dim) % This function fetches various preperties of the atoms in the atom struct, using for instance the bond valence method and for instance the radii originally taken from below Revised effective ionic radii and systematic studies of interatomic distances in halides and chalcogenides. R. D. Shannon Acta Cryst. (1976) A32, 751-767.
  3. atom2make_ndx_bonded(filename,groupname,atomtypes) % This function can help you print one custom gromacs .ndx group,based on the atomtypes names.
  4. atom2make_ndx(filename,groupname,atomtypes,molid) % This little script can be used to write custom made Gromacs index files
  5. atom2mk_angndx(filename,groupname,atomtypes) % This function can help you print one custom gromacs angle.ndx group, based on the atomtypes names
  6. atomic_scattering_factors(Atom_label,lambda,twotheta,DW) % This function retrieves the atomic scattering factor vs 2theta using the 11 coeff parameters from Waasmaier Kirfel, 1995
  7. ave_atom(atom) % This function calculates the mean of the atom coordinates
  8. bend_atom(atom,Box_dim,Radii) % This simple function tries to bend an atom struct
  9. bond_atom(atom,Box_dim,max_long_dist) % This function tries to assign all bonds to a Bond_matrix and a Bond_index variable
  10. bond_angle_atom(atom,Box_dim,max_short_dist,max_long_dist,varargin) % This function tries to find all bonds and angles of the atom struct 'more' is an optional varargin argument
  11. bond_angle_type(atom1,atom2,Box_dim,rmin,rmax,angle_limit,varargin) % This tries to find all bonds and angles of the atom types
  12. bond_angle_dihedral_atom(atom,Box_dim,varargin) % This function tries to find all bonds, angles and dihedrals of the atom struct. Rmaxshort and Rmaxlong as well as 'more' is an optional varargin argument
  13. bond_valence_atom(atom,Box_dim,varargin) % This function tries to calculate the bond valence values according to the bond valence method
  14. bond_valence_data(ion1,ion2,R,varargin) % This function fetches the data and matches it to the passed atom types used to calculate the bond valence values according to http://www.iucr.org/resources/data/datasets/bond-valence-parameters
  15. cat_atom.m % This is a special script (and not a function) that imports and appends atom structs into a .gro trajectory file, useful to make a trajectory with varying number of particles
  16. cell_list_dist_matrix_atom(atom,Box_dim,varargin) % This function calculates the distance matrix from the atom struct, using a cell list algorithm adapted from the Matlab MDtoolbox by Yasuhiro Matsunaga
  17. Box_dim2Cell(Box_dim) % * This function transforms the 1x3 or the 1x9 Box_dim variable to the 1x6 Cell variable
  18. Cell2Box_dim(Cell) % * This function transforms the 1x6 Cell variable containing the a, b, c cell values and the alfa, beta, gamma angle values as used in a typical .pdb file, into a 1x3 or the 1x9 Box_dim variable
  19. center_atom(atom,Box_dim,resname,dim) % This function centers the atom with respect to the resname molecule
  20. charge_atom(atom,Box_dim,ffname,watermodel,varargin) % This function tries to charge the atom accorind to clayff or interface ff
  21. charge_clayff_2004_atom(atom,Box_dim,varargin) % Sets the charge for the original Clayff atomtypes for the original Clayff ff from the Cygan et al., 2004 paper
  22. charge_clayff_atom(atom,Box_dim,varargin) % Sets the charge for Clayff atomtypes 
  23. charge_interface_atom(atom,Box_dim,varargin) % Sets the charge for Interface atomtypes 
  24. charge_interface15_atom(atom,Box_dim,varargin) % Sets the charge for Interface 1.5 atomtypes
  25. charge_opls_go_atom(atom,Box_dim,varargin) % Sets the charge for some specific OPLS atomtypes
  26. check_clayff_2004_charge(atom) % check_clayff_2004_charge.m - This checks the charge of the original Clayff atomtypes by Mholmboe
  27. check_clayff_charge(atom) % check_clayff_charge.m - This checks the charge of the Clayff atomtypes by Mholmboe
  28. check_clayff_H2Odens(atom,Box_dim) % Check the approx. water density for a clayff system
  29. check_H2Odens(atom,Box_dim) % Computes the water density
  30. check_interface_charge(atom) %  This checks the charge of the INTERFACE atomtypes by Mholmboe
  31. check_interface15_charge(atom) %  This checks the charge of the INTERFACE 1.5 atomtypes by Mholmboe
  32. cn_atom(atom,Box_dim) % This function tries to extract the coordination number of all the atom struct indexes and store it in the field [atom.cn].
  33. clayff_2004_atom(atom,Box_dim,varargin) % Assigns the original Clayff atom types by Cygan et al., 2004. Can also 'heal' edges 
  34. clayff_2004_param(Atom_label,varargin) % Holds the ion and the original Clayff atomtype parameters
  35. clayff_atom(atom,Box_dim,varargin) % Assigns the Clayff atom types by MHolmboe. Can also 'heal' edges 
  36. clayff_param(Atom_label,varargin) % Holds the ion and Clayff atomtype parameters
  37. clayffmod_atom(atom,Box_dim,varargin) % Assigns the modififed Clayff atom types. Can also 'heal' edges 
  38. clayffmod_atom(atom,Box_dim,varargin) % New faster version. Assigns the modififed Clayff atom types. Can also 'heal' edges 
  39. closest_atom(atom1,atom2,Box_dim) % This function returns the atom1 struct with the nMolId's in atom1 closest to the atom2 struct.
  40. COM_atom(atom,MolID) % This function calculates the COM for certain elements
  41. COM_func(MolID,XYZ_data,Atom_label,XYZ_labels,Box_dim) % This calculates the center of mass for water. Slow due to pbc...
  42. COM_molid(atom,MolID) % This function calculates the COM for certain elements
  43. COM_SOL(MolID,XYZ_data,Atom_label,XYZ_labels,Box_dim) % Computes the COM of SPC water?
  44. composition_atom(atom) % This function looks at the composition of the atom struct
  45. concatenate_atom(atom_1,atom_2) % This function concatenats atom sections.
  46. condense_atom(atom,Box_dim,s) % This function tries to minimize the box size and remove gaps between molids?
  47. CONECT_atom(atom,Box_dim,short_r,long_r) % This prints conect records for pdb files
  48. copy_atom(atom,atomtype,new_atomtype,new_resname,trans_vec,varargin) % This function copies and translates atoms in the atom struct
  49. copy_type(atom,atomtype,new_atomtype,new_resname,trans_vec,varargin) % This function copies and translates types in the atom struct
  50. 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
  51. 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
  52. density_atom(atom,Box_dim) % This function calculates concentration and electron density profiles. If the atom struct contains the field charge. the charge density, electric field and electrostatic potential is also calculated.
  53. dipoles_atom(Elements,Box_dim) % This function calculates the dipole vector of water. Similar to the COM_func
  54. dist_matrix_atom(atom,Box_dim) % This calculates the distance matrix from the atom struct
  55. draw_box_atom(Box_dim,LineColor,LineThickness) % Draws a box
  56. duplicate_atom(atom,molID) % This function duplicates residue with molid MolID
  57. element_atom(atom,varargin)  % Converts atomtypes to element types. This function replaces the atomtypes names with the element names
  58. element_color(Atom_label) % This function assigns a certain color to each element. Estethic improvements are welcome...
  59. find_bonded_atom(atom,bond_matrix,label1,label2) % This function does a cross check of the bond matrix
  60. find_pair_atom(atom,bond_matrix,Atom_label1,Atom_label2) % This function does a cross check of the bond matrix
  61. 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.
  62. frac2atom(atom,Box_dim,angleparam,angletype) % This function transforms fractional coordinates to cartesian
  63. frame2atom(atom,traj,frame,Box_dim,varargin) % This function extracts a frame to the trajectory matrix
  64. fuse_atom(atom,Box_dim,varargin) % This function tries to fuse all sites within a certain cutoff rmax, typically 0.85 Å
  65. G2_atom(atom,Box_dim) % This function calculates the continuous G2 factor from the cos and sin terms and also saves a struct variable for G2_calc_func(). You might wnat to edit the atomtype names below to fit your needs...
  66. gmx_make_ndx(groupname,ind) % This function helps you print custom gromacs .ndx files
  67. gmx_mk_angndx(groupname,ind) % This function helps you print custom gromacs angle .ndx files
  68. 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
  69. 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.
  70. hist_atom(atom,s) % This function is used to calculate density profiles in the X|Y|Z-direction
  71. histz_atom(atom,s) % This function is used to calculate density profiles in the Z-direction
  72. import_atom_car(filename,varargin) % This function imports .car files from Hendrik Heinz INTERFACE ff distribution, and then tries to write out a Gromacs molecular topology file (.itp) and a new .pdb file
  73. import_atom_gro(filename) % This function imports .gro files into the atom struct
  74. import_atom_multiple_gro(filename,nFrames) % This function import multiple .gro files
  75. import_atom_pdb(filename) % This function imports .pdb files into the atom struct
  76. import_atom_xyz(filename) % This imports an .xyz file into the atom struct
  77. import_atom(filename) % import_atom.m - This imports a .xyz/.gro/.pdb file and puts the data in a structure variable called atom
  78. import_gro_traj(filename,varargin) % This function imports an strcture and an .gro trajectory file
  79. import_mc_pdb_traj(filename,varargin) % This function imports an structure and an .pdb trajectory file, and can handle changing number of particles
  80. import_pdb_traj(filename,varargin) % This function imports an strcture and an .pdb trajectory file.
  81. import_traj(filenameconf,filenametraj) % This function imports an strcture and an dcd, trr, xtc, xyz or gro  trajectory file.
  82. import_trr(filenameconf,filenametraj) % This function imports an structure and an trr  trajectory file
  83. import_trrv2(filenameconf,filenametraj) % This function imports an structure and an trr  trajectory file
  84. import_xtc(filenameconf,filenamextc) % import_atom_xtc.m - This imports a structure file and a xtc file
  85. import_xtcv2(filenameconf,filenamextc) % import_atom_xtc.m - This imports a structure file and a xtc file
  86. import_xvg(filename) % This function imports a Gromacs .xvg file
  87. import_xyz_traj(filenametraj) % import_xyz_traj.m - This imports an strcture and an .xyz trajectory file.
  88. import_xyz(filename) % This function imports an .xyz file. Atom types should be made of letters, not numbers... Try the import_atom_xyz function instead...
  89. insert_atom(atom_in,limits,rotate,r,maxsol,solute_atom,varargin) % - This inserts a molecule from a structure file into a region defined by limits with a atom (molecule)> % structure
  90. interface_atom(atom,Box_dim,varargin) % This function tries to assign all atoms according to the interface atom types (with modified atom names by MHolmboe), with some modifications for edges...
  91. interface_param(Atom_label,water_model) %  This holds the extended INTERFACE ff parameters
  92. interface15_atom(atom,Box_dim,varargin) % This function tries to assign all atoms according to the interface1.5 atom types (with modified atom names by MHolmboe), with some modifications for edges...
  93. interface15_param(Atom_label,water_model) %  This holds the extended INTERFACE1.5 ff parameters
  94. 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
  95. keep_atom(atom,resname) % keep_atom.m - This removes all but resname
  96. keep_resname(atom,resnames) % keep_resname.m - This removes all but the resnames
  97. lmp_atom_style_full_func(fid,Atom_label,Charge,XYZ_labels,XYZ_data) % This creates and prints the Atoms section properties in the LAMMPS data file .lj file according to atom style full, without image flags
  98. mass_atom_clayff(atom,varargin) % This function fetches the atom weight from the clayff and interface ff's
  99. mass_atom(atom) % This function fetches the mass for each atomtype and put it into atom.mass
  100. median_atom(atom) % This function calculates the median position of the atom struct
  101. 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)
  102. 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.
  103. molid_rotate(atom,Box_dim,MolID,rotate_dim) % This function rotate the atom randomly
  104. molid_translate(atom,trans_vec,MolID) % This translates a certain molid
  105. neigh_atom(atom,Box_dim,rmax,varargin) % This function checks which neighbors each atom has and ouputs their info
  106. neighbor_func(solute_index,XYZ_solute,XYZ_data,Box_dim,radius) % This function scans xyz data and checks who is within a certain radius. It outputs neighbour index,
  107. new_neigh_atom(atom,Box_dim,rmax,varargin) % Not finished yet...
  108. neutralize_atom(atom) % This function appends a 0 to all atomtype names and will also set the charge (if the field charge exist) to zero (0).
  109. numer_type(atom,varargin) % This function numbers the atom types, like H1, H2, H3...
  110. opls_go_atom(atom,Box_dim,rmin,rlarge) % This function tries to smear out the charge at around -OH and epoxides in GO
  111. oplsaa_go_param(Atom_label,water_model) % This custom function holds the extended oplsaa_aa ff for graphite oxide
  112. 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]
  113. order_attributes(atom) % This function order the struct attributes, or fields in a certain order.
  114. overwrite_atom(In_atom,atomtype,resname) % This function overwrites the atom struct information with new information 
  115. PATH2GMX() % The Gromacs path on your computer
  116. PATH2VMD() % The VMD path on your computer
  117. 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
  118. plot_density_atom(atom,Box_dim,varargin) % This function draws the atom struct in 3D adjoined by some density profiles
  119. plot_atom(atom,Box_dim,varargin) % This function draws the atom struct in 3D. Its very simplistic with no cool features
  120. poly_atom(atom,Box_dim,varargin) % This function tries to plot pretty polyhedras, similar to the show_atom function
  121. position_molid(atom,position_vec,MolID) % This function movies a molid (COM)> % to a certain position
  122. 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.
  123. radius_atom(atom,ffname,watermodel) % This function fetches the ion radius from clayff or interface or interface2015 ff's and
  124. radius_ion(Atom_label) % This function fetches the ionic radius, originally taken from the link below
  125. radius_vdw(Atom_label) % This function fetches the rdw radius, originally taken from below from 'A cartography of the van der Waals territories' Santiago Alvarez doi:10.1039/c3dt50599e
  126. rdf_atom(atom,Box_dim,varargin) % This function calculates the radial distributtion function and the coordination number. Can also do Gaussion smoothing.
  127. reduced_mass(Atom_label1,varargin) % This function calculates the reduced mass.
  128. 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.
  129. remove_molid(atom,MolID) %  remove_molid.m - This removes residue with molid MolID = [1 2 3 .....]
  130. remove_occypancy_atom(atom) % This function removes all succeding particles in the atom struct that has identical coordinates to a preceding particle
  131. remove_residues(atom,resnames,lo,hi,dim) % This function section is used to remove residues in the simulation box between limits lo and hi
  132. remove_resname(atom,resnames) % This function removes residue with molid MolID, resnames = {'SOL' 'Protein'}
  133. remove_SOL(atom,atomname,lo,hi,dim) %  This section is used to remove residues in the simulation box between limits lo and hi
  134. remove_type(atom,typescell) % This function removes atomtypes with types as in typescell = {'OW' 'HW1' 'HW2'}
  135. rename_type(atom,atomtype,new_atomtype,varargin) % This function renames atoms in the atom
  136. reorder_atom_gro(atom,atomlist,Box_dim,filename_out) % This function reorders the atoms in a .gro file
  137. reorder_atom(atom,atomlist) % This function reorders the atoms in the atom struct
  138. 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
  139. replicate_atom(atom,Box_dim,replicate) %  replicate_atom.m This replicates the atom struct and the orthogonal box dimensions
  140. resname_atom(atom) % This function tries to guess the resname of all atom types
  141. rotate_atom(atom,Box_dim,alfa,beta,gamma) % This function rotate the atom randomly
  142. round_atom(atom,Box_dim,varargin) % This function rounds the coordinates in the atom struct
  143. scale_atom(atom,scale_vec,Box_dim,Resname) % This function scales the coordinates in the atom struct
  144. show_density_atom(atom,Box_dim,varargin) % This function draws the atom struct in 3D adjoined by some density profiles
  145. show_atom(atom,varargin) % This function draws the atom struct in 3D. Its a bit fancier that plot_atom()
  146. show_arrow(p1,p2,varargin) % * plot a 3D arrow as patch object (cylinder+cone). This function was adapted from mArrow3.m
  147. show_axis(varargin) % * This function draws the axis in a plot
  148. show_box(Box_dim) % * This function draws the simulation box
  149. show_miller(Box_dim) % * This function draws the hkl Miller planes of the Box_dim/Cell variables
  150. sigma_vdw(Atom_label) % This function fetches the sigma radius parameter, originally taken from the link below from 'A cartography of the van der Waals territories' Santiago Alvarez doi:10.1039/c3dt50599e
  151. 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.
  152. 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.
  153. slice_triclinic_atom(atom,limits,invert) % This function slices the atoms into the triclinic box.
  154. 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
  155. sort_atom(atom) % sort_atom.m - This section orders to atoms with respect to z
  156. sort_molid(Molid) % This function sorts the molecular indexes in an ascending order
  157. sphere_atom(atom,Box_dim,radius) % * This function slices a spherical particle (like a colloid) of the atom struct
  158. spiral_atomspiral_atom(atom,Box_dim,[0 0 90]) % This function spiral the atom randomly or by the angles given by the spiral vector
  159. spc2tip4p(filename) % This function converts a .gro or .pdb file with spc water to some tip4p water
  160. spc2tip5p(filename) % This function converts a .gro or .pdb file with spc water to some tip5p water
  161. spce2tip4p(filename) % This function converts a .gro or .pdb file with spc water to some tip4p water
  162. 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
  163. tip3p2tip4p(filename) % This function converts a .gro file with spc water to some tip4p water
  164. 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..
  165. translate_atom(atom,trans_vec,Resname) % translate_atom.m - This translates the resname by a vector
  166. translate_molid(atom,trans_vec,molid) %  translate_molid.m - This translates the molid by a vector
  167. 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
  168. 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).
  169. tweak_charge_atom(atom) % This function tries to tweak the charge of the atom struct in case of rounding errors
  170. unwrap_atom(atom,Box_dim,dim) % This function unwraps the atom struct along the dimension dim
  171. update_atom(atom) % This function updates the molid index and the atoms index in the atom struct
  172. vmd(atom,Box_dim) % This function plots the atom struct
  173. wrap_atom(atom,Box_dim) % This wraps the atoms into the orthogonal box
  174. Wrap_Coord_func(XYZ_data,Box_dim) % This is an old function that wraps atoms 'sticking out' back into the box
  175. wrap_molid(atom,Box_dim) % This function wraps the atom struct into the box
  176. write_atom_all(atom,Box_dim,filename_out,varargin) % This function tries to write various files for you. Works best for systems designed for Clayff...
  177. write_atom_cif(atom,Box_dim,filename_out) % This function writes a basic .cif file from the atom struct
  178. write_atom_gro(atom,Box_dim,filename_out) % This function writes a gro file. Does it also write velocities?
  179. write_atom_itp(atom,Box_dim,filename_out,varargin) % This script creates and prints a gromacs .itp file. Works best for clayff or interface ff with spc, spce or tip3p
  180. write_atom_lmp(atom,Box_dim,filename_out,varargin) % This script creates and prints a lammps data file (.lj). Works best for Clayff systems
  181. write_atom_mol2(atom,Bond_index,Box_dim,filename_out) % This function writes a .mol2 file from the atom struct
  182. write_atom_multiple_gro(atom,traj,filename_out) % % * This function writes a .gro trajectory I think this function works...
  183. write_atom_oplsaa_go_itp(atom,Box_dim,filename_out,varargin) % This custom made script creates and prints a gromacs .itp file for 
  184. write_atom_pdb(atom,Box_dim,filename_out) % This function writes an .pdb file from the atom struct using Gromacs
  185. write_atom_pqr(atom,Box_dim,filename_out,varargin) % This function writes an .pqr file from the atom struct
  186. write_atom_psf(atom,Box_dim,filename_out,varargin) % This function writes an .psf file from the atom struct
  187. write_atom_xyz(atom,Box_dim,filename_out) % This function writes an XYZ file from the atom struct
  188. write_atom(atom,Box_dim,filename_out,varargin) % This function writes the below listed file types depending on the filename and passed variables, ie either a .gro|.pdb|.xyz|.itp and so on
  189. write_gro_traj(atom,traj,Box_dim,filename_out) % This function writes a .gro trajectory 
  190. write_pdb_traj(atom,traj,Box_dim,filename_out) % This function writes a .pdb trajectory 
  191. write_xyz_traj(atom,traj,Box_dim,filename_out) % This function writes a .xyz trajectory 
  192. xrd_atom(varargin) % This function calculates theoretical XRD patterns from a .pdb|.gro file or from an atom struct and Box_dim.
  193. 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

Version

2.11

Contact

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