Dear Bin,
> I got the atomic charges from R.E.D. server and now I want to show them
> with the molecular structure. I tried VMD and PyMOL but can not get the
> charge label. On the R.E.D. website, Jmol is used to show the charge
> value, but it is an option with check box. Could anybody let me know how
> to run it as local application?
First, you can automatically display the charge values in the mol2
file in a Jmol applet available in a R.E.D. Server job.
After running the demo, see for instance:
http://cluster.q4md-forcefieldtools.org/~ucpublic1/ADF1ADFCADFLeF2SgADFg9ADF6e1voUADF6grCPNcvIIT1/P6598/javaappletmol2-11.html
http://cluster.q4md-forcefieldtools.org/~ucpublic1/ADF1ADFCADFLeF2SgADFg9ADF6e1voUADF6grCPNcvIIT1/P6598/javaappletmol2-12.html
etc...
from the P6598 R.E.D. Server job:
http://cluster.q4md-forcefieldtools.org/~ucpublic1/ADF1ADFCADFLeF2SgADFg9ADF6e1voUADF6grCPNcvIIT1/P6598.html
- then, when using VMD, you can add in your .vmdrc file (this .vmdrc
file is in your login $HOME) the following functions:
# LA = label_atoms; HowTo use it: "LA 0 all"
proc LA { molid all } {
set sel [atomselect $molid $all]
set atomlist [$sel list]
foreach {atom} $atomlist {
set atomlabel [format "%d/%d" $molid $atom]
label add Atoms $atomlabel
}
$sel delete
}
# LC = label_charges; HowTo use it: "LC 0 all"
proc LC {molid all} {
set sel [atomselect $molid $all]
set offset {0.0 0.3 0.3}
set mol_id [$sel molid]
#Initialization of the atom list
set list_atom [$sel list]
#Initialization of the atomic coordinates list
set liste_xyz [$sel get {x y z}]
#Initialization of the atomic charges list"
set liste_q [$sel get charge]
graphics $molid color yellow
foreach {atom} $list_atom {
set q [lindex $liste_q $atom]
set xyz [lindex $liste_xyz $atom]
set xyz_texte [vecadd $offset [lindex $liste_xyz $atom]]
#puts "Atom n°$atom | q = $q | xyz = $xyz | xyz_texte $xyz_texte"
draw text $xyz_texte [ format "%5.4f" $q]
}
}
proc ML {} {
set i 0
foreach filename [lsort -dictionary [glob *.mol2 ]] {
puts $filename
mol new $filename type mol2 waitfor all
molinfo top set drawn 0
LA $i all
LC $i all
incr i 1
}
}
# LA 0 all
# LC 0 all
# ML
- To activate the function ML in your .vmdrc file for instance you
uncomment "# ML" into "ML"
- The ML function will display _all_ the atoms and _all_ the charges
for _all_ the mol2 files in the working directory: this is quite
convenient to load all the mol2 files generated by R.E.D.-III.5 or
R.E.D. IV in once by _only_ typing "vmd" with all the charges and/or
atom names automatically displayed.
- If you want to display all the atom names and all the charges for
all the mol2 files in your working directory you keep uncommented "LA
$i all" & "LC $i all" in the ML function.
- If you want to only display all the charges you comment "LA $i all"
and only keep uncomment "LC $i all" in the ML function.
- etc...
Following the same principle you can create a ML2 function where you
will display all the atom names reflecting chemical equivalencing for
all the P2N files belonging to the working directory.
proc ML2 {} {
set i 0
foreach filename [lsort -dictionary [glob *.p2n]] {
puts $filename
mol new $filename type pdb waitfor all
molinfo top set drawn 0
LA $i all
incr i 1
}
}
to execute ML2 simply add ML2 in your .vmdrc and only execute "vmd" in
the directory where the P2N files are...
Thus, with the functions ML and ML2 for VMD you can look at (i) atom
names reflecting chemical equivalencing for a bunch of R.E.D. inputs
and (ii) IUPAC atom names, atomic charges as well as atom
connectivities (i.e. the topology in a future prmtop file) for all the
outputs of a R.E.D. job.
Finally, do not forget to make the "D" black for the molecule in the
VMD main window ;-) i.e. to only display the selected structure among
the series loaded...
I forward this email in the Amber mailing list because other users
might be interested by this approach... I would also be interested if
other users know better approaches.
We should have added that in the R.E.D. tools version III.5...
I hope this helps...
regards, Francois
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Feb 24 2012 - 23:30:02 PST