I wrote a VMD converter script I create the *gro file using csg_map, then I run that through VMD and scale all the coordinates and box lengths, and then write the LAMMPS data file using TopoTools. Saved me from writing my own scripts/code.
csg_map --top topol.xml --trj water.nvt.dump --cg water.xml --out cg.gro --nframes 1 vmd -dispdev none -eofexit < cg.vmd where cg.vmd is # Convert from *gro file in Angstroms to LAMMPS data file in Angstroms (since VMD, Votca think *dump is in nm) mol new cg.gro type gro molid 0 mol top 0 set anew [expr 0.1*[molinfo top get a]] set bnew [expr 0.1*[molinfo top get b]] set cnew [expr 0.1*[molinfo top get c]] molinfo top set a $anew molinfo top set b $bnew molinfo top set c $cnew set sel [atomselect top "all"] set xnew [vecscale 0.1 [$sel get x]] set ynew [vecscale 0.1 [$sel get y]] set znew [vecscale 0.1 [$sel get z]] $sel set x $xnew $sel set y $ynew $sel set z $znew package require topotools topo clearbonds topo clearangles topo cleardihedrals topo clearimpropers topo writelammpsdata cg.data full Seems to be working so far, and then I have the spce.in and everything in the LAMMPS inverse runs with real units in Angstroms and kcal/mol. Appears to be working, but still testing. Next I will setup the hexane example with the bonding in real units. On Saturday, February 11, 2017 at 9:00:21 PM UTC-5, Christoph Junghans wrote: > 2017-02-11 17:10 GMT-07:00 Joshua Moore <[email protected] <javascript:>>: > > Thanks. > > > > I think VMD does the same thing you do. It interprets the *.gro file as > in > > nm, so if it converts it to say *pdb, it also would multiply by 10. > > > > I'm trying to get Votca to work with LAMMPS in "real" units, all the way > > through from atomistic trajectory all the way through ibi. > The main problem here is that, dump files could be in any units, so is > there another file format lammps supports, which lists the units in > it? > > Otherwise just add a scale property to the xml topology (and its > reader) and use it in the dump file reader. > > Christoph > > > > > > > > On Saturday, February 11, 2017 at 7:03:58 PM UTC-5, Christoph Junghans > > wrote: > >> > >> 2017-02-11 16:36 GMT-07:00 Joshua Moore <[email protected]>: > >> > Hi, > >> > > >> > Is there an option not to scale the output. So for example, I have a > >> > dump > >> > file which was written in LAMMPS "real" units (Angstroms, kcal/mol). > I > >> > would like to map the trajectory, or write out a *pdb file, but > csg-map > >> > as > >> > you state below assumes the dump file is in nm. Is there a way to > tell > >> > cg-map that I do not want it to scale and use the coordinates as is, > >> > > >> > So I could do something like > >> > > >> > csg_map --top --topol.xml --trj water_aa.dump --cg cg_water.xml --out > >> > cg.pdb > >> > --nframes 1 > >> > > >> > This would write out a cg.pdb file which I could then use with > topotools > >> > to > >> > write out the LAMMPS input ".data" file. Can that be defined in the > >> > all-atom topol.xml file? > >> > > >> > Currently though csg_map is scaling everything by 10. > >> Sorry, even though adding a scale option to the topology class isn't > >> hard, no improvements has been made on that front (pull requests > >> welcome). > >> > >> As a workaround, I think, topotools supports the gro file format as > >> well, which is in nm, and hence won't have any scaling difference when > >> converting from a dump file using csg_map. > >> > >> Christoph > >> > > >> > Thanks. > >> > > >> > Josh > >> > > >> > > >> > On Saturday, February 28, 2015 at 9:37:29 AM UTC-5, Christoph > Junghans > >> > wrote: > >> >> > >> >> 2015-02-27 5:17 GMT-07:00 Vitalie Botan <[email protected]>: > >> >> > Hi, > >> >> > > >> >> > It seems like VOTCA has an additional factor 10 when converting > >> >> > between > >> >> > Angstroms and nm: > >> >> > the COM coors calculated from lammps dump in VMD are as they are > >> >> > supposed to > >> >> > be in Angstroms, but the output from csg_map is 10 times larger. > In > >> >> > the > >> >> > example above the coordinates of B1 bead should be 1.6348 -13.9948 > >> >> > 3.7050 > >> >> > in Angstroms or 0.16348 -1.399 0.37 in nm, but they are multiplied > by > >> >> > 10, > >> >> > i.e. the output units are 10^-11, not 10^-9. > >> >> > Of course I can scale the output manually, but I am not sure if > the > >> >> > same > >> >> > routine is used in other scripts like csg_stat or csg_boltzmann. > Can > >> >> > you > >> >> > check if the same scaling problem exists in the internal routines > of > >> >> > other > >> >> > scripts? > >> >> Ok, maybe I wasn't very clear, VOTCA assumes dump files are in nm, > >> >> independently if this is actually the case or not. > >> >> However, this only matters if you convert between different > simulation > >> >> programs/formats. > >> >> Example: > >> >> $ csg_map --top topol.xml --out conf.dump --trj spce.dump --no-map > >> >> no unit change (dump and dump have the same length unit) > >> >> $ csg_map --top topol.xml --out conf.gro --trj spce.dump --no-map > >> >> no unit change (gro and dump have the same length unit) > >> >> $ csg_map --top topol.xml --out conf.pdb --trj spce.dump --no-map > >> >> (factor 10, as dump is nm and pdb is angstrom) > >> >> > >> >> That implies, one can also run an IBI iteration in units different > >> >> from nm as long as one keeps using the same file format and hence no > >> >> scaling is performed. > >> >> > >> >> Christoph > >> >> > >> >> > >> >> > Best, > >> >> > > >> >> > Vitalie > >> >> > > >> >> > -- > >> >> > You received this message because you are subscribed to the Google > >> >> > Groups > >> >> > "votca" group. > >> >> > To unsubscribe from this group and stop receiving emails from it, > >> >> > send > >> >> > an > >> >> > email to [email protected]. > >> >> > To post to this group, send email to [email protected]. > >> >> > Visit this group at http://groups.google.com/group/votca. > >> >> > For more options, visit https://groups.google.com/d/optout. > >> >> > >> >> > >> >> > >> >> -- > >> >> Christoph Junghans > >> >> Web: http://www.compphys.de > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "votca" group. > >> > To unsubscribe from this group and stop receiving emails from it, > send > >> > an > >> > email to [email protected]. > >> > To post to this group, send email to [email protected]. > >> > Visit this group at https://groups.google.com/group/votca. > >> > > >> > For more options, visit https://groups.google.com/d/optout. > >> > >> > >> > >> -- > >> Christoph Junghans > >> Web: http://www.compphys.de > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "votca" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at https://groups.google.com/group/votca. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Christoph Junghans > Web: http://www.compphys.de > -- You received this message because you are subscribed to the Google Groups "votca" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/votca. For more options, visit https://groups.google.com/d/optout.
