ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/atom2md/openmdformat.cpp
(Generate patch)

Comparing:
trunk/src/applications/atom2md/openmdformat.cpp (file contents), Revision 1398 by gezelter, Tue Dec 8 22:17:02 2009 UTC vs.
branches/development/src/applications/atom2md/openmdformat.cpp (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 1 | Line 1 | Copyright (C) 2000 by OpenEye Scientific Software, Inc
1   /**********************************************************************
2   Copyright (C) 2000 by OpenEye Scientific Software, Inc.
3 < Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
3 > Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
4   Some portions Copyright (C) 2004 by Chris Morley
5 < Some portions Copyright (C) 2008 by J. Daniel Gezelter
5 > Some portions Copyright (C) 2008-2009 by J. Daniel Gezelter
6  
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
# Line 40 | Line 40 | namespace OpenBabel
40      virtual const char* Description() //required
41      {
42        return
43 <        "OpenMD combined meta-data / cartesian coordinates format\nNo comments yet\n";
43 >        "OpenMD combined meta-data / cartesian coordinates format\n\
44 >        No comments yet\n";
45      };
46      
47      virtual const char* SpecificationURL()
# Line 128 | Line 129 | namespace OpenBabel
129          return false;
130      }
131      
132 +
133 +
134      WriteMDFile(mdMols, numMols, ofs, *pmol, indices);
135      
136      for(vector<OBMol*>::iterator  i = mdMols.begin(); i != mdMols.end(); ++i) {
# Line 170 | Line 173 | namespace OpenBabel
173                                              vector<int>& fragment) {
174      
175      OBMol* newMol = new OBMol();
176 +    OBChainsParser* chainParser = new OBChainsParser();  
177 +    bool molIsWater = false;
178 +
179      newMol->ReserveAtoms(fragment.size());
180      newMol->BeginModify();
181      for(vector<int>::iterator i = fragment.begin(); i != fragment.end(); ++i) {
# Line 211 | Line 217 | namespace OpenBabel
217        OBMol* pmol = mols[i];
218        map<OBAtom*, int> atomMap;
219  
220 +
221        //chainParser->PerceiveChains(*pmol, false);
222        molIsWater = false;
223        FOR_RESIDUES_OF_MOL(residue, *pmol) {
217        std::cerr << "residue = " << residue->GetName() << "\n";
224          if (residue->GetName().compare("HOH") == 0) {
225            molIsWater = true;
226          }
# Line 350 | Line 356 | namespace OpenBabel
356              size_t endpos = str.find_last_not_of(" ");
357              str = str.substr( startpos, endpos-startpos+1 );
358              str1 = resName + "-" + str;
359 <          }      
359 >          }      
360            os << "  atom[" << ai << "] { ";
361            os << "type = " << "\"" << str1 << "\"" << "; ";
362            os << "position( " << (&*atom)->GetX() << ", " << (&*atom)->GetY() << ", " << (&*atom)->GetZ() << ");";
# Line 389 | Line 395 | namespace OpenBabel
395        OBMol* pmol = mols[i];      
396        os << "component{" << endl;
397        if (std::string(pmol->GetTitle()).compare("HOH") == 0) {
398 <        os << "  type = " << "HOH" << ";" << endl;
398 >        os << "  type = " << "\"HOH\"" << "; // change to appropriate water model" << endl;
399        } else {
400          sprintf(buffer, "%d", i);
401          os << "  type = " << molPrefix << buffer << ";" << endl;
# Line 415 | Line 421 | namespace OpenBabel
421      os << buffer << endl;
422      os << "    </FrameData>" << endl;
423      os << "    <StuntDoubles>" << endl;
424 <    
424 >        
425      OBAtom *atom;
426 <    
421 <    // still to do: intercept waters and recompute pvqj lines
422 <
426 >        
427      for(vector<int>::iterator i = indices.begin();i != indices.end(); ++i) {    
428 +      
429        atom = mol.GetAtom(*i);
430        sprintf(buffer, "%10d %7s %18.10g %18.10g %18.10g %13e %13e %13e", *i - 1,
431                "pv", atom->GetX(), atom->GetY(), atom->GetZ(), 0.0, 0.0, 0.0);

Comparing:
trunk/src/applications/atom2md/openmdformat.cpp (property svn:keywords), Revision 1398 by gezelter, Tue Dec 8 22:17:02 2009 UTC vs.
branches/development/src/applications/atom2md/openmdformat.cpp (property svn:keywords), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines