diff --git a/.gitignore b/.gitignore index f9b5a2f0ee6e680b33fc32ba135765c747db8041..c4c1b9add1cca6fb92c973b33b29748e8c3a46a8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ pov_*test.pov pov_*test.inc *-out.pdb *-out.sdf +*-out.crd CMakeLists.txt.user OpenStructure.cbp DartConfiguration.tcl @@ -51,4 +52,4 @@ Debug /deployment/win/create_archive.bat /install_manifest.txt *_out.csv -/modules/io/tests/temp_img.tmp \ No newline at end of file +/modules/io/tests/temp_img.tmp diff --git a/modules/base/src/test_utils/compare_files.cc b/modules/base/src/test_utils/compare_files.cc index f28821e686e4e7745d1de9b359f441ca3d99aea4..904b14a7fa75dde9bf4edcf3cab176966f312dc1 100644 --- a/modules/base/src/test_utils/compare_files.cc +++ b/modules/base/src/test_utils/compare_files.cc @@ -44,17 +44,17 @@ bool compare_files(const String& test, const String& gold_standard) } if (!test_end) { std::cerr << gold_standard << " contains additional line(s):" - << std::endl << gold_line; + << std::endl << gold_line << std::endl; return false; } if (!gold_end) { std::cerr << test << " contains additional line(s):" - << std::endl << test_line; + << std::endl << test_line << std::endl; return false; } if (gold_line!=test_line) { std::cerr << "line mismatch:" << std::endl << "test: " << test_line - << std::endl << "gold: " << gold_line; + << std::endl << "gold: " << gold_line << std::endl; return false; } } diff --git a/modules/io/src/mol/entity_io_crd_handler.cc b/modules/io/src/mol/entity_io_crd_handler.cc index 8b0ceb837058b498a5cd21d7529f9590f7279aa8..58fdcb910d7346f8564be8dcc68fa3e64d34b8a2 100644 --- a/modules/io/src/mol/entity_io_crd_handler.cc +++ b/modules/io/src/mol/entity_io_crd_handler.cc @@ -43,6 +43,11 @@ namespace ost { namespace io { using boost::format; + +/// \brief Reader for CHARMM crd file format +/// +/// Standard and extended CHARMM format is supported, and file format is +/// automatically detected based on file header or atom number CRDReader::CRDReader(const boost::filesystem::path& loc): sequential_atom_list_(), curr_chain_(), @@ -60,11 +65,14 @@ CRDReader::CRDReader(const boost::filesystem::path& loc): if(!infile_) throw IOException("could not open "+loc.string()); } +/// \brief Returns an vector containing all atom handles as observed in the file std::vector<mol::AtomHandle> CRDReader::GetSequentialAtoms() const { return sequential_atom_list_; } + +/// \brief Performes file import void CRDReader::Import(mol::EntityHandle& ent) { Profile profile_import("CRDReader::Import"); @@ -79,21 +87,24 @@ void CRDReader::Import(mol::EntityHandle& ent) std::vector<String> line_content; boost::trim(line); boost::split(line_content,line,boost::is_any_of(" ")); - + // expanded charmm CARD format check if (line_content.size() > 1 || boost::lexical_cast<int>(line_content[0]) > 99999) while(std::getline(in_,line)) { - ParseAndAddAtomExpanded(line,ent); + if (!boost::trim_copy(line).empty()) + ParseAndAddAtomExpanded(line,ent); } else while(std::getline(in_,line)) { - ParseAndAddAtom(line,ent); + if (!boost::trim_copy(line).empty()) + ParseAndAddAtom(line,ent); } - + LOG_INFO("imported " << chain_count_ << " chains, " << residue_count_ << " residues, " << atom_count_ << " atoms"); } +/// \brief Parsing for standard format void CRDReader::ParseAndAddAtom(const String& line, mol::EntityHandle& ent) { mol::XCSEditor editor=ent.EditXCS(mol::BUFFERED_EDIT); @@ -103,7 +114,7 @@ void CRDReader::ParseAndAddAtom(const String& line, mol::EntityHandle& ent) //int anum = boost::lexical_cast<int>(boost::trim_copy(line.substr(0,5))); String aname = boost::trim_copy(line.substr(16,4)); String ele = aname.substr(0,1); - String rname = boost::trim_copy(line.substr(11,3)); + String rname = boost::trim_copy(line.substr(11,4)); int irnum = boost::lexical_cast<int>(boost::trim_copy(line.substr(55,4))); String s_chain = boost::trim_copy(line.substr(51,4)); geom::Vec3 apos(boost::lexical_cast<Real>(boost::trim_copy(line.substr(21,9))), @@ -155,7 +166,8 @@ void CRDReader::ParseAndAddAtom(const String& line, mol::EntityHandle& ent) sequential_atom_list_.push_back(ah); ++atom_count_; } - + +/// \brief Parsing for extended format void CRDReader::ParseAndAddAtomExpanded(const String& line, mol::EntityHandle& ent) { mol::XCSEditor editor=ent.EditXCS(mol::BUFFERED_EDIT); @@ -167,10 +179,11 @@ void CRDReader::ParseAndAddAtomExpanded(const String& line, mol::EntityHandle& e String ele = aname.substr(0,1); String rname = boost::trim_copy(line.substr(22,8)); int irnum = boost::lexical_cast<int>(boost::trim_copy(line.substr(112,8))); - String s_chain = boost::trim_copy(line.substr(102.8,8)); + String s_chain = boost::trim_copy(line.substr(102,8)); geom::Vec3 apos(boost::lexical_cast<Real>(boost::trim_copy(line.substr(40,20))), boost::lexical_cast<Real>(boost::trim_copy(line.substr(60,20))), boost::lexical_cast<Real>(boost::trim_copy(line.substr(80,20)))); + Real b_factor = boost::lexical_cast<Real>(boost::trim_copy(line.substr(128,12))); mol::ResidueKey rkey(rname); @@ -213,28 +226,38 @@ void CRDReader::ParseAndAddAtomExpanded(const String& line, mol::EntityHandle& e // finally add atom LOG_DEBUG("adding atom " << aname << " (" << ele << ") @" << apos); - mol::AtomHandle ah = editor.InsertAtom(curr_residue_, aname, apos, ele); + mol::AtomHandle ah = editor.InsertAtom(curr_residue_, aname, apos, ele, + 1.0, b_factor); sequential_atom_list_.push_back(ah); ++atom_count_; } -CRDWriter::CRDWriter(std::ostream& ostream) : - outfile_(), outstream_(ostream), atom_count_(0) +/// \brief CHARMM format writer +/// +/// The charmm format writer supports both the standard and the extended +/// format. Standard format supports at maximum 99999 atoms. If less atoms than +/// that are present, the default format is standard format, otherwise the +/// extended format is used. Extended format can be requested by setting the +/// parameter ext to true. +CRDWriter::CRDWriter(std::ostream& ostream, bool ext) : + outfile_(), outstream_(ostream), ext_(ext), atom_count_(0), res_count_(0) {} -CRDWriter::CRDWriter(const boost::filesystem::path& filename) : +CRDWriter::CRDWriter(const boost::filesystem::path& filename, bool ext) : #if BOOST_FILESYSTEM_VERSION==3 outfile_(filename.string().c_str()), outstream_(outfile_), #else outfile_(filename.file_string().c_str()), outstream_(outfile_), #endif - atom_count_(0) + ext_(ext), atom_count_(0), res_count_(0) {} -CRDWriter::CRDWriter(const String& filename) : - outfile_(filename.c_str()), outstream_(outfile_), atom_count_(0) +CRDWriter::CRDWriter(const String& filename, bool ext) : + outfile_(filename.c_str()), outstream_(outfile_), ext_(ext), atom_count_(0), + res_count_(0) {} +/// \brief Write header containing standard title and atom count/format row void CRDWriter::WriteHeader(const mol::EntityView& ent) { outstream_ << "* COOR FILE CREATED BY OPENSTRUCTURE" << std::endl; @@ -242,7 +265,7 @@ void CRDWriter::WriteHeader(const mol::EntityView& ent) atom_total_ = ent.GetAtomCount(); - if (atom_total_ > 99999) { + if (atom_total_ > 99999 || ext_) { outstream_ << format("%10i") % ent.GetAtomCount() << " EXT" << std::endl; } else { @@ -250,6 +273,43 @@ void CRDWriter::WriteHeader(const mol::EntityView& ent) } } +/// \brief Performs re-initialisation for writer +/// +/// Currently, this only sets the residue count to zero +void CRDWriter::Init() +{ + res_count_ = 0; +} + +void CRDWriter::Write(const mol::EntityView& ent) +{ + if (!outstream_) { + throw IOException("Can't write CRD file. Bad output stream"); + } + this->Init(); + mol::EntityView non_const_view = ent; + this->WriteHeader(non_const_view); + non_const_view.Apply(*this); +} + +void CRDWriter::Write(const mol::EntityHandle& ent) +{ + if (!outstream_) { + throw IOException("Can't write CRD file. Bad output stream"); + } + this->Init(); + mol::EntityView non_const_view = ent.CreateFullView(); + this->WriteHeader(non_const_view); + non_const_view.Apply(*this); +} + + +bool CRDWriter::VisitResidue(const mol::ResidueHandle& r) +{ + res_count_++; + return true; +} + bool CRDWriter::VisitAtom(const mol::AtomHandle& atom) { atom_count_++; @@ -260,27 +320,27 @@ bool CRDWriter::VisitAtom(const mol::AtomHandle& atom) mol::ResidueHandle res=atom.GetResidue(); - if (atom_total_ > 99999) { + if (atom_total_ > 99999 || ext_) { outstream_ << format("%10i") % atom_count_ - << format("%10i") % res.GetNumber() << " " + << format("%10i") % res_count_ << " " << format("%-8s") % res.GetKey() << " " << format("%-8s") % atom.GetName() << format("%20.10f") % atom.GetPos().x << format("%20.10f") % atom.GetPos().y << format("%20.10f") % atom.GetPos().z << " " - << format("%-8s") % e_name << " " + << format("%-8s") % res.GetChain().GetName() << " " << format("%-8i") % res.GetNumber() << format("%20.10f") % atom.GetBFactor() << std::endl; } else { outstream_ << format("%5i") % atom_count_ - << format("%5i") % res.GetNumber() << " " - << format("%4s") % res.GetKey() << " " + << format("%5i") % res_count_ << " " + << format("%-4s") % res.GetKey() << " " << format("%-4s") % atom.GetName() << format("%10.5f") % atom.GetPos().x << format("%10.5f") % atom.GetPos().y << format("%10.5f") % atom.GetPos().z << " " - << format("%-4s") % e_name << " " + << format("%-4s") % res.GetChain().GetName() << " " << format("%-5i") % res.GetNumber() << " " << format("%8.5f") % atom.GetBFactor() << std::endl; @@ -288,6 +348,7 @@ bool CRDWriter::VisitAtom(const mol::AtomHandle& atom) return true; } +/// \brief CHARMM file format requires builder bool EntityIOCRDHandler::RequiresBuilder() const { return true; @@ -304,18 +365,14 @@ void EntityIOCRDHandler::Export(const mol::EntityView& ent, std::ostream& stream) const { CRDWriter writer(stream); - writer.WriteHeader(ent); - mol::EntityView non_const_view = ent; - non_const_view.Apply(writer); + writer.Write(ent); } void EntityIOCRDHandler::Export(const mol::EntityView& ent, const boost::filesystem::path& loc) const { CRDWriter writer(loc); - writer.WriteHeader(ent); - mol::EntityView non_const_view = ent; - non_const_view.Apply(writer); + writer.Write(ent); } namespace { diff --git a/modules/io/src/mol/entity_io_crd_handler.hh b/modules/io/src/mol/entity_io_crd_handler.hh index 714a1d4019128264bd330e70468631772870e29c..c0d625a804258e7bd8b16d547d228bf5589ed6d2 100644 --- a/modules/io/src/mol/entity_io_crd_handler.hh +++ b/modules/io/src/mol/entity_io_crd_handler.hh @@ -16,14 +16,13 @@ // along with this library; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ +/* + Author: Ansgar Philippsen, Tobias Schmidt + */ + #ifndef OST_IO_ENTITY_IO_PLUGIN_CRD_H #define OST_IO_ENTITY_IO_PLUGIN_CRD_H -/* - CHARMM coordinate file import - Author: Ansgar Philippsen - */ - #include <ost/mol/entity_handle.hh> #include <ost/mol/chain_handle.hh> #include <ost/mol/residue_handle.hh> @@ -35,6 +34,7 @@ namespace ost { namespace io { +/// \brief CHARMM coordinate file import class DLLEXPORT_OST_IO CRDReader { public: CRDReader(const boost::filesystem::path& loc); @@ -58,22 +58,30 @@ private: boost::iostreams::filtering_stream<boost::iostreams::input> in_; }; - +/// \brief CHARMM coordinate file export class DLLEXPORT_OST_IO CRDWriter : public mol::EntityVisitor { public: - CRDWriter(const String& filename); - CRDWriter(const boost::filesystem::path& filename); - CRDWriter(std::ostream& outstream); + CRDWriter(const String& filename, bool ext=false); + CRDWriter(const boost::filesystem::path& filename, bool ext=false); + CRDWriter(std::ostream& outstream, bool ext=false); + + void Write(const mol::EntityView& ent); + void Write(const mol::EntityHandle& ent); virtual bool VisitAtom(const mol::AtomHandle& atom); + virtual bool VisitResidue(const mol::ResidueHandle& r); void WriteHeader(const mol::EntityView& ent); private: + void Init(); + std::ofstream outfile_; std::ostream& outstream_; + bool ext_; int atom_count_; int atom_total_; + int res_count_; }; class DLLEXPORT_OST_IO EntityIOCRDHandler: public EntityIOHandler { diff --git a/modules/io/tests/test_io_crd.cc b/modules/io/tests/test_io_crd.cc index 14400aed80c33c5c6e7865c71e45d540c8dbc7c6..82126d10f1fb9d9298e68a035340396df58dd57e 100644 --- a/modules/io/tests/test_io_crd.cc +++ b/modules/io/tests/test_io_crd.cc @@ -16,8 +16,10 @@ // along with this library; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ +#include <ost/test_utils/compare_files.hh> #include <ost/mol/mol.hh> #include <ost/io/mol/entity_io_crd_handler.hh> +#include <ost/io/save_entity.hh> #define BOOST_TEST_DYN_LINK #include <boost/test/unit_test.hpp> @@ -27,16 +29,129 @@ using namespace ost::io; BOOST_AUTO_TEST_SUITE( io ) +BOOST_AUTO_TEST_CASE(test_io_crd_import_handler) +{ + String fname("testfiles/crd/test_in.crd"); + + mol::EntityHandle eh=mol::CreateEntity(); + EntityIOCRDHandler crdh; + + BOOST_CHECK(EntityIOCRDHandler::ProvidesImport("","crd")); + BOOST_CHECK(EntityIOCRDHandler::ProvidesImport(fname)); + BOOST_CHECK(EntityIOCRDHandler::ProvidesImport("test_in.CRD")); + + BOOST_CHECK(EntityIOCRDHandler::ProvidesExport("","crd")); + BOOST_CHECK(EntityIOCRDHandler::ProvidesExport(fname)); + BOOST_CHECK(EntityIOCRDHandler::ProvidesExport("test_in.CRD")); +} + +/// check standard format input BOOST_AUTO_TEST_CASE(test_io_crd) { - const String fname("testfiles/test_in.crd"); + const String fname("testfiles/crd/test_in.crd"); + + mol::EntityHandle eh=mol::CreateEntity(); + CRDReader crdr(fname); + + crdr.Import(eh); + std::vector<mol::AtomHandle> alist = crdr.GetSequentialAtoms(); + + BOOST_CHECK_EQUAL(eh.GetAtomCount(), 9); + BOOST_CHECK_EQUAL(eh.GetResidueCount(), 2); + BOOST_CHECK_EQUAL(eh.GetChainCount(), 2); + BOOST_CHECK_EQUAL(eh.GetResidueList()[0].GetNumber().GetNum(), 3); + BOOST_CHECK_EQUAL(eh.GetResidueList()[1].GetNumber().GetNum(), 4); + BOOST_CHECK_EQUAL(eh.GetResidueList()[0].GetName(), "ALA"); + BOOST_CHECK_EQUAL(eh.GetResidueList()[1].GetName(), "P2AC"); + BOOST_CHECK_EQUAL(eh.GetAtomList()[0].GetName(), "N"); + BOOST_CHECK_EQUAL(eh.GetAtomList()[7].GetName(), "HA51"); + BOOST_CHECK_EQUAL(eh.GetChainList()[0].GetName(), "PEPT"); + BOOST_CHECK_EQUAL(eh.GetChainList()[1].GetName(), "RNA"); +} + +/// check extended format input +BOOST_AUTO_TEST_CASE(test_io_crd_ext) +{ + const String fname("testfiles/crd/multisegment.crd"); mol::EntityHandle eh=mol::CreateEntity(); CRDReader crdr(fname); crdr.Import(eh); std::vector<mol::AtomHandle> alist = crdr.GetSequentialAtoms(); + + BOOST_CHECK_EQUAL(eh.GetAtomCount(), 43); + BOOST_CHECK_EQUAL(eh.GetResidueCount(), 6); + BOOST_CHECK_EQUAL(eh.GetChainCount(), 3); + BOOST_CHECK_EQUAL(eh.GetResidueList()[0].GetNumber().GetNum(), 1); + BOOST_CHECK_EQUAL(eh.GetResidueList()[1].GetNumber().GetNum(), 2); + BOOST_CHECK_EQUAL(eh.GetResidueList()[2].GetNumber().GetNum(), 1); + BOOST_CHECK_EQUAL(eh.GetResidueList()[0].GetName(), "GLY"); + BOOST_CHECK_EQUAL(eh.GetResidueList()[1].GetName(), "GLU"); + BOOST_CHECK_EQUAL(eh.GetResidueList()[2].GetName(), "G3AC"); + BOOST_CHECK_EQUAL(eh.GetAtomList()[0].GetName(), "N"); + BOOST_CHECK_EQUAL(eh.GetAtomList()[20].GetName(), "OE1"); + BOOST_CHECK_EQUAL(eh.GetChainList()[0].GetName(), "PROTEIN"); + BOOST_CHECK_EQUAL(eh.GetChainList()[1].GetName(), "RNA"); + BOOST_CHECK_EQUAL(eh.GetChainList()[2].GetName(), "SAM"); } -BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file +/// check that empty lines at end of file are ignored +BOOST_AUTO_TEST_CASE(test_io_crd_empty_line) +{ + const String fname("testfiles/crd/empty_line_at_end.crd"); + mol::EntityHandle eh=mol::CreateEntity(); + CRDReader reader(fname); + reader.Import(eh); +} + +/// check extended format with multisegment file output +BOOST_AUTO_TEST_CASE(test_io_crd_writer_ext) +{ + const String fname("testfiles/crd/multisegment.crd"); + { + mol::EntityHandle eh=mol::CreateEntity(); + CRDReader reader(fname); + reader.Import(eh); + + CRDWriter writer(String("testfiles/crd/multisegment-out.crd"), true); + writer.Write(eh); + } + BOOST_CHECK(compare_files("testfiles/crd/multisegment-out.crd", + "testfiles/crd/multisegment.crd")); +} + +/// check standard format output +BOOST_AUTO_TEST_CASE(test_io_crd_writer_std) +{ + const String fname("testfiles/crd/test_in.crd"); + { + mol::EntityHandle eh=mol::CreateEntity(); + CRDReader reader(fname); + reader.Import(eh); + + CRDWriter writer(String("testfiles/crd/test-out.crd")); + writer.Write(eh); + } + BOOST_CHECK(compare_files("testfiles/crd/test-out.crd", + "testfiles/crd/test_in.crd")); +} + +/// check standard format is written by default +BOOST_AUTO_TEST_CASE(test_io_crd_default_format) +{ + const String fname("testfiles/crd/test_in.crd"); + { + mol::EntityHandle eh=mol::CreateEntity(); + CRDReader reader(fname); + reader.Import(eh); + + ost::io::SaveEntity(eh, "testfiles/crd/test-out.crd"); + } + BOOST_CHECK(compare_files("testfiles/crd/test-out.crd", + "testfiles/crd/test_in.crd")); +} + + +BOOST_AUTO_TEST_SUITE_END() diff --git a/modules/io/tests/testfiles/crd/empty_line_at_end.crd b/modules/io/tests/testfiles/crd/empty_line_at_end.crd new file mode 100755 index 0000000000000000000000000000000000000000..c9903690b46caece44d905d77c94a9fa37a00c35 --- /dev/null +++ b/modules/io/tests/testfiles/crd/empty_line_at_end.crd @@ -0,0 +1,14 @@ +* COOR FILE CREATED BY OPENSTRUCTURE +* + 9 + 1 1 ALA N -2.53857 10.36006 28.21452 PEPT 3 0.00000 + 2 1 ALA HT1 -2.09853 10.16934 29.15484 PEPT 3 0.00000 + 3 1 ALA HT2 -3.19965 9.53958 28.27807 PEPT 3 0.00000 + 4 1 ALA HT3 -3.03496 11.26844 28.29274 PEPT 3 0.00000 + 5 1 ALA CA -1.58333 10.24913 27.09525 PEPT 3 0.00000 + 6 1 ALA HA -0.74083 9.67002 27.43410 PEPT 3 0.00000 + 7 1 ALA CB -2.26337 9.53603 25.91124 PEPT 3 0.00000 + 8 2 P2AC HA51 -6.76933 80.69502 15.53886 RNA 4 0.00000 + 9 2 P2AC HA52 -8.23100 81.32728 16.35343 RNA 4 0.00000 + + diff --git a/modules/io/tests/testfiles/crd/multisegment.crd b/modules/io/tests/testfiles/crd/multisegment.crd new file mode 100644 index 0000000000000000000000000000000000000000..9b3e2e2870948fdbe62870224463e0ebaf6d46b1 --- /dev/null +++ b/modules/io/tests/testfiles/crd/multisegment.crd @@ -0,0 +1,46 @@ +* COOR FILE CREATED BY OPENSTRUCTURE +* + 43 EXT + 1 1 GLY N -2.0000000000 -8.5000000000 -4.0000000000 PROTEIN 1 0.0000916632 + 2 1 GLY HT1 -16.1250000000 -16.0009765625 -16.1259765625 PROTEIN 1 0.0000787743 + 3 1 GLY HT2 -24.0502128601 -10.1571445465 -4.7282133102 PROTEIN 1 0.0000787526 + 4 1 GLY HT3 -25.6165981293 -10.6957426071 -5.4588241577 PROTEIN 1 0.0000786720 + 5 1 GLY CA -25.3130340576 -11.3211555481 -3.5009372234 PROTEIN 1 0.0000978857 + 6 1 GLY HA1 -26.2965011597 -11.7470941544 -3.6310827732 PROTEIN 1 0.0000000000 + 7 1 GLY HA2 -25.4361457825 -10.4118413925 -2.8764421940 PROTEIN 1 0.0000851970 + 8 1 GLY C -24.4854793549 -12.3229217529 -2.9330530167 PROTEIN 1 0.0000944421 + 9 1 GLY O -23.7718524933 -13.0324668884 -3.6388895512 PROTEIN 1 0.0000894775 + 10 2 GLU N -24.5463562012 -12.6111087799 -1.6436747313 PROTEIN 2 0.0000000000 + 11 2 GLU HN -23.9035968781 -13.3227586746 -1.3749105930 PROTEIN 2 0.0000000000 + 12 2 GLU CA -25.4813365936 -12.0606479645 -0.6506563425 PROTEIN 2 0.0000000000 + 13 2 GLU HA -26.1672992706 -11.3891696930 -1.1180906296 PROTEIN 2 0.0000000000 + 14 2 GLU CB -26.2274837494 -13.2668724060 0.0429458581 PROTEIN 2 0.0000000000 + 15 2 GLU HB1 -26.7839298248 -12.7876672745 0.9326843023 PROTEIN 2 0.0030197345 + 16 2 GLU HB2 -25.4761943817 -13.9268684387 0.5624338984 PROTEIN 2 0.0000000000 + 17 2 GLU CG -27.2343692780 -13.8997907639 -0.9133957624 PROTEIN 2 0.0166021846 + 18 2 GLU HG1 -27.7255306244 -14.7208814621 -0.4454757869 PROTEIN 2 0.0368194766 + 19 2 GLU HG2 -26.6897678375 -14.4738664627 -1.8157539368 PROTEIN 2 0.0017852589 + 20 2 GLU CD -28.2506389618 -13.0106611252 -1.5168483257 PROTEIN 2 0.0774637908 + 21 2 GLU OE1 -29.3007488251 -12.8661479950 -0.8537709117 PROTEIN 2 0.1687415987 + 22 2 GLU OE2 -28.2000064850 -12.5138931274 -2.6356098652 PROTEIN 2 0.0706803948 + 23 2 GLU C -24.6928653717 -11.2268772125 0.3724045455 PROTEIN 2 0.0000000000 + 24 2 GLU O -25.2389545441 -10.7677593231 1.3376628160 PROTEIN 2 0.0000000000 + 25 3 G3AC N9 -15.8120441437 6.0608630180 -6.6949663162 RNA 1 0.0000393577 + 26 3 G3AC C4 -16.9207630157 6.8197221756 -7.0580096245 RNA 1 0.0000500576 + 27 3 G3AC N2 -20.2281303406 7.6236495972 -6.4126434326 RNA 1 0.0000850955 + 28 3 G3AC H21 -20.3844623566 6.9206910133 -5.6787233353 RNA 1 0.0000501027 + 29 3 G3AC H22 -20.8750762939 8.3805465698 -6.5524845123 RNA 1 0.0000851209 + 30 3 G3AC N3 -18.1747817993 6.6029930115 -6.5917358398 RNA 1 0.0000000000 + 31 4 GUA P -1.5319050550 5.2959299088 -0.6717305183 RNA 2 0.0000786968 + 32 4 GUA O1P -0.8520842195 4.0187578201 -0.6064184904 RNA 2 0.0000477555 + 33 4 GUA O2P -1.8167773485 6.0385017395 0.5593457222 RNA 2 0.0000425713 + 34 4 GUA O5' -0.7149851322 6.1814560890 -1.7396181822 RNA 2 0.0000425333 + 35 5 CYT P 2.5655767918 10.5823450089 -2.4465763569 RNA 3 0.0000425641 + 36 5 CYT O1P 3.6461751461 10.5359878540 -3.4340066910 RNA 3 0.0000000000 + 37 5 CYT O2P 2.8808369637 11.1873378754 -1.1375198364 RNA 3 0.0000000000 + 38 5 CYT O5' 1.2869589329 11.2338676453 -3.0263113976 RNA 3 0.0000917684 + 39 6 SAM N 4.0659961700 1.8457804918 -0.2989104986 SAM 1 0.0001180591 + 40 6 SAM HT1 4.6446375847 1.0045971870 -0.1713269502 SAM 1 0.0001002858 + 41 6 SAM HT2 4.0898685455 2.4858167171 0.5328502059 SAM 1 0.0000425641 + 42 6 SAM HT3 3.1142795086 1.6198593378 -0.4299965501 SAM 1 0.0000978186 + 43 6 SAM CA 4.8570294380 2.6207458973 -1.2435295582 SAM 1 0.0000851861 diff --git a/modules/io/tests/testfiles/test_in.crd b/modules/io/tests/testfiles/crd/test_in.crd similarity index 72% rename from modules/io/tests/testfiles/test_in.crd rename to modules/io/tests/testfiles/crd/test_in.crd index 35353e12430e93f81c67b607bca8a78a9de8e880..ce552c3e191dc5d50d5434e6b8b9a7304309bd95 100755 --- a/modules/io/tests/testfiles/test_in.crd +++ b/modules/io/tests/testfiles/crd/test_in.crd @@ -1,12 +1,12 @@ -* FULL SYSTEM -* AFTER MINIMIZATION AND 5 PSEC DYNAMICS -* DATE: 4/ 5/ 5 8:46:31 CREATED BY USER: bernechs -* -45283 - 1 1 ALA N -2.53857 10.36006 28.21452 PEPT 3 0.00000 - 2 1 ALA HT1 -2.09853 10.16934 29.15484 PEPT 3 0.00000 - 3 1 ALA HT2 -3.19965 9.53958 28.27807 PEPT 3 0.00000 - 4 1 ALA HT3 -3.03496 11.26844 28.29274 PEPT 3 0.00000 - 5 1 ALA CA -1.58333 10.24913 27.09525 PEPT 3 0.00000 - 6 1 ALA HA -0.74083 9.67002 27.43410 PEPT 3 0.00000 - 7 1 ALA CB -2.26337 9.53603 25.91124 PEPT 3 0.00000 +* COOR FILE CREATED BY OPENSTRUCTURE +* + 9 + 1 1 ALA N -2.53857 10.36006 28.21452 PEPT 3 0.00000 + 2 1 ALA HT1 -2.09853 10.16934 29.15484 PEPT 3 0.00000 + 3 1 ALA HT2 -3.19965 9.53958 28.27807 PEPT 3 0.00000 + 4 1 ALA HT3 -3.03496 11.26844 28.29274 PEPT 3 0.00000 + 5 1 ALA CA -1.58333 10.24913 27.09525 PEPT 3 0.00000 + 6 1 ALA HA -0.74083 9.67002 27.43410 PEPT 3 0.00000 + 7 1 ALA CB -2.26337 9.53603 25.91124 PEPT 3 0.00000 + 8 2 P2AC HA51 -6.76933 80.69502 15.53886 RNA 4 0.00000 + 9 2 P2AC HA52 -8.23100 81.32728 16.35343 RNA 4 0.00000