From df9cf17027b8d24d3559a12da1dae411077cde4b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 6 Nov 2023 15:23:52 -0500 Subject: [PATCH 0001/1492] Start Remote class --- src/Remote.cpp | 20 ++++++++++++++++++++ src/Remote.h | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/Remote.cpp create mode 100644 src/Remote.h diff --git a/src/Remote.cpp b/src/Remote.cpp new file mode 100644 index 0000000000..16585188d9 --- /dev/null +++ b/src/Remote.cpp @@ -0,0 +1,20 @@ +#include "Remote.h" +#include "CpptrajStdio.h" + +using namespace Cpptraj; + +/** CONSTRUCTOR */ +Remote::Remote() {} + +/** CONSTRUCTOR - base url */ +Remote::Remote(std::string const& baseUrl) : + url_(baseUrl) +{} + +/** Download file from base URL */ +int Remote::DownloadFile(std::string const& fname, std::string const& outputFname) +const +{ + return 0; +} + diff --git a/src/Remote.h b/src/Remote.h new file mode 100644 index 0000000000..a1cca47d4d --- /dev/null +++ b/src/Remote.h @@ -0,0 +1,18 @@ +#ifndef INC_REMOTE_H +#define INC_REMOTE_H +#include +namespace Cpptraj { +/// Class for downloading remote files. +class Remote { + public: + /// CONSTRUCTOR + Remote(); + /// CONSTRUCTOR - Take remote base URL + Remote(std::string const&); + /// Download file assuming URL is remote directory + int DownloadFile(std::string const&, std::string const&) const; + private: + std::string url_; ///< Remote base URL +}; +} +#endif From 0f876da874e617440a6c3e3c155c8b74d39c1922 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 6 Nov 2023 15:46:31 -0500 Subject: [PATCH 0002/1492] Start download function --- src/Remote.cpp | 52 +++++++++++++++++++++++++++++++++++++++++++++++--- src/Remote.h | 4 ++++ 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index 16585188d9..c7962a6276 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -1,20 +1,66 @@ #include "Remote.h" #include "CpptrajStdio.h" +#include "FileName.h" +#include // system using namespace Cpptraj; +/** The remote download command. */ +std::string Remote::cmd_ = ""; + /** CONSTRUCTOR */ -Remote::Remote() {} +Remote::Remote() { + setRemoteDownloadCommand(); +} /** CONSTRUCTOR - base url */ Remote::Remote(std::string const& baseUrl) : url_(baseUrl) -{} +{ + setRemoteDownloadCommand(); +} + +/** Set the remote download command. */ +int Remote::setRemoteDownloadCommand() { + if (!cmd_.empty()) return 0; + // First try curl + int err = system("curl --version"); + if (err == 0) { + mprintf("\tcurl found.\n"); + cmd_.assign("curl -L -o"); + } else { + err = system("wget --version"); + if (err == 0) { + mprintf("\twget found.\n"); + cmd_.assign("wget -O"); + } else { + mprinterr("Error: No working remote command found.\n"); + return 1; + } + } + return 0; +} /** Download file from base URL */ -int Remote::DownloadFile(std::string const& fname, std::string const& outputFname) +int Remote::DownloadFile(std::string const& fname, std::string const& outputFnameIn) const { + if (cmd_.empty()) { + mprinterr("Error: No remote download command set.\n"); + return 1; + } + if (fname.empty()) { + mprinterr("Error: No file name to download specified.\n"); + return 1; + } + FileName fileName(fname); + // Set output file name if necessary + FileName outputFname; + if (outputFnameIn.empty()) + outputFname = fileName; + else + outputFname.SetFileName( outputFnameIn ); + return 0; } diff --git a/src/Remote.h b/src/Remote.h index a1cca47d4d..875de8ab56 100644 --- a/src/Remote.h +++ b/src/Remote.h @@ -12,7 +12,11 @@ class Remote { /// Download file assuming URL is remote directory int DownloadFile(std::string const&, std::string const&) const; private: + /// Set remote download command + int setRemoteDownloadCommand(); + std::string url_; ///< Remote base URL + static std::string cmd_; ///< Command to call to download remote files }; } #endif From ef372705a79fcbeb5cc9bb3c884e5848e0446230 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 6 Nov 2023 15:55:52 -0500 Subject: [PATCH 0003/1492] Set up the actual command to call --- src/Remote.cpp | 14 ++++++++++++-- src/Remote.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index c7962a6276..3a9dd12349 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -8,6 +8,8 @@ using namespace Cpptraj; /** The remote download command. */ std::string Remote::cmd_ = ""; +std::string Remote::oflag_ = ""; + /** CONSTRUCTOR */ Remote::Remote() { setRemoteDownloadCommand(); @@ -27,12 +29,14 @@ int Remote::setRemoteDownloadCommand() { int err = system("curl --version"); if (err == 0) { mprintf("\tcurl found.\n"); - cmd_.assign("curl -L -o"); + cmd_.assign("curl -L "); + oflag_.assign("-o "); } else { err = system("wget --version"); if (err == 0) { mprintf("\twget found.\n"); - cmd_.assign("wget -O"); + cmd_.assign("wget "); + oflag_.assign("-O "); } else { mprinterr("Error: No working remote command found.\n"); return 1; @@ -61,6 +65,12 @@ const else outputFname.SetFileName( outputFnameIn ); + std::string remoteUrl = url_ + "/" + fileName.Full(); + mprintf("\t %s => %s\n", remoteUrl.c_str(), outputFname.full()); + + std::string remoteCmd = cmd_ + remoteUrl + " " + oflag_ + outputFname.Full(); + mprintf("DEBUG: %s\n", remoteCmd.c_str()); + return 0; } diff --git a/src/Remote.h b/src/Remote.h index 875de8ab56..b5508308c1 100644 --- a/src/Remote.h +++ b/src/Remote.h @@ -17,6 +17,7 @@ class Remote { std::string url_; ///< Remote base URL static std::string cmd_; ///< Command to call to download remote files + static std::string oflag_; ///< Command output file flag }; } #endif From 35175b27b8dc3cfbe1c3fa83d6ae28e343f4d610 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 6 Nov 2023 15:57:27 -0500 Subject: [PATCH 0004/1492] Actually call the download command --- src/Remote.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Remote.cpp b/src/Remote.cpp index 3a9dd12349..08c3ad5fc4 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -70,6 +70,11 @@ const std::string remoteCmd = cmd_ + remoteUrl + " " + oflag_ + outputFname.Full(); mprintf("DEBUG: %s\n", remoteCmd.c_str()); + int err = system(remoteCmd.c_str()); + if (err != 0) { + mprinterr("Error: Could not download %s => %s\n", remoteUrl.c_str(), outputFname.full()); + return 1; + } return 0; } From 663a8b2aea1db4515337068fb954773eb7e4a4ad Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 08:55:07 -0500 Subject: [PATCH 0005/1492] When nothing specified use base --- src/Remote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index 08c3ad5fc4..ba2527cb4e 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -61,7 +61,7 @@ const // Set output file name if necessary FileName outputFname; if (outputFnameIn.empty()) - outputFname = fileName; + outputFname = fileName.Base(); else outputFname.SetFileName( outputFnameIn ); From 6981d5d4fb16a3f1773bb8b43c5c756b0fde2816 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 09:03:49 -0500 Subject: [PATCH 0006/1492] Have option to overwrite files or not --- src/Remote.cpp | 27 ++++++++++++++++++++++----- src/Remote.h | 7 +++++-- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index ba2527cb4e..3bb871a358 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -11,17 +11,25 @@ std::string Remote::cmd_ = ""; std::string Remote::oflag_ = ""; /** CONSTRUCTOR */ -Remote::Remote() { +Remote::Remote() : + overwrite_(false) +{ setRemoteDownloadCommand(); } /** CONSTRUCTOR - base url */ Remote::Remote(std::string const& baseUrl) : + overwrite_(false), url_(baseUrl) { setRemoteDownloadCommand(); } +/** Set whether to overwrite existing files or not. */ +void Remote::SetOverwrite(bool b) { + overwrite_ = b; +} + /** Set the remote download command. */ int Remote::setRemoteDownloadCommand() { if (!cmd_.empty()) return 0; @@ -58,16 +66,26 @@ const return 1; } FileName fileName(fname); - // Set output file name if necessary + // Set output file name FileName outputFname; if (outputFnameIn.empty()) outputFname = fileName.Base(); else outputFname.SetFileName( outputFnameIn ); - + bool fileExists = File::Exists( outputFname ); + if (overwrite_) { + if (fileExists) + mprintf("Warning: Overwriting existing file '%s'\n", outputFname.full()); + } else { + if (fileExists) { + mprintf("Warning: Not overwriting existing file '%s'\n", outputFname.full()); + return 0; + } + } + // Set remote URL std::string remoteUrl = url_ + "/" + fileName.Full(); mprintf("\t %s => %s\n", remoteUrl.c_str(), outputFname.full()); - + // Download File std::string remoteCmd = cmd_ + remoteUrl + " " + oflag_ + outputFname.Full(); mprintf("DEBUG: %s\n", remoteCmd.c_str()); int err = system(remoteCmd.c_str()); @@ -78,4 +96,3 @@ const return 0; } - diff --git a/src/Remote.h b/src/Remote.h index b5508308c1..0ef6919e6d 100644 --- a/src/Remote.h +++ b/src/Remote.h @@ -9,14 +9,17 @@ class Remote { Remote(); /// CONSTRUCTOR - Take remote base URL Remote(std::string const&); + /// Set whether to overwrite files or not. + void SetOverwrite(bool); /// Download file assuming URL is remote directory int DownloadFile(std::string const&, std::string const&) const; private: /// Set remote download command int setRemoteDownloadCommand(); - std::string url_; ///< Remote base URL - static std::string cmd_; ///< Command to call to download remote files + bool overwrite_; ///< If true overwrite any existing files + std::string url_; ///< Remote base URL + static std::string cmd_; ///< Command to call to download remote files static std::string oflag_; ///< Command output file flag }; } From 992e25a7f4dfbdac72575c3c04cbcf30327a45b2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 09:52:38 -0500 Subject: [PATCH 0007/1492] Add debug level --- src/Remote.cpp | 12 ++++++++++-- src/Remote.h | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index 3bb871a358..88c8b6b5e9 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -8,11 +8,13 @@ using namespace Cpptraj; /** The remote download command. */ std::string Remote::cmd_ = ""; +/** Flag for setting output file for remote command. */ std::string Remote::oflag_ = ""; /** CONSTRUCTOR */ Remote::Remote() : - overwrite_(false) + overwrite_(false), + debug_(0) { setRemoteDownloadCommand(); } @@ -20,6 +22,7 @@ Remote::Remote() : /** CONSTRUCTOR - base url */ Remote::Remote(std::string const& baseUrl) : overwrite_(false), + debug_(0), url_(baseUrl) { setRemoteDownloadCommand(); @@ -30,6 +33,11 @@ void Remote::SetOverwrite(bool b) { overwrite_ = b; } +/** Set debug level */ +void Remote::SetDebug(int d) { + debug_ = d; +} + /** Set the remote download command. */ int Remote::setRemoteDownloadCommand() { if (!cmd_.empty()) return 0; @@ -87,7 +95,7 @@ const mprintf("\t %s => %s\n", remoteUrl.c_str(), outputFname.full()); // Download File std::string remoteCmd = cmd_ + remoteUrl + " " + oflag_ + outputFname.Full(); - mprintf("DEBUG: %s\n", remoteCmd.c_str()); + if (debug_ > 0) mprintf("DEBUG: %s\n", remoteCmd.c_str()); int err = system(remoteCmd.c_str()); if (err != 0) { mprinterr("Error: Could not download %s => %s\n", remoteUrl.c_str(), outputFname.full()); diff --git a/src/Remote.h b/src/Remote.h index 0ef6919e6d..b47723b87a 100644 --- a/src/Remote.h +++ b/src/Remote.h @@ -11,6 +11,8 @@ class Remote { Remote(std::string const&); /// Set whether to overwrite files or not. void SetOverwrite(bool); + /// Set debug level + void SetDebug(int); /// Download file assuming URL is remote directory int DownloadFile(std::string const&, std::string const&) const; private: @@ -18,6 +20,7 @@ class Remote { int setRemoteDownloadCommand(); bool overwrite_; ///< If true overwrite any existing files + int debug_; std::string url_; ///< Remote base URL static std::string cmd_; ///< Command to call to download remote files static std::string oflag_; ///< Command output file flag From da9e8d694972589b72f7162da9d40e54cfc116be Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 09:55:06 -0500 Subject: [PATCH 0008/1492] Add Remote.cpp, update depends --- src/cpptrajdepend | 1 + src/cpptrajfiles | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index e379d7ca83..cd68bbf84c 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -426,6 +426,7 @@ Range.o : Range.cpp ArgList.h CpptrajStdio.h Range.h StringRoutines.h ReadLine.o : ReadLine.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdInput.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReadLine.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ReferenceAction.o : ReferenceAction.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Coords_TRJ.h Dimension.h FileIO.h FileName.h Frame.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceAction.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajFrameIndex.h Trajin.h TypeNameHolder.h Unit.h Vec3.h RemdReservoirNC.o : RemdReservoirNC.cpp Atom.h AtomMask.h Box.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h Parallel.h RemdReservoirNC.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Unit.h Vec3.h +Remote.o : Remote.cpp CpptrajStdio.h FileName.h Remote.h Residue.o : Residue.cpp NameType.h Residue.h SDFfile.o : SDFfile.cpp Atom.h CpptrajFile.h FileIO.h FileName.h NameType.h Parallel.h SDFfile.h StringRoutines.h SymbolExporting.h SimplexMin.o : SimplexMin.cpp AssociatedData.h CpptrajFile.h CpptrajStdio.h DataSet.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h Random.h Range.h SimplexMin.h TextFormat.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 2d534859fb..a8d821136f 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -387,6 +387,7 @@ COMMON_SOURCES= \ ExternalFxn.cpp \ Random.cpp \ Range.cpp \ + Remote.cpp \ RNG.cpp \ RNG_Marsaglia.cpp \ RNG_MersenneTwister.cpp \ From cc8aa44e6ecb2092a742dc706c6182a409ee85c2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 10:26:35 -0500 Subject: [PATCH 0009/1492] Create a list of unrecognized residues to find parameters for. --- src/Exec_PrepareForLeap.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index 8afe438afc..f608c319e7 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -1028,6 +1028,33 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) mprintf("\tNot preparing sugars.\n"); } + // Determine unknown residues we may want to find parameters for + NameType solvName(solventResName_); + SetType residuesToFindParamsFor; + for (ResStatArray::iterator it = resStat.begin(); it != resStat.end(); ++it) + { + NameType const& residueName = topIn.Res(it-resStat.begin()).Name(); + // Skip water if not removing water + if (!remove_water && residueName == solvName) continue; + // If status is unknown, see if this is a common residue name + if ( *it == ResStatArray::UNKNOWN ) { + SetType::const_iterator pname = pdb_res_names_.find( residueName ); + if (pname == pdb_res_names_.end()) { + mprintf("\t%s is an unrecognized name and may not have parameters.\n", + topIn.TruncResNameOnumId(it-resStat.begin()).c_str()); + residuesToFindParamsFor.insert( residueName ); + } else + *it = ResStatArray::VALIDATED; + } + } + if (!residuesToFindParamsFor.empty()) { + mprintf("\tResidues to find parameters for:"); + for (SetType::const_iterator it = residuesToFindParamsFor.begin(); + it != residuesToFindParamsFor.end(); ++it) + mprintf(" %s", it->Truncated().c_str()); + mprintf("\n"); + } + // Create LEaP input for bonds that need to be made in LEaP for (std::vector::const_iterator bnd = LeapBonds.begin(); bnd != LeapBonds.end(); ++bnd) @@ -1035,7 +1062,6 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) // Count any solvent molecules if (!remove_water) { - NameType solvName(solventResName_); unsigned int nsolvent = 0; for (Topology::res_iterator res = topIn.ResStart(); res != topIn.ResEnd(); ++res) { if ( res->Name() == solvName) { From 94974fe05458f880bde82720aa57265283f4b0c5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 10:42:42 -0500 Subject: [PATCH 0010/1492] Add version not specifying output file --- src/Remote.cpp | 5 +++++ src/Remote.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index 88c8b6b5e9..1d6b640afd 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -104,3 +104,8 @@ const return 0; } + +/** Download file from base URL */ +int Remote::DownloadFile(std::string const& fname) const { + return DownloadFile(fname, ""); +} diff --git a/src/Remote.h b/src/Remote.h index b47723b87a..497b425f85 100644 --- a/src/Remote.h +++ b/src/Remote.h @@ -13,8 +13,10 @@ class Remote { void SetOverwrite(bool); /// Set debug level void SetDebug(int); - /// Download file assuming URL is remote directory + /// Download file to output file assuming URL is remote directory int DownloadFile(std::string const&, std::string const&) const; + /// Download file assuming URL is remote directory + int DownloadFile(std::string const&) const; private: /// Set remote download command int setRemoteDownloadCommand(); From ad3fac0f29a21f333749a775ec2f19222bdbaf78 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 11:05:55 -0500 Subject: [PATCH 0011/1492] Initial attempt at downloading files. Works ok, but not yet capturing when parameters not found. --- src/Exec_PrepareForLeap.cpp | 46 +++++++++++++++++++++++++++++++++++++ src/Exec_PrepareForLeap.h | 10 ++++---- src/cpptrajdepend | 2 +- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index f608c319e7..fa679bd831 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -4,6 +4,7 @@ #include "DataSet_Coords_CRD.h" #include "LeapInterface.h" #include "ParmFile.h" +#include "Remote.h" #include "StringRoutines.h" #include "Structure/Disulfide.h" #include "Structure/HisProt.h" @@ -12,6 +13,7 @@ #include "Structure/Sugar.h" #include "Trajout_Single.h" #include // FindTerByBonds +#include // tolower using namespace Cpptraj::Structure; @@ -634,6 +636,43 @@ void Exec_PrepareForLeap::LeapFxnGroupWarning(Topology const& topIn, int rnum) { } } +/** Try to download missing parameters. */ +int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, SetType const& resNames) +const +{ + Cpptraj::Remote remote( parameterURL_ ); + remote.SetDebug(1); // FIXME + for (SetType::const_iterator it = resNames.begin(); it != resNames.end(); ++it) + { + std::string rname = it->Truncated(); + mprintf("\t\tSearching for parameters for residue '%s'\n", rname.c_str()); + // Assume parameters are in a subdirectory starting with lowercase version + // of the first letter of the residue. + char lcase = tolower( rname[0] ); + std::string rfbase = std::string(1, lcase) + "/" + rname; + mprintf("DEBUG: Base name: %s\n", rfbase.c_str()); + int err = 0; + err += remote.DownloadFile( rfbase + ".mol2" ); + if (err == 0) { + err += remote.DownloadFile( rfbase + ".frcmod" ); + if (err != 0) + mprintf("Warning: Could not download %s.frcmod\n", rfbase.c_str()); + } else { + mprintf("Warning: Could not download %s.mol2\n", rfbase.c_str()); + } + if (err != 0) + mprintf("Warning: Could not download parameter files for '%s'\n", rname.c_str()); + else { + // Sanity check - make sure the files are there. + if (!File::Exists(rname + ".mol2") || !File::Exists(rname + ".frcmod")) { + mprinterr("Error: Problem downloading parameter files for '%s'\n", rname.c_str()); + return 1; + } + } + } // END loop over residue names to get parameters for + return 0; +} + // Exec_PrepareForLeap::Help() void Exec_PrepareForLeap::Help() const { @@ -1053,6 +1092,13 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) it != residuesToFindParamsFor.end(); ++it) mprintf(" %s", it->Truncated().c_str()); mprintf("\n"); + // Set default parameter URL if not yet set. + if (parameterURL_.empty()) + parameterURL_.assign("https://raw.githubusercontent.com/phenix-project/geostd/master"); + if (DownloadParameters(resStat, residuesToFindParamsFor)) { + mprinterr("Error: Download parameters failed.\n"); + return CpptrajState::ERR; + } } // Create LEaP input for bonds that need to be made in LEaP diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index 57e27c6ff8..985d02a778 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -4,6 +4,7 @@ namespace Cpptraj { namespace Structure { class SugarBuilder; +class ResStatArray; } } /// Do common tasks to prepare a structure to be loaded into tleap @@ -15,6 +16,7 @@ class Exec_PrepareForLeap : public Exec { RetType Execute(CpptrajState&, ArgList&); private: typedef std::vector Iarray; + typedef std::set SetType; /// Set PDB residue names recognized by Amber FFs void SetPdbResNames(); @@ -30,27 +32,27 @@ class Exec_PrepareForLeap : public Exec { /// Try to determine where TER cards should be placed based on bonds int FindTerByBonds(Topology&, CharMask const&) const; - - /// Remove specified atoms int ModifyCoords(Topology&, Frame&, bool, std::string const&, std::string const&, std::string const&, Iarray const&) const; /// Remove hydrogen atoms int RemoveHydrogens(Topology&, Frame&) const; - /// Run leap to generate topology, perform any modifications int RunLeap(std::string const&, std::string const&) const; /// Print a warning for residues that will need modification after leap static void LeapFxnGroupWarning(Topology const&, int); + /// Download missing parameters + int DownloadParameters(Cpptraj::Structure::ResStatArray&, SetType const&) const; + // ----------------------- - typedef std::set SetType; SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs std::string leapunitname_; bool errorsAreFatal_; ///< If false, try to skip errors. int debug_; ///< Debug level std::string solventResName_; ///< Solvent residue name + std::string parameterURL_; ///< URL to download parameters from }; #endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index cd68bbf84c..d2c7d7b566 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -318,7 +318,7 @@ Exec_ParmWrite.o : Exec_ParmWrite.cpp Action.h ActionList.h ActionState.h Analys Exec_ParseTiming.o : Exec_ParseTiming.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ParseTiming.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_PermuteDihedrals.o : Exec_PermuteDihedrals.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DihedralSearch.h Dimension.h DispatchObject.h DistRoutines.h EnsembleIn.h EnsembleOutList.h ExclusionArray.h Exec.h Exec_PermuteDihedrals.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h ImageOption.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Random.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StructureCheck.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Precision.o : Exec_Precision.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Precision.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_PrepareForLeap.o : Exec_PrepareForLeap.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_PrepareForLeap.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h LeapInterface.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h Structure/Disulfide.h Structure/HisProt.h Structure/ResStatArray.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarToken.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h +Exec_PrepareForLeap.o : Exec_PrepareForLeap.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_PrepareForLeap.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h LeapInterface.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h Remote.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h Structure/Disulfide.h Structure/HisProt.h Structure/ResStatArray.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarToken.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_PrintData.o : Exec_PrintData.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_PrintData.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Random.o : Exec_Random.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Random.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Random.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ReadData.o : Exec_ReadData.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ReadData.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From c579ffb4030a9d7f26ed258581be1a102c8e59cc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 11:20:57 -0500 Subject: [PATCH 0012/1492] Make less verbose --- src/Remote.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Remote.cpp b/src/Remote.cpp index 1d6b640afd..52cc4bd4ce 100644 --- a/src/Remote.cpp +++ b/src/Remote.cpp @@ -45,13 +45,13 @@ int Remote::setRemoteDownloadCommand() { int err = system("curl --version"); if (err == 0) { mprintf("\tcurl found.\n"); - cmd_.assign("curl -L "); + cmd_.assign("curl -s --show-error -f -L "); oflag_.assign("-o "); } else { err = system("wget --version"); if (err == 0) { mprintf("\twget found.\n"); - cmd_.assign("wget "); + cmd_.assign("wget --quiet "); oflag_.assign("-O "); } else { mprinterr("Error: No working remote command found.\n"); @@ -99,6 +99,7 @@ const int err = system(remoteCmd.c_str()); if (err != 0) { mprinterr("Error: Could not download %s => %s\n", remoteUrl.c_str(), outputFname.full()); + // FIXME: wget will leave behind empty files here return 1; } From 81e400202c8a5ec65f21f608629e1b44d3fe3c93 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 11:28:02 -0500 Subject: [PATCH 0013/1492] Add necessary leap input --- src/Exec_PrepareForLeap.cpp | 19 +++++++++++++------ src/Exec_PrepareForLeap.h | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index fa679bd831..f131483655 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -637,7 +637,8 @@ void Exec_PrepareForLeap::LeapFxnGroupWarning(Topology const& topIn, int rnum) { } /** Try to download missing parameters. */ -int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, SetType const& resNames) +int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, SetType const& resNames, + CpptrajFile* leapInput) const { Cpptraj::Remote remote( parameterURL_ ); @@ -668,6 +669,11 @@ const mprinterr("Error: Problem downloading parameter files for '%s'\n", rname.c_str()); return 1; } + // Add leap input + if (leapInput != 0) { + leapInput->Printf("%s = loadmol2 %s.mol2\n", rname.c_str(), rname.c_str()); + leapInput->Printf("parm%s = loadamberparams %s.frcmod\n", rname.c_str(), rname.c_str()); + } } } // END loop over residue names to get parameters for return 0; @@ -1032,10 +1038,6 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) if (outfile == 0) return CpptrajState::ERR; mprintf("\tLEaP input containing 'loadpdb' and bond commands for disulfides,\n" "\t sugars, etc will be written to '%s'\n", outfile->Filename().full()); - // Add the loadpdb command if we are writing a PDB file. - // TODO add 'addPdbResMap { { 1 "NH2" "NHE" } }' to recognize NHE? - if (!pdbout.empty()) - outfile->Printf("%s = loadpdb %s\n", leapunitname_.c_str(), pdbout.c_str()); // Array that will hold bonds that need to be made in LEaP std::vector LeapBonds; @@ -1095,12 +1097,17 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) // Set default parameter URL if not yet set. if (parameterURL_.empty()) parameterURL_.assign("https://raw.githubusercontent.com/phenix-project/geostd/master"); - if (DownloadParameters(resStat, residuesToFindParamsFor)) { + if (DownloadParameters(resStat, residuesToFindParamsFor, outfile)) { mprinterr("Error: Download parameters failed.\n"); return CpptrajState::ERR; } } + // Add the loadpdb command if we are writing a PDB file. + // TODO add 'addPdbResMap { { 1 "NH2" "NHE" } }' to recognize NHE? + if (!pdbout.empty()) + outfile->Printf("%s = loadpdb %s\n", leapunitname_.c_str(), pdbout.c_str()); + // Create LEaP input for bonds that need to be made in LEaP for (std::vector::const_iterator bnd = LeapBonds.begin(); bnd != LeapBonds.end(); ++bnd) diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index 985d02a778..052672a7dd 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -44,7 +44,7 @@ class Exec_PrepareForLeap : public Exec { static void LeapFxnGroupWarning(Topology const&, int); /// Download missing parameters - int DownloadParameters(Cpptraj::Structure::ResStatArray&, SetType const&) const; + int DownloadParameters(Cpptraj::Structure::ResStatArray&, SetType const&, CpptrajFile*) const; // ----------------------- SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs From 90af0e5b973d527e1a3b09e2f3de35fde4d61f59 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 7 Nov 2023 16:07:49 -0500 Subject: [PATCH 0014/1492] Start ResNameIndices class --- src/Structure/ResNameIndices.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/Structure/ResNameIndices.h diff --git a/src/Structure/ResNameIndices.h b/src/Structure/ResNameIndices.h new file mode 100644 index 0000000000..6390049470 --- /dev/null +++ b/src/Structure/ResNameIndices.h @@ -0,0 +1,33 @@ +#ifndef INC_STRUCTURE_RESNAMEINDICES_H +#define INC_STRUCTURE_RESNAMEINDICES_H +#include +#include "../NameType.h" +namespace Cpptraj { +namespace Structure { +class ResNameIndices { + typedef std::vector Iarray; + public: + ResNameIndices() {} + /// CONSTRUCTOR - Residue name and index + ResNameIndices(NameType const& n, int r) : resname_(n), resnums_(1, r) {} + /// Add residue index + void AddResnum(int r) { resnums_.push_back( r ); } + /// Sort only by resname + bool operator<(ResNameIndices const& rhs) const { + return (resname_ < rhs.resname_); + } + /// \return Residue name + NameType const& Resname() const { return resname_; } + /// Iterator over residue numbers + typedef Iarray::const_iterator const_iterator; + /// \return Beginning of residue numbers + const_iterator begin() const { return resnums_.begin(); } + /// \return Ending of residue numbers + const_iterator end() const { return resnums_.end(); } + private: + NameType resname_; ///< Residue name + Iarray resnums_; ///< Residue indices with this name +}; +} +} +#endif From 3a7454121039d7a41647615dd1f2c210a40ae205 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 08:31:39 -0500 Subject: [PATCH 0015/1492] Different constructor --- src/Structure/ResNameIndices.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Structure/ResNameIndices.h b/src/Structure/ResNameIndices.h index 6390049470..e11e26109a 100644 --- a/src/Structure/ResNameIndices.h +++ b/src/Structure/ResNameIndices.h @@ -9,7 +9,9 @@ class ResNameIndices { public: ResNameIndices() {} /// CONSTRUCTOR - Residue name and index - ResNameIndices(NameType const& n, int r) : resname_(n), resnums_(1, r) {} + //ResNameIndices(NameType const& n, int r) : resname_(n), resnums_(1, r) {} + /// CONSTRUCTOR - Residue name + ResNameIndices(NameType const& n) : resname_(n) {} /// Add residue index void AddResnum(int r) { resnums_.push_back( r ); } /// Sort only by resname From 3c69f650f87820e044c0b334decc7dff1dd606ea Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 08:31:51 -0500 Subject: [PATCH 0016/1492] Using a map instead --- src/Structure/ResNameIndices.h | 35 ---------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/Structure/ResNameIndices.h diff --git a/src/Structure/ResNameIndices.h b/src/Structure/ResNameIndices.h deleted file mode 100644 index e11e26109a..0000000000 --- a/src/Structure/ResNameIndices.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef INC_STRUCTURE_RESNAMEINDICES_H -#define INC_STRUCTURE_RESNAMEINDICES_H -#include -#include "../NameType.h" -namespace Cpptraj { -namespace Structure { -class ResNameIndices { - typedef std::vector Iarray; - public: - ResNameIndices() {} - /// CONSTRUCTOR - Residue name and index - //ResNameIndices(NameType const& n, int r) : resname_(n), resnums_(1, r) {} - /// CONSTRUCTOR - Residue name - ResNameIndices(NameType const& n) : resname_(n) {} - /// Add residue index - void AddResnum(int r) { resnums_.push_back( r ); } - /// Sort only by resname - bool operator<(ResNameIndices const& rhs) const { - return (resname_ < rhs.resname_); - } - /// \return Residue name - NameType const& Resname() const { return resname_; } - /// Iterator over residue numbers - typedef Iarray::const_iterator const_iterator; - /// \return Beginning of residue numbers - const_iterator begin() const { return resnums_.begin(); } - /// \return Ending of residue numbers - const_iterator end() const { return resnums_.end(); } - private: - NameType resname_; ///< Residue name - Iarray resnums_; ///< Residue indices with this name -}; -} -} -#endif From 7dcb392d0ce2df50a3edf8abd4c1c03115394014 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 08:35:33 -0500 Subject: [PATCH 0017/1492] Clean up any downloaded parameters --- test/Test_PrepareForLeap/RunTest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Test_PrepareForLeap/RunTest.sh b/test/Test_PrepareForLeap/RunTest.sh index 681b41cca2..deea079740 100755 --- a/test/Test_PrepareForLeap/RunTest.sh +++ b/test/Test_PrepareForLeap/RunTest.sh @@ -4,7 +4,7 @@ CleanFiles cpptraj.in 1qos.cpptraj.pdb leap.1qos.in \ leap.4zzw.in 4zzw.cpptraj.pdb 1qos.cpptraj.pdb.2 \ - leap.1qos.in.2 + leap.1qos.in.2 *.mol2 *.frcmod INPUT='-i cpptraj.in' From 452ff08f7db43e2343653298068fc523f28edc83 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 08:36:01 -0500 Subject: [PATCH 0018/1492] Save residue numbers of residues to get parameters for --- src/Exec_PrepareForLeap.cpp | 27 ++++++++++++++++++--------- src/Exec_PrepareForLeap.h | 5 ++++- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index f131483655..17a8305856 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -637,16 +637,19 @@ void Exec_PrepareForLeap::LeapFxnGroupWarning(Topology const& topIn, int rnum) { } /** Try to download missing parameters. */ -int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, SetType const& resNames, +int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, RmapType const& resNames, CpptrajFile* leapInput) const { Cpptraj::Remote remote( parameterURL_ ); remote.SetDebug(1); // FIXME - for (SetType::const_iterator it = resNames.begin(); it != resNames.end(); ++it) + for (RmapType::const_iterator it = resNames.begin(); it != resNames.end(); ++it) { - std::string rname = it->Truncated(); - mprintf("\t\tSearching for parameters for residue '%s'\n", rname.c_str()); + std::string rname = it->first.Truncated(); + mprintf("\t\tSearching for parameters for residue '%s'", rname.c_str()); + for (Iarray::const_iterator rn = it->second.begin(); rn != it->second.end(); ++rn) + mprintf(" %i", *rn + 1); + mprintf("\n"); // Assume parameters are in a subdirectory starting with lowercase version // of the first letter of the residue. char lcase = tolower( rname[0] ); @@ -1071,7 +1074,7 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) // Determine unknown residues we may want to find parameters for NameType solvName(solventResName_); - SetType residuesToFindParamsFor; + RmapType residuesToFindParamsFor; for (ResStatArray::iterator it = resStat.begin(); it != resStat.end(); ++it) { NameType const& residueName = topIn.Res(it-resStat.begin()).Name(); @@ -1083,16 +1086,22 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) if (pname == pdb_res_names_.end()) { mprintf("\t%s is an unrecognized name and may not have parameters.\n", topIn.TruncResNameOnumId(it-resStat.begin()).c_str()); - residuesToFindParamsFor.insert( residueName ); + RmapType::iterator ret = residuesToFindParamsFor.lower_bound( residueName ); + if (ret == residuesToFindParamsFor.end() || ret->first != residueName) + { + // New residue to get params for + ret = residuesToFindParamsFor.insert(ret, RpairType(residueName, Iarray())); + } + ret->second.push_back( it - resStat.begin() ); } else *it = ResStatArray::VALIDATED; } } if (!residuesToFindParamsFor.empty()) { mprintf("\tResidues to find parameters for:"); - for (SetType::const_iterator it = residuesToFindParamsFor.begin(); - it != residuesToFindParamsFor.end(); ++it) - mprintf(" %s", it->Truncated().c_str()); + for (RmapType::const_iterator it = residuesToFindParamsFor.begin(); + it != residuesToFindParamsFor.end(); ++it) + mprintf(" %s", it->first.Truncated().c_str()); mprintf("\n"); // Set default parameter URL if not yet set. if (parameterURL_.empty()) diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index 052672a7dd..1a5d464ce8 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -5,6 +5,7 @@ namespace Cpptraj { namespace Structure { class SugarBuilder; class ResStatArray; +class ResNameIndices; } } /// Do common tasks to prepare a structure to be loaded into tleap @@ -17,6 +18,8 @@ class Exec_PrepareForLeap : public Exec { private: typedef std::vector Iarray; typedef std::set SetType; + typedef std::pair RpairType; + typedef std::map RmapType; /// Set PDB residue names recognized by Amber FFs void SetPdbResNames(); @@ -44,7 +47,7 @@ class Exec_PrepareForLeap : public Exec { static void LeapFxnGroupWarning(Topology const&, int); /// Download missing parameters - int DownloadParameters(Cpptraj::Structure::ResStatArray&, SetType const&, CpptrajFile*) const; + int DownloadParameters(Cpptraj::Structure::ResStatArray&, RmapType const&, CpptrajFile*) const; // ----------------------- SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs From 21e582fcea2b8da7902a1f39c47f6920a9a5c454 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 08:43:38 -0500 Subject: [PATCH 0019/1492] Detect residue connectivity for unknown residues --- src/Exec_PrepareForLeap.cpp | 19 +++++++++++++++++-- src/Exec_PrepareForLeap.h | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index 17a8305856..821cbc6096 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -638,7 +638,7 @@ void Exec_PrepareForLeap::LeapFxnGroupWarning(Topology const& topIn, int rnum) { /** Try to download missing parameters. */ int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, RmapType const& resNames, - CpptrajFile* leapInput) + Topology const& topIn, CpptrajFile* leapInput) const { Cpptraj::Remote remote( parameterURL_ ); @@ -677,6 +677,21 @@ const leapInput->Printf("%s = loadmol2 %s.mol2\n", rname.c_str(), rname.c_str()); leapInput->Printf("parm%s = loadamberparams %s.frcmod\n", rname.c_str(), rname.c_str()); } + // Downloaded mol2 files do not have connectivity, so we need to add bonds. + for (Iarray::const_iterator rn = it->second.begin(); rn != it->second.end(); ++rn) + { + Residue const& currentRes = topIn.Res( *rn ); + // Check each atom for bonds to another residue + for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); ++at) { + for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) { + if ( topIn[*bat].ResNum() != *rn ) { + mprintf("\t\t\tRes %s is bonded to res %s\n", + topIn.TruncResAtomName(at).c_str(), + topIn.TruncResAtomName(*bat).c_str()); + } + } // END loop over bonded atoms + } // END loop over atoms in residue + } // END loop over residue numbers } } // END loop over residue names to get parameters for return 0; @@ -1106,7 +1121,7 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) // Set default parameter URL if not yet set. if (parameterURL_.empty()) parameterURL_.assign("https://raw.githubusercontent.com/phenix-project/geostd/master"); - if (DownloadParameters(resStat, residuesToFindParamsFor, outfile)) { + if (DownloadParameters(resStat, residuesToFindParamsFor, topIn, outfile)) { mprinterr("Error: Download parameters failed.\n"); return CpptrajState::ERR; } diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index 1a5d464ce8..ce1df12bdc 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -47,7 +47,8 @@ class Exec_PrepareForLeap : public Exec { static void LeapFxnGroupWarning(Topology const&, int); /// Download missing parameters - int DownloadParameters(Cpptraj::Structure::ResStatArray&, RmapType const&, CpptrajFile*) const; + int DownloadParameters(Cpptraj::Structure::ResStatArray&, RmapType const&, + Topology const&, CpptrajFile*) const; // ----------------------- SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs From de91632226149708cb54c683e6832dcf936e2571 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 09:23:29 -0500 Subject: [PATCH 0020/1492] Add == operator --- src/ParameterTypes.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 69b64b3bde..7564a61069 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -64,6 +64,11 @@ class BondType { return (a2_ < rhs.a2_); } else return (a1_ < rhs.a1_); } + bool operator==(const BondType& rhs) const { + if ( (a1_ == rhs.a1_ && a2_ == rhs.a2_) || + (a2_ == rhs.a1_ && a1_ == rhs.a2_) ) return true; + return false; + } private: int a1_; int a2_; From b15831b4f2d35ba6c91db29e9c93a27fa26f154f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 09:23:50 -0500 Subject: [PATCH 0021/1492] Add detected bonds from unknown residues to other residues. Remove any duplicates. --- src/Exec_PrepareForLeap.cpp | 12 ++++++++++-- src/Exec_PrepareForLeap.h | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index 821cbc6096..1efd2a83a5 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -14,6 +14,7 @@ #include "Trajout_Single.h" #include // FindTerByBonds #include // tolower +#include // unique using namespace Cpptraj::Structure; @@ -638,7 +639,8 @@ void Exec_PrepareForLeap::LeapFxnGroupWarning(Topology const& topIn, int rnum) { /** Try to download missing parameters. */ int Exec_PrepareForLeap::DownloadParameters(ResStatArray& resStat, RmapType const& resNames, - Topology const& topIn, CpptrajFile* leapInput) + Topology const& topIn, CpptrajFile* leapInput, + std::vector& LeapBonds) const { Cpptraj::Remote remote( parameterURL_ ); @@ -688,6 +690,7 @@ const mprintf("\t\t\tRes %s is bonded to res %s\n", topIn.TruncResAtomName(at).c_str(), topIn.TruncResAtomName(*bat).c_str()); + LeapBonds.push_back( BondType(at, *bat, -1) ); } } // END loop over bonded atoms } // END loop over atoms in residue @@ -1121,7 +1124,7 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) // Set default parameter URL if not yet set. if (parameterURL_.empty()) parameterURL_.assign("https://raw.githubusercontent.com/phenix-project/geostd/master"); - if (DownloadParameters(resStat, residuesToFindParamsFor, topIn, outfile)) { + if (DownloadParameters(resStat, residuesToFindParamsFor, topIn, outfile, LeapBonds)) { mprinterr("Error: Download parameters failed.\n"); return CpptrajState::ERR; } @@ -1132,6 +1135,11 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) if (!pdbout.empty()) outfile->Printf("%s = loadpdb %s\n", leapunitname_.c_str(), pdbout.c_str()); + // Remove any duplicate bonds + std::sort( LeapBonds.begin(), LeapBonds.end() ); + std::vector::const_iterator it = std::unique( LeapBonds.begin(), LeapBonds.end() ); + LeapBonds.resize( it - LeapBonds.begin() ); + // Create LEaP input for bonds that need to be made in LEaP for (std::vector::const_iterator bnd = LeapBonds.begin(); bnd != LeapBonds.end(); ++bnd) diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index ce1df12bdc..f9b64d3ca3 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -1,6 +1,7 @@ #ifndef INC_EXEC_PREPAREFORLEAP_H #define INC_EXEC_PREPAREFORLEAP_H #include "Exec.h" +class BondType; namespace Cpptraj { namespace Structure { class SugarBuilder; @@ -48,7 +49,7 @@ class Exec_PrepareForLeap : public Exec { /// Download missing parameters int DownloadParameters(Cpptraj::Structure::ResStatArray&, RmapType const&, - Topology const&, CpptrajFile*) const; + Topology const&, CpptrajFile*, std::vector&) const; // ----------------------- SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs From 240f48f8ab798429602a16f66f09259ad95cdd7d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 09:31:47 -0500 Subject: [PATCH 0022/1492] Output is the same but bonds are now sorted --- test/Test_PrepareForLeap/leap.1qos.in.save | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Test_PrepareForLeap/leap.1qos.in.save b/test/Test_PrepareForLeap/leap.1qos.in.save index 32c3565874..fe1929faba 100644 --- a/test/Test_PrepareForLeap/leap.1qos.in.save +++ b/test/Test_PrepareForLeap/leap.1qos.in.save @@ -1,7 +1,7 @@ m = loadpdb 1qos.cpptraj.pdb bond m.182.SG m.419.SG bond m.475.C1 m.476.O1 -bond m.478.C1 m.479.O1 -bond m.483.C1 m.110.OG bond m.475.O4 m.477.C1 +bond m.478.C1 m.479.O1 bond m.478.O4 m.480.C1 +bond m.483.C1 m.110.OG From 7254fcda20232d423d3da0f57ea20a797d1b40ab Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 8 Nov 2023 10:31:30 -0500 Subject: [PATCH 0023/1492] If we could find parameters for residues, mark them as validated. --- src/Exec_PrepareForLeap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index 1efd2a83a5..59b7a538f6 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -682,6 +682,8 @@ const // Downloaded mol2 files do not have connectivity, so we need to add bonds. for (Iarray::const_iterator rn = it->second.begin(); rn != it->second.end(); ++rn) { + // Assume we are all good with parameters for these residues now. + resStat[*rn] = ResStatArray::VALIDATED; Residue const& currentRes = topIn.Res( *rn ); // Check each atom for bonds to another residue for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); ++at) { From 0a130525a8cc581c7e6fee5df46e40a27c72e9e3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 09:22:27 -0500 Subject: [PATCH 0024/1492] Add dlparams/nodlparams keywords. Do not check for unknown residues twice. --- src/Exec_PrepareForLeap.cpp | 27 ++++++++++++++++++++------- src/Exec_PrepareForLeap.h | 9 +++++---- src/Structure/ResStatArray.h | 6 ++++++ 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/Exec_PrepareForLeap.cpp b/src/Exec_PrepareForLeap.cpp index 59b7a538f6..82020e049b 100644 --- a/src/Exec_PrepareForLeap.cpp +++ b/src/Exec_PrepareForLeap.cpp @@ -21,6 +21,7 @@ using namespace Cpptraj::Structure; /** CONSTRUCTOR */ Exec_PrepareForLeap::Exec_PrepareForLeap() : Exec(COORDS), errorsAreFatal_(true), + downloadParams_(true), debug_(0) { SetHidden(false); @@ -708,7 +709,7 @@ void Exec_PrepareForLeap::Help() const mprintf("\tcrdset [frame <#>] name \n" "\t[pdbout [terbymol]]\n" "\t[leapunitname ] [out [runleap ]]\n" - "\t[skiperrors]\n" + "\t[skiperrors] [{dlparams|nodlparams}]\n" "\t[nowat [watermask ] [noh]\n" "\t[keepaltloc {|highestocc}]\n" "\t[stripmask ] [solventresname ]\n" @@ -733,6 +734,8 @@ void Exec_PrepareForLeap::Help() const " have any inter-residue bonds removed, and the appropriate LEaP\n" " input to add the bonds back once the structure has been loaded\n" " into LEaP will be written to .\n" + " The command will attempt to download parameters for unknown\n" + " residues unless 'nodlparams' is specified.\n" ); } @@ -745,6 +748,12 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) "# J. Comp. Chem. (2022), V. 43, I. 13, pp 930-935.\n" ); debug_ = State.Debug(); errorsAreFatal_ = !argIn.hasKey("skiperrors"); + if (argIn.hasKey("dlparams")) + downloadParams_ = true; + else if (argIn.hasKey("nodlparams")) + downloadParams_ = false; + else + downloadParams_ = true; // Get input coords std::string crdset = argIn.GetStringKey("crdset"); if (crdset.empty()) { @@ -847,6 +856,10 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) for (SetType::const_iterator it = pdb_res_names_.begin(); it != pdb_res_names_.end(); ++it) mprintf("\t %s\n", *(*it)); } + if (downloadParams_) + mprintf("\tWill attempt to download parameters for unknown residues.\n"); + else + mprintf("\tWill not attempt to download paramters for unknown residues.\n"); // Load PDB to glycam residue name map SugarBuilder sugarBuilder(debug_); @@ -1117,7 +1130,7 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) *it = ResStatArray::VALIDATED; } } - if (!residuesToFindParamsFor.empty()) { + if (downloadParams_ && !residuesToFindParamsFor.empty()) { mprintf("\tResidues to find parameters for:"); for (RmapType::const_iterator it = residuesToFindParamsFor.begin(); it != residuesToFindParamsFor.end(); ++it) @@ -1166,7 +1179,7 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) int fatal_errors = 0; static const char* msg1 = "Potential problem : "; static const char* msg2 = "Fatal problem : "; - for (ResStatArray::iterator it = resStat.begin(); it != resStat.end(); ++it) + for (ResStatArray::const_iterator it = resStat.begin(); it != resStat.end(); ++it) { LeapFxnGroupWarning(topIn, it-resStat.begin()); //if ( *it == VALIDATED ) @@ -1175,12 +1188,12 @@ Exec::RetType Exec_PrepareForLeap::Execute(CpptrajState& State, ArgList& argIn) // mprintf("\t\t%s UNKNOWN\n", topIn.TruncResNameOnumId(it-resStat_.begin()).c_str()); // ----- Warnings -------- if ( *it == ResStatArray::UNKNOWN ) { - SetType::const_iterator pname = pdb_res_names_.find( topIn.Res(it-resStat.begin()).Name() ); - if (pname == pdb_res_names_.end()) + //SetType::const_iterator pname = pdb_res_names_.find( topIn.Res(it-resStat.begin()).Name() ); + //if (pname == pdb_res_names_.end()) mprintf("\t%s%s is an unrecognized name and may not have parameters.\n", msg1, topIn.TruncResNameOnumId(it-resStat.begin()).c_str()); - else - *it = ResStatArray::VALIDATED; + //else + // *it = ResStatArray::VALIDATED; } else if ( *it == ResStatArray::SUGAR_NAME_MISMATCH ) { mprintf("\t%s%s sugar anomer type and/or configuration is not consistent with name.\n", msg1, topIn.TruncResNameOnumId(it-resStat.begin()).c_str()); diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index f9b64d3ca3..eb163c31f8 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -52,11 +52,12 @@ class Exec_PrepareForLeap : public Exec { Topology const&, CpptrajFile*, std::vector&) const; // ----------------------- - SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs + SetType pdb_res_names_; ///< PDB residue names recognized by Amber FFs - std::string leapunitname_; - bool errorsAreFatal_; ///< If false, try to skip errors. - int debug_; ///< Debug level + std::string leapunitname_; ///< Unit name to use when loading molecule + bool errorsAreFatal_; ///< If false, try to skip errors. + bool downloadParams_; ///< If true, try to download parameters for missing residues + int debug_; ///< Debug level std::string solventResName_; ///< Solvent residue name std::string parameterURL_; ///< URL to download parameters from }; diff --git a/src/Structure/ResStatArray.h b/src/Structure/ResStatArray.h index 04d443718f..02a522e924 100644 --- a/src/Structure/ResStatArray.h +++ b/src/Structure/ResStatArray.h @@ -27,6 +27,12 @@ class ResStatArray { iterator begin() { return resStat_.begin(); } /// \return iterator to end iterator end() { return resStat_.end(); } + + typedef std::vector::const_iterator const_iterator; + /// \return const iterator to beginning + const_iterator begin() const { return resStat_.begin(); } + /// \return iterator to end + const_iterator end() const { return resStat_.end(); } private: typedef std::vector Rarray; Rarray resStat_; ///< Status of each residue in a topology From 45bb375e845d0fb47ca90abb3b5ebb252be26eb6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 09:23:58 -0500 Subject: [PATCH 0025/1492] Add LJ 1-4 pairs to ParameterSet --- src/ParameterSet.cpp | 8 ++++++++ src/ParameterSet.h | 40 ++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 7d85cfb647..ccfc35bde6 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -27,6 +27,12 @@ void ParameterSet::Debug(const char* fnameIn) const { for (ParmHolder::const_iterator nb = nbParm_.begin(); nb != nbParm_.end(); ++nb) Out.Printf("\t%6s %6s : %12.4E %12.4E\n", (*nb->first[0]), (*nb->first[1]), nb->second.A(), nb->second.B()); } + if (!nb14Parm_.empty()) { + Out.Printf("LJ 1-4 parameters:\n"); + Out.Printf("\t%6s %6s : %12s %12s\n", "Type1", "Type2", "A", "B"); + for (ParmHolder::const_iterator nb = nb14Parm_.begin(); nb != nb14Parm_.end(); ++nb) + Out.Printf("\t%6s %6s : %12.4E %12.4E\n", (*nb->first[0]), (*nb->first[1]), nb->second.A(), nb->second.B()); + } if (!bondParm_.empty()) { Out.Printf("Bond parameters:\n"); Out.Printf("\t%6s %6s : %12s %12s\n", "Type1", "Type2", "Rk", "Req"); @@ -85,6 +91,8 @@ int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int uc.nAtomTypeUpdated_ = UpdateParameters< ParmHolder >(set0.AT(), set1.AT(), "atom type"); // LJ Pairs uc.nLJparamsUpdated_ = UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); + // LJ 1-4 Pairs + uc.nLJ14paramsUpdated_ = UpdateParameters< ParmHolder >(set0.NB14(), set1.NB14(), "LJ A-B 1-4"); if (debugIn > 0) set0.Debug("newp.dat"); return 0; diff --git a/src/ParameterSet.h b/src/ParameterSet.h index e5b1844220..eb5b787ebd 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -10,24 +10,24 @@ class ParameterSet { ParmHolder& AT() { return atomTypes_; } ParmHolder& NB() { return nbParm_; } - ParmHolder& BP() { return bondParm_; } + ParmHolder& NB14() { return nb14Parm_; } + ParmHolder& BP() { return bondParm_; } ParmHolder& AP() { return angleParm_; } - ParmHolder& UB() { return ubParm_; } - //ParmHolder& DP() { return dihParm_; } - ParmHolder& IP() { return impParm_; } - DihedralParmHolder& DP() { return dihParm_; } + ParmHolder& UB() { return ubParm_; } + ParmHolder& IP() { return impParm_; } + DihedralParmHolder& DP() { return dihParm_; } void SetHasLJparams(bool b) { hasLJparams_ = b; } bool HasLJparams() const { return hasLJparams_; } ParmHolder const& AT() const { return atomTypes_; } ParmHolder const& NB() const { return nbParm_; } - ParmHolder const& BP() const { return bondParm_; } + ParmHolder const& NB14() const { return nb14Parm_; } + ParmHolder const& BP() const { return bondParm_; } ParmHolder const& AP() const { return angleParm_; } - ParmHolder const& UB() const { return ubParm_; } - //ParmHolder const& DP() const { return dihParm_; } - ParmHolder const& IP() const { return impParm_; } - DihedralParmHolder const& DP() const { return dihParm_; } + ParmHolder const& UB() const { return ubParm_; } + ParmHolder const& IP() const { return impParm_; } + DihedralParmHolder const& DP() const { return dihParm_; } void Debug(const char*) const; void Debug() const { return Debug(""); } @@ -38,7 +38,7 @@ class ParameterSet { UpdateCount() : nBondsUpdated_(0), nAnglesUpdated_(0), nDihedralsUpdated_(0), nImpropersUpdated_(0), nUreyBradleyUpdated_(0), nAtomTypeUpdated_(0), - nLJparamsUpdated_(0) {} + nLJparamsUpdated_(0), nLJ14paramsUpdated_(0) {} unsigned int nBondsUpdated_; unsigned int nAnglesUpdated_; unsigned int nDihedralsUpdated_; @@ -46,21 +46,21 @@ class ParameterSet { unsigned int nUreyBradleyUpdated_; unsigned int nAtomTypeUpdated_; unsigned int nLJparamsUpdated_; + unsigned int nLJ14paramsUpdated_; }; /// Update this set with parameters from given set int UpdateParamSet(ParameterSet const&, UpdateCount&, int); /// \return Size in memory in bytes size_t DataSize() const; private: - //AtomTypeArray atomTypes_; - ParmHolder atomTypes_; - ParmHolder nbParm_; - ParmHolder bondParm_; - ParmHolder angleParm_; - ParmHolder ubParm_; - //ParmHolder dihParm_; - ParmHolder impParm_; - DihedralParmHolder dihParm_; + ParmHolder atomTypes_; ///< Atom types + ParmHolder nbParm_; ///< Lennard-Jones 6-12 A-B parameters + ParmHolder nb14Parm_; ///< LJ 6-12 A-B parameters for 1-4 interactions + ParmHolder bondParm_; ///< Hooke's law bond potential parameters + ParmHolder angleParm_; ///< Hooke's law angle potential parameters + ParmHolder ubParm_; ///< Urey-Bradley parameters + ParmHolder impParm_; ///< Improper dihedral parameters + DihedralParmHolder dihParm_; ///< Cosine-series dihedral parameters bool hasLJparams_; }; #endif From 4c7f7d8d73d3f1826f554f8d94b5981a196f76d8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 09:38:04 -0500 Subject: [PATCH 0026/1492] Add nodlparams keyword --- test/Test_PrepareForLeap/RunTest.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Test_PrepareForLeap/RunTest.sh b/test/Test_PrepareForLeap/RunTest.sh index deea079740..a2855ece19 100755 --- a/test/Test_PrepareForLeap/RunTest.sh +++ b/test/Test_PrepareForLeap/RunTest.sh @@ -20,7 +20,7 @@ cat > cpptraj.in < cpptraj.in < cpptraj.in < Date: Thu, 9 Nov 2023 09:38:42 -0500 Subject: [PATCH 0027/1492] Bonds are now order by atom # --- test/Test_PrepareForLeap/leap.4zzw.in.save | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Test_PrepareForLeap/leap.4zzw.in.save b/test/Test_PrepareForLeap/leap.4zzw.in.save index 08d4bc42f4..f6fabc9c1a 100644 --- a/test/Test_PrepareForLeap/leap.4zzw.in.save +++ b/test/Test_PrepareForLeap/leap.4zzw.in.save @@ -8,9 +8,9 @@ bond m.176.SG m.206.SG bond m.235.SG m.240.SG bond m.258.SG m.331.SG bond m.436.C1 m.203.ND2 +bond m.436.O4 m.437.C1 bond m.438.C1 m.439.O1 +bond m.438.O4 m.440.C1 bond m.441.C1 m.57.ND2 bond m.442.C1 m.429.ND2 bond m.443.C1 m.196.OG -bond m.436.O4 m.437.C1 -bond m.438.O4 m.440.C1 From 0e75c306588e4fcc15f875d74e84037531d15398 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 09:44:30 -0500 Subject: [PATCH 0028/1492] Start download params test --- test/Test_PrepareForLeap/RunTest.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/test/Test_PrepareForLeap/RunTest.sh b/test/Test_PrepareForLeap/RunTest.sh index a2855ece19..a1f3660312 100755 --- a/test/Test_PrepareForLeap/RunTest.sh +++ b/test/Test_PrepareForLeap/RunTest.sh @@ -4,7 +4,9 @@ CleanFiles cpptraj.in 1qos.cpptraj.pdb leap.1qos.in \ leap.4zzw.in 4zzw.cpptraj.pdb 1qos.cpptraj.pdb.2 \ - leap.1qos.in.2 *.mol2 *.frcmod + leap.1qos.in.2 PEG.mol2 PEG.frcmod GOL.mol2 GOL.frcmod \ + PCA.mol2 PCA.frcmod MG.mol2 MG.frcmod \ + dlparams.leap.4zzw.in dlparams.4zzw.cpptraj.pdb INPUT='-i cpptraj.in' @@ -64,4 +66,25 @@ RunCpptraj "Prepare PDB 4zzw for LEaP" DoTest leap.4zzw.in.save leap.4zzw.in DoTest 4zzw.cpptraj.pdb.save 4zzw.cpptraj.pdb +# Test remote connectivity. +PINGCMD=`which ping` +if [ ! -z "$PINGCMD" ] ; then + $PINGCMD -c 1 raw.githubusercontent.com + if [ $? -eq 0 ] ; then + cat > cpptraj.in < Date: Thu, 9 Nov 2023 09:48:48 -0500 Subject: [PATCH 0029/1492] Ensure test will be skipped if no connectivity --- test/Test_PrepareForLeap/RunTest.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/Test_PrepareForLeap/RunTest.sh b/test/Test_PrepareForLeap/RunTest.sh index a1f3660312..ebd616fd53 100755 --- a/test/Test_PrepareForLeap/RunTest.sh +++ b/test/Test_PrepareForLeap/RunTest.sh @@ -67,10 +67,14 @@ DoTest leap.4zzw.in.save leap.4zzw.in DoTest 4zzw.cpptraj.pdb.save 4zzw.cpptraj.pdb # Test remote connectivity. +UNITNAME="Prepare PDB 4zzw for LEaP, download missing parameters" PINGCMD=`which ping` if [ ! -z "$PINGCMD" ] ; then $PINGCMD -c 1 raw.githubusercontent.com - if [ $? -eq 0 ] ; then + if [ $? -ne 0 ] ; then + echo "Warning: Could not ping raw.githubusercontent.com, no internet connectivity." + SkipCheck "$UNITNAME" + else cat > cpptraj.in < Date: Thu, 9 Nov 2023 09:50:39 -0500 Subject: [PATCH 0030/1492] Add test save --- test/Test_PrepareForLeap/RunTest.sh | 1 + .../dlparams.leap.4zzw.in.save | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/Test_PrepareForLeap/dlparams.leap.4zzw.in.save diff --git a/test/Test_PrepareForLeap/RunTest.sh b/test/Test_PrepareForLeap/RunTest.sh index ebd616fd53..ca73c1fada 100755 --- a/test/Test_PrepareForLeap/RunTest.sh +++ b/test/Test_PrepareForLeap/RunTest.sh @@ -88,6 +88,7 @@ prepareforleap dlparams \ nowat noh keepaltloc highestocc EOF RunCpptraj "$UNITNAME" + DoTest dlparams.leap.4zzw.in.save dlparams.leap.4zzw.in fi else echo "Warning: No 'ping' found, cannot check for internet connectivity." diff --git a/test/Test_PrepareForLeap/dlparams.leap.4zzw.in.save b/test/Test_PrepareForLeap/dlparams.leap.4zzw.in.save new file mode 100644 index 0000000000..52bca364c1 --- /dev/null +++ b/test/Test_PrepareForLeap/dlparams.leap.4zzw.in.save @@ -0,0 +1,23 @@ +GOL = loadmol2 GOL.mol2 +parmGOL = loadamberparams GOL.frcmod +PCA = loadmol2 PCA.mol2 +parmPCA = loadamberparams PCA.frcmod +PEG = loadmol2 PEG.mol2 +parmPEG = loadamberparams PEG.frcmod +m = loadpdb dlparams.4zzw.cpptraj.pdb +bond m.1.C m.2.N +bond m.19.SG m.25.SG +bond m.50.SG m.71.SG +bond m.61.SG m.67.SG +bond m.138.SG m.399.SG +bond m.172.SG m.207.SG +bond m.176.SG m.206.SG +bond m.235.SG m.240.SG +bond m.258.SG m.331.SG +bond m.436.C1 m.203.ND2 +bond m.436.O4 m.437.C1 +bond m.438.C1 m.439.O1 +bond m.438.O4 m.440.C1 +bond m.441.C1 m.57.ND2 +bond m.442.C1 m.429.ND2 +bond m.443.C1 m.196.OG From 2198d64d7e9ea79737369b1f93a5c54053fd2c0a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 20:55:35 -0500 Subject: [PATCH 0031/1492] Start Amber force field param file class --- src/DataIO_AmberFF.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++ src/DataIO_AmberFF.h | 17 +++++++++++ 2 files changed, 84 insertions(+) create mode 100644 src/DataIO_AmberFF.cpp create mode 100644 src/DataIO_AmberFF.h diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp new file mode 100644 index 0000000000..a872b0ec01 --- /dev/null +++ b/src/DataIO_AmberFF.cpp @@ -0,0 +1,67 @@ +#include "DataIO_AmberFF.h" +#include "CpptrajStdio.h" +#include "BufferedLine.h" + +/// CONSTRUCTOR +DataIO_AmberFF::DataIO_AmberFF() +{ + +} + +// DataIO_AmberFF::ID_DataFormat() +bool DataIO_AmberFF::ID_DataFormat(CpptrajFile& infile) +{ + //if (infile.OpenFile()) return false; + //std::string line = infile.GetLine(); // Title + //infile.CloseFile(); + //bool isLib = (line == "!!index array str"); + return false; +} + +// DataIO_AmberFF::ReadHelp() +void DataIO_AmberFF::ReadHelp() +{ + +} + +// DataIO_AmberFF::processReadArgs() +int DataIO_AmberFF::processReadArgs(ArgList& argIn) +{ + + return 0; +} + +// DataIO_AmberFF::ReadData() +int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) +{ + BufferedLine infile; + if (infile.OpenFileRead( fname )) { + mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); + return 1; + } + std::string title = infile.GetLine(); + mprintf("\tTitle: %s\n", title.c_str()); + + infile.CloseFile(); + return 0; +} + +// DataIO_AmberFF::WriteHelp() +void DataIO_AmberFF::WriteHelp() +{ + +} + +// DataIO_AmberFF::processWriteArgs() +int DataIO_AmberFF::processWriteArgs(ArgList& argIn) +{ + + return 0; +} + +// DataIO_AmberFF::WriteData() +int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) +{ + + return 1; +} diff --git a/src/DataIO_AmberFF.h b/src/DataIO_AmberFF.h new file mode 100644 index 0000000000..323d198403 --- /dev/null +++ b/src/DataIO_AmberFF.h @@ -0,0 +1,17 @@ +#ifndef INC_DATAIO_AMBERFF_H +#define INC_DATAIO_AMBERFF_H +#include "DataIO.h" +/// +class DataIO_AmberFF : public DataIO { + public: + DataIO_AmberFF(); + static void ReadHelp(); + static void WriteHelp(); + static BaseIOtype* Alloc() { return (BaseIOtype*)new DataIO_AmberFF(); } + int processReadArgs(ArgList&); + int ReadData(FileName const&, DataSetList&, std::string const&); + int processWriteArgs(ArgList&); + int WriteData(FileName const&, DataSetList const&); + bool ID_DataFormat(CpptrajFile&); +}; +#endif From f347d6710dbbf88ab1eebd39aa2a122587361846 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 20:59:39 -0500 Subject: [PATCH 0032/1492] Enable amber ff format for testing --- src/DataFile.cpp | 3 +++ src/DataFile.h | 2 +- src/cpptrajdepend | 3 ++- src/cpptrajfiles | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/DataFile.cpp b/src/DataFile.cpp index b215286b34..c393ddb4e3 100644 --- a/src/DataFile.cpp +++ b/src/DataFile.cpp @@ -34,6 +34,7 @@ #include "DataIO_Numpy.h" #include "DataIO_AmberPrep.h" #include "DataIO_AmberLib.h" +#include "DataIO_AmberFF.h" // CONSTRUCTOR DataFile::DataFile() : @@ -89,6 +90,7 @@ const FileTypes::AllocToken DataFile::DF_AllocArray[] = { { "Numpy array", 0, 0, DataIO_Numpy::Alloc}, { "Amber Prep File", DataIO_AmberPrep::ReadHelp, 0, DataIO_AmberPrep::Alloc}, { "Amber OFF File", 0, 0, DataIO_AmberLib::Alloc}, + { "Amber Force Field", 0, 0, DataIO_AmberFF::Alloc}, { "Unknown Data file", 0, 0, 0 } }; @@ -118,6 +120,7 @@ const FileTypes::KeyToken DataFile::DF_KeyArray[] = { { AMBERPREP, "prepin", ".prepin" }, { AMBERLIB, "off", ".off" }, { AMBERLIB, "off", ".lib" }, + { AMBERFF, "amberff", ".parm" }, { UNKNOWN_DATA, 0, 0 } }; diff --git a/src/DataFile.h b/src/DataFile.h index f5f6b0b92a..6cce13ed11 100644 --- a/src/DataFile.h +++ b/src/DataFile.h @@ -18,7 +18,7 @@ class DataFile { DATAFILE=0, XMGRACE, GNUPLOT, XPLOR, OPENDX, REMLOG, MDOUT, EVECS, VECTRAJ, XVG, CCP4, CHARMMREPD, CHARMMFASTREP, CHARMMOUT, CPOUT, CHARMMRTFPRM, CMATRIX_BINARY, CMATRIX_NETCDF, PEAKS, - NETCDFDATA, AMBERENE, NUMPY, AMBERPREP, AMBERLIB, + NETCDFDATA, AMBERENE, NUMPY, AMBERPREP, AMBERLIB, AMBERFF, UNKNOWN_DATA }; DataFile(); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index d2c7d7b566..af6ad3ff40 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -199,11 +199,12 @@ CpptrajFile.o : CpptrajFile.cpp CpptrajFile.h CpptrajStdio.h FileIO.h FileIO_Bzi CpptrajState.o : CpptrajState.cpp Action.h ActionList.h ActionState.h Action_CreateCrd.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_Coords_TRJ.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleNavigator.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h Frame.h FrameArray.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Random.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajFrameIndex.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h CpptrajStdio.o : CpptrajStdio.cpp Parallel.h CurveFit.o : CurveFit.cpp CurveFit.h -DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h +DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PDBfile.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberEne.o : DataIO_AmberEne.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberEne.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_AmberFF.o : DataIO_AmberFF.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberLib.o : DataIO_AmberLib.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberLib.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CCP4.o : DataIO_CCP4.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ByteRoutines.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CCP4.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index a8d821136f..dd53d39862 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -175,6 +175,7 @@ COMMON_SOURCES= \ DataFilter.cpp \ DataIO.cpp \ DataIO_AmberEne.cpp \ + DataIO_AmberFF.cpp \ DataIO_AmberLib.cpp \ DataIO_AmberPrep.cpp \ DataIO_CCP4.cpp \ From 22c764056b99d836e13061ce8c05a1b5ffd3e198 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 21:01:02 -0500 Subject: [PATCH 0033/1492] Allocate data set --- src/DataIO_AmberFF.cpp | 16 ++++++++++++++++ src/cpptrajdepend | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index a872b0ec01..94443e63ae 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -1,6 +1,7 @@ #include "DataIO_AmberFF.h" #include "CpptrajStdio.h" #include "BufferedLine.h" +#include "DataSet_Parameters.h" /// CONSTRUCTOR DataIO_AmberFF::DataIO_AmberFF() @@ -34,6 +35,21 @@ int DataIO_AmberFF::processReadArgs(ArgList& argIn) // DataIO_AmberFF::ReadData() int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { + // Allocate data set + MetaData md( dsname ); + DataSet* ds = dsl.CheckForSet( md ); + if (ds != 0) { + if (ds->Type() != DataSet::PARAMETERS) { + mprinterr("Error: Set '%s' does not have parameters, cannot append.\n", ds->legend()); + return 1; + } + mprintf("\tAdding to existing set %s\n", ds->legend()); + } else { + ds = dsl.AddSet( DataSet::PARAMETERS, md ); + if (ds == 0) return 1; + } + DataSet_Parameters& prm = static_cast( *ds ); + BufferedLine infile; if (infile.OpenFileRead( fname )) { mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index af6ad3ff40..46acb9fc99 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -204,7 +204,7 @@ DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberEne.o : DataIO_AmberEne.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberEne.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_AmberFF.o : DataIO_AmberFF.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_AmberFF.o : DataIO_AmberFF.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberLib.o : DataIO_AmberLib.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberLib.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CCP4.o : DataIO_CCP4.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ByteRoutines.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CCP4.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 982057996c1b1081257ec700611c465d02732d69 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 9 Nov 2023 21:09:43 -0500 Subject: [PATCH 0034/1492] Start reading sections --- src/DataIO_AmberFF.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 94443e63ae..7f96441f3f 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -50,13 +50,35 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } DataSet_Parameters& prm = static_cast( *ds ); + // Read title BufferedLine infile; if (infile.OpenFileRead( fname )) { mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); return 1; } - std::string title = infile.GetLine(); + const char* ptr = infile.Line(); + if (ptr == 0) { + mprinterr("Error: Could not read anything from Amber FF file %s\n", fname.full()); + return 1; + } + std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); + // Read file + enum SectionType { ATYPE = 0, UNKNOWN }; + SectionType section = ATYPE; + while (ptr != 0) { + if (*ptr == '\0') { + // Section Change + if (section != UNKNOWN) { + section = (SectionType)((int)section + 1); + } + } else if (section == ATYPE) { + // Input for atom symbols and masses + // Format (A2,2X,F10.2x,f10.2) + mprintf("DEBUG: Atype: %s\n", ptr); + } + ptr = infile.Line(); + } infile.CloseFile(); return 0; From 3d9d05f0c96f5920d6d92d20aea8c69fa2c875c3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 15:14:14 -0500 Subject: [PATCH 0035/1492] Add atomic polarizability --- src/AtomType.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/AtomType.h b/src/AtomType.h index b74de65677..75cec029e3 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -4,11 +4,14 @@ /// Hold parameters for a unique atom type class AtomType { public: - AtomType() : mass_(0.0), oidx_(-1) {} - AtomType(double r, double d, int o) : lj_(r, d), mass_(0.0), oidx_(o) {} // TODO deprecate - /// Mass only + /// CONSTRUCTOR + AtomType() : mass_(0.0), polarizability_(0.0), oidx_(-1) {} + AtomType(double r, double d, int o) : lj_(r, d), mass_(0.0), polarizability_(0.0), oidx_(o) {} // TODO deprecate + /// CONSTRUCTOR - Mass, polarizability + AtomType(double m, double p) : mass_(0.0), polarizability_(p), oidx_(-1) {} + /// CONSTRUCTOR - Mass only AtomType(double m) : mass_(m), oidx_(-1) {} - /// Radius, well depth, mass + /// CONSTRUCTOR - Radius, well depth, mass AtomType(double r, double d, double m) : lj_(r, d), mass_(m), oidx_(-1) {} /// \return default LJ parameters LJparmType const& LJ() const { return lj_; } @@ -27,6 +30,7 @@ class AtomType { private: LJparmType lj_; ///< Default Lennard-Jones parameters (always valid for self). double mass_; ///< Mass in amu + double polarizability_; ///< Atomic polarizability in Ang^3 int oidx_; ///< Original atom type index. TODO deprecate }; #endif From 564a65e7517293cf34a59bef12af411db416397d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 15:34:32 -0500 Subject: [PATCH 0036/1492] Read in atom types --- src/DataIO_AmberFF.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 7f96441f3f..8a41cb301a 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "BufferedLine.h" #include "DataSet_Parameters.h" +#include // sscanf /// CONSTRUCTOR DataIO_AmberFF::DataIO_AmberFF() @@ -66,6 +67,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // Read file enum SectionType { ATYPE = 0, UNKNOWN }; SectionType section = ATYPE; + ptr = infile.Line(); while (ptr != 0) { if (*ptr == '\0') { // Section Change @@ -76,6 +78,26 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // Input for atom symbols and masses // Format (A2,2X,F10.2x,f10.2) mprintf("DEBUG: Atype: %s\n", ptr); + char kndsym[16]; + double amass; + double atpol; + int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); + ParameterHolders::RetType ret; + if (nscan == 3) { + ret = prm.AT().AddParm( TypeNameHolder(kndsym), + AtomType(amass, atpol), + true ); + } else if (nscan == 2) { + // Only mass + ret = prm.AT().AddParm( TypeNameHolder(kndsym), + AtomType(amass), + true ); + } else { + mprinterr("Error: Expected atom type, mass, polarizability, got only %i\n", nscan); + return 1; + } + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining atom type %s\n", kndsym); } ptr = infile.Line(); } From 30a3483842f816f12f6046a36ca7b3dbfb55251e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 16:23:39 -0500 Subject: [PATCH 0037/1492] Report atomic polarizability --- src/AtomType.h | 4 +++- src/DataIO_AmberFF.cpp | 1 + src/ParameterSet.cpp | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/AtomType.h b/src/AtomType.h index 75cec029e3..13ba56aaa4 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -8,7 +8,7 @@ class AtomType { AtomType() : mass_(0.0), polarizability_(0.0), oidx_(-1) {} AtomType(double r, double d, int o) : lj_(r, d), mass_(0.0), polarizability_(0.0), oidx_(o) {} // TODO deprecate /// CONSTRUCTOR - Mass, polarizability - AtomType(double m, double p) : mass_(0.0), polarizability_(p), oidx_(-1) {} + AtomType(double m, double p) : mass_(m), polarizability_(p), oidx_(-1) {} /// CONSTRUCTOR - Mass only AtomType(double m) : mass_(m), oidx_(-1) {} /// CONSTRUCTOR - Radius, well depth, mass @@ -17,6 +17,8 @@ class AtomType { LJparmType const& LJ() const { return lj_; } /// \return Atom mass in amu double Mass() const { return mass_; } + /// \return Atomic polarizability in Ang^3 + double Polarizability() const { return polarizability_; } /// \return Original atom type index. Useful when checking for off-diagonal NB parameters. int OriginalIdx() const { return oidx_; } /// \return true if LJ params are less than incoming diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 8a41cb301a..1959ae79d1 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -102,6 +102,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin ptr = infile.Line(); } + prm.Debug(); // TODO debug level infile.CloseFile(); return 0; } diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index ccfc35bde6..854a6c914e 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -17,9 +17,9 @@ void ParameterSet::Debug(const char* fnameIn) const { CpptrajFile Out; Out.OpenWrite( fnameIn ); Out.Printf("Atom Types:\n"); - Out.Printf("\t%6s %8s %12s %12s %12s\n", "Name", "TypeIdx", "Radius", "Depth", "Mass"); + Out.Printf("\t%6s %8s %12s %12s %12s %12s\n", "Name", "TypeIdx", "Radius", "Depth", "Mass", "Polar."); for (ParmHolder::const_iterator at = atomTypes_.begin(); at != atomTypes_.end(); ++at) { - Out.Printf("\t%6s %8li %12.4f %12.4f %12.4f\n", *(at->first[0]), at - atomTypes_.begin(), at->second.LJ().Radius(), at->second.LJ().Depth(), at->second.Mass()); + Out.Printf("\t%6s %8li %12.4f %12.4f %12.4f %12.4f\n", *(at->first[0]), at - atomTypes_.begin(), at->second.LJ().Radius(), at->second.LJ().Depth(), at->second.Mass(), at->second.Polarizability()); } if (!nbParm_.empty()) { Out.Printf("LJ parameters:\n"); From c2cea85ab69e0ce1198c4ebc98afaa587dbf97f3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 16:33:18 -0500 Subject: [PATCH 0038/1492] Start reading hydrophilic atom types --- src/DataIO_AmberFF.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 1959ae79d1..09139a5d74 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -65,7 +65,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file - enum SectionType { ATYPE = 0, UNKNOWN }; + enum SectionType { ATYPE = 0, HYDROPHILIC, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -74,6 +74,23 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin if (section != UNKNOWN) { section = (SectionType)((int)section + 1); } + // Special case; hydrophilic atom types. One line. + // FORMAT(20(A2,2X)) + if (section == HYDROPHILIC) { + ptr = infile.Line(); + mprintf("DEBUG: Hydrophilic: %s\n", ptr); + char htype[5]; + htype[4] = '\0'; + std::string hline(ptr); + for (unsigned int idx = 0; idx < hline.size(); idx+=4) { + htype[0] = hline[idx ]; + htype[1] = hline[idx+1]; + htype[2] = hline[idx+2]; + htype[3] = hline[idx+3]; + mprintf("DEBUG:\t%s\n", htype); + } + section = (SectionType)((int)section + 1); + } } else if (section == ATYPE) { // Input for atom symbols and masses // Format (A2,2X,F10.2x,f10.2) From debec8292bc199c43c1eb79880c500227971f50e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 16:50:42 -0500 Subject: [PATCH 0039/1492] Add read and saving of hydrophilic atom types. --- src/DataIO_AmberFF.cpp | 3 ++- src/ParameterSet.cpp | 20 ++++++++++++++++++++ src/ParameterSet.h | 5 +++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 09139a5d74..ab3db72e71 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -87,7 +87,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin htype[1] = hline[idx+1]; htype[2] = hline[idx+2]; htype[3] = hline[idx+3]; - mprintf("DEBUG:\t%s\n", htype); + //mprintf("DEBUG:\t%s\n", htype); + prm.AddHydrophilicAtomType( NameType(htype) ); } section = (SectionType)((int)section + 1); } diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 854a6c914e..635b9e2b4f 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -65,6 +65,12 @@ void ParameterSet::Debug(const char* fnameIn) const { for (ParmHolder::const_iterator bp = impParm_.begin(); bp != impParm_.end(); ++bp) Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(bp->first[0]), *(bp->first[1]), *(bp->first[2]), *(bp->first[3]), bp->second.Pk(), bp->second.Pn(), bp->second.Phase()); } + if (!hydrophilicAtomTypes_.empty()) { + Out.Printf("Hydrophilic atom types:"); + for (NsetType::const_iterator it = hydrophilicAtomTypes_.begin(); it != hydrophilicAtomTypes_.end(); ++it) + Out.Printf(" %s", it->Truncated().c_str()); + Out.Printf("\n"); + } } /** Update/add to parameters in this topology with those from given set. */ @@ -97,3 +103,17 @@ int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int if (debugIn > 0) set0.Debug("newp.dat"); return 0; } + +/** Add hydrophilic atom type. */ +int ParameterSet::AddHydrophilicAtomType(NameType const& atype) { + for (NsetType::const_iterator it = hydrophilicAtomTypes_.begin(); it != hydrophilicAtomTypes_.end(); ++it) + { + if (atype == *it) { + mprintf("Warning: %s already defined as hydrophilic atom type.\n", atype.Truncated().c_str()); + return 0; + } + } + // TODO check against existing types? + hydrophilicAtomTypes_.push_back( atype ); + return 0; +} diff --git a/src/ParameterSet.h b/src/ParameterSet.h index eb5b787ebd..fbfadc82ec 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -50,9 +50,13 @@ class ParameterSet { }; /// Update this set with parameters from given set int UpdateParamSet(ParameterSet const&, UpdateCount&, int); + /// Add hydrophilic atom type + int AddHydrophilicAtomType(NameType const&); /// \return Size in memory in bytes size_t DataSize() const; private: + typedef std::vector NsetType; + ParmHolder atomTypes_; ///< Atom types ParmHolder nbParm_; ///< Lennard-Jones 6-12 A-B parameters ParmHolder nb14Parm_; ///< LJ 6-12 A-B parameters for 1-4 interactions @@ -61,6 +65,7 @@ class ParameterSet { ParmHolder ubParm_; ///< Urey-Bradley parameters ParmHolder impParm_; ///< Improper dihedral parameters DihedralParmHolder dihParm_; ///< Cosine-series dihedral parameters + NsetType hydrophilicAtomTypes_; ///< Hold names of hydrophilic atom types bool hasLJparams_; }; #endif From 429048b3a0e3ab663510147b6d9239410d27e9dc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 19:40:57 -0500 Subject: [PATCH 0040/1492] Use whitespace delimiting; more future-proof --- src/DataIO_AmberFF.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index ab3db72e71..62dfcd9cd7 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -79,6 +79,11 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin if (section == HYDROPHILIC) { ptr = infile.Line(); mprintf("DEBUG: Hydrophilic: %s\n", ptr); + // Take advantage of the fact that we expect whitespace-delimiters + ArgList hsymbols( ptr, " " ); + for (int iarg = 0; iarg != hsymbols.Nargs(); ++iarg) + prm.AddHydrophilicAtomType( NameType( hsymbols[iarg] ) ); + /* char htype[5]; htype[4] = '\0'; std::string hline(ptr); @@ -89,7 +94,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin htype[3] = hline[idx+3]; //mprintf("DEBUG:\t%s\n", htype); prm.AddHydrophilicAtomType( NameType(htype) ); - } + }*/ section = (SectionType)((int)section + 1); } } else if (section == ATYPE) { From fdc7852c4207374bb3fffbf652194565a838c61b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 20:18:46 -0500 Subject: [PATCH 0041/1492] Start bond section --- src/DataIO_AmberFF.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 62dfcd9cd7..e4235ac83e 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -65,7 +65,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, UNKNOWN }; + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -121,6 +121,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } if (ret == ParameterHolders::UPDATED) mprintf("Warning: Redefining atom type %s\n", kndsym); + } else if (section == BOND) { + mprintf("DEBUG: Bond: %s\n", ptr); } ptr = infile.Line(); } From 552234b0bd00e48e17ba3068d93e47a454a8d78d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 10 Nov 2023 20:27:45 -0500 Subject: [PATCH 0042/1492] Start bond param scan --- src/DataIO_AmberFF.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index e4235ac83e..b8fb15ae59 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -36,6 +36,7 @@ int DataIO_AmberFF::processReadArgs(ArgList& argIn) // DataIO_AmberFF::ReadData() int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { + static const int MAXSYMLEN = 16; // Allocate data set MetaData md( dsname ); DataSet* ds = dsl.CheckForSet( md ); @@ -101,7 +102,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // Input for atom symbols and masses // Format (A2,2X,F10.2x,f10.2) mprintf("DEBUG: Atype: %s\n", ptr); - char kndsym[16]; + char kndsym[MAXSYMLEN]; double amass; double atpol; int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); @@ -116,13 +117,28 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin AtomType(amass), true ); } else { - mprinterr("Error: Expected atom type, mass, polarizability, got only %i\n", nscan); + mprinterr("Error: Expected atom type, mass, polarizability, got only %i columns.\n", nscan); return 1; } if (ret == ParameterHolders::UPDATED) mprintf("Warning: Redefining atom type %s\n", kndsym); } else if (section == BOND) { + // Bond parameters + // IBT , JBT , RK , REQ + // FORMAT(A2,1X,A2,2F10.2) mprintf("DEBUG: Bond: %s\n", ptr); + char ibt[MAXSYMLEN]; + char jbt[MAXSYMLEN]; + double RK, REQ; + int nscan = sscanf(ptr, "%s %s %lf %lf", ibt, jbt, &RK, &REQ); + if (nscan != 4) { + mprinterr("Error: Expected atom type 1, atom type 2, RK, REQ, got only %i columns,\n", nscan); + return 1; + } + TypeNameHolder types(2); + types.AddName( ibt ); + types.AddName( jbt ); + prm.BP().AddParm(types, BondParmType(RK, REQ), false); } ptr = infile.Line(); } From a21be7f17047758b5afdb534e120ceb962eab877 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 11 Nov 2023 09:03:52 -0500 Subject: [PATCH 0043/1492] New way to read in symbols --- src/DataIO_AmberFF.cpp | 34 +++++++++++++++++++++++++++++++++- src/DataIO_AmberFF.h | 2 ++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index b8fb15ae59..13fba0b226 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -33,6 +33,29 @@ int DataIO_AmberFF::processReadArgs(ArgList& argIn) return 0; } +/** Read symbols delimited by - and space. */ +int DataIO_AmberFF::read_symbols(const char* ptrIn, std::vector& symbols, int nsymbols) +{ + int isymbol = 0; + int idx = 0; + bool char_has_been_read = false; + const char* ptr = ptrIn; + for (; *ptr != '\0'; ++ptr) + { + if (*ptr == '-') { + isymbol++; + idx = 0; + char_has_been_read = false; + } else if (*ptr == ' ' && isymbol + 1 == nsymbols && char_has_been_read) { + break; + } else { + symbols[isymbol][idx++] = *ptr; + if (*ptr != ' ') char_has_been_read = true; + } + } + return (ptr - ptrIn); +} + // DataIO_AmberFF::ReadData() int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -127,6 +150,15 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // IBT , JBT , RK , REQ // FORMAT(A2,1X,A2,2F10.2) mprintf("DEBUG: Bond: %s\n", ptr); + std::vector symbols(2); + symbols[0].assign(MAXSYMLEN, ' '); + symbols[1].assign(MAXSYMLEN, ' '); + //char symbols[2][MAXSYMLEN]; + //symbols[0][MAXSYMLEN-1] = '\0'; + //symbols[1][MAXSYMLEN-1] = '\0'; + read_symbols(ptr, symbols, 2); + mprintf("DEBUG: %s %s\n", symbols[0].c_str(), symbols[1].c_str()); +/* char ibt[MAXSYMLEN]; char jbt[MAXSYMLEN]; double RK, REQ; @@ -138,7 +170,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin TypeNameHolder types(2); types.AddName( ibt ); types.AddName( jbt ); - prm.BP().AddParm(types, BondParmType(RK, REQ), false); + prm.BP().AddParm(types, BondParmType(RK, REQ), false);*/ } ptr = infile.Line(); } diff --git a/src/DataIO_AmberFF.h b/src/DataIO_AmberFF.h index 323d198403..ab89e8fb09 100644 --- a/src/DataIO_AmberFF.h +++ b/src/DataIO_AmberFF.h @@ -13,5 +13,7 @@ class DataIO_AmberFF : public DataIO { int processWriteArgs(ArgList&); int WriteData(FileName const&, DataSetList const&); bool ID_DataFormat(CpptrajFile&); + private: + static int read_symbols(const char*, std::vector&, int); }; #endif From d96364ca7bd4c5da79e2e5c2dafd4139978db475 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 11 Nov 2023 15:37:24 -0500 Subject: [PATCH 0044/1492] Trap errors, do not presize the strings --- src/DataIO_AmberFF.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 13fba0b226..b23a0b5f96 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -37,23 +37,20 @@ int DataIO_AmberFF::processReadArgs(ArgList& argIn) int DataIO_AmberFF::read_symbols(const char* ptrIn, std::vector& symbols, int nsymbols) { int isymbol = 0; - int idx = 0; bool char_has_been_read = false; - const char* ptr = ptrIn; - for (; *ptr != '\0'; ++ptr) + for (const char* ptr = ptrIn; *ptr != '\0'; ++ptr) { if (*ptr == '-') { isymbol++; - idx = 0; char_has_been_read = false; } else if (*ptr == ' ' && isymbol + 1 == nsymbols && char_has_been_read) { - break; + return (ptr - ptrIn); } else { - symbols[isymbol][idx++] = *ptr; + symbols[isymbol] += *ptr; if (*ptr != ' ') char_has_been_read = true; } } - return (ptr - ptrIn); + return -1; } // DataIO_AmberFF::ReadData() @@ -151,13 +148,18 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // FORMAT(A2,1X,A2,2F10.2) mprintf("DEBUG: Bond: %s\n", ptr); std::vector symbols(2); - symbols[0].assign(MAXSYMLEN, ' '); - symbols[1].assign(MAXSYMLEN, ' '); + //symbols[0].assign(MAXSYMLEN, ' '); + //symbols[1].assign(MAXSYMLEN, ' '); //char symbols[2][MAXSYMLEN]; //symbols[0][MAXSYMLEN-1] = '\0'; //symbols[1][MAXSYMLEN-1] = '\0'; - read_symbols(ptr, symbols, 2); - mprintf("DEBUG: %s %s\n", symbols[0].c_str(), symbols[1].c_str()); + int pos = read_symbols(ptr, symbols, 2); + if (pos < 0) { + mprinterr("Error: Could not read symbols for bond from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); + /* char ibt[MAXSYMLEN]; char jbt[MAXSYMLEN]; From 2c064255cb2127983984bc1e1dceffcaea17ed38 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 11 Nov 2023 15:49:22 -0500 Subject: [PATCH 0045/1492] Finish bond parm read --- src/DataIO_AmberFF.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index b23a0b5f96..ad91ab626c 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -159,20 +159,27 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin return 1; } mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); - + double RK, REQ; + int nscan = sscanf(ptr+pos, "%lf %lf", &RK, &REQ); + if (nscan != 2) { + mprinterr("Error: Expected RK, REQ, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(2); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + prm.BP().AddParm(types, BondParmType(RK, REQ), false); /* char ibt[MAXSYMLEN]; char jbt[MAXSYMLEN]; - double RK, REQ; int nscan = sscanf(ptr, "%s %s %lf %lf", ibt, jbt, &RK, &REQ); if (nscan != 4) { mprinterr("Error: Expected atom type 1, atom type 2, RK, REQ, got only %i columns,\n", nscan); return 1; } - TypeNameHolder types(2); types.AddName( ibt ); types.AddName( jbt ); - prm.BP().AddParm(types, BondParmType(RK, REQ), false);*/ +*/ } ptr = infile.Line(); } From 3e0e27ee623c72c2f5440ee14058026d582e6238 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 11 Nov 2023 19:23:25 -0500 Subject: [PATCH 0046/1492] Read angle parameters --- src/DataIO_AmberFF.cpp | 49 +++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index ad91ab626c..f3a6658d3f 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -86,7 +86,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, UNKNOWN }; + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -104,18 +104,6 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin ArgList hsymbols( ptr, " " ); for (int iarg = 0; iarg != hsymbols.Nargs(); ++iarg) prm.AddHydrophilicAtomType( NameType( hsymbols[iarg] ) ); - /* - char htype[5]; - htype[4] = '\0'; - std::string hline(ptr); - for (unsigned int idx = 0; idx < hline.size(); idx+=4) { - htype[0] = hline[idx ]; - htype[1] = hline[idx+1]; - htype[2] = hline[idx+2]; - htype[3] = hline[idx+3]; - //mprintf("DEBUG:\t%s\n", htype); - prm.AddHydrophilicAtomType( NameType(htype) ); - }*/ section = (SectionType)((int)section + 1); } } else if (section == ATYPE) { @@ -148,11 +136,6 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // FORMAT(A2,1X,A2,2F10.2) mprintf("DEBUG: Bond: %s\n", ptr); std::vector symbols(2); - //symbols[0].assign(MAXSYMLEN, ' '); - //symbols[1].assign(MAXSYMLEN, ' '); - //char symbols[2][MAXSYMLEN]; - //symbols[0][MAXSYMLEN-1] = '\0'; - //symbols[1][MAXSYMLEN-1] = '\0'; int pos = read_symbols(ptr, symbols, 2); if (pos < 0) { mprinterr("Error: Could not read symbols for bond from %s\n", ptr); @@ -169,17 +152,29 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( symbols[0] ); types.AddName( symbols[1] ); prm.BP().AddParm(types, BondParmType(RK, REQ), false); -/* - char ibt[MAXSYMLEN]; - char jbt[MAXSYMLEN]; - int nscan = sscanf(ptr, "%s %s %lf %lf", ibt, jbt, &RK, &REQ); - if (nscan != 4) { - mprinterr("Error: Expected atom type 1, atom type 2, RK, REQ, got only %i columns,\n", nscan); + } else if (section == ANGLE) { + // Angle parameters + //ITT , JTT , KTT , TK , TEQ + //FORMAT(A2,1X,A2,1X,A2,2F10.2) + mprintf("DEBUG: Angle: %s\n", ptr); + std::vector symbols(3); + int pos = read_symbols(ptr, symbols, 3); + if (pos < 0) { + mprinterr("Error: Could not read symbols for angle from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); + double TK, TEQ; + int nscan = sscanf(ptr+pos, "%lf %lf", &TK, &TEQ); + if (nscan != 2) { + mprinterr("Error: Expected TK, TEQ, got only %i elements\n", nscan); return 1; } - types.AddName( ibt ); - types.AddName( jbt ); -*/ + TypeNameHolder types(3); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + prm.AP().AddParm(types, AngleParmType(TK, TEQ), false); } ptr = infile.Line(); } From 988a38f6e927ed60b122d32bb2d500728fd08b91 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 11 Nov 2023 19:35:39 -0500 Subject: [PATCH 0047/1492] Add dihedral parm read --- src/DataIO_AmberFF.cpp | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index f3a6658d3f..c9200e0624 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -86,7 +86,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, UNKNOWN }; + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -154,8 +154,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin prm.BP().AddParm(types, BondParmType(RK, REQ), false); } else if (section == ANGLE) { // Angle parameters - //ITT , JTT , KTT , TK , TEQ - //FORMAT(A2,1X,A2,1X,A2,2F10.2) + // ITT , JTT , KTT , TK , TEQ + // FORMAT(A2,1X,A2,1X,A2,2F10.2) mprintf("DEBUG: Angle: %s\n", ptr); std::vector symbols(3); int pos = read_symbols(ptr, symbols, 3); @@ -175,6 +175,39 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( symbols[1] ); types.AddName( symbols[2] ); prm.AP().AddParm(types, AngleParmType(TK, TEQ), false); + } else if (section == DIHEDRAL) { + // Dihedral parameters + // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + // If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the + // system involving the atoms "JPT" and and "KPT" are assigned + // the same parameters. This is called the general dihedral type + // and is of the form "X "-"JPT"-"KPT"-"X ". + // IDIVF is the factor by which the torsional barrier is divided. + // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for + // details. Basically, the actual torsional potential is + // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) + mprintf("DEBUG: Dihedral: %s\n", ptr); + std::vector symbols(4); + int pos = read_symbols(ptr, symbols, 4); + if (pos < 0) { + mprinterr("Error: Could not read symbols for dihedral from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + int IDIVF; + double PK, PHASE, PN; + int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); + if (nscan != 4) { + mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(4); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + types.AddName( symbols[3] ); + prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), false); } ptr = infile.Line(); } From adbf534f850379b873460678331951862be1d44c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 11 Nov 2023 20:23:47 -0500 Subject: [PATCH 0048/1492] Add improper param read. Ensure whitespace chars are skipped when looking for section changes. --- src/DataIO_AmberFF.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index c9200e0624..b52309fba3 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -86,13 +86,17 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, UNKNOWN }; + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { + // Advance to first non-space char + while (*ptr == ' ' && *ptr != '\0') ++ptr; + mprintf("DEBUG: First char: %c (%i)\n", *ptr, (int)*ptr); if (*ptr == '\0') { // Section Change if (section != UNKNOWN) { + mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); section = (SectionType)((int)section + 1); } // Special case; hydrophilic atom types. One line. @@ -208,6 +212,30 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( symbols[2] ); types.AddName( symbols[3] ); prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), false); + } else if (section == IMPROPER) { + // Improper parameters + // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + mprintf("DEBUG: Improper: %s\n", ptr); + std::vector symbols(4); + int pos = read_symbols(ptr, symbols, 4); + if (pos < 0) { + mprinterr("Error: Could not read symbols for improper from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + double PK, PHASE, PN; + int nscan = sscanf(ptr+pos, "%lf %lf %lf", &PK, &PHASE, &PN); + if (nscan != 3) { + mprinterr("Error: Expected PK, PHASE, PN, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(4); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + types.AddName( symbols[3] ); + prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); } ptr = infile.Line(); } From 8c85b7e4efda0cf8326809096c05226a7b9bee6e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 14:43:13 -0500 Subject: [PATCH 0049/1492] Start LJ 10-12 read. Add lookahead after hydrophilic section to deal with older parm files. --- src/DataIO_AmberFF.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index b52309fba3..877dca7ef8 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -86,7 +86,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, UNKNOWN }; + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, + LJ1012, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -109,6 +110,11 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin for (int iarg = 0; iarg != hsymbols.Nargs(); ++iarg) prm.AddHydrophilicAtomType( NameType( hsymbols[iarg] ) ); section = (SectionType)((int)section + 1); + // Look ahead. Older parm files have the hydrophilic section delimited + // with a newline. + ptr = infile.Line(); + while (*ptr == ' ' && *ptr != '\0') ++ptr; + if (*ptr != '\0') continue; } } else if (section == ATYPE) { // Input for atom symbols and masses @@ -236,7 +242,25 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( symbols[2] ); types.AddName( symbols[3] ); prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); - } + } else if (section == LJ1012) { + // Lennard-Jones 10-12 hydrogen bonding term + // KT1 , KT2 , A , B , ASOLN , BSOLN , HCUT , IC + // FORMAT(2X,A2,2X,A2,2x,5F10.2,I2) + // NOTE: The ASOLN, BSOLN, HCUT, and IC columns are no longer used + // and so are not read. + char KT1[MAXSYMLEN], KT2[MAXSYMLEN]; + double A, B; + //double ASOLN, BSOLN, HCUT; + //int IC; + mprintf("DEBUG: LJ 10-12: %s\n", ptr); + //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", + int nscan = sscanf(ptr, "%s %s %lf %lf", KT1, KT2, &A, &B); + if (nscan < 4) { + mprinterr("Error: Expected at least KT1, KT2, A, B, got only %i elements\n", nscan); + return 1; + } + } + ptr = infile.Line(); } From 2a537ce31ea26e1e53f069a3bf38c5d04f0b2902 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 15:06:15 -0500 Subject: [PATCH 0050/1492] Scan HBcut. Add LJ 10-12 to ParameterSet --- src/DataIO_AmberFF.cpp | 15 ++++++++------- src/ParameterSet.cpp | 10 +++++++++- src/ParameterSet.h | 7 ++++++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 877dca7ef8..395ac5ce35 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -243,20 +243,21 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( symbols[3] ); prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); } else if (section == LJ1012) { - // Lennard-Jones 10-12 hydrogen bonding term + // Lennard-Jones 10-12 hydrogen bonding term. + // According to the docs, the format should be: // KT1 , KT2 , A , B , ASOLN , BSOLN , HCUT , IC // FORMAT(2X,A2,2X,A2,2x,5F10.2,I2) - // NOTE: The ASOLN, BSOLN, HCUT, and IC columns are no longer used - // and so are not read. + // In practive (in e.g. parm91.dat), the actual format appears to be: + // KT1, KT2, A, B, HCUT char KT1[MAXSYMLEN], KT2[MAXSYMLEN]; - double A, B; + double A, B, HCUT; //double ASOLN, BSOLN, HCUT; //int IC; mprintf("DEBUG: LJ 10-12: %s\n", ptr); //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", - int nscan = sscanf(ptr, "%s %s %lf %lf", KT1, KT2, &A, &B); - if (nscan < 4) { - mprinterr("Error: Expected at least KT1, KT2, A, B, got only %i elements\n", nscan); + int nscan = sscanf(ptr, "%s %s %lf %lf %lf", KT1, KT2, &A, &B, &HCUT); + if (nscan < 5) { + mprinterr("Error: Expected at least KT1, KT2, A, B, HCUT, got only %i elements\n", nscan); return 1; } } diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 635b9e2b4f..9134bc2ec0 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -10,7 +10,9 @@ size_t ParameterSet::DataSize() const { angleParm_.DataSize() + ubParm_.DataSize() + dihParm_.DataSize() + - impParm_.DataSize()); + impParm_.DataSize() + + HBparm_.DataSize() + + (hydrophilicAtomTypes_.size() * NameType::DataSize())); } void ParameterSet::Debug(const char* fnameIn) const { @@ -33,6 +35,12 @@ void ParameterSet::Debug(const char* fnameIn) const { for (ParmHolder::const_iterator nb = nb14Parm_.begin(); nb != nb14Parm_.end(); ++nb) Out.Printf("\t%6s %6s : %12.4E %12.4E\n", (*nb->first[0]), (*nb->first[1]), nb->second.A(), nb->second.B()); } + if (!HBparm_.empty()) { + Out.Printf("HB LJ 10-12 parameters:\n"); + Out.Printf("\t%6s %6s : %12s %12s %12s\n", "Type1", "Type2", "Asol", "Bsol", "HBcut"); + for (ParmHolder::const_iterator hb = HBparm_.begin(); hb != HBparm_.end(); ++hb) + Out.Printf("\t%6s %6s : %12.4f %124.f %12.4f\n", *(hb->first[0]), *(hb->first[1]), hb->second.Asol(), hb->second.Bsol(), hb->second.HBcut()); + } if (!bondParm_.empty()) { Out.Printf("Bond parameters:\n"); Out.Printf("\t%6s %6s : %12s %12s\n", "Type1", "Type2", "Rk", "Req"); diff --git a/src/ParameterSet.h b/src/ParameterSet.h index fbfadc82ec..42964ca3eb 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -16,6 +16,7 @@ class ParameterSet { ParmHolder& UB() { return ubParm_; } ParmHolder& IP() { return impParm_; } DihedralParmHolder& DP() { return dihParm_; } + ParmHolder& HB() { return HBparm_; } void SetHasLJparams(bool b) { hasLJparams_ = b; } bool HasLJparams() const { return hasLJparams_; } @@ -28,6 +29,7 @@ class ParameterSet { ParmHolder const& UB() const { return ubParm_; } ParmHolder const& IP() const { return impParm_; } DihedralParmHolder const& DP() const { return dihParm_; } + ParmHolder const& HB() const { return HBparm_; } void Debug(const char*) const; void Debug() const { return Debug(""); } @@ -38,7 +40,8 @@ class ParameterSet { UpdateCount() : nBondsUpdated_(0), nAnglesUpdated_(0), nDihedralsUpdated_(0), nImpropersUpdated_(0), nUreyBradleyUpdated_(0), nAtomTypeUpdated_(0), - nLJparamsUpdated_(0), nLJ14paramsUpdated_(0) {} + nLJparamsUpdated_(0), nLJ14paramsUpdated_(0), + nHBparamsUpdated_(0) {} unsigned int nBondsUpdated_; unsigned int nAnglesUpdated_; unsigned int nDihedralsUpdated_; @@ -47,6 +50,7 @@ class ParameterSet { unsigned int nAtomTypeUpdated_; unsigned int nLJparamsUpdated_; unsigned int nLJ14paramsUpdated_; + unsigned int nHBparamsUpdated_; }; /// Update this set with parameters from given set int UpdateParamSet(ParameterSet const&, UpdateCount&, int); @@ -65,6 +69,7 @@ class ParameterSet { ParmHolder ubParm_; ///< Urey-Bradley parameters ParmHolder impParm_; ///< Improper dihedral parameters DihedralParmHolder dihParm_; ///< Cosine-series dihedral parameters + ParmHolder HBparm_; ///< LJ 10-12 A-B parameters for hydrogen bonds NsetType hydrophilicAtomTypes_; ///< Hold names of hydrophilic atom types bool hasLJparams_; }; From 5f1eb35933dd99ae2f9daf8f12aad5f1616ad8c5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 15:19:50 -0500 Subject: [PATCH 0051/1492] Finish reading HB 10-12 params --- src/DataIO_AmberFF.cpp | 4 ++++ src/ParameterSet.cpp | 2 +- src/ParameterTypes.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 395ac5ce35..1d21880cff 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -260,6 +260,10 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprinterr("Error: Expected at least KT1, KT2, A, B, HCUT, got only %i elements\n", nscan); return 1; } + TypeNameHolder types(2); + types.AddName( KT1 ); + types.AddName( KT2 ); + prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); } ptr = infile.Line(); diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 9134bc2ec0..b35819b07c 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -39,7 +39,7 @@ void ParameterSet::Debug(const char* fnameIn) const { Out.Printf("HB LJ 10-12 parameters:\n"); Out.Printf("\t%6s %6s : %12s %12s %12s\n", "Type1", "Type2", "Asol", "Bsol", "HBcut"); for (ParmHolder::const_iterator hb = HBparm_.begin(); hb != HBparm_.end(); ++hb) - Out.Printf("\t%6s %6s : %12.4f %124.f %12.4f\n", *(hb->first[0]), *(hb->first[1]), hb->second.Asol(), hb->second.Bsol(), hb->second.HBcut()); + Out.Printf("\t%6s %6s : %12.4f %12.4f %12.4f\n", *(hb->first[0]), *(hb->first[1]), hb->second.Asol(), hb->second.Bsol(), hb->second.HBcut()); } if (!bondParm_.empty()) { Out.Printf("Bond parameters:\n"); diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 7564a61069..4908d653eb 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -258,6 +258,12 @@ typedef std::vector DihedralArray; // ----- NON-BONDED PARAMETERS ------------------------------------------------- /// Hold LJ 10-12 hbond params class HB_ParmType { + /** Tolerance for comparison. A little larger than SMALL because A + * and B tend to be large. + */ + // NOTE: Probably should check __cpluscplus here instead of using a + // define, but this is guaranteed to be portable. +# define tol_ 0.00000001 public: HB_ParmType() : asol_(0), bsol_(0), hbcut_(0) {} HB_ParmType(double a, double b, double c) : @@ -268,10 +274,33 @@ class HB_ParmType { void SetAsol(double a) { asol_ = a; } void SetBsol(double b) { bsol_ = b; } void SetHBcut(double h) { hbcut_ = h; } + /// \return True if A, B, and HBcut match + bool operator==(HB_ParmType const& rhs) const { + return ( (fabs(asol_ - rhs.asol_) < tol_) && + (fabs(bsol_ - rhs.bsol_) < tol_) && + (fabs(hbcut_ - rhs.hbcut_) < tol_) ); + } + /// \return True if A, B, or HBcut do not match + bool operator!=(HB_ParmType const& rhs) const { + return ( (fabs(asol_ - rhs.asol_) > tol_) || + (fabs(bsol_ - rhs.bsol_) > tol_) || + (fabs(hbcut_ - rhs.hbcut_) > tol_) ); + } + /// \return True if A less than zero, or B if A is equal. TODO add hbcut? + bool operator<(HB_ParmType const& rhs) const { + if (*this != rhs) { + if ( (fabs(asol_ - rhs.asol_) < tol_) ) + return (bsol_ < rhs.bsol_); + else + return (asol_ < rhs.asol_); + } else + return false; + } private: double asol_; double bsol_; double hbcut_; +# undef tol_ }; typedef std::vector HB_ParmArray; /// Hold Lennard-Jones 6-12 interaction A and B parameters From 81c82ec3adbc88a36eb5d305ad740e0fc3f2118d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 19:02:49 -0500 Subject: [PATCH 0052/1492] Start nonbonded equivalent and nonbonded reads --- src/DataIO_AmberFF.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 1d21880cff..79d4aaa4e3 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -87,7 +87,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprintf("\tTitle: %s\n", title.c_str()); // Read file enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, - LJ1012, UNKNOWN }; + LJ1012, NB_EQUIV, NONBOND, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -115,6 +115,14 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin ptr = infile.Line(); while (*ptr == ' ' && *ptr != '\0') ++ptr; if (*ptr != '\0') continue; + } else if (section == NONBOND) { + // Special case: first read the line: + // LABEL , KINDNB + // FORMAT(A4,6X,A2) + ptr = infile.Line(); + char nb_label[MAXSYMLEN], nb_kind[MAXSYMLEN]; + sscanf(ptr, "%s %s", nb_label, nb_kind); + mprintf("DEBUG: NB label= %s NB kind = %s\n", nb_label, nb_kind); } } else if (section == ATYPE) { // Input for atom symbols and masses @@ -264,7 +272,11 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( KT1 ); types.AddName( KT2 ); prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); - } + } else if (section == NB_EQUIV) { + mprintf("DEBUG: Nonbond equiv: %s\n", ptr); + } else if (section == NONBOND) { + mprintf("DEBUG: Nonbond: %s\n", ptr); + } ptr = infile.Line(); } From c1c197a82e49b421171006d975159550b81b92ab Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 19:07:39 -0500 Subject: [PATCH 0053/1492] Check that nonbond parameters are type RE --- src/DataIO_AmberFF.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 79d4aaa4e3..bcb05f29f1 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -100,9 +100,10 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); section = (SectionType)((int)section + 1); } - // Special case; hydrophilic atom types. One line. - // FORMAT(20(A2,2X)) + // Special cases if (section == HYDROPHILIC) { + // Special case: hydrophilic atom types. One line. + // FORMAT(20(A2,2X)) ptr = infile.Line(); mprintf("DEBUG: Hydrophilic: %s\n", ptr); // Take advantage of the fact that we expect whitespace-delimiters @@ -116,13 +117,17 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin while (*ptr == ' ' && *ptr != '\0') ++ptr; if (*ptr != '\0') continue; } else if (section == NONBOND) { - // Special case: first read the line: + // Special case: first read the line. // LABEL , KINDNB // FORMAT(A4,6X,A2) ptr = infile.Line(); char nb_label[MAXSYMLEN], nb_kind[MAXSYMLEN]; sscanf(ptr, "%s %s", nb_label, nb_kind); mprintf("DEBUG: NB label= %s NB kind = %s\n", nb_label, nb_kind); + if (nb_kind[0] != 'R' || nb_kind[1] != 'E') { + mprinterr("Error: Nonbond parameters are not of type 'RE' (Rmin, Epsilon).\n"); + return 1; + } } } else if (section == ATYPE) { // Input for atom symbols and masses From c85d1f7e1c2e7e1060412eb3fb18b76eacffa91c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 19:24:01 -0500 Subject: [PATCH 0054/1492] Start reading nonbond params --- src/DataIO_AmberFF.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index bcb05f29f1..d22b70c6c2 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -280,7 +280,25 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } else if (section == NB_EQUIV) { mprintf("DEBUG: Nonbond equiv: %s\n", ptr); } else if (section == NONBOND) { + // ***** ONLY IF KINDNB .EQ. 'RE' ***** + // LTYNB , R , EDEP mprintf("DEBUG: Nonbond: %s\n", ptr); + char LTYNB[MAXSYMLEN]; + double R, EDEP; + double R14, E14; + int nscan = sscanf(ptr, "%s %lf %lf %lf %lf", LTYNB, &R, &EDEP, &R14, &E14); + + if (nscan == 3 || nscan == 5) { + // symbol, rmin, epsilon + ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); + if (it == prm.AT().end()) { + mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." + " Skipping.\n", LTYNB); + } else { + it->second.SetLJ().SetRadius( R ); + it->second.SetLJ().SetDepth( EDEP ); + } + } } ptr = infile.Line(); From 5672f3caf298c20d7a301b9ec8832a5a45998193 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 20:40:02 -0500 Subject: [PATCH 0055/1492] Start handling multiple NB sets in same parm --- src/DataIO_AmberFF.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index d22b70c6c2..c1ab590e0d 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -53,6 +53,15 @@ int DataIO_AmberFF::read_symbols(const char* ptrIn, std::vector& sy return -1; } +/// Hold a set of nonbonded parameters +class NonbondSet { + public: + NonbondSet(std::string const& n) : name_(n) {} + + std::string name_; ///< Name of set parameters + ParmHolder LJ_; ///< Hold LJ 6-12 parameters +}; + // DataIO_AmberFF::ReadData() int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -72,6 +81,9 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } DataSet_Parameters& prm = static_cast( *ds ); + typedef std::vector NbSetArrayType; + NbSetArrayType NBsets; + // Read title BufferedLine infile; if (infile.OpenFileRead( fname )) { @@ -128,6 +140,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprinterr("Error: Nonbond parameters are not of type 'RE' (Rmin, Epsilon).\n"); return 1; } + NBsets.push_back( NonbondSet( std::string(nb_label) ) ); } } else if (section == ATYPE) { // Input for atom symbols and masses From 8841d722a98c05001969b34b499f8f46f229f015 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 20:55:31 -0500 Subject: [PATCH 0056/1492] Try to handle multiple nonbond sets --- src/DataIO_AmberFF.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index c1ab590e0d..b843b49bb9 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -98,6 +98,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); // Read file + bool ljedit = false; enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, LJ1012, NB_EQUIV, NONBOND, UNKNOWN }; SectionType section = ATYPE; @@ -109,8 +110,23 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin if (*ptr == '\0') { // Section Change if (section != UNKNOWN) { - mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); - section = (SectionType)((int)section + 1); + if (section == NONBOND) { + // Do a lookahead to see if there are multiple NB sets. + // It will either be another set, END, or LJEDIT + ptr = infile.Line(); + while (*ptr == ' ' && *ptr != '\0') ++ptr; + std::string nbline(ptr); + if (nbline == "END") { + mprintf("END\n"); + section = UNKNOWN; + } else if (nbline == "LJEDIT") { + ljedit = true; + section = UNKNOWN; + } // Otherwise assume another nonbond section + } else { + mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); + section = (SectionType)((int)section + 1); + } } // Special cases if (section == HYDROPHILIC) { @@ -132,7 +148,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // Special case: first read the line. // LABEL , KINDNB // FORMAT(A4,6X,A2) - ptr = infile.Line(); + if (NBsets.empty()) + ptr = infile.Line(); char nb_label[MAXSYMLEN], nb_kind[MAXSYMLEN]; sscanf(ptr, "%s %s", nb_label, nb_kind); mprintf("DEBUG: NB label= %s NB kind = %s\n", nb_label, nb_kind); @@ -312,6 +329,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin it->second.SetLJ().SetDepth( EDEP ); } } + } else if (ljedit) { + mprintf("DEBUG: LJedit: %s\n", ptr); } ptr = infile.Line(); From 8a375e6f07a773c49c1598ff37afd70855c72a5d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 12 Nov 2023 21:01:38 -0500 Subject: [PATCH 0057/1492] Actually save the nonbonded param --- src/DataIO_AmberFF.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index b843b49bb9..715484c205 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -320,6 +320,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin if (nscan == 3 || nscan == 5) { // symbol, rmin, epsilon + NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); if (it == prm.AT().end()) { mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." From dd3ef4bbf304a12ec08911943f06f2e92bab7617 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 11:22:56 -0500 Subject: [PATCH 0058/1492] Add ability to choose from multiple nonbond parm sets --- src/DataFile.cpp | 2 +- src/DataIO_AmberFF.cpp | 36 ++++++++++++++++++++++++++++++++++-- src/DataIO_AmberFF.h | 2 ++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/DataFile.cpp b/src/DataFile.cpp index c393ddb4e3..b2e6bbaa59 100644 --- a/src/DataFile.cpp +++ b/src/DataFile.cpp @@ -90,7 +90,7 @@ const FileTypes::AllocToken DataFile::DF_AllocArray[] = { { "Numpy array", 0, 0, DataIO_Numpy::Alloc}, { "Amber Prep File", DataIO_AmberPrep::ReadHelp, 0, DataIO_AmberPrep::Alloc}, { "Amber OFF File", 0, 0, DataIO_AmberLib::Alloc}, - { "Amber Force Field", 0, 0, DataIO_AmberFF::Alloc}, + { "Amber Force Field", DataIO_AmberFF::ReadHelp, 0, DataIO_AmberFF::Alloc}, { "Unknown Data file", 0, 0, 0 } }; diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 715484c205..e5f027bb44 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -23,13 +23,13 @@ bool DataIO_AmberFF::ID_DataFormat(CpptrajFile& infile) // DataIO_AmberFF::ReadHelp() void DataIO_AmberFF::ReadHelp() { - + mprintf("\tnbset : Nonbonded set name to use when multiple nonbond parameter sets.\n"); } // DataIO_AmberFF::processReadArgs() int DataIO_AmberFF::processReadArgs(ArgList& argIn) { - + nbsetname_ = argIn.GetStringKey("nbset"); return 0; } @@ -335,6 +335,38 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } ptr = infile.Line(); + } // END loop over file. + // Deal with nonbond and equivalence + if (!NBsets.empty()) { + int nbsetidx = 0; + if (NBsets.size() > 1 || !nbsetname_.empty()) { + // Choose from multiple nbsets + if (nbsetname_.empty()) { + mprinterr("Error: Parm set in file '%s' contains %zu nonbonded parameter sets\n" + "Error: but no set has been specified.\n", fname.full(), NBsets.size()); + mprinterr("Error: Need to specify one of"); + for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) + mprinterr(" %s", it->name_.c_str()); + mprinterr("\n"); + } else { + nbsetidx = -1; + for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) { + if (it->name_ == nbsetname_) { + nbsetidx = it - NBsets.begin(); + break; + } + } + if (nbsetidx < 0) { + mprinterr("Error: Nonbonded set '%s' not found.\n", nbsetname_.c_str()); + mprinterr("Error: Need to specify one of"); + for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) + mprinterr(" %s", it->name_.c_str()); + mprinterr("\n"); + return 1; + } + } + } + mprintf("\tUsing nonbonded parm set: %s\n", NBsets[nbsetidx].name_.c_str()); } prm.Debug(); // TODO debug level diff --git a/src/DataIO_AmberFF.h b/src/DataIO_AmberFF.h index ab89e8fb09..5d0af59568 100644 --- a/src/DataIO_AmberFF.h +++ b/src/DataIO_AmberFF.h @@ -15,5 +15,7 @@ class DataIO_AmberFF : public DataIO { bool ID_DataFormat(CpptrajFile&); private: static int read_symbols(const char*, std::vector&, int); + + std::string nbsetname_; ///< Nonbonded parameter set name to use }; #endif From e3f4b52fa4edae86bc33f5da1471b890062c17c7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 11:38:43 -0500 Subject: [PATCH 0059/1492] Add nb params from the chosen set --- src/DataIO_AmberFF.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index e5f027bb44..a8f6b61a3b 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -321,14 +321,14 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin if (nscan == 3 || nscan == 5) { // symbol, rmin, epsilon NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); - ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); + /*ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); if (it == prm.AT().end()) { mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." " Skipping.\n", LTYNB); } else { it->second.SetLJ().SetRadius( R ); it->second.SetLJ().SetDepth( EDEP ); - } + }*/ } } else if (ljedit) { mprintf("DEBUG: LJedit: %s\n", ptr); @@ -367,7 +367,19 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } } mprintf("\tUsing nonbonded parm set: %s\n", NBsets[nbsetidx].name_.c_str()); - } + for (ParmHolder::const_iterator it = NBsets[nbsetidx].LJ_.begin(); + it != NBsets[nbsetidx].LJ_.end(); ++it) + { + ParmHolder::iterator at = prm.AT().GetParam( it->first ); + if (at == prm.AT().end()) { + mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." + " Skipping.\n", *(it->first[0])); + } else { + at->second.SetLJ().SetRadius( it->second.Radius() ); + at->second.SetLJ().SetDepth( it->second.Depth() ); + } + } + } // END nonbond parameters prm.Debug(); // TODO debug level infile.CloseFile(); From 535162010e35f8652f1689e8ae68094d3f580867 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 14:05:26 -0500 Subject: [PATCH 0060/1492] Do equivalent NB params --- src/DataIO_AmberFF.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index a8f6b61a3b..ad8aeab231 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -81,8 +81,13 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } DataSet_Parameters& prm = static_cast( *ds ); + // For files with > 1 set of NB params typedef std::vector NbSetArrayType; NbSetArrayType NBsets; + // For holding equivalent NB type names + typedef std::vector Narray; + typedef std::vector XNarray; + XNarray EquivalentNames; // Read title BufferedLine infile; @@ -308,7 +313,14 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin types.AddName( KT2 ); prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); } else if (section == NB_EQUIV) { + // EQUIVALENCING ATOM SYMBOLS FOR THE NON-BONDED 6-12 POTENTIAL PARAMETERS + // IORG , IEQV(I) , I = 1 , 19 + // FORMAT(20(A2,2X)) mprintf("DEBUG: Nonbond equiv: %s\n", ptr); + EquivalentNames.push_back( Narray() ); + ArgList equiv_line( ptr, " " ); + for (int iarg = 0; iarg != equiv_line.Nargs(); iarg++) + EquivalentNames.back().push_back( equiv_line[iarg] ); } else if (section == NONBOND) { // ***** ONLY IF KINDNB .EQ. 'RE' ***** // LTYNB , R , EDEP @@ -379,6 +391,29 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin at->second.SetLJ().SetDepth( it->second.Depth() ); } } + // Do equivalent atoms. + for (XNarray::const_iterator equivAts = EquivalentNames.begin(); + equivAts != EquivalentNames.end(); ++equivAts) + { + // First name is the type to copy TODO check size? + Narray::const_iterator typeName = equivAts->begin(); + ParmHolder::const_iterator at0 = prm.AT().GetParam( *typeName ); + if (at0 == prm.AT().end()) { + mprinterr("Error: Equivalent atom type '%s' not found.\n", *(*typeName) ); + return 1; + } + ++typeName; + for (; typeName != equivAts->end(); ++typeName) { + ParmHolder::iterator at1 = prm.AT().GetParam( *typeName ); + if (at1 == prm.AT().end()) { + mprinterr("Error: Equivalent atom type '%s' (base '%s') not found.\n", *(*typeName), *(at0->first[0])); + return 1; + } + mprintf("DEBUG: Equiv '%s' => '%s'\n", *(at0->first[0]), *(*typeName)); + at1->second.SetLJ().SetRadius( at0->second.LJ().Radius() ); + at1->second.SetLJ().SetDepth( at0->second.LJ().Depth() ); + } + } // END loop over EquivalentNames } // END nonbond parameters prm.Debug(); // TODO debug level From 3378980f11bef3c406f4597256f4bc017bb0e4d3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 14:09:40 -0500 Subject: [PATCH 0061/1492] Update 10-12 pairs --- src/ParameterSet.cpp | 2 ++ src/UpdateParameters.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index b35819b07c..3833c8fad3 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -107,6 +107,8 @@ int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int uc.nLJparamsUpdated_ = UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); // LJ 1-4 Pairs uc.nLJ14paramsUpdated_ = UpdateParameters< ParmHolder >(set0.NB14(), set1.NB14(), "LJ A-B 1-4"); + // HB LJ 10-12 Pairs + uc.nHBparamsUpdated_ = UpdateParameters< ParmHolder >(set0.HB(), set1.HB(), "LJ HB 10-12"); if (debugIn > 0) set0.Debug("newp.dat"); return 0; diff --git a/src/UpdateParameters.h b/src/UpdateParameters.h index 8d9240fc0f..9dcd79b04c 100644 --- a/src/UpdateParameters.h +++ b/src/UpdateParameters.h @@ -14,6 +14,7 @@ static inline void PrintParmType(DihedralParmArray const& dpa) { } static inline void PrintParmType(AtomType const& at) { mprintf(" %12.4f %12.4f %12.4f\n", at.LJ().Radius(), at.LJ().Depth(), at.Mass()); } static inline void PrintParmType(NonbondType const& nb) { mprintf(" %12.4E %12.4E\n", nb.A(), nb.B()); } +static inline void PrintParmType(HB_ParmType const& hb) { mprintf(" %12.4E %12.4E %12.4E\n", hb.Asol(), hb.Bsol(), hb.HBcut()); } /** Add update parameters. * \param0 Parameters to add to/update. From 4a043d6779eb49af02db5f7fcc1850c8849f6b7e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 14:19:56 -0500 Subject: [PATCH 0062/1492] Save parameter set name and NB set name --- src/DataIO_AmberFF.cpp | 2 ++ src/ParameterSet.cpp | 14 ++++++++++++++ src/ParameterSet.h | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index ad8aeab231..52bc494f8e 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -102,6 +102,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); + prm.SetParamSetName( title ); // Read file bool ljedit = false; enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, @@ -379,6 +380,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } } mprintf("\tUsing nonbonded parm set: %s\n", NBsets[nbsetidx].name_.c_str()); + prm.SetNbParamName( NBsets[nbsetidx].name_ ); for (ParmHolder::const_iterator it = NBsets[nbsetidx].LJ_.begin(); it != NBsets[nbsetidx].LJ_.end(); ++it) { diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 3833c8fad3..4a1b4defaf 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -18,6 +18,10 @@ size_t ParameterSet::DataSize() const { void ParameterSet::Debug(const char* fnameIn) const { CpptrajFile Out; Out.OpenWrite( fnameIn ); + if (!name_.empty()) + Out.Printf("Parameter set: %s\n", name_.c_str()); + if (!NBname_.empty()) + Out.Printf("Nonbond parameters name: %s\n", NBname_.c_str()); Out.Printf("Atom Types:\n"); Out.Printf("\t%6s %8s %12s %12s %12s %12s\n", "Name", "TypeIdx", "Radius", "Depth", "Mass", "Polar."); for (ParmHolder::const_iterator at = atomTypes_.begin(); at != atomTypes_.end(); ++at) { @@ -127,3 +131,13 @@ int ParameterSet::AddHydrophilicAtomType(NameType const& atype) { hydrophilicAtomTypes_.push_back( atype ); return 0; } + +/** Set parameter set name. */ +void ParameterSet::SetParamSetName(std::string const& nameIn) { + name_ = nameIn; +} + +/** Set nonbond parameter set name. */ +void ParameterSet::SetNbParamName(std::string const& nameIn) { + NBname_ = nameIn; +} diff --git a/src/ParameterSet.h b/src/ParameterSet.h index 42964ca3eb..59f71ada8b 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -56,11 +56,18 @@ class ParameterSet { int UpdateParamSet(ParameterSet const&, UpdateCount&, int); /// Add hydrophilic atom type int AddHydrophilicAtomType(NameType const&); + /// Set parameter set name + void SetParamSetName(std::string const&); + /// Set nonbond parameter set name + void SetNbParamName(std::string const&); /// \return Size in memory in bytes size_t DataSize() const; private: typedef std::vector NsetType; + std::string name_; ///< Parameter set name + std::string NBname_; ///< Nonbond set name + ParmHolder atomTypes_; ///< Atom types ParmHolder nbParm_; ///< Lennard-Jones 6-12 A-B parameters ParmHolder nb14Parm_; ///< LJ 6-12 A-B parameters for 1-4 interactions From 2b32914765d69a0450182b314984d421403c0b91 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 15:17:40 -0500 Subject: [PATCH 0063/1492] Fix up the LJEDIT section processing (not finished yet). Fix detection of 1-4 params when included with NONBOND. --- src/DataIO_AmberFF.cpp | 90 +++++++++++++++++++++++++++++------------- src/cpptrajdepend | 2 +- 2 files changed, 64 insertions(+), 28 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 52bc494f8e..aa54b7936f 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "BufferedLine.h" #include "DataSet_Parameters.h" +#include "StringRoutines.h" #include // sscanf /// CONSTRUCTOR @@ -104,9 +105,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprintf("\tTitle: %s\n", title.c_str()); prm.SetParamSetName( title ); // Read file - bool ljedit = false; enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, - LJ1012, NB_EQUIV, NONBOND, UNKNOWN }; + LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { @@ -126,8 +126,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprintf("END\n"); section = UNKNOWN; } else if (nbline == "LJEDIT") { - ljedit = true; - section = UNKNOWN; + section = LJEDIT; } // Otherwise assume another nonbond section } else { mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); @@ -326,25 +325,62 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // ***** ONLY IF KINDNB .EQ. 'RE' ***** // LTYNB , R , EDEP mprintf("DEBUG: Nonbond: %s\n", ptr); - char LTYNB[MAXSYMLEN]; - double R, EDEP; - double R14, E14; - int nscan = sscanf(ptr, "%s %lf %lf %lf %lf", LTYNB, &R, &EDEP, &R14, &E14); - - if (nscan == 3 || nscan == 5) { - // symbol, rmin, epsilon - NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); - /*ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); - if (it == prm.AT().end()) { - mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." - " Skipping.\n", LTYNB); - } else { - it->second.SetLJ().SetRadius( R ); - it->second.SetLJ().SetDepth( EDEP ); - }*/ + //char LTYNB[MAXSYMLEN]; + //double R, EDEP; + //double R14, E14; + // This section is a little tricky. Apparently CHARMM-style Amber FF + // files can have 14 LJ params here. Try to detect this. + ArgList nbargs( ptr, " " ); + if (nbargs.Nargs() < 3) { + mprinterr("Error: Expected at least TYPE, R, DEPTH, got %i elements.\n", nbargs.Nargs()); + return 1; } - } else if (ljedit) { + bool has_14 = false; + if (nbargs.Nargs() >= 5) { + if (validDouble( nbargs[3] ) && validDouble( nbargs[4] )) { + has_14 = true; + } + } + if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); + double R = convertToDouble( nbargs[1] ); + double EDEP = convertToDouble( nbargs[2] ); + NBsets.back().LJ_.AddParm( TypeNameHolder(nbargs[0]), LJparmType(R, EDEP), false ); + //int nscan = sscanf(ptr, "%s %lf %lf %lf %lf", LTYNB, &R, &EDEP, &R14, &E14); + + //if (nscan >= 5) { + // // symbol, rmin, epsilon + // NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); + // /*ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); + // if (it == prm.AT().end()) { + // mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." + // " Skipping.\n", LTYNB); + // } else { + // it->second.SetLJ().SetRadius( R ); + // it->second.SetLJ().SetDepth( EDEP ); + // }*/ + //} + } else if (section == LJEDIT) { mprintf("DEBUG: LJedit: %s\n", ptr); + // Lennard-Jones sigma and epsilon of the first atom type when it + // interacts with anything under the normal rules, then the sigma + // and epsilon of the second atom type when it interacts with the first. + char AT1[MAXSYMLEN], AT2[MAXSYMLEN]; + double sig1, eps1, sig2, eps2; + int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf", AT1, AT2, &sig1, &eps1, &sig2, &eps2); + if (nscan != 6) { + mprinterr("Error: Expected AT1, AT2, SIG1, EPS1, SIG2, EPS2, got %i elements.\n", nscan); + return 1; + } + LJparmType LJ1(sig1, eps1); + LJparmType LJ2(sig2, eps2); + ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(AT1) ); + if (it == prm.AT().end()) { + mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", + AT1); + return 1; + } + it->second.SetLJ().SetRadius( LJ1.Radius() ); + it->second.SetLJ().SetDepth( LJ1.Depth() ); } ptr = infile.Line(); @@ -386,12 +422,12 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin { ParmHolder::iterator at = prm.AT().GetParam( it->first ); if (at == prm.AT().end()) { - mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." - " Skipping.\n", *(it->first[0])); - } else { - at->second.SetLJ().SetRadius( it->second.Radius() ); - at->second.SetLJ().SetDepth( it->second.Depth() ); - } + mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", + *(it->first[0])); + return 1; + } + at->second.SetLJ().SetRadius( it->second.Radius() ); + at->second.SetLJ().SetDepth( it->second.Depth() ); } // Do equivalent atoms. for (XNarray::const_iterator equivAts = EquivalentNames.begin(); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 46acb9fc99..59dfdcab32 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -204,7 +204,7 @@ DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberEne.o : DataIO_AmberEne.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberEne.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_AmberFF.o : DataIO_AmberFF.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_AmberFF.o : DataIO_AmberFF.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberLib.o : DataIO_AmberLib.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberLib.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CCP4.o : DataIO_CCP4.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ByteRoutines.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CCP4.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 16b331e552a936434ab552c664a2630f3effd203 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 15:24:51 -0500 Subject: [PATCH 0064/1492] Set off-diagonal --- src/DataIO_AmberFF.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index aa54b7936f..292095f463 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -373,6 +373,7 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } LJparmType LJ1(sig1, eps1); LJparmType LJ2(sig2, eps2); + // Set type 1 ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(AT1) ); if (it == prm.AT().end()) { mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", @@ -381,6 +382,12 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } it->second.SetLJ().SetRadius( LJ1.Radius() ); it->second.SetLJ().SetDepth( LJ1.Depth() ); + // Set off-diagonal for type1-type2 + TypeNameHolder types(2); + types.AddName( AT1 ); + types.AddName( AT2 ); + // FIXME different combine rules? + prm.NB().AddParm(types, LJ1.Combine_LB(LJ2), false); } ptr = infile.Line(); From 225a13f5f95a5388e24b66657126aec2f32bfd2d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 15:43:36 -0500 Subject: [PATCH 0065/1492] Ensure off-diagonal mods are processed after the main NB params --- src/DataIO_AmberFF.cpp | 57 +++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 292095f463..b99d3df322 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -63,6 +63,21 @@ class NonbondSet { ParmHolder LJ_; ///< Hold LJ 6-12 parameters }; +/// Hold an off-diagonal NB modification +class OffdiagNB { + public: + OffdiagNB(NameType const& AT1, NameType const& AT2, double sig1, double eps1, double sig2, double eps2) : + types_(2), LJ1_(sig1, eps1), LJ2_(sig2, eps2) + { + types_.AddName(AT1); + types_.AddName(AT2); + } + + TypeNameHolder types_; + LJparmType LJ1_; + LJparmType LJ2_; +}; + // DataIO_AmberFF::ReadData() int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -89,6 +104,9 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin typedef std::vector Narray; typedef std::vector XNarray; XNarray EquivalentNames; + // For holding off-diagonal mods + typedef std::vector Oarray; + Oarray Offdiag; // Read title BufferedLine infile; @@ -371,27 +389,12 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin mprinterr("Error: Expected AT1, AT2, SIG1, EPS1, SIG2, EPS2, got %i elements.\n", nscan); return 1; } - LJparmType LJ1(sig1, eps1); - LJparmType LJ2(sig2, eps2); - // Set type 1 - ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(AT1) ); - if (it == prm.AT().end()) { - mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", - AT1); - return 1; - } - it->second.SetLJ().SetRadius( LJ1.Radius() ); - it->second.SetLJ().SetDepth( LJ1.Depth() ); - // Set off-diagonal for type1-type2 - TypeNameHolder types(2); - types.AddName( AT1 ); - types.AddName( AT2 ); - // FIXME different combine rules? - prm.NB().AddParm(types, LJ1.Combine_LB(LJ2), false); + Offdiag.push_back( OffdiagNB(AT1, AT2, sig1, eps1, sig2, eps2) ); } ptr = infile.Line(); } // END loop over file. + // Deal with nonbond and equivalence if (!NBsets.empty()) { int nbsetidx = 0; @@ -461,6 +464,26 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } // END loop over EquivalentNames } // END nonbond parameters + // Do off diagonal NB mods + if (!Offdiag.empty()) { + for (Oarray::const_iterator od = Offdiag.begin(); od != Offdiag.end(); ++od) + { + mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); + // Set type 1 + ParmHolder::iterator it = prm.AT().GetParam( od->types_[0] ); + if (it == prm.AT().end()) { + mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", + *(od->types_[0])); + return 1; + } + it->second.SetLJ().SetRadius( od->LJ1_.Radius() ); + it->second.SetLJ().SetDepth( od->LJ1_.Depth() ); + // Set off-diagonal for type1-type2 + // FIXME different combine rules? + prm.NB().AddParm(od->types_, od->LJ1_.Combine_LB(od->LJ2_), false); + } + } // END off-diagonal NB mods + prm.Debug(); // TODO debug level infile.CloseFile(); return 0; From d7a7ac3fb36b708b016fa7cb61c82a5afdef8e78 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 15:49:02 -0500 Subject: [PATCH 0066/1492] Update info printout --- src/DataSet_Parameters.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/DataSet_Parameters.cpp b/src/DataSet_Parameters.cpp index 45535f063b..200aa79ad1 100644 --- a/src/DataSet_Parameters.cpp +++ b/src/DataSet_Parameters.cpp @@ -18,13 +18,15 @@ size_t DataSet_Parameters::Size() const { void DataSet_Parameters::Info() const { if (Size() > 0) { mprintf(" ("); - if (AT().size() > 0) mprintf(" types=%zu", AT().size()); - if (NB().size() > 0) mprintf(" LJ pairs=%zu", NB().size()); - if (BP().size() > 0) mprintf(" bnd=%zu", BP().size()); - if (AP().size() > 0) mprintf(" ang=%zu", AP().size()); - if (UB().size() > 0) mprintf(" UB=%zu", UB().size()); - if (DP().size() > 0) mprintf(" dih=%zu", DP().size()); - if (IP().size() > 0) mprintf(" imp=%zu", IP().size()); + if (AT().size() > 0) mprintf(" types=%zu", AT().size()); + if (NB().size() > 0) mprintf(" LJ pairs=%zu", NB().size()); + if (NB14().size() > 0) mprintf(" LJ14 pairs=%zu", NB14().size()); + if (HB().size() > 0) mprintf(" HB pairs=%zu", HB().size()); + if (BP().size() > 0) mprintf(" bnd=%zu", BP().size()); + if (AP().size() > 0) mprintf(" ang=%zu", AP().size()); + if (UB().size() > 0) mprintf(" UB=%zu", UB().size()); + if (DP().size() > 0) mprintf(" dih=%zu", DP().size()); + if (IP().size() > 0) mprintf(" imp=%zu", IP().size()); mprintf(" )"); } } From 60a5d8daf73181dae2ab7409851f74f97ef7a427 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 20:05:42 -0500 Subject: [PATCH 0067/1492] Start write function --- src/DataIO_AmberFF.cpp | 30 +++++++++++++++++++++++++++++- src/DataIO_AmberFF.h | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index b99d3df322..3284881bb0 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -8,7 +8,8 @@ /// CONSTRUCTOR DataIO_AmberFF::DataIO_AmberFF() { - + SetValid( DataSet::PARAMETERS ); + // TODO Topology too? } // DataIO_AmberFF::ID_DataFormat() @@ -505,6 +506,33 @@ int DataIO_AmberFF::processWriteArgs(ArgList& argIn) // DataIO_AmberFF::WriteData() int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) { + std::vector toWrite; + for (DataSetList::const_iterator it = dsl.begin(); it != dsl.end(); ++it) + { + if ( (*it)->Type() == DataSet::PARAMETERS ) + toWrite.push_back( (DataSet_Parameters*)(*it) ); + } + if (toWrite.empty()) { + mprinterr("Error: No parameter sets to write.\n"); + return 1; + } else if (toWrite.size() == 1) { + return writeParameterSet( *(toWrite.front()) ); + } else { + // Create a combined parameter set + ParameterSet prm; + for (std::vector::const_iterator it = toWrite.begin(); + it != toWrite.end(); ++it) + { + ParameterSet::UpdateCount UC; + prm.UpdateParamSet( *(*it), UC, debug_ ); + } + return writeParameterSet( prm ); + } return 1; } + +int DataIO_AmberFF::writeParameterSet(ParameterSet const& prm) const { + + return 0; +} diff --git a/src/DataIO_AmberFF.h b/src/DataIO_AmberFF.h index 5d0af59568..b5c6ea4386 100644 --- a/src/DataIO_AmberFF.h +++ b/src/DataIO_AmberFF.h @@ -15,6 +15,7 @@ class DataIO_AmberFF : public DataIO { bool ID_DataFormat(CpptrajFile&); private: static int read_symbols(const char*, std::vector&, int); + int writeParameterSet(ParameterSet const&) const; std::string nbsetname_; ///< Nonbonded parameter set name to use }; From a41a2424c65ef960ce9b6a71f8d9ad8fcff4a7d0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 13 Nov 2023 20:17:34 -0500 Subject: [PATCH 0068/1492] Start a write routine --- src/DataFile.cpp | 1 + src/DataIO_AmberFF.cpp | 15 ++++++++++++--- src/DataIO_AmberFF.h | 2 +- src/ParameterSet.h | 2 ++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/DataFile.cpp b/src/DataFile.cpp index b2e6bbaa59..2189eeba3e 100644 --- a/src/DataFile.cpp +++ b/src/DataFile.cpp @@ -142,6 +142,7 @@ const FileTypes::KeyToken DataFile::DF_WriteKeyArray[] = { { CHARMMRTFPRM, "charmmrtfprm", ".prm" }, { PEAKS, "peaks", ".peaks" }, { NETCDFDATA, "netcdf", ".nc" }, + { AMBERFF, "amberff",".parm"}, { UNKNOWN_DATA, 0, 0 } }; diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 3284881bb0..04f7f0ef46 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -516,7 +516,7 @@ int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) mprinterr("Error: No parameter sets to write.\n"); return 1; } else if (toWrite.size() == 1) { - return writeParameterSet( *(toWrite.front()) ); + return writeParameterSet( fname, *(toWrite.front()) ); } else { // Create a combined parameter set ParameterSet prm; @@ -526,13 +526,22 @@ int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) ParameterSet::UpdateCount UC; prm.UpdateParamSet( *(*it), UC, debug_ ); } - return writeParameterSet( prm ); + return writeParameterSet( fname, prm ); } return 1; } -int DataIO_AmberFF::writeParameterSet(ParameterSet const& prm) const { +int DataIO_AmberFF::writeParameterSet(FileName const& fname, ParameterSet const& prm) const { + CpptrajFile outfile; + if (outfile.OpenWrite(fname)) return 1; + + std::string title; + if (prm.ParamSetName().empty()) + title.assign("Parameters written from CPPTRAJ"); + else + title = prm.ParamSetName(); + outfile.Printf("%s\n", title.c_str()); return 0; } diff --git a/src/DataIO_AmberFF.h b/src/DataIO_AmberFF.h index b5c6ea4386..631b5baac2 100644 --- a/src/DataIO_AmberFF.h +++ b/src/DataIO_AmberFF.h @@ -15,7 +15,7 @@ class DataIO_AmberFF : public DataIO { bool ID_DataFormat(CpptrajFile&); private: static int read_symbols(const char*, std::vector&, int); - int writeParameterSet(ParameterSet const&) const; + int writeParameterSet(FileName const&, ParameterSet const&) const; std::string nbsetname_; ///< Nonbonded parameter set name to use }; diff --git a/src/ParameterSet.h b/src/ParameterSet.h index 59f71ada8b..3cfd233e2d 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -30,6 +30,8 @@ class ParameterSet { ParmHolder const& IP() const { return impParm_; } DihedralParmHolder const& DP() const { return dihParm_; } ParmHolder const& HB() const { return HBparm_; } + std::string const& ParamSetName() const { return name_; } + std::string const& NbParamName() const { return NBname_; } void Debug(const char*) const; void Debug() const { return Debug(""); } From ce1b3e1d27e09fd1c934f3f7859ddf7a9a462d63 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 16 Nov 2023 11:53:44 -0500 Subject: [PATCH 0069/1492] Print atom type symbols --- src/DataIO_AmberFF.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 04f7f0ef46..2940550a90 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -535,13 +535,22 @@ int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) int DataIO_AmberFF::writeParameterSet(FileName const& fname, ParameterSet const& prm) const { CpptrajFile outfile; if (outfile.OpenWrite(fname)) return 1; - + // 1 - Title std::string title; if (prm.ParamSetName().empty()) title.assign("Parameters written from CPPTRAJ"); else title = prm.ParamSetName(); outfile.Printf("%s\n", title.c_str()); + // 2 - Atom symbols and masses + for (ParmHolder::const_iterator at = prm.AT().begin(); at != prm.AT().end(); ++at) + { + std::string asym = at->first[0].Truncated(); + if (asym.size() > 2) + mprintf("Warning: Atom symbol %s is larger than 2 characters, which breaks Amber FF format.\n"); + + outfile.Printf("%-2s %10.2f %10.2f\n", asym.c_str(), at->second.Mass(), at->second.Polarizability()); + } return 0; } From d46b6eb8001b023ba8fbeb538c342da403ac304b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 16 Nov 2023 13:24:27 -0500 Subject: [PATCH 0070/1492] Still trying to figure out if Amber FF files actually have a format or not --- src/DataIO_AmberFF.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 2940550a90..1f8a2045d6 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -548,8 +548,16 @@ int DataIO_AmberFF::writeParameterSet(FileName const& fname, ParameterSet const& std::string asym = at->first[0].Truncated(); if (asym.size() > 2) mprintf("Warning: Atom symbol %s is larger than 2 characters, which breaks Amber FF format.\n"); + outfile.Printf("%-2s", asym.c_str()); + if (at->second.Mass() < 10.0) + outfile.Printf(" %-10.3f", at->second.Mass()); + else if (at->second.Mass() < 100.0) + outfile.Printf(" %-10.2f", at->second.Mass()); + else + outfile.Printf(" %-10.1f", at->second.Mass()); + outfile.Printf(" %10.3f\n", at->second.Polarizability()); - outfile.Printf("%-2s %10.2f %10.2f\n", asym.c_str(), at->second.Mass(), at->second.Polarizability()); + //outfile.Printf("%-2s %-10.2f %-10.2f\n", asym.c_str(), at->second.Mass(), at->second.Polarizability()); } return 0; From 86b5419cea1021a76f1c2eba473bd005df805b80 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 16 Nov 2023 17:38:47 -0500 Subject: [PATCH 0071/1492] Ensure vars are initialized --- src/DataIO_AmberFF.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 1f8a2045d6..ac3152225f 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -188,8 +188,8 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin // Format (A2,2X,F10.2x,f10.2) mprintf("DEBUG: Atype: %s\n", ptr); char kndsym[MAXSYMLEN]; - double amass; - double atpol; + double amass = 0; + double atpol = 0; int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); ParameterHolders::RetType ret; if (nscan == 3) { From 0356f9ddde4697df5cc600a89e0c0f128d36f418 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 16 Nov 2023 17:41:52 -0500 Subject: [PATCH 0072/1492] Add check --- src/DataIO_AmberFF.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index ac3152225f..a7ffa145aa 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -175,7 +175,11 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin if (NBsets.empty()) ptr = infile.Line(); char nb_label[MAXSYMLEN], nb_kind[MAXSYMLEN]; - sscanf(ptr, "%s %s", nb_label, nb_kind); + int nscan = sscanf(ptr, "%s %s", nb_label, nb_kind); + if (nscan != 2) { + mprinterr("Error: Expected nonbond label, nonbond kind, got %i elements.\n", nscan); + return 1; + } mprintf("DEBUG: NB label= %s NB kind = %s\n", nb_label, nb_kind); if (nb_kind[0] != 'R' || nb_kind[1] != 'E') { mprinterr("Error: Nonbond parameters are not of type 'RE' (Rmin, Epsilon).\n"); From 6ea220cf9901573cfc2f353ec7def83cbe9936b5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 19 Nov 2023 16:53:53 -0500 Subject: [PATCH 0073/1492] Start makeing a separate Amber param file class --- src/AmberParamFile.cpp | 490 +++++++++++++++++++++++++++++++++++++++++ src/AmberParamFile.h | 18 ++ 2 files changed, 508 insertions(+) create mode 100644 src/AmberParamFile.cpp create mode 100644 src/AmberParamFile.h diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp new file mode 100644 index 0000000000..6a22bb91af --- /dev/null +++ b/src/AmberParamFile.cpp @@ -0,0 +1,490 @@ +#include "AmberParamFile.h" +#include "ArgList.h" +#include "CpptrajStdio.h" +#include "BufferedLine.h" +#include "ParameterHolders.h" +#include "StringRoutines.h" +#include "ParameterSet.h" +#include // sscanf + +/// CONSTRUCTOR +AmberParamFile::AmberParamFile() {} + +/** Read symbols delimited by - and space. */ +int AmberParamFile::read_symbols(const char* ptrIn, std::vector& symbols, int nsymbols) +{ + int isymbol = 0; + bool char_has_been_read = false; + for (const char* ptr = ptrIn; *ptr != '\0'; ++ptr) + { + if (*ptr == '-') { + isymbol++; + char_has_been_read = false; + } else if (*ptr == ' ' && isymbol + 1 == nsymbols && char_has_been_read) { + return (ptr - ptrIn); + } else { + symbols[isymbol] += *ptr; + if (*ptr != ' ') char_has_been_read = true; + } + } + return -1; +} + +/// Hold a set of nonbonded parameters +class NonbondSet { + public: + NonbondSet(std::string const& n) : name_(n) {} + + std::string name_; ///< Name of set parameters + ParmHolder LJ_; ///< Hold LJ 6-12 parameters +}; + +/// Hold an off-diagonal NB modification +class OffdiagNB { + public: + OffdiagNB(NameType const& AT1, NameType const& AT2, double sig1, double eps1, double sig2, double eps2) : + types_(2), LJ1_(sig1, eps1), LJ2_(sig2, eps2) + { + types_.AddName(AT1); + types_.AddName(AT2); + } + + TypeNameHolder types_; + LJparmType LJ1_; + LJparmType LJ2_; +}; + +// DataIO_AmberFF::ReadData() +int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, + std::string const& nbsetnameIn, int debugIn) const +{ + static const int MAXSYMLEN = 16; + + // For files with > 1 set of NB params + typedef std::vector NbSetArrayType; + NbSetArrayType NBsets; + // For holding equivalent NB type names + typedef std::vector Narray; + typedef std::vector XNarray; + XNarray EquivalentNames; + // For holding off-diagonal mods + typedef std::vector Oarray; + Oarray Offdiag; + + // Read title + BufferedLine infile; + if (infile.OpenFileRead( fname )) { + mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); + return 1; + } + const char* ptr = infile.Line(); + if (ptr == 0) { + mprinterr("Error: Could not read anything from Amber FF file %s\n", fname.full()); + return 1; + } + std::string title(ptr); + mprintf("\tTitle: %s\n", title.c_str()); + prm.SetParamSetName( title ); + // Read file + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, + LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; + SectionType section = ATYPE; + ptr = infile.Line(); + while (ptr != 0) { + // Advance to first non-space char + while (*ptr == ' ' && *ptr != '\0') ++ptr; + mprintf("DEBUG: First char: %c (%i)\n", *ptr, (int)*ptr); + if (*ptr == '\0') { + // Section Change + if (section != UNKNOWN) { + if (section == NONBOND) { + // Do a lookahead to see if there are multiple NB sets. + // It will either be another set, END, or LJEDIT + ptr = infile.Line(); + while (*ptr == ' ' && *ptr != '\0') ++ptr; + std::string nbline(ptr); + if (nbline == "END") { + mprintf("END\n"); + section = UNKNOWN; + } else if (nbline == "LJEDIT") { + section = LJEDIT; + } // Otherwise assume another nonbond section + } else { + mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); + section = (SectionType)((int)section + 1); + } + } + // Special cases + if (section == HYDROPHILIC) { + // Special case: hydrophilic atom types. One line. + // FORMAT(20(A2,2X)) + ptr = infile.Line(); + mprintf("DEBUG: Hydrophilic: %s\n", ptr); + // Take advantage of the fact that we expect whitespace-delimiters + ArgList hsymbols( ptr, " " ); + for (int iarg = 0; iarg != hsymbols.Nargs(); ++iarg) + prm.AddHydrophilicAtomType( NameType( hsymbols[iarg] ) ); + section = (SectionType)((int)section + 1); + // Look ahead. Older parm files have the hydrophilic section delimited + // with a newline. + ptr = infile.Line(); + while (*ptr == ' ' && *ptr != '\0') ++ptr; + if (*ptr != '\0') continue; + } else if (section == NONBOND) { + // Special case: first read the line. + // LABEL , KINDNB + // FORMAT(A4,6X,A2) + if (NBsets.empty()) + ptr = infile.Line(); + char nb_label[MAXSYMLEN], nb_kind[MAXSYMLEN]; + int nscan = sscanf(ptr, "%s %s", nb_label, nb_kind); + if (nscan != 2) { + mprinterr("Error: Expected nonbond label, nonbond kind, got %i elements.\n", nscan); + return 1; + } + mprintf("DEBUG: NB label= %s NB kind = %s\n", nb_label, nb_kind); + if (nb_kind[0] != 'R' || nb_kind[1] != 'E') { + mprinterr("Error: Nonbond parameters are not of type 'RE' (Rmin, Epsilon).\n"); + return 1; + } + NBsets.push_back( NonbondSet( std::string(nb_label) ) ); + } + } else if (section == ATYPE) { + // Input for atom symbols and masses + // Format (A2,2X,F10.2x,f10.2) + mprintf("DEBUG: Atype: %s\n", ptr); + char kndsym[MAXSYMLEN]; + double amass = 0; + double atpol = 0; + int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); + ParameterHolders::RetType ret; + if (nscan == 3) { + ret = prm.AT().AddParm( TypeNameHolder(kndsym), + AtomType(amass, atpol), + true ); + } else if (nscan == 2) { + // Only mass + ret = prm.AT().AddParm( TypeNameHolder(kndsym), + AtomType(amass), + true ); + } else { + mprinterr("Error: Expected atom type, mass, polarizability, got only %i columns.\n", nscan); + return 1; + } + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining atom type %s\n", kndsym); + } else if (section == BOND) { + // Bond parameters + // IBT , JBT , RK , REQ + // FORMAT(A2,1X,A2,2F10.2) + mprintf("DEBUG: Bond: %s\n", ptr); + std::vector symbols(2); + int pos = read_symbols(ptr, symbols, 2); + if (pos < 0) { + mprinterr("Error: Could not read symbols for bond from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); + double RK, REQ; + int nscan = sscanf(ptr+pos, "%lf %lf", &RK, &REQ); + if (nscan != 2) { + mprinterr("Error: Expected RK, REQ, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(2); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + prm.BP().AddParm(types, BondParmType(RK, REQ), false); + } else if (section == ANGLE) { + // Angle parameters + // ITT , JTT , KTT , TK , TEQ + // FORMAT(A2,1X,A2,1X,A2,2F10.2) + mprintf("DEBUG: Angle: %s\n", ptr); + std::vector symbols(3); + int pos = read_symbols(ptr, symbols, 3); + if (pos < 0) { + mprinterr("Error: Could not read symbols for angle from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); + double TK, TEQ; + int nscan = sscanf(ptr+pos, "%lf %lf", &TK, &TEQ); + if (nscan != 2) { + mprinterr("Error: Expected TK, TEQ, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(3); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + prm.AP().AddParm(types, AngleParmType(TK, TEQ), false); + } else if (section == DIHEDRAL) { + // Dihedral parameters + // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + // If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the + // system involving the atoms "JPT" and and "KPT" are assigned + // the same parameters. This is called the general dihedral type + // and is of the form "X "-"JPT"-"KPT"-"X ". + // IDIVF is the factor by which the torsional barrier is divided. + // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for + // details. Basically, the actual torsional potential is + // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) + mprintf("DEBUG: Dihedral: %s\n", ptr); + std::vector symbols(4); + int pos = read_symbols(ptr, symbols, 4); + if (pos < 0) { + mprinterr("Error: Could not read symbols for dihedral from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + int IDIVF; + double PK, PHASE, PN; + int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); + if (nscan != 4) { + mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(4); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + types.AddName( symbols[3] ); + prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), false); + } else if (section == IMPROPER) { + // Improper parameters + // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + mprintf("DEBUG: Improper: %s\n", ptr); + std::vector symbols(4); + int pos = read_symbols(ptr, symbols, 4); + if (pos < 0) { + mprinterr("Error: Could not read symbols for improper from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + double PK, PHASE, PN; + int nscan = sscanf(ptr+pos, "%lf %lf %lf", &PK, &PHASE, &PN); + if (nscan != 3) { + mprinterr("Error: Expected PK, PHASE, PN, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(4); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + types.AddName( symbols[3] ); + prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); + } else if (section == LJ1012) { + // Lennard-Jones 10-12 hydrogen bonding term. + // According to the docs, the format should be: + // KT1 , KT2 , A , B , ASOLN , BSOLN , HCUT , IC + // FORMAT(2X,A2,2X,A2,2x,5F10.2,I2) + // In practive (in e.g. parm91.dat), the actual format appears to be: + // KT1, KT2, A, B, HCUT + char KT1[MAXSYMLEN], KT2[MAXSYMLEN]; + double A, B, HCUT; + //double ASOLN, BSOLN, HCUT; + //int IC; + mprintf("DEBUG: LJ 10-12: %s\n", ptr); + //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", + int nscan = sscanf(ptr, "%s %s %lf %lf %lf", KT1, KT2, &A, &B, &HCUT); + if (nscan < 5) { + mprinterr("Error: Expected at least KT1, KT2, A, B, HCUT, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(2); + types.AddName( KT1 ); + types.AddName( KT2 ); + prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); + } else if (section == NB_EQUIV) { + // EQUIVALENCING ATOM SYMBOLS FOR THE NON-BONDED 6-12 POTENTIAL PARAMETERS + // IORG , IEQV(I) , I = 1 , 19 + // FORMAT(20(A2,2X)) + mprintf("DEBUG: Nonbond equiv: %s\n", ptr); + EquivalentNames.push_back( Narray() ); + ArgList equiv_line( ptr, " " ); + for (int iarg = 0; iarg != equiv_line.Nargs(); iarg++) + EquivalentNames.back().push_back( equiv_line[iarg] ); + } else if (section == NONBOND) { + // ***** ONLY IF KINDNB .EQ. 'RE' ***** + // LTYNB , R , EDEP + mprintf("DEBUG: Nonbond: %s\n", ptr); + //char LTYNB[MAXSYMLEN]; + //double R, EDEP; + //double R14, E14; + // This section is a little tricky. Apparently CHARMM-style Amber FF + // files can have 14 LJ params here. Try to detect this. + ArgList nbargs( ptr, " " ); + if (nbargs.Nargs() < 3) { + mprinterr("Error: Expected at least TYPE, R, DEPTH, got %i elements.\n", nbargs.Nargs()); + return 1; + } + bool has_14 = false; + if (nbargs.Nargs() >= 5) { + if (validDouble( nbargs[3] ) && validDouble( nbargs[4] )) { + has_14 = true; + } + } + if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); + double R = convertToDouble( nbargs[1] ); + double EDEP = convertToDouble( nbargs[2] ); + NBsets.back().LJ_.AddParm( TypeNameHolder(nbargs[0]), LJparmType(R, EDEP), false ); + //int nscan = sscanf(ptr, "%s %lf %lf %lf %lf", LTYNB, &R, &EDEP, &R14, &E14); + + //if (nscan >= 5) { + // // symbol, rmin, epsilon + // NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); + // /*ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); + // if (it == prm.AT().end()) { + // mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." + // " Skipping.\n", LTYNB); + // } else { + // it->second.SetLJ().SetRadius( R ); + // it->second.SetLJ().SetDepth( EDEP ); + // }*/ + //} + } else if (section == LJEDIT) { + mprintf("DEBUG: LJedit: %s\n", ptr); + // Lennard-Jones sigma and epsilon of the first atom type when it + // interacts with anything under the normal rules, then the sigma + // and epsilon of the second atom type when it interacts with the first. + char AT1[MAXSYMLEN], AT2[MAXSYMLEN]; + double sig1, eps1, sig2, eps2; + int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf", AT1, AT2, &sig1, &eps1, &sig2, &eps2); + if (nscan != 6) { + mprinterr("Error: Expected AT1, AT2, SIG1, EPS1, SIG2, EPS2, got %i elements.\n", nscan); + return 1; + } + Offdiag.push_back( OffdiagNB(AT1, AT2, sig1, eps1, sig2, eps2) ); + } + + ptr = infile.Line(); + } // END loop over file. + + // Deal with nonbond and equivalence + if (!NBsets.empty()) { + int nbsetidx = 0; + if (NBsets.size() > 1 || !nbsetnameIn.empty()) { + // Choose from multiple nbsets + if (nbsetnameIn.empty()) { + mprinterr("Error: Parm set in file '%s' contains %zu nonbonded parameter sets\n" + "Error: but no set has been specified.\n", fname.full(), NBsets.size()); + mprinterr("Error: Need to specify one of"); + for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) + mprinterr(" %s", it->name_.c_str()); + mprinterr("\n"); + } else { + nbsetidx = -1; + for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) { + if (it->name_ == nbsetnameIn) { + nbsetidx = it - NBsets.begin(); + break; + } + } + if (nbsetidx < 0) { + mprinterr("Error: Nonbonded set '%s' not found.\n", nbsetnameIn.c_str()); + mprinterr("Error: Need to specify one of"); + for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) + mprinterr(" %s", it->name_.c_str()); + mprinterr("\n"); + return 1; + } + } + } + mprintf("\tUsing nonbonded parm set: %s\n", NBsets[nbsetidx].name_.c_str()); + prm.SetNbParamName( NBsets[nbsetidx].name_ ); + for (ParmHolder::const_iterator it = NBsets[nbsetidx].LJ_.begin(); + it != NBsets[nbsetidx].LJ_.end(); ++it) + { + ParmHolder::iterator at = prm.AT().GetParam( it->first ); + if (at == prm.AT().end()) { + mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", + *(it->first[0])); + return 1; + } + at->second.SetLJ().SetRadius( it->second.Radius() ); + at->second.SetLJ().SetDepth( it->second.Depth() ); + } + // Do equivalent atoms. + for (XNarray::const_iterator equivAts = EquivalentNames.begin(); + equivAts != EquivalentNames.end(); ++equivAts) + { + // First name is the type to copy TODO check size? + Narray::const_iterator typeName = equivAts->begin(); + ParmHolder::const_iterator at0 = prm.AT().GetParam( *typeName ); + if (at0 == prm.AT().end()) { + mprinterr("Error: Equivalent atom type '%s' not found.\n", *(*typeName) ); + return 1; + } + ++typeName; + for (; typeName != equivAts->end(); ++typeName) { + ParmHolder::iterator at1 = prm.AT().GetParam( *typeName ); + if (at1 == prm.AT().end()) { + mprinterr("Error: Equivalent atom type '%s' (base '%s') not found.\n", *(*typeName), *(at0->first[0])); + return 1; + } + mprintf("DEBUG: Equiv '%s' => '%s'\n", *(at0->first[0]), *(*typeName)); + at1->second.SetLJ().SetRadius( at0->second.LJ().Radius() ); + at1->second.SetLJ().SetDepth( at0->second.LJ().Depth() ); + } + } // END loop over EquivalentNames + } // END nonbond parameters + + // Do off diagonal NB mods + if (!Offdiag.empty()) { + for (Oarray::const_iterator od = Offdiag.begin(); od != Offdiag.end(); ++od) + { + mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); + // Set type 1 + ParmHolder::iterator it = prm.AT().GetParam( od->types_[0] ); + if (it == prm.AT().end()) { + mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", + *(od->types_[0])); + return 1; + } + it->second.SetLJ().SetRadius( od->LJ1_.Radius() ); + it->second.SetLJ().SetDepth( od->LJ1_.Depth() ); + // Set off-diagonal for type1-type2 + // FIXME different combine rules? + prm.NB().AddParm(od->types_, od->LJ1_.Combine_LB(od->LJ2_), false); + } + } // END off-diagonal NB mods + + prm.Debug(); // TODO debug level + infile.CloseFile(); + return 0; +} + +// DataIO_AmberFF::WriteData() +int AmberParamFile::WriteParams(ParameterSet& prm, FileName const& fname, int debugIn) const +{ + CpptrajFile outfile; + if (outfile.OpenWrite(fname)) return 1; + // 1 - Title + std::string title; + if (prm.ParamSetName().empty()) + title.assign("Parameters written from CPPTRAJ"); + else + title = prm.ParamSetName(); + outfile.Printf("%s\n", title.c_str()); + // 2 - Atom symbols and masses + for (ParmHolder::const_iterator at = prm.AT().begin(); at != prm.AT().end(); ++at) + { + std::string asym = at->first[0].Truncated(); + if (asym.size() > 2) + mprintf("Warning: Atom symbol %s is larger than 2 characters, which breaks Amber FF format.\n"); + outfile.Printf("%-2s", asym.c_str()); + if (at->second.Mass() < 10.0) + outfile.Printf(" %-10.3f", at->second.Mass()); + else if (at->second.Mass() < 100.0) + outfile.Printf(" %-10.2f", at->second.Mass()); + else + outfile.Printf(" %-10.1f", at->second.Mass()); + outfile.Printf(" %10.3f\n", at->second.Polarizability()); + + //outfile.Printf("%-2s %-10.2f %-10.2f\n", asym.c_str(), at->second.Mass(), at->second.Polarizability()); + } + + return 0; +} diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h new file mode 100644 index 0000000000..a533e44adb --- /dev/null +++ b/src/AmberParamFile.h @@ -0,0 +1,18 @@ +#ifndef INC_AMBERPARAMFILE_H +#define INC_AMBERPARAMFILE_H +#include +#include +class ParameterSet; +//class BufferedLine; +class FileName; +/// Used to read in Amber parameters from Amber FF/FRCMOD file. +class AmberParamFile { + public: + AmberParamFile(); + int ReadParams(ParameterSet&, FileName const&, std::string const&, int) const; + int WriteParams(ParameterSet&, FileName const&, int) const; + private: + static int read_symbols(const char*, std::vector&, int); + //int ReadInput(std::string&, BufferedLine&) const; +}; +#endif From 9c6f5b5db4ac3ab057effdaae70ed9aefaea93d4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 19 Nov 2023 16:55:35 -0500 Subject: [PATCH 0074/1492] Update dependencies --- src/cpptrajdepend | 1 + src/cpptrajfiles | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 59dfdcab32..855dcd91ec 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -91,6 +91,7 @@ Action_Volmap.o : Action_Volmap.cpp Action.h ActionState.h Action_Volmap.h ArgLi Action_Volume.o : Action_Volume.cpp Action.h ActionState.h Action_Volume.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Action_Watershell.o : Action_Watershell.cpp Action.h ActionState.h Action_Watershell.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h DistRoutines.h FileIO.h FileName.h FileTypes.h Frame.h ImageOption.h ImageRoutines.h ImageTypes.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/kernel_wrappers.cuh Action_XtalSymm.o : Action_XtalSymm.cpp Action.h ActionState.h Action_XtalSymm.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SpaceGroup.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +AmberParamFile.o : AmberParamFile.cpp AmberParamFile.h ArgList.h AtomType.h BufferedLine.h Constants.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h StringRoutines.h TypeNameHolder.h AnalysisList.o : AnalysisList.cpp ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Analysis_AmdBias.o : Analysis_AmdBias.cpp ActionState.h Analysis.h AnalysisState.h Analysis_AmdBias.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Analysis_AutoCorr.o : Analysis_AutoCorr.cpp ActionState.h Analysis.h AnalysisState.h Analysis_AutoCorr.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Vector.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index dd53d39862..8c7fb6c8a2 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -94,6 +94,7 @@ COMMON_SOURCES= \ Action_Volume.cpp \ Action_Watershell.cpp \ Action_XtalSymm.cpp \ + AmberParamFile.cpp \ AnalysisList.cpp \ Analysis_AmdBias.cpp \ Analysis_AutoCorr.cpp \ From e647d4183c0e1748f9ed4d65e5f6f425d3feca39 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 19 Nov 2023 19:24:35 -0500 Subject: [PATCH 0075/1492] Use AmberParamFile --- src/DataIO_AmberFF.cpp | 482 +---------------------------------------- src/DataIO_AmberFF.h | 2 - src/cpptrajdepend | 2 +- 3 files changed, 10 insertions(+), 476 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index a7ffa145aa..07fc9487ef 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -1,9 +1,7 @@ #include "DataIO_AmberFF.h" #include "CpptrajStdio.h" -#include "BufferedLine.h" +#include "AmberParamFile.h" #include "DataSet_Parameters.h" -#include "StringRoutines.h" -#include // sscanf /// CONSTRUCTOR DataIO_AmberFF::DataIO_AmberFF() @@ -35,54 +33,9 @@ int DataIO_AmberFF::processReadArgs(ArgList& argIn) return 0; } -/** Read symbols delimited by - and space. */ -int DataIO_AmberFF::read_symbols(const char* ptrIn, std::vector& symbols, int nsymbols) -{ - int isymbol = 0; - bool char_has_been_read = false; - for (const char* ptr = ptrIn; *ptr != '\0'; ++ptr) - { - if (*ptr == '-') { - isymbol++; - char_has_been_read = false; - } else if (*ptr == ' ' && isymbol + 1 == nsymbols && char_has_been_read) { - return (ptr - ptrIn); - } else { - symbols[isymbol] += *ptr; - if (*ptr != ' ') char_has_been_read = true; - } - } - return -1; -} - -/// Hold a set of nonbonded parameters -class NonbondSet { - public: - NonbondSet(std::string const& n) : name_(n) {} - - std::string name_; ///< Name of set parameters - ParmHolder LJ_; ///< Hold LJ 6-12 parameters -}; - -/// Hold an off-diagonal NB modification -class OffdiagNB { - public: - OffdiagNB(NameType const& AT1, NameType const& AT2, double sig1, double eps1, double sig2, double eps2) : - types_(2), LJ1_(sig1, eps1), LJ2_(sig2, eps2) - { - types_.AddName(AT1); - types_.AddName(AT2); - } - - TypeNameHolder types_; - LJparmType LJ1_; - LJparmType LJ2_; -}; - // DataIO_AmberFF::ReadData() int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { - static const int MAXSYMLEN = 16; // Allocate data set MetaData md( dsname ); DataSet* ds = dsl.CheckForSet( md ); @@ -98,400 +51,13 @@ int DataIO_AmberFF::ReadData(FileName const& fname, DataSetList& dsl, std::strin } DataSet_Parameters& prm = static_cast( *ds ); - // For files with > 1 set of NB params - typedef std::vector NbSetArrayType; - NbSetArrayType NBsets; - // For holding equivalent NB type names - typedef std::vector Narray; - typedef std::vector XNarray; - XNarray EquivalentNames; - // For holding off-diagonal mods - typedef std::vector Oarray; - Oarray Offdiag; - - // Read title - BufferedLine infile; - if (infile.OpenFileRead( fname )) { - mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); - return 1; - } - const char* ptr = infile.Line(); - if (ptr == 0) { - mprinterr("Error: Could not read anything from Amber FF file %s\n", fname.full()); - return 1; + AmberParamFile infile; + int err = infile.ReadParams(prm, fname, nbsetname_, debug_); + if (err != 0) { + mprinterr("Error: Could not read '%s'\n", fname.full()); } - std::string title(ptr); - mprintf("\tTitle: %s\n", title.c_str()); - prm.SetParamSetName( title ); - // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, - LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; - SectionType section = ATYPE; - ptr = infile.Line(); - while (ptr != 0) { - // Advance to first non-space char - while (*ptr == ' ' && *ptr != '\0') ++ptr; - mprintf("DEBUG: First char: %c (%i)\n", *ptr, (int)*ptr); - if (*ptr == '\0') { - // Section Change - if (section != UNKNOWN) { - if (section == NONBOND) { - // Do a lookahead to see if there are multiple NB sets. - // It will either be another set, END, or LJEDIT - ptr = infile.Line(); - while (*ptr == ' ' && *ptr != '\0') ++ptr; - std::string nbline(ptr); - if (nbline == "END") { - mprintf("END\n"); - section = UNKNOWN; - } else if (nbline == "LJEDIT") { - section = LJEDIT; - } // Otherwise assume another nonbond section - } else { - mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); - section = (SectionType)((int)section + 1); - } - } - // Special cases - if (section == HYDROPHILIC) { - // Special case: hydrophilic atom types. One line. - // FORMAT(20(A2,2X)) - ptr = infile.Line(); - mprintf("DEBUG: Hydrophilic: %s\n", ptr); - // Take advantage of the fact that we expect whitespace-delimiters - ArgList hsymbols( ptr, " " ); - for (int iarg = 0; iarg != hsymbols.Nargs(); ++iarg) - prm.AddHydrophilicAtomType( NameType( hsymbols[iarg] ) ); - section = (SectionType)((int)section + 1); - // Look ahead. Older parm files have the hydrophilic section delimited - // with a newline. - ptr = infile.Line(); - while (*ptr == ' ' && *ptr != '\0') ++ptr; - if (*ptr != '\0') continue; - } else if (section == NONBOND) { - // Special case: first read the line. - // LABEL , KINDNB - // FORMAT(A4,6X,A2) - if (NBsets.empty()) - ptr = infile.Line(); - char nb_label[MAXSYMLEN], nb_kind[MAXSYMLEN]; - int nscan = sscanf(ptr, "%s %s", nb_label, nb_kind); - if (nscan != 2) { - mprinterr("Error: Expected nonbond label, nonbond kind, got %i elements.\n", nscan); - return 1; - } - mprintf("DEBUG: NB label= %s NB kind = %s\n", nb_label, nb_kind); - if (nb_kind[0] != 'R' || nb_kind[1] != 'E') { - mprinterr("Error: Nonbond parameters are not of type 'RE' (Rmin, Epsilon).\n"); - return 1; - } - NBsets.push_back( NonbondSet( std::string(nb_label) ) ); - } - } else if (section == ATYPE) { - // Input for atom symbols and masses - // Format (A2,2X,F10.2x,f10.2) - mprintf("DEBUG: Atype: %s\n", ptr); - char kndsym[MAXSYMLEN]; - double amass = 0; - double atpol = 0; - int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); - ParameterHolders::RetType ret; - if (nscan == 3) { - ret = prm.AT().AddParm( TypeNameHolder(kndsym), - AtomType(amass, atpol), - true ); - } else if (nscan == 2) { - // Only mass - ret = prm.AT().AddParm( TypeNameHolder(kndsym), - AtomType(amass), - true ); - } else { - mprinterr("Error: Expected atom type, mass, polarizability, got only %i columns.\n", nscan); - return 1; - } - if (ret == ParameterHolders::UPDATED) - mprintf("Warning: Redefining atom type %s\n", kndsym); - } else if (section == BOND) { - // Bond parameters - // IBT , JBT , RK , REQ - // FORMAT(A2,1X,A2,2F10.2) - mprintf("DEBUG: Bond: %s\n", ptr); - std::vector symbols(2); - int pos = read_symbols(ptr, symbols, 2); - if (pos < 0) { - mprinterr("Error: Could not read symbols for bond from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); - double RK, REQ; - int nscan = sscanf(ptr+pos, "%lf %lf", &RK, &REQ); - if (nscan != 2) { - mprinterr("Error: Expected RK, REQ, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(2); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - prm.BP().AddParm(types, BondParmType(RK, REQ), false); - } else if (section == ANGLE) { - // Angle parameters - // ITT , JTT , KTT , TK , TEQ - // FORMAT(A2,1X,A2,1X,A2,2F10.2) - mprintf("DEBUG: Angle: %s\n", ptr); - std::vector symbols(3); - int pos = read_symbols(ptr, symbols, 3); - if (pos < 0) { - mprinterr("Error: Could not read symbols for angle from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); - double TK, TEQ; - int nscan = sscanf(ptr+pos, "%lf %lf", &TK, &TEQ); - if (nscan != 2) { - mprinterr("Error: Expected TK, TEQ, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(3); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - types.AddName( symbols[2] ); - prm.AP().AddParm(types, AngleParmType(TK, TEQ), false); - } else if (section == DIHEDRAL) { - // Dihedral parameters - // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN - // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) - // If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the - // system involving the atoms "JPT" and and "KPT" are assigned - // the same parameters. This is called the general dihedral type - // and is of the form "X "-"JPT"-"KPT"-"X ". - // IDIVF is the factor by which the torsional barrier is divided. - // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for - // details. Basically, the actual torsional potential is - // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) - mprintf("DEBUG: Dihedral: %s\n", ptr); - std::vector symbols(4); - int pos = read_symbols(ptr, symbols, 4); - if (pos < 0) { - mprinterr("Error: Could not read symbols for dihedral from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); - int IDIVF; - double PK, PHASE, PN; - int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); - if (nscan != 4) { - mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(4); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - types.AddName( symbols[2] ); - types.AddName( symbols[3] ); - prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), false); - } else if (section == IMPROPER) { - // Improper parameters - // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN - // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) - mprintf("DEBUG: Improper: %s\n", ptr); - std::vector symbols(4); - int pos = read_symbols(ptr, symbols, 4); - if (pos < 0) { - mprinterr("Error: Could not read symbols for improper from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); - double PK, PHASE, PN; - int nscan = sscanf(ptr+pos, "%lf %lf %lf", &PK, &PHASE, &PN); - if (nscan != 3) { - mprinterr("Error: Expected PK, PHASE, PN, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(4); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - types.AddName( symbols[2] ); - types.AddName( symbols[3] ); - prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); - } else if (section == LJ1012) { - // Lennard-Jones 10-12 hydrogen bonding term. - // According to the docs, the format should be: - // KT1 , KT2 , A , B , ASOLN , BSOLN , HCUT , IC - // FORMAT(2X,A2,2X,A2,2x,5F10.2,I2) - // In practive (in e.g. parm91.dat), the actual format appears to be: - // KT1, KT2, A, B, HCUT - char KT1[MAXSYMLEN], KT2[MAXSYMLEN]; - double A, B, HCUT; - //double ASOLN, BSOLN, HCUT; - //int IC; - mprintf("DEBUG: LJ 10-12: %s\n", ptr); - //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", - int nscan = sscanf(ptr, "%s %s %lf %lf %lf", KT1, KT2, &A, &B, &HCUT); - if (nscan < 5) { - mprinterr("Error: Expected at least KT1, KT2, A, B, HCUT, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(2); - types.AddName( KT1 ); - types.AddName( KT2 ); - prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); - } else if (section == NB_EQUIV) { - // EQUIVALENCING ATOM SYMBOLS FOR THE NON-BONDED 6-12 POTENTIAL PARAMETERS - // IORG , IEQV(I) , I = 1 , 19 - // FORMAT(20(A2,2X)) - mprintf("DEBUG: Nonbond equiv: %s\n", ptr); - EquivalentNames.push_back( Narray() ); - ArgList equiv_line( ptr, " " ); - for (int iarg = 0; iarg != equiv_line.Nargs(); iarg++) - EquivalentNames.back().push_back( equiv_line[iarg] ); - } else if (section == NONBOND) { - // ***** ONLY IF KINDNB .EQ. 'RE' ***** - // LTYNB , R , EDEP - mprintf("DEBUG: Nonbond: %s\n", ptr); - //char LTYNB[MAXSYMLEN]; - //double R, EDEP; - //double R14, E14; - // This section is a little tricky. Apparently CHARMM-style Amber FF - // files can have 14 LJ params here. Try to detect this. - ArgList nbargs( ptr, " " ); - if (nbargs.Nargs() < 3) { - mprinterr("Error: Expected at least TYPE, R, DEPTH, got %i elements.\n", nbargs.Nargs()); - return 1; - } - bool has_14 = false; - if (nbargs.Nargs() >= 5) { - if (validDouble( nbargs[3] ) && validDouble( nbargs[4] )) { - has_14 = true; - } - } - if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); - double R = convertToDouble( nbargs[1] ); - double EDEP = convertToDouble( nbargs[2] ); - NBsets.back().LJ_.AddParm( TypeNameHolder(nbargs[0]), LJparmType(R, EDEP), false ); - //int nscan = sscanf(ptr, "%s %lf %lf %lf %lf", LTYNB, &R, &EDEP, &R14, &E14); - - //if (nscan >= 5) { - // // symbol, rmin, epsilon - // NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); - // /*ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); - // if (it == prm.AT().end()) { - // mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." - // " Skipping.\n", LTYNB); - // } else { - // it->second.SetLJ().SetRadius( R ); - // it->second.SetLJ().SetDepth( EDEP ); - // }*/ - //} - } else if (section == LJEDIT) { - mprintf("DEBUG: LJedit: %s\n", ptr); - // Lennard-Jones sigma and epsilon of the first atom type when it - // interacts with anything under the normal rules, then the sigma - // and epsilon of the second atom type when it interacts with the first. - char AT1[MAXSYMLEN], AT2[MAXSYMLEN]; - double sig1, eps1, sig2, eps2; - int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf", AT1, AT2, &sig1, &eps1, &sig2, &eps2); - if (nscan != 6) { - mprinterr("Error: Expected AT1, AT2, SIG1, EPS1, SIG2, EPS2, got %i elements.\n", nscan); - return 1; - } - Offdiag.push_back( OffdiagNB(AT1, AT2, sig1, eps1, sig2, eps2) ); - } - - ptr = infile.Line(); - } // END loop over file. - - // Deal with nonbond and equivalence - if (!NBsets.empty()) { - int nbsetidx = 0; - if (NBsets.size() > 1 || !nbsetname_.empty()) { - // Choose from multiple nbsets - if (nbsetname_.empty()) { - mprinterr("Error: Parm set in file '%s' contains %zu nonbonded parameter sets\n" - "Error: but no set has been specified.\n", fname.full(), NBsets.size()); - mprinterr("Error: Need to specify one of"); - for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) - mprinterr(" %s", it->name_.c_str()); - mprinterr("\n"); - } else { - nbsetidx = -1; - for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) { - if (it->name_ == nbsetname_) { - nbsetidx = it - NBsets.begin(); - break; - } - } - if (nbsetidx < 0) { - mprinterr("Error: Nonbonded set '%s' not found.\n", nbsetname_.c_str()); - mprinterr("Error: Need to specify one of"); - for (NbSetArrayType::const_iterator it = NBsets.begin(); it != NBsets.end(); ++it) - mprinterr(" %s", it->name_.c_str()); - mprinterr("\n"); - return 1; - } - } - } - mprintf("\tUsing nonbonded parm set: %s\n", NBsets[nbsetidx].name_.c_str()); - prm.SetNbParamName( NBsets[nbsetidx].name_ ); - for (ParmHolder::const_iterator it = NBsets[nbsetidx].LJ_.begin(); - it != NBsets[nbsetidx].LJ_.end(); ++it) - { - ParmHolder::iterator at = prm.AT().GetParam( it->first ); - if (at == prm.AT().end()) { - mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", - *(it->first[0])); - return 1; - } - at->second.SetLJ().SetRadius( it->second.Radius() ); - at->second.SetLJ().SetDepth( it->second.Depth() ); - } - // Do equivalent atoms. - for (XNarray::const_iterator equivAts = EquivalentNames.begin(); - equivAts != EquivalentNames.end(); ++equivAts) - { - // First name is the type to copy TODO check size? - Narray::const_iterator typeName = equivAts->begin(); - ParmHolder::const_iterator at0 = prm.AT().GetParam( *typeName ); - if (at0 == prm.AT().end()) { - mprinterr("Error: Equivalent atom type '%s' not found.\n", *(*typeName) ); - return 1; - } - ++typeName; - for (; typeName != equivAts->end(); ++typeName) { - ParmHolder::iterator at1 = prm.AT().GetParam( *typeName ); - if (at1 == prm.AT().end()) { - mprinterr("Error: Equivalent atom type '%s' (base '%s') not found.\n", *(*typeName), *(at0->first[0])); - return 1; - } - mprintf("DEBUG: Equiv '%s' => '%s'\n", *(at0->first[0]), *(*typeName)); - at1->second.SetLJ().SetRadius( at0->second.LJ().Radius() ); - at1->second.SetLJ().SetDepth( at0->second.LJ().Depth() ); - } - } // END loop over EquivalentNames - } // END nonbond parameters - - // Do off diagonal NB mods - if (!Offdiag.empty()) { - for (Oarray::const_iterator od = Offdiag.begin(); od != Offdiag.end(); ++od) - { - mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); - // Set type 1 - ParmHolder::iterator it = prm.AT().GetParam( od->types_[0] ); - if (it == prm.AT().end()) { - mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", - *(od->types_[0])); - return 1; - } - it->second.SetLJ().SetRadius( od->LJ1_.Radius() ); - it->second.SetLJ().SetDepth( od->LJ1_.Depth() ); - // Set off-diagonal for type1-type2 - // FIXME different combine rules? - prm.NB().AddParm(od->types_, od->LJ1_.Combine_LB(od->LJ2_), false); - } - } // END off-diagonal NB mods - prm.Debug(); // TODO debug level - infile.CloseFile(); - return 0; + return err; } // DataIO_AmberFF::WriteHelp() @@ -510,6 +76,7 @@ int DataIO_AmberFF::processWriteArgs(ArgList& argIn) // DataIO_AmberFF::WriteData() int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) { + AmberParamFile outfile; std::vector toWrite; for (DataSetList::const_iterator it = dsl.begin(); it != dsl.end(); ++it) { @@ -520,7 +87,7 @@ int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) mprinterr("Error: No parameter sets to write.\n"); return 1; } else if (toWrite.size() == 1) { - return writeParameterSet( fname, *(toWrite.front()) ); + return outfile.WriteParams( *(toWrite.front()), fname, debug_ ); } else { // Create a combined parameter set ParameterSet prm; @@ -530,39 +97,8 @@ int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) ParameterSet::UpdateCount UC; prm.UpdateParamSet( *(*it), UC, debug_ ); } - return writeParameterSet( fname, prm ); + return outfile.WriteParams( prm, fname, debug_ ); } return 1; } - -int DataIO_AmberFF::writeParameterSet(FileName const& fname, ParameterSet const& prm) const { - CpptrajFile outfile; - if (outfile.OpenWrite(fname)) return 1; - // 1 - Title - std::string title; - if (prm.ParamSetName().empty()) - title.assign("Parameters written from CPPTRAJ"); - else - title = prm.ParamSetName(); - outfile.Printf("%s\n", title.c_str()); - // 2 - Atom symbols and masses - for (ParmHolder::const_iterator at = prm.AT().begin(); at != prm.AT().end(); ++at) - { - std::string asym = at->first[0].Truncated(); - if (asym.size() > 2) - mprintf("Warning: Atom symbol %s is larger than 2 characters, which breaks Amber FF format.\n"); - outfile.Printf("%-2s", asym.c_str()); - if (at->second.Mass() < 10.0) - outfile.Printf(" %-10.3f", at->second.Mass()); - else if (at->second.Mass() < 100.0) - outfile.Printf(" %-10.2f", at->second.Mass()); - else - outfile.Printf(" %-10.1f", at->second.Mass()); - outfile.Printf(" %10.3f\n", at->second.Polarizability()); - - //outfile.Printf("%-2s %-10.2f %-10.2f\n", asym.c_str(), at->second.Mass(), at->second.Polarizability()); - } - - return 0; -} diff --git a/src/DataIO_AmberFF.h b/src/DataIO_AmberFF.h index 631b5baac2..1f73866cea 100644 --- a/src/DataIO_AmberFF.h +++ b/src/DataIO_AmberFF.h @@ -14,8 +14,6 @@ class DataIO_AmberFF : public DataIO { int WriteData(FileName const&, DataSetList const&); bool ID_DataFormat(CpptrajFile&); private: - static int read_symbols(const char*, std::vector&, int); - int writeParameterSet(FileName const&, ParameterSet const&) const; std::string nbsetname_; ///< Nonbonded parameter set name to use }; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 855dcd91ec..ae9c0202de 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -205,7 +205,7 @@ DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberEne.o : DataIO_AmberEne.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberEne.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_AmberFF.o : DataIO_AmberFF.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_AmberFF.o : DataIO_AmberFF.cpp AmberParamFile.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberLib.o : DataIO_AmberLib.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberLib.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CCP4.o : DataIO_CCP4.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ByteRoutines.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CCP4.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 0bab1611d50c9ca8cfb21da09d3ac3e93a536f6f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 14:50:58 -0500 Subject: [PATCH 0076/1492] Start frcmod file IO --- src/AmberParamFile.cpp | 23 +++++++++++- src/AmberParamFile.h | 4 ++ src/DataIO_AmberFrcmod.cpp | 77 ++++++++++++++++++++++++++++++++++++++ src/DataIO_AmberFrcmod.h | 17 +++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 src/DataIO_AmberFrcmod.cpp create mode 100644 src/DataIO_AmberFrcmod.h diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 6a22bb91af..599c1ec1c2 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -54,7 +54,28 @@ class OffdiagNB { LJparmType LJ2_; }; -// DataIO_AmberFF::ReadData() +/** Read parametrers from Amber frcmod file. */ +int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const +{ + // Read title + BufferedLine infile; + if (infile.OpenFileRead( fname )) { + mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); + return 1; + } + const char* ptr = infile.Line(); + if (ptr == 0) { + mprinterr("Error: Could not read anything from Amber FF file %s\n", fname.full()); + return 1; + } + std::string title(ptr); + mprintf("\tTitle: %s\n", title.c_str()); + //prm.SetParamSetName( title ); TODO append title + + return 0; +} + +/** Read parameters from Amber main FF parameter file. */ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, std::string const& nbsetnameIn, int debugIn) const { diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index a533e44adb..1405c426fc 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -9,7 +9,11 @@ class FileName; class AmberParamFile { public: AmberParamFile(); + /// Read main Amber FF file int ReadParams(ParameterSet&, FileName const&, std::string const&, int) const; + /// Read Amber frcmod file + int ReadFrcmod(ParameterSet&, FileName const&, int) const; + /// Write main Amber FF file int WriteParams(ParameterSet&, FileName const&, int) const; private: static int read_symbols(const char*, std::vector&, int); diff --git a/src/DataIO_AmberFrcmod.cpp b/src/DataIO_AmberFrcmod.cpp new file mode 100644 index 0000000000..b1d2db5f2c --- /dev/null +++ b/src/DataIO_AmberFrcmod.cpp @@ -0,0 +1,77 @@ +#include "DataIO_AmberFrcmod.h" +#include "CpptrajStdio.h" +#include "DataSet_Parameters.h" +#include "AmberParamFile.h" + +/// CONSTRUCTOR +DataIO_AmberFrcmod::DataIO_AmberFrcmod() +{ + +} + +// DataIO_AmberFrcmod::ID_DataFormat() +bool DataIO_AmberFrcmod::ID_DataFormat(CpptrajFile& infile) +{ + + return false; +} + +// DataIO_AmberFrcmod::ReadHelp() +void DataIO_AmberFrcmod::ReadHelp() +{ + +} + +// DataIO_AmberFrcmod::processReadArgs() +int DataIO_AmberFrcmod::processReadArgs(ArgList& argIn) +{ + + return 0; +} + +// DataIO_AmberFrcmod::ReadData() +int DataIO_AmberFrcmod::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) +{ + // Allocate data set + MetaData md( dsname ); + DataSet* ds = dsl.CheckForSet( md ); + if (ds != 0) { + if (ds->Type() != DataSet::PARAMETERS) { + mprinterr("Error: Set '%s' does not have parameters, cannot append.\n", ds->legend()); + return 1; + } + mprintf("\tAdding to existing set %s\n", ds->legend()); + } else { + ds = dsl.AddSet( DataSet::PARAMETERS, md ); + if (ds == 0) return 1; + } + DataSet_Parameters& prm = static_cast( *ds ); + + AmberParamFile infile; + if (infile.ReadFrcmod(prm, fname, debug_)) { + mprinterr("Error: Could not read Amber frcmod file '%s'\n", fname.full()); + return 1; + } + + return 0; +} + +// DataIO_AmberFrcmod::WriteHelp() +void DataIO_AmberFrcmod::WriteHelp() +{ + +} + +// DataIO_AmberFrcmod::processWriteArgs() +int DataIO_AmberFrcmod::processWriteArgs(ArgList& argIn) +{ + + return 0; +} + +// DataIO_AmberFrcmod::WriteData() +int DataIO_AmberFrcmod::WriteData(FileName const& fname, DataSetList const& dsl) +{ + + return 1; +} diff --git a/src/DataIO_AmberFrcmod.h b/src/DataIO_AmberFrcmod.h new file mode 100644 index 0000000000..bf792d4e48 --- /dev/null +++ b/src/DataIO_AmberFrcmod.h @@ -0,0 +1,17 @@ +#ifndef INC_DATAIO_AMBERFRCMOD_H +#define INC_DATAIO_AMBERFRCMOD_H +#include "DataIO.h" +/// +class DataIO_AmberFrcmod : public DataIO { + public: + DataIO_AmberFrcmod(); + static void ReadHelp(); + static void WriteHelp(); + static BaseIOtype* Alloc() { return (BaseIOtype*)new DataIO_AmberFrcmod(); } + int processReadArgs(ArgList&); + int ReadData(FileName const&, DataSetList&, std::string const&); + int processWriteArgs(ArgList&); + int WriteData(FileName const&, DataSetList const&); + bool ID_DataFormat(CpptrajFile&); +}; +#endif From 612a9aab710f5b4bfcee29a2bf3d27ce708e20be Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 14:55:45 -0500 Subject: [PATCH 0077/1492] Enable for testing --- src/DataFile.cpp | 3 +++ src/DataFile.h | 2 +- src/cpptrajdepend | 3 ++- src/cpptrajfiles | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/DataFile.cpp b/src/DataFile.cpp index 2189eeba3e..4403b0d6e9 100644 --- a/src/DataFile.cpp +++ b/src/DataFile.cpp @@ -35,6 +35,7 @@ #include "DataIO_AmberPrep.h" #include "DataIO_AmberLib.h" #include "DataIO_AmberFF.h" +#include "DataIO_AmberFrcmod.h" // CONSTRUCTOR DataFile::DataFile() : @@ -91,6 +92,7 @@ const FileTypes::AllocToken DataFile::DF_AllocArray[] = { { "Amber Prep File", DataIO_AmberPrep::ReadHelp, 0, DataIO_AmberPrep::Alloc}, { "Amber OFF File", 0, 0, DataIO_AmberLib::Alloc}, { "Amber Force Field", DataIO_AmberFF::ReadHelp, 0, DataIO_AmberFF::Alloc}, + { "Amber Frcmod File", 0, 0, DataIO_AmberFrcmod::Alloc}, { "Unknown Data file", 0, 0, 0 } }; @@ -121,6 +123,7 @@ const FileTypes::KeyToken DataFile::DF_KeyArray[] = { { AMBERLIB, "off", ".off" }, { AMBERLIB, "off", ".lib" }, { AMBERFF, "amberff", ".parm" }, + { AMBERFRCMOD, "frcmod", ".frcmod" }, { UNKNOWN_DATA, 0, 0 } }; diff --git a/src/DataFile.h b/src/DataFile.h index 6cce13ed11..7cd62360b7 100644 --- a/src/DataFile.h +++ b/src/DataFile.h @@ -18,7 +18,7 @@ class DataFile { DATAFILE=0, XMGRACE, GNUPLOT, XPLOR, OPENDX, REMLOG, MDOUT, EVECS, VECTRAJ, XVG, CCP4, CHARMMREPD, CHARMMFASTREP, CHARMMOUT, CPOUT, CHARMMRTFPRM, CMATRIX_BINARY, CMATRIX_NETCDF, PEAKS, - NETCDFDATA, AMBERENE, NUMPY, AMBERPREP, AMBERLIB, AMBERFF, + NETCDFDATA, AMBERENE, NUMPY, AMBERPREP, AMBERLIB, AMBERFF, AMBERFRCMOD, UNKNOWN_DATA }; DataFile(); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index e813c5d642..347343a149 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -200,12 +200,13 @@ CpptrajFile.o : CpptrajFile.cpp CpptrajFile.h CpptrajStdio.h FileIO.h FileIO_Bzi CpptrajState.o : CpptrajState.cpp Action.h ActionList.h ActionState.h Action_CreateCrd.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_Coords_TRJ.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleNavigator.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h Frame.h FrameArray.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Random.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajFrameIndex.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h CpptrajStdio.o : CpptrajStdio.cpp Parallel.h CurveFit.o : CurveFit.cpp CurveFit.h -DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h +DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PDBfile.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberEne.o : DataIO_AmberEne.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberEne.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberFF.o : DataIO_AmberFF.cpp AmberParamFile.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_AmberFrcmod.o : DataIO_AmberFrcmod.cpp AmberParamFile.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFrcmod.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberLib.o : DataIO_AmberLib.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberLib.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CCP4.o : DataIO_CCP4.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ByteRoutines.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CCP4.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 46eb2f8d29..a8a487d7b1 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -177,6 +177,7 @@ COMMON_SOURCES= \ DataIO.cpp \ DataIO_AmberEne.cpp \ DataIO_AmberFF.cpp \ + DataIO_AmberFrcmod.cpp \ DataIO_AmberLib.cpp \ DataIO_AmberPrep.cpp \ DataIO_CCP4.cpp \ From 05caafa11956b6e6a73bdea9185d1d6d7d7f3773 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 15:05:40 -0500 Subject: [PATCH 0078/1492] ID sections --- src/AmberParamFile.cpp | 24 ++++++++++++++++++++++-- src/AmberParamFile.h | 2 ++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 599c1ec1c2..084cd53af9 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -71,6 +71,28 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); //prm.SetParamSetName( title ); TODO append title + // Read file + SectionType section = UNKNOWN; + ptr = infile.Line(); + while (ptr != 0) { + // Is this a recognized section keyword? + if (*ptr != '\0') { + std::string line(ptr); + if (line.compare(0, 4, "MASS") == 0) section = ATYPE; + else if (line.compare(0, 4, "BOND") == 0) section = BOND; + else if (line.compare(0, 4, "ANGL") == 0) section = ANGLE; + else if (line.compare(0, 4, "DIHE") == 0) section = DIHEDRAL; + else if (line.compare(0, 4, "IMPR") == 0) section = IMPROPER; + else if (line.compare(0, 4, "HBON") == 0) section = LJ1012; + else if (line.compare(0, 4, "NONB") == 0) { + section = NONBOND; + // TODO check RE + } else { + mprintf("DEBUG: Section %i: %s\n", (int)section, ptr); + } + } + ptr = infile.Line(); + } return 0; } @@ -107,8 +129,6 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, mprintf("\tTitle: %s\n", title.c_str()); prm.SetParamSetName( title ); // Read file - enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, - LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; SectionType section = ATYPE; ptr = infile.Line(); while (ptr != 0) { diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index 1405c426fc..c65da9756d 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -16,6 +16,8 @@ class AmberParamFile { /// Write main Amber FF file int WriteParams(ParameterSet&, FileName const&, int) const; private: + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, + LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; static int read_symbols(const char*, std::vector&, int); //int ReadInput(std::string&, BufferedLine&) const; }; From d365305d0db065b2e9f35a2294bf36661e13ddc3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 15:24:37 -0500 Subject: [PATCH 0079/1492] Start splitting off into separate read functions that can be used for both FF and frcmod --- src/AmberParamFile.cpp | 69 +++++++++++++++++++++++++++--------------- src/AmberParamFile.h | 4 +++ 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 084cd53af9..39d0de74f5 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -7,6 +7,8 @@ #include "ParameterSet.h" #include // sscanf +const int AmberParamFile::MAXSYMLEN = 16; + /// CONSTRUCTOR AmberParamFile::AmberParamFile() {} @@ -54,6 +56,35 @@ class OffdiagNB { LJparmType LJ2_; }; +/** Read input for atom symbols and masses. */ +int AmberParamFile::read_atype(ParameterSet& prm, const char* ptr) +const +{ + // Format (A2,2X,F10.2x,f10.2) + mprintf("DEBUG: Atype: %s\n", ptr); + char kndsym[MAXSYMLEN]; + double amass = 0; + double atpol = 0; + int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); + ParameterHolders::RetType ret; + if (nscan == 3) { + ret = prm.AT().AddParm( TypeNameHolder(kndsym), + AtomType(amass, atpol), + true ); + } else if (nscan == 2) { + // Only mass + ret = prm.AT().AddParm( TypeNameHolder(kndsym), + AtomType(amass), + true ); + } else { + mprinterr("Error: Expected atom type, mass, polarizability, got only %i columns.\n", nscan); + return 1; + } + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining atom type %s\n", kndsym); + return 0; +} + /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { @@ -89,6 +120,13 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb // TODO check RE } else { mprintf("DEBUG: Section %i: %s\n", (int)section, ptr); + int err = 0; + if (section == ATYPE) + err = read_atype(prm, ptr); + if (err != 0) { + mprinterr("Error: Reading line: %s\n", ptr); + return 1; + } } } ptr = infile.Line(); @@ -101,7 +139,6 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, std::string const& nbsetnameIn, int debugIn) const { - static const int MAXSYMLEN = 16; // For files with > 1 set of NB params typedef std::vector NbSetArrayType; @@ -135,6 +172,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, // Advance to first non-space char while (*ptr == ' ' && *ptr != '\0') ++ptr; mprintf("DEBUG: First char: %c (%i)\n", *ptr, (int)*ptr); + int read_err = 0; if (*ptr == '\0') { // Section Change if (section != UNKNOWN) { @@ -191,29 +229,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, NBsets.push_back( NonbondSet( std::string(nb_label) ) ); } } else if (section == ATYPE) { - // Input for atom symbols and masses - // Format (A2,2X,F10.2x,f10.2) - mprintf("DEBUG: Atype: %s\n", ptr); - char kndsym[MAXSYMLEN]; - double amass = 0; - double atpol = 0; - int nscan = sscanf(ptr, "%s %lf %lf", kndsym, &amass, &atpol); - ParameterHolders::RetType ret; - if (nscan == 3) { - ret = prm.AT().AddParm( TypeNameHolder(kndsym), - AtomType(amass, atpol), - true ); - } else if (nscan == 2) { - // Only mass - ret = prm.AT().AddParm( TypeNameHolder(kndsym), - AtomType(amass), - true ); - } else { - mprinterr("Error: Expected atom type, mass, polarizability, got only %i columns.\n", nscan); - return 1; - } - if (ret == ParameterHolders::UPDATED) - mprintf("Warning: Redefining atom type %s\n", kndsym); + read_err = read_atype(prm, ptr); } else if (section == BOND) { // Bond parameters // IBT , JBT , RK , REQ @@ -399,7 +415,10 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } Offdiag.push_back( OffdiagNB(AT1, AT2, sig1, eps1, sig2, eps2) ); } - + if (read_err != 0) { + mprinterr("Error: Reading line: %s\n", ptr); + return 1; + } ptr = infile.Line(); } // END loop over file. diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index c65da9756d..16fa0cd698 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -16,9 +16,13 @@ class AmberParamFile { /// Write main Amber FF file int WriteParams(ParameterSet&, FileName const&, int) const; private: + static const int MAXSYMLEN; + enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; static int read_symbols(const char*, std::vector&, int); + /// Read atom type line + int read_atype(ParameterSet&, const char*) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 22f213d3bf5fd780343e1045645d2a14afb1466e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 15:27:37 -0500 Subject: [PATCH 0080/1492] Hide some debug info --- src/AmberParamFile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 39d0de74f5..71d7df34e1 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -119,7 +119,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb section = NONBOND; // TODO check RE } else { - mprintf("DEBUG: Section %i: %s\n", (int)section, ptr); + //mprintf("DEBUG: Section %i: %s\n", (int)section, ptr); int err = 0; if (section == ATYPE) err = read_atype(prm, ptr); @@ -131,6 +131,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb } ptr = infile.Line(); } + prm.Debug(); // TODO debug level + infile.CloseFile(); return 0; } @@ -171,7 +173,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, while (ptr != 0) { // Advance to first non-space char while (*ptr == ' ' && *ptr != '\0') ++ptr; - mprintf("DEBUG: First char: %c (%i)\n", *ptr, (int)*ptr); + //mprintf("DEBUG: First char: %c (%i)\n", *ptr, (int)*ptr); int read_err = 0; if (*ptr == '\0') { // Section Change From 6b5141439337ed1072387649b27635b5412fb3f3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 15:43:36 -0500 Subject: [PATCH 0081/1492] Functions for reading bonds and angles. Allow updates, report when they happen --- src/AmberParamFile.cpp | 113 +++++++++++++++++++++++++---------------- src/AmberParamFile.h | 4 ++ 2 files changed, 74 insertions(+), 43 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 71d7df34e1..0f75bfe035 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -85,6 +85,70 @@ const return 0; } +/** Read input for bond. */ +int AmberParamFile::read_bond(ParameterSet& prm, const char* ptr) +const +{ + // Bond parameters + // IBT , JBT , RK , REQ + // FORMAT(A2,1X,A2,2F10.2) + mprintf("DEBUG: Bond: %s\n", ptr); + std::vector symbols(2); + int pos = read_symbols(ptr, symbols, 2); + if (pos < 0) { + mprinterr("Error: Could not read symbols for bond from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); + double RK, REQ; + int nscan = sscanf(ptr+pos, "%lf %lf", &RK, &REQ); + if (nscan != 2) { + mprinterr("Error: Expected RK, REQ, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(2); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + ParameterHolders::RetType ret = prm.BP().AddParm(types, BondParmType(RK, REQ), true); + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining bond type %s - %s\n", *(types[0]), *(types[1])); + + return 0; +} + +/** Read input for angle. */ +int AmberParamFile::read_angle(ParameterSet& prm, const char* ptr) +const +{ + // Angle parameters + // ITT , JTT , KTT , TK , TEQ + // FORMAT(A2,1X,A2,1X,A2,2F10.2) + mprintf("DEBUG: Angle: %s\n", ptr); + std::vector symbols(3); + int pos = read_symbols(ptr, symbols, 3); + if (pos < 0) { + mprinterr("Error: Could not read symbols for angle from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); + double TK, TEQ; + int nscan = sscanf(ptr+pos, "%lf %lf", &TK, &TEQ); + if (nscan != 2) { + mprinterr("Error: Expected TK, TEQ, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(3); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + ParameterHolders::RetType ret = prm.AP().AddParm(types, AngleParmType(TK, TEQ), true); + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining angle type %s - %s - %s\n", *(types[0]), *(types[1]), *(types[2])); + + return 0; +} + + /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { @@ -123,6 +187,10 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb int err = 0; if (section == ATYPE) err = read_atype(prm, ptr); + else if (section == BOND) + err = read_bond(prm, ptr); + else if (section == ANGLE) + err = read_angle(prm, ptr); if (err != 0) { mprinterr("Error: Reading line: %s\n", ptr); return 1; @@ -233,50 +301,9 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } else if (section == ATYPE) { read_err = read_atype(prm, ptr); } else if (section == BOND) { - // Bond parameters - // IBT , JBT , RK , REQ - // FORMAT(A2,1X,A2,2F10.2) - mprintf("DEBUG: Bond: %s\n", ptr); - std::vector symbols(2); - int pos = read_symbols(ptr, symbols, 2); - if (pos < 0) { - mprinterr("Error: Could not read symbols for bond from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); - double RK, REQ; - int nscan = sscanf(ptr+pos, "%lf %lf", &RK, &REQ); - if (nscan != 2) { - mprinterr("Error: Expected RK, REQ, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(2); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - prm.BP().AddParm(types, BondParmType(RK, REQ), false); + read_err = read_bond(prm, ptr); } else if (section == ANGLE) { - // Angle parameters - // ITT , JTT , KTT , TK , TEQ - // FORMAT(A2,1X,A2,1X,A2,2F10.2) - mprintf("DEBUG: Angle: %s\n", ptr); - std::vector symbols(3); - int pos = read_symbols(ptr, symbols, 3); - if (pos < 0) { - mprinterr("Error: Could not read symbols for angle from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); - double TK, TEQ; - int nscan = sscanf(ptr+pos, "%lf %lf", &TK, &TEQ); - if (nscan != 2) { - mprinterr("Error: Expected TK, TEQ, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(3); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - types.AddName( symbols[2] ); - prm.AP().AddParm(types, AngleParmType(TK, TEQ), false); + read_err = read_angle(prm, ptr); } else if (section == DIHEDRAL) { // Dihedral parameters // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index 16fa0cd698..7313dc2322 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -23,6 +23,10 @@ class AmberParamFile { static int read_symbols(const char*, std::vector&, int); /// Read atom type line int read_atype(ParameterSet&, const char*) const; + /// Read bond line + int read_bond(ParameterSet&, const char*) const; + /// Read angle line + int read_angle(ParameterSet&, const char*) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 19c96481a0c75498ad53ac4c198846c84499ee26 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 15:47:48 -0500 Subject: [PATCH 0082/1492] Function for dihedrals --- src/AmberParamFile.cpp | 77 ++++++++++++++++++++++++------------------ src/AmberParamFile.h | 2 ++ 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 0f75bfe035..9c3b52ee5f 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -148,6 +148,48 @@ const return 0; } +/** Read input for dihedral. */ +int AmberParamFile::read_dihedral(ParameterSet& prm, const char* ptr) +const +{ + // Dihedral parameters + // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + // If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the + // system involving the atoms "JPT" and and "KPT" are assigned + // the same parameters. This is called the general dihedral type + // and is of the form "X "-"JPT"-"KPT"-"X ". + // IDIVF is the factor by which the torsional barrier is divided. + // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for + // details. Basically, the actual torsional potential is + // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) + mprintf("DEBUG: Dihedral: %s\n", ptr); + std::vector symbols(4); + int pos = read_symbols(ptr, symbols, 4); + if (pos < 0) { + mprinterr("Error: Could not read symbols for dihedral from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + int IDIVF; + double PK, PHASE, PN; + int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); + if (nscan != 4) { + mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(4); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + types.AddName( symbols[3] ); + ParameterHolders::RetType ret = + prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), true); + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining angle type %s - %s - %s - %s\n", + *(types[0]), *(types[1]), *(types[2]), *(types[3])); + return 0; +} /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const @@ -191,6 +233,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb err = read_bond(prm, ptr); else if (section == ANGLE) err = read_angle(prm, ptr); + else if (section == DIHEDRAL) + err = read_dihedral(prm, ptr); if (err != 0) { mprinterr("Error: Reading line: %s\n", ptr); return 1; @@ -305,38 +349,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } else if (section == ANGLE) { read_err = read_angle(prm, ptr); } else if (section == DIHEDRAL) { - // Dihedral parameters - // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN - // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) - // If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the - // system involving the atoms "JPT" and and "KPT" are assigned - // the same parameters. This is called the general dihedral type - // and is of the form "X "-"JPT"-"KPT"-"X ". - // IDIVF is the factor by which the torsional barrier is divided. - // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for - // details. Basically, the actual torsional potential is - // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) - mprintf("DEBUG: Dihedral: %s\n", ptr); - std::vector symbols(4); - int pos = read_symbols(ptr, symbols, 4); - if (pos < 0) { - mprinterr("Error: Could not read symbols for dihedral from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); - int IDIVF; - double PK, PHASE, PN; - int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); - if (nscan != 4) { - mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(4); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - types.AddName( symbols[2] ); - types.AddName( symbols[3] ); - prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), false); + read_err = read_dihedral(prm, ptr); } else if (section == IMPROPER) { // Improper parameters // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index 7313dc2322..31bc402f7e 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -27,6 +27,8 @@ class AmberParamFile { int read_bond(ParameterSet&, const char*) const; /// Read angle line int read_angle(ParameterSet&, const char*) const; + /// Read dihedral line + int read_dihedral(ParameterSet&, const char*) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 863ad0eb51f69e81ff29db90cb4236a23d2da262 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 16:06:52 -0500 Subject: [PATCH 0083/1492] Add improper function --- src/AmberParamFile.cpp | 63 ++++++++++++++++++++++++++---------------- src/AmberParamFile.h | 2 ++ 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 9c3b52ee5f..28a02f125f 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -186,11 +186,46 @@ const ParameterHolders::RetType ret = prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), true); if (ret == ParameterHolders::UPDATED) - mprintf("Warning: Redefining angle type %s - %s - %s - %s\n", + mprintf("Warning: Redefining dihedral type %s - %s - %s - %s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); return 0; } +/** Read input for improper. */ +int AmberParamFile::read_improper(ParameterSet& prm, const char* ptr) +const +{ + // Improper parameters + // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + mprintf("DEBUG: Improper: %s\n", ptr); + std::vector symbols(4); + int pos = read_symbols(ptr, symbols, 4); + if (pos < 0) { + mprinterr("Error: Could not read symbols for improper from %s\n", ptr); + return 1; + } + mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + double PK, PHASE, PN; + int nscan = sscanf(ptr+pos, "%lf %lf %lf", &PK, &PHASE, &PN); + if (nscan != 3) { + mprinterr("Error: Expected PK, PHASE, PN, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(4); + types.AddName( symbols[0] ); + types.AddName( symbols[1] ); + types.AddName( symbols[2] ); + types.AddName( symbols[3] ); + ParameterHolders::RetType ret = + prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining improper type %s - %s - %s - %s\n", + *(types[0]), *(types[1]), *(types[2]), *(types[3])); + + return 0; +} + /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { @@ -235,6 +270,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb err = read_angle(prm, ptr); else if (section == DIHEDRAL) err = read_dihedral(prm, ptr); + else if (section == IMPROPER) + err = read_improper(prm, ptr); if (err != 0) { mprinterr("Error: Reading line: %s\n", ptr); return 1; @@ -351,29 +388,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } else if (section == DIHEDRAL) { read_err = read_dihedral(prm, ptr); } else if (section == IMPROPER) { - // Improper parameters - // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN - // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) - mprintf("DEBUG: Improper: %s\n", ptr); - std::vector symbols(4); - int pos = read_symbols(ptr, symbols, 4); - if (pos < 0) { - mprinterr("Error: Could not read symbols for improper from %s\n", ptr); - return 1; - } - mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); - double PK, PHASE, PN; - int nscan = sscanf(ptr+pos, "%lf %lf %lf", &PK, &PHASE, &PN); - if (nscan != 3) { - mprinterr("Error: Expected PK, PHASE, PN, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(4); - types.AddName( symbols[0] ); - types.AddName( symbols[1] ); - types.AddName( symbols[2] ); - types.AddName( symbols[3] ); - prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); + read_err = read_improper(prm, ptr); } else if (section == LJ1012) { // Lennard-Jones 10-12 hydrogen bonding term. // According to the docs, the format should be: diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index 31bc402f7e..a4e2292d3a 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -29,6 +29,8 @@ class AmberParamFile { int read_angle(ParameterSet&, const char*) const; /// Read dihedral line int read_dihedral(ParameterSet&, const char*) const; + /// Read improper line + int read_improper(ParameterSet&, const char*) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 2bf76a5e6b5da776ab27fa42b4ba4725c6dad58b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 16:10:34 -0500 Subject: [PATCH 0084/1492] Add function for LJ 10-12 hbond --- src/AmberParamFile.cpp | 54 ++++++++++++++++++++++++++---------------- src/AmberParamFile.h | 2 ++ 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 28a02f125f..b35c99424b 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -226,6 +226,36 @@ const return 0; } +/** Read input for LJ 10-12 hbond. */ +int AmberParamFile::read_lj1012(ParameterSet& prm, const char* ptr) +const +{ + // Lennard-Jones 10-12 hydrogen bonding term. + // According to the docs, the format should be: + // KT1 , KT2 , A , B , ASOLN , BSOLN , HCUT , IC + // FORMAT(2X,A2,2X,A2,2x,5F10.2,I2) + // In practive (in e.g. parm91.dat), the actual format appears to be: + // KT1, KT2, A, B, HCUT + char KT1[MAXSYMLEN], KT2[MAXSYMLEN]; + double A, B, HCUT; + //double ASOLN, BSOLN, HCUT; + //int IC; + mprintf("DEBUG: LJ 10-12: %s\n", ptr); + //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", + int nscan = sscanf(ptr, "%s %s %lf %lf %lf", KT1, KT2, &A, &B, &HCUT); + if (nscan < 5) { + mprinterr("Error: Expected at least KT1, KT2, A, B, HCUT, got only %i elements\n", nscan); + return 1; + } + TypeNameHolder types(2); + types.AddName( KT1 ); + types.AddName( KT2 ); + ParameterHolders::RetType ret = prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining LJ 10-12 hbond type %s %s\n", *(types[0]), *(types[1])); + return 0; +} + /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { @@ -272,6 +302,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb err = read_dihedral(prm, ptr); else if (section == IMPROPER) err = read_improper(prm, ptr); + else if (section == LJ1012) + err = read_lj1012(prm, ptr); if (err != 0) { mprinterr("Error: Reading line: %s\n", ptr); return 1; @@ -390,27 +422,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } else if (section == IMPROPER) { read_err = read_improper(prm, ptr); } else if (section == LJ1012) { - // Lennard-Jones 10-12 hydrogen bonding term. - // According to the docs, the format should be: - // KT1 , KT2 , A , B , ASOLN , BSOLN , HCUT , IC - // FORMAT(2X,A2,2X,A2,2x,5F10.2,I2) - // In practive (in e.g. parm91.dat), the actual format appears to be: - // KT1, KT2, A, B, HCUT - char KT1[MAXSYMLEN], KT2[MAXSYMLEN]; - double A, B, HCUT; - //double ASOLN, BSOLN, HCUT; - //int IC; - mprintf("DEBUG: LJ 10-12: %s\n", ptr); - //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", - int nscan = sscanf(ptr, "%s %s %lf %lf %lf", KT1, KT2, &A, &B, &HCUT); - if (nscan < 5) { - mprinterr("Error: Expected at least KT1, KT2, A, B, HCUT, got only %i elements\n", nscan); - return 1; - } - TypeNameHolder types(2); - types.AddName( KT1 ); - types.AddName( KT2 ); - prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); + read_err = read_lj1012(prm, ptr); } else if (section == NB_EQUIV) { // EQUIVALENCING ATOM SYMBOLS FOR THE NON-BONDED 6-12 POTENTIAL PARAMETERS // IORG , IEQV(I) , I = 1 , 19 diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index a4e2292d3a..a2b93498c1 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -31,6 +31,8 @@ class AmberParamFile { int read_dihedral(ParameterSet&, const char*) const; /// Read improper line int read_improper(ParameterSet&, const char*) const; + /// Read LJ 10-12 hbond line + int read_lj1012(ParameterSet&, const char*) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 1857f30789347d303fbe8c21ef52f79d50046447 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 16:12:33 -0500 Subject: [PATCH 0085/1492] Allow parameters to be updated --- src/AmberParamFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index b35c99424b..133481738f 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -218,7 +218,7 @@ const types.AddName( symbols[2] ); types.AddName( symbols[3] ); ParameterHolders::RetType ret = - prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), false); + prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), true); if (ret == ParameterHolders::UPDATED) mprintf("Warning: Redefining improper type %s - %s - %s - %s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); @@ -250,7 +250,7 @@ const TypeNameHolder types(2); types.AddName( KT1 ); types.AddName( KT2 ); - ParameterHolders::RetType ret = prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), false); + ParameterHolders::RetType ret = prm.HB().AddParm(types, HB_ParmType(A, B, HCUT), true); if (ret == ParameterHolders::UPDATED) mprintf("Warning: Redefining LJ 10-12 hbond type %s %s\n", *(types[0]), *(types[1])); return 0; From 3e827c0d645121dccb0c9c2b7fcd69e03b29a3ee Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 16:17:05 -0500 Subject: [PATCH 0086/1492] Start adding nonbond set read. --- src/AmberParamFile.cpp | 33 ++++++++++++++++++++++++++++++++- src/AmberParamFile.h | 5 +++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 133481738f..b83928dde2 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -33,7 +33,7 @@ int AmberParamFile::read_symbols(const char* ptrIn, std::vector& sy } /// Hold a set of nonbonded parameters -class NonbondSet { +class AmberParamFile::NonbondSet { public: NonbondSet(std::string const& n) : name_(n) {} @@ -256,6 +256,37 @@ const return 0; } +/** Read radius/depth input for LJ 6-12 nonbond. */ +int AmberParamFile::read_nb_RE(NonbondSet& nbset, const char* ptr) +const +{ + // ***** ONLY IF KINDNB .EQ. 'RE' ***** + // LTYNB , R , EDEP + mprintf("DEBUG: Nonbond: %s\n", ptr); + //char LTYNB[MAXSYMLEN]; + //double R, EDEP; + //double R14, E14; + // This section is a little tricky. Apparently CHARMM-style Amber FF + // files can have 14 LJ params here. Try to detect this. + ArgList nbargs( ptr, " " ); + if (nbargs.Nargs() < 3) { + mprinterr("Error: Expected at least TYPE, R, DEPTH, got %i elements.\n", nbargs.Nargs()); + return 1; + } + bool has_14 = false; + if (nbargs.Nargs() >= 5) { + if (validDouble( nbargs[3] ) && validDouble( nbargs[4] )) { + has_14 = true; + } + } + if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); + double R = convertToDouble( nbargs[1] ); + double EDEP = convertToDouble( nbargs[2] ); + nbset.LJ_.AddParm( TypeNameHolder(nbargs[0]), LJparmType(R, EDEP), false ); + return 0; +} + + /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index a2b93498c1..b1b93d1246 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -20,6 +20,9 @@ class AmberParamFile { enum SectionType { ATYPE = 0, HYDROPHILIC, BOND, ANGLE, DIHEDRAL, IMPROPER, LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; + + class NonbondSet; + static int read_symbols(const char*, std::vector&, int); /// Read atom type line int read_atype(ParameterSet&, const char*) const; @@ -33,6 +36,8 @@ class AmberParamFile { int read_improper(ParameterSet&, const char*) const; /// Read LJ 10-12 hbond line int read_lj1012(ParameterSet&, const char*) const; + /// Read LJ 6-12 R/depth line + int read_nb_RE(NonbondSet&, const char*) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 3c7a13148480b1b6355e2c02933d38a8ce09f721 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 19:36:29 -0500 Subject: [PATCH 0087/1492] Nonbonds for frcmod --- src/AmberParamFile.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index b83928dde2..57bb1f13c7 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -282,7 +282,10 @@ const if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); double R = convertToDouble( nbargs[1] ); double EDEP = convertToDouble( nbargs[2] ); - nbset.LJ_.AddParm( TypeNameHolder(nbargs[0]), LJparmType(R, EDEP), false ); + TypeNameHolder types( nbargs[0] ); + ParameterHolders::RetType ret = nbset.LJ_.AddParm( types, LJparmType(R, EDEP), true ); + if (ret == ParameterHolders::UPDATED) + mprintf("Warning: Redefining LJ 6-12 type %s\n", *(types[0])); return 0; } @@ -304,6 +307,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); //prm.SetParamSetName( title ); TODO append title + NonbondSet nbset(title); // Read file SectionType section = UNKNOWN; ptr = infile.Line(); @@ -335,6 +339,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb err = read_improper(prm, ptr); else if (section == LJ1012) err = read_lj1012(prm, ptr); + else if (section == NONBOND) + err = read_nb_RE(nbset, ptr); if (err != 0) { mprinterr("Error: Reading line: %s\n", ptr); return 1; @@ -343,6 +349,20 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb } ptr = infile.Line(); } + // Nonbonds + for (ParmHolder::const_iterator it = nbset.LJ_.begin(); + it != nbset.LJ_.end(); ++it) + { + ParmHolder::iterator at = prm.AT().GetParam( it->first ); + if (at == prm.AT().end()) { + mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", + *(it->first[0])); + return 1; + } + at->second.SetLJ().SetRadius( it->second.Radius() ); + at->second.SetLJ().SetDepth( it->second.Depth() ); + } + prm.Debug(); // TODO debug level infile.CloseFile(); From 892c3eff0467ec2dcd1dc956b60f3ca0d033a275 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 20:04:25 -0500 Subject: [PATCH 0088/1492] Nonbond parameter assignment fxn --- src/AmberParamFile.cpp | 44 +++++++++++++++++++----------------------- src/AmberParamFile.h | 2 ++ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 57bb1f13c7..5545af4e69 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -289,6 +289,23 @@ const return 0; } +/** Assign nonbond parameters from a NonbondSet to ParameterSet */ +int AmberParamFile::assign_nb(ParameterSet& prm, NonbondSet const& nbset) const { + // Nonbonds + for (ParmHolder::const_iterator it = nbset.LJ_.begin(); + it != nbset.LJ_.end(); ++it) + { + ParmHolder::iterator at = prm.AT().GetParam( it->first ); + if (at == prm.AT().end()) { + mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", + *(it->first[0])); + return 1; + } + at->second.SetLJ().SetRadius( it->second.Radius() ); + at->second.SetLJ().SetDepth( it->second.Depth() ); + } + return 0; +} /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const @@ -350,18 +367,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb ptr = infile.Line(); } // Nonbonds - for (ParmHolder::const_iterator it = nbset.LJ_.begin(); - it != nbset.LJ_.end(); ++it) - { - ParmHolder::iterator at = prm.AT().GetParam( it->first ); - if (at == prm.AT().end()) { - mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", - *(it->first[0])); - return 1; - } - at->second.SetLJ().SetRadius( it->second.Radius() ); - at->second.SetLJ().SetDepth( it->second.Depth() ); - } + if (assign_nb(prm, nbset)) return 1; prm.Debug(); // TODO debug level infile.CloseFile(); @@ -574,18 +580,8 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } mprintf("\tUsing nonbonded parm set: %s\n", NBsets[nbsetidx].name_.c_str()); prm.SetNbParamName( NBsets[nbsetidx].name_ ); - for (ParmHolder::const_iterator it = NBsets[nbsetidx].LJ_.begin(); - it != NBsets[nbsetidx].LJ_.end(); ++it) - { - ParmHolder::iterator at = prm.AT().GetParam( it->first ); - if (at == prm.AT().end()) { - mprinterr("Error: Nonbond parameters defined for previously undefined type '%s'.\n", - *(it->first[0])); - return 1; - } - at->second.SetLJ().SetRadius( it->second.Radius() ); - at->second.SetLJ().SetDepth( it->second.Depth() ); - } + if (assign_nb(prm, NBsets[nbsetidx])) return 1; + // Do equivalent atoms. for (XNarray::const_iterator equivAts = EquivalentNames.begin(); equivAts != EquivalentNames.end(); ++equivAts) diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index b1b93d1246..e816c0473d 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -38,6 +38,8 @@ class AmberParamFile { int read_lj1012(ParameterSet&, const char*) const; /// Read LJ 6-12 R/depth line int read_nb_RE(NonbondSet&, const char*) const; + /// Assign parameters from NonbondSet to ParameterSet + int assign_nb(ParameterSet&, NonbondSet const&) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From 5cc888a531aa95848f876255d6f42b5e1c618a8d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 20:13:19 -0500 Subject: [PATCH 0089/1492] Use read_nb_RE function --- src/AmberParamFile.cpp | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 5545af4e69..6eb786b1fc 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -491,42 +491,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, EquivalentNames.back().push_back( equiv_line[iarg] ); } else if (section == NONBOND) { // ***** ONLY IF KINDNB .EQ. 'RE' ***** - // LTYNB , R , EDEP - mprintf("DEBUG: Nonbond: %s\n", ptr); - //char LTYNB[MAXSYMLEN]; - //double R, EDEP; - //double R14, E14; - // This section is a little tricky. Apparently CHARMM-style Amber FF - // files can have 14 LJ params here. Try to detect this. - ArgList nbargs( ptr, " " ); - if (nbargs.Nargs() < 3) { - mprinterr("Error: Expected at least TYPE, R, DEPTH, got %i elements.\n", nbargs.Nargs()); - return 1; - } - bool has_14 = false; - if (nbargs.Nargs() >= 5) { - if (validDouble( nbargs[3] ) && validDouble( nbargs[4] )) { - has_14 = true; - } - } - if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); - double R = convertToDouble( nbargs[1] ); - double EDEP = convertToDouble( nbargs[2] ); - NBsets.back().LJ_.AddParm( TypeNameHolder(nbargs[0]), LJparmType(R, EDEP), false ); - //int nscan = sscanf(ptr, "%s %lf %lf %lf %lf", LTYNB, &R, &EDEP, &R14, &E14); - - //if (nscan >= 5) { - // // symbol, rmin, epsilon - // NBsets.back().LJ_.AddParm( TypeNameHolder(LTYNB), LJparmType(R, EDEP), false ); - // /*ParmHolder::iterator it = prm.AT().GetParam( TypeNameHolder(LTYNB) ); - // if (it == prm.AT().end()) { - // mprintf("Warning: Nonbond parameters defined for previously undefined type '%s'." - // " Skipping.\n", LTYNB); - // } else { - // it->second.SetLJ().SetRadius( R ); - // it->second.SetLJ().SetDepth( EDEP ); - // }*/ - //} + read_err = read_nb_RE(NBsets.back(), ptr); } else if (section == LJEDIT) { mprintf("DEBUG: LJedit: %s\n", ptr); // Lennard-Jones sigma and epsilon of the first atom type when it From ffe52beb6e4ce22d214014a33dbac7457cee3f6f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 20:20:51 -0500 Subject: [PATCH 0090/1492] Add function for reading off-diagonal LJ mods --- src/AmberParamFile.cpp | 27 +++++++++++++++++++++++++-- src/AmberParamFile.h | 4 ++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 6eb786b1fc..5705328d04 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -42,7 +42,7 @@ class AmberParamFile::NonbondSet { }; /// Hold an off-diagonal NB modification -class OffdiagNB { +class AmberParamFile::OffdiagNB { public: OffdiagNB(NameType const& AT1, NameType const& AT2, double sig1, double eps1, double sig2, double eps2) : types_(2), LJ1_(sig1, eps1), LJ2_(sig2, eps2) @@ -289,6 +289,26 @@ const return 0; } +/** Read LJ off-diagonal modifications */ +int AmberParamFile::read_ljedit(Oarray& Offdiag, const char* ptr) +const +{ + mprintf("DEBUG: LJedit: %s\n", ptr); + // Lennard-Jones sigma and epsilon of the first atom type when it + // interacts with anything under the normal rules, then the sigma + // and epsilon of the second atom type when it interacts with the first. + char AT1[MAXSYMLEN], AT2[MAXSYMLEN]; + double sig1, eps1, sig2, eps2; + int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf", AT1, AT2, &sig1, &eps1, &sig2, &eps2); + if (nscan != 6) { + mprinterr("Error: Expected AT1, AT2, SIG1, EPS1, SIG2, EPS2, got %i elements.\n", nscan); + return 1; + } + Offdiag.push_back( OffdiagNB(AT1, AT2, sig1, eps1, sig2, eps2) ); + return 0; +} + + /** Assign nonbond parameters from a NonbondSet to ParameterSet */ int AmberParamFile::assign_nb(ParameterSet& prm, NonbondSet const& nbset) const { // Nonbonds @@ -325,6 +345,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb mprintf("\tTitle: %s\n", title.c_str()); //prm.SetParamSetName( title ); TODO append title NonbondSet nbset(title); + Oarray Offdiag; // Read file SectionType section = UNKNOWN; ptr = infile.Line(); @@ -338,6 +359,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb else if (line.compare(0, 4, "DIHE") == 0) section = DIHEDRAL; else if (line.compare(0, 4, "IMPR") == 0) section = IMPROPER; else if (line.compare(0, 4, "HBON") == 0) section = LJ1012; + else if (line.compare(0, 6, "LJEDIT") == 0) section = LJEDIT; else if (line.compare(0, 4, "NONB") == 0) { section = NONBOND; // TODO check RE @@ -358,6 +380,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb err = read_lj1012(prm, ptr); else if (section == NONBOND) err = read_nb_RE(nbset, ptr); + else if (section == LJEDIT) + err = read_ljedit(Offdiag, ptr); if (err != 0) { mprinterr("Error: Reading line: %s\n", ptr); return 1; @@ -388,7 +412,6 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, typedef std::vector XNarray; XNarray EquivalentNames; // For holding off-diagonal mods - typedef std::vector Oarray; Oarray Offdiag; // Read title diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index e816c0473d..cb30b5ca6c 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -22,6 +22,8 @@ class AmberParamFile { LJ1012, NB_EQUIV, NONBOND, LJEDIT, UNKNOWN }; class NonbondSet; + class OffdiagNB; + typedef std::vector Oarray; static int read_symbols(const char*, std::vector&, int); /// Read atom type line @@ -38,6 +40,8 @@ class AmberParamFile { int read_lj1012(ParameterSet&, const char*) const; /// Read LJ 6-12 R/depth line int read_nb_RE(NonbondSet&, const char*) const; + /// Read LJ 6-12 off-diagonal modifications + int read_ljedit(Oarray&, const char*) const; /// Assign parameters from NonbondSet to ParameterSet int assign_nb(ParameterSet&, NonbondSet const&) const; //int ReadInput(std::string&, BufferedLine&) const; From 3d6363168c417e93f4369c224a4898f0e0e3e2d6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 20:27:59 -0500 Subject: [PATCH 0091/1492] Function for assigning off-diagonal NB params --- src/AmberParamFile.cpp | 26 ++++++++++++++++++++++++++ src/AmberParamFile.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 5705328d04..620420f9e8 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -327,6 +327,30 @@ int AmberParamFile::assign_nb(ParameterSet& prm, NonbondSet const& nbset) const return 0; } +/** Assign off-diagonal nonbond parameters from an OffdiagNB array to ParameterSet */ +int AmberParamFile::assign_offdiag(ParameterSet& prm, Oarray const& Offdiag) const { + // Do off diagonal NB mods + if (!Offdiag.empty()) { + for (Oarray::const_iterator od = Offdiag.begin(); od != Offdiag.end(); ++od) + { + mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); + // Set type 1 + ParmHolder::iterator it = prm.AT().GetParam( od->types_[0] ); + if (it == prm.AT().end()) { + mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", + *(od->types_[0])); + return 1; + } + it->second.SetLJ().SetRadius( od->LJ1_.Radius() ); + it->second.SetLJ().SetDepth( od->LJ1_.Depth() ); + // Set off-diagonal for type1-type2 + // FIXME different combine rules? + prm.NB().AddParm(od->types_, od->LJ1_.Combine_LB(od->LJ2_), false); + } + } // END off-diagonal NB mods + return 0; +} + /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { @@ -392,6 +416,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb } // Nonbonds if (assign_nb(prm, nbset)) return 1; + // Off-diagonal NB modifications + if (assign_offdiag(prm, Offdiag)) return 1; prm.Debug(); // TODO debug level infile.CloseFile(); diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index cb30b5ca6c..8658cf8f73 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -44,6 +44,8 @@ class AmberParamFile { int read_ljedit(Oarray&, const char*) const; /// Assign parameters from NonbondSet to ParameterSet int assign_nb(ParameterSet&, NonbondSet const&) const; + /// Assign parameters from OffdiagNB array to ParameterSet + int assign_offdiag(ParameterSet&, Oarray const&) const; //int ReadInput(std::string&, BufferedLine&) const; }; #endif From b159c83773536d52595683b1c8f7971fbae7fb7c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 20 Nov 2023 20:28:54 -0500 Subject: [PATCH 0092/1492] Use assign_offdiag --- src/AmberParamFile.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 620420f9e8..d075b79ee5 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -622,24 +622,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, } // END nonbond parameters // Do off diagonal NB mods - if (!Offdiag.empty()) { - for (Oarray::const_iterator od = Offdiag.begin(); od != Offdiag.end(); ++od) - { - mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); - // Set type 1 - ParmHolder::iterator it = prm.AT().GetParam( od->types_[0] ); - if (it == prm.AT().end()) { - mprinterr("Error: Off-diagonal nonbond parameters defined for previously undefined type '%s'.\n", - *(od->types_[0])); - return 1; - } - it->second.SetLJ().SetRadius( od->LJ1_.Radius() ); - it->second.SetLJ().SetDepth( od->LJ1_.Depth() ); - // Set off-diagonal for type1-type2 - // FIXME different combine rules? - prm.NB().AddParm(od->types_, od->LJ1_.Combine_LB(od->LJ2_), false); - } - } // END off-diagonal NB mods + if (assign_offdiag(prm, Offdiag)) return 1; prm.Debug(); // TODO debug level infile.CloseFile(); From 9381d0362da502f761ca725f87adccb25da69010 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 08:54:54 -0500 Subject: [PATCH 0093/1492] Use read_ljedit. Hide some debug info. Ensure has LJ params flag is set. --- src/AmberParamFile.cpp | 58 ++++++++++++++++++++---------------------- src/AmberParamFile.h | 4 +++ 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index d075b79ee5..0a7f55426e 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -10,7 +10,14 @@ const int AmberParamFile::MAXSYMLEN = 16; /// CONSTRUCTOR -AmberParamFile::AmberParamFile() {} +AmberParamFile::AmberParamFile() : + debug_(0) +{} + +/** Set debug level */ +void AmberParamFile::SetDebug(int d) { + debug_ = d; +} /** Read symbols delimited by - and space. */ int AmberParamFile::read_symbols(const char* ptrIn, std::vector& symbols, int nsymbols) @@ -61,7 +68,7 @@ int AmberParamFile::read_atype(ParameterSet& prm, const char* ptr) const { // Format (A2,2X,F10.2x,f10.2) - mprintf("DEBUG: Atype: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Atype: %s\n", ptr); char kndsym[MAXSYMLEN]; double amass = 0; double atpol = 0; @@ -92,14 +99,14 @@ const // Bond parameters // IBT , JBT , RK , REQ // FORMAT(A2,1X,A2,2F10.2) - mprintf("DEBUG: Bond: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Bond: %s\n", ptr); std::vector symbols(2); int pos = read_symbols(ptr, symbols, 2); if (pos < 0) { mprinterr("Error: Could not read symbols for bond from %s\n", ptr); return 1; } - mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); + //mprintf("DEBUG: %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), ptr+pos); double RK, REQ; int nscan = sscanf(ptr+pos, "%lf %lf", &RK, &REQ); if (nscan != 2) { @@ -123,14 +130,14 @@ const // Angle parameters // ITT , JTT , KTT , TK , TEQ // FORMAT(A2,1X,A2,1X,A2,2F10.2) - mprintf("DEBUG: Angle: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Angle: %s\n", ptr); std::vector symbols(3); int pos = read_symbols(ptr, symbols, 3); if (pos < 0) { mprinterr("Error: Could not read symbols for angle from %s\n", ptr); return 1; } - mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); + //mprintf("DEBUG: %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), ptr+pos); double TK, TEQ; int nscan = sscanf(ptr+pos, "%lf %lf", &TK, &TEQ); if (nscan != 2) { @@ -163,14 +170,14 @@ const // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for // details. Basically, the actual torsional potential is // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) - mprintf("DEBUG: Dihedral: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Dihedral: %s\n", ptr); std::vector symbols(4); int pos = read_symbols(ptr, symbols, 4); if (pos < 0) { mprinterr("Error: Could not read symbols for dihedral from %s\n", ptr); return 1; } - mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + //mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); int IDIVF; double PK, PHASE, PN; int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); @@ -198,14 +205,14 @@ const // Improper parameters // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) - mprintf("DEBUG: Improper: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Improper: %s\n", ptr); std::vector symbols(4); int pos = read_symbols(ptr, symbols, 4); if (pos < 0) { mprinterr("Error: Could not read symbols for improper from %s\n", ptr); return 1; } - mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); + //mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); double PK, PHASE, PN; int nscan = sscanf(ptr+pos, "%lf %lf %lf", &PK, &PHASE, &PN); if (nscan != 3) { @@ -240,7 +247,7 @@ const double A, B, HCUT; //double ASOLN, BSOLN, HCUT; //int IC; - mprintf("DEBUG: LJ 10-12: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: LJ 10-12: %s\n", ptr); //int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf %lf %i\n", int nscan = sscanf(ptr, "%s %s %lf %lf %lf", KT1, KT2, &A, &B, &HCUT); if (nscan < 5) { @@ -262,7 +269,7 @@ const { // ***** ONLY IF KINDNB .EQ. 'RE' ***** // LTYNB , R , EDEP - mprintf("DEBUG: Nonbond: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Nonbond: %s\n", ptr); //char LTYNB[MAXSYMLEN]; //double R, EDEP; //double R14, E14; @@ -279,7 +286,7 @@ const has_14 = true; } } - if (has_14) mprintf("DEBUG: NB HAS CHARMM.\n"); + if (has_14) mprintf("DEBUG: NB HAS 1-4 LJ PARAMS.\n"); // FIXME save these double R = convertToDouble( nbargs[1] ); double EDEP = convertToDouble( nbargs[2] ); TypeNameHolder types( nbargs[0] ); @@ -293,7 +300,7 @@ const int AmberParamFile::read_ljedit(Oarray& Offdiag, const char* ptr) const { - mprintf("DEBUG: LJedit: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: LJedit: %s\n", ptr); // Lennard-Jones sigma and epsilon of the first atom type when it // interacts with anything under the normal rules, then the sigma // and epsilon of the second atom type when it interacts with the first. @@ -333,7 +340,7 @@ int AmberParamFile::assign_offdiag(ParameterSet& prm, Oarray const& Offdiag) con if (!Offdiag.empty()) { for (Oarray::const_iterator od = Offdiag.begin(); od != Offdiag.end(); ++od) { - mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); + if (debug_ > 1) mprintf("DEBUG: Off diag %s %s\n", *(od->types_[0]), *(od->types_[1])); // Set type 1 ParmHolder::iterator it = prm.AT().GetParam( od->types_[0] ); if (it == prm.AT().end()) { @@ -386,6 +393,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb else if (line.compare(0, 6, "LJEDIT") == 0) section = LJEDIT; else if (line.compare(0, 4, "NONB") == 0) { section = NONBOND; + prm.SetHasLJparams( true ); // TODO check RE } else { //mprintf("DEBUG: Section %i: %s\n", (int)section, ptr); @@ -487,7 +495,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, // Special case: hydrophilic atom types. One line. // FORMAT(20(A2,2X)) ptr = infile.Line(); - mprintf("DEBUG: Hydrophilic: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Hydrophilic: %s\n", ptr); // Take advantage of the fact that we expect whitespace-delimiters ArgList hsymbols( ptr, " " ); for (int iarg = 0; iarg != hsymbols.Nargs(); ++iarg) @@ -499,6 +507,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, while (*ptr == ' ' && *ptr != '\0') ++ptr; if (*ptr != '\0') continue; } else if (section == NONBOND) { + prm.SetHasLJparams( true ); // Special case: first read the line. // LABEL , KINDNB // FORMAT(A4,6X,A2) @@ -533,7 +542,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, // EQUIVALENCING ATOM SYMBOLS FOR THE NON-BONDED 6-12 POTENTIAL PARAMETERS // IORG , IEQV(I) , I = 1 , 19 // FORMAT(20(A2,2X)) - mprintf("DEBUG: Nonbond equiv: %s\n", ptr); + if (debug_ > 1) mprintf("DEBUG: Nonbond equiv: %s\n", ptr); EquivalentNames.push_back( Narray() ); ArgList equiv_line( ptr, " " ); for (int iarg = 0; iarg != equiv_line.Nargs(); iarg++) @@ -542,18 +551,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, // ***** ONLY IF KINDNB .EQ. 'RE' ***** read_err = read_nb_RE(NBsets.back(), ptr); } else if (section == LJEDIT) { - mprintf("DEBUG: LJedit: %s\n", ptr); - // Lennard-Jones sigma and epsilon of the first atom type when it - // interacts with anything under the normal rules, then the sigma - // and epsilon of the second atom type when it interacts with the first. - char AT1[MAXSYMLEN], AT2[MAXSYMLEN]; - double sig1, eps1, sig2, eps2; - int nscan = sscanf(ptr, "%s %s %lf %lf %lf %lf", AT1, AT2, &sig1, &eps1, &sig2, &eps2); - if (nscan != 6) { - mprinterr("Error: Expected AT1, AT2, SIG1, EPS1, SIG2, EPS2, got %i elements.\n", nscan); - return 1; - } - Offdiag.push_back( OffdiagNB(AT1, AT2, sig1, eps1, sig2, eps2) ); + read_err = read_ljedit(Offdiag, ptr); } if (read_err != 0) { mprinterr("Error: Reading line: %s\n", ptr); @@ -614,7 +612,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, mprinterr("Error: Equivalent atom type '%s' (base '%s') not found.\n", *(*typeName), *(at0->first[0])); return 1; } - mprintf("DEBUG: Equiv '%s' => '%s'\n", *(at0->first[0]), *(*typeName)); + if (debug_ > 1) mprintf("DEBUG: Equiv '%s' => '%s'\n", *(at0->first[0]), *(*typeName)); at1->second.SetLJ().SetRadius( at0->second.LJ().Radius() ); at1->second.SetLJ().SetDepth( at0->second.LJ().Depth() ); } diff --git a/src/AmberParamFile.h b/src/AmberParamFile.h index 8658cf8f73..8a3cff620a 100644 --- a/src/AmberParamFile.h +++ b/src/AmberParamFile.h @@ -15,6 +15,8 @@ class AmberParamFile { int ReadFrcmod(ParameterSet&, FileName const&, int) const; /// Write main Amber FF file int WriteParams(ParameterSet&, FileName const&, int) const; + /// Set debug level + void SetDebug(int); private: static const int MAXSYMLEN; @@ -47,5 +49,7 @@ class AmberParamFile { /// Assign parameters from OffdiagNB array to ParameterSet int assign_offdiag(ParameterSet&, Oarray const&) const; //int ReadInput(std::string&, BufferedLine&) const; + + int debug_; }; #endif From ad24d2bf20d83986dba0c1772e15204e529a4799 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 08:56:32 -0500 Subject: [PATCH 0094/1492] Set nonbonded flag for LJEDIT as well --- src/AmberParamFile.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 0a7f55426e..49f3239c3c 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -390,8 +390,10 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb else if (line.compare(0, 4, "DIHE") == 0) section = DIHEDRAL; else if (line.compare(0, 4, "IMPR") == 0) section = IMPROPER; else if (line.compare(0, 4, "HBON") == 0) section = LJ1012; - else if (line.compare(0, 6, "LJEDIT") == 0) section = LJEDIT; - else if (line.compare(0, 4, "NONB") == 0) { + else if (line.compare(0, 6, "LJEDIT") == 0) { + section = LJEDIT; + prm.SetHasLJparams( true ); + } else if (line.compare(0, 4, "NONB") == 0) { section = NONBOND; prm.SetHasLJparams( true ); // TODO check RE @@ -484,6 +486,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, section = UNKNOWN; } else if (nbline == "LJEDIT") { section = LJEDIT; + prm.SetHasLJparams( true ); } // Otherwise assume another nonbond section } else { mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); From 22103f65bb19794c211e70ea1f58b08d25756310 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 09:18:49 -0500 Subject: [PATCH 0095/1492] Allow ParameterSet to store multiple titles for better tracking of what parameter sets are actually present --- src/AmberParamFile.cpp | 2 +- src/ParameterSet.cpp | 17 +++++++++++++++-- src/ParameterSet.h | 5 +++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 49f3239c3c..579d89c24d 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -374,7 +374,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb } std::string title(ptr); mprintf("\tTitle: %s\n", title.c_str()); - //prm.SetParamSetName( title ); TODO append title + prm.SetParamSetName( title ); NonbondSet nbset(title); Oarray Offdiag; // Read file diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 4a1b4defaf..def78e59b9 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -19,7 +19,7 @@ void ParameterSet::Debug(const char* fnameIn) const { CpptrajFile Out; Out.OpenWrite( fnameIn ); if (!name_.empty()) - Out.Printf("Parameter set: %s\n", name_.c_str()); + Out.Printf("Parameter set: %s\n", ParamSetName().c_str()); if (!NBname_.empty()) Out.Printf("Nonbond parameters name: %s\n", NBname_.c_str()); Out.Printf("Atom Types:\n"); @@ -132,9 +132,22 @@ int ParameterSet::AddHydrophilicAtomType(NameType const& atype) { return 0; } +/** \return Single string with total parameter set name */ +std::string ParameterSet::ParamSetName() const { + if (name_.size() == 1) + return name_.front(); + else if (name_.size() > 1) { + std::string out = name_.front(); + for (unsigned int idx = 1; idx < name_.size(); idx++) + out.append(" + " + name_[idx]); + return out; + } + return std::string(); +} + /** Set parameter set name. */ void ParameterSet::SetParamSetName(std::string const& nameIn) { - name_ = nameIn; + name_.push_back( nameIn ); } /** Set nonbond parameter set name. */ diff --git a/src/ParameterSet.h b/src/ParameterSet.h index 3cfd233e2d..d842f6a8dc 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -30,8 +30,8 @@ class ParameterSet { ParmHolder const& IP() const { return impParm_; } DihedralParmHolder const& DP() const { return dihParm_; } ParmHolder const& HB() const { return HBparm_; } - std::string const& ParamSetName() const { return name_; } std::string const& NbParamName() const { return NBname_; } + std::string ParamSetName() const; void Debug(const char*) const; void Debug() const { return Debug(""); } @@ -66,8 +66,9 @@ class ParameterSet { size_t DataSize() const; private: typedef std::vector NsetType; + typedef std::vector Sarray; - std::string name_; ///< Parameter set name + Sarray name_; ///< Parameter set name(s) std::string NBname_; ///< Nonbond set name ParmHolder atomTypes_; ///< Atom types From f0eaab5a4d278eb59c8fe8e6a3f39dddfb00b9cc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 09:46:24 -0500 Subject: [PATCH 0096/1492] Use print function built into ParameterSet to write parameters as generic data --- src/DataIO_Std.cpp | 30 ++++++++++++++++++++++++++++++ src/DataIO_Std.h | 1 + src/ParameterSet.cpp | 7 +++++++ src/ParameterSet.h | 6 +++++- src/cpptrajdepend | 2 +- 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/DataIO_Std.cpp b/src/DataIO_Std.cpp index 280707d5bd..466399d77e 100644 --- a/src/DataIO_Std.cpp +++ b/src/DataIO_Std.cpp @@ -21,6 +21,7 @@ #include "DataSet_MatrixFlt.h" #include "DataSet_MatrixDbl.h" #include "DataSet_3D.h" +#include "DataSet_Parameters.h" // CONSTRUCTOR DataIO_Std::DataIO_Std() : @@ -44,6 +45,7 @@ DataIO_Std::DataIO_Std() : dims_[0] = 0; dims_[1] = 0; dims_[2] = 0; + SetValid( DataSet::PARAMETERS ); } static void PrintColumnError(int idx) { @@ -1173,11 +1175,39 @@ int DataIO_Std::WriteData(FileName const& fname, DataSetList const& SetList) err = WriteData2D(file, SetList); else if (SetList[0]->Ndim() == 3) err = WriteData3D(file, SetList); + else if (SetList[0]->Type() == DataSet::PARAMETERS) + err = WriteParameters(file, SetList); + else + mprintf("Warning: Could not determine how to write dat based on set '%s'\n", + SetList[0]->legend()); file.CloseFile(); } return err; } +/** Write parameters to data file. */ +int DataIO_Std::WriteParameters(CpptrajFile& file, DataSetList const& Sets) const { + if (Sets.size() == 1) { + DataSet_Parameters const& prm = static_cast( *(Sets[0]) ); + prm.Print(file); + } else if (Sets.size() > 1) { + // Create a combined parameter set + ParameterSet prm; + for (DataSetList::const_iterator it = Sets.begin(); it != Sets.end(); ++it) + { + if ((*it)->Type() == DataSet::PARAMETERS) { + DataSet_Parameters const& param = static_cast( *(*it) ); + ParameterSet::UpdateCount UC; + prm.UpdateParamSet( param, UC, debug_ ); + } else { + mprintf("Warning: Set '%s' is not a parameter set, skipping.\n", (*it)->legend()); + } + } + prm.Print(file); + } + return 0; +} + // DataIO_Std::WriteCmatrix() int DataIO_Std::WriteCmatrix(CpptrajFile& file, DataSetList const& Sets) { for (DataSetList::const_iterator ds = Sets.begin(); ds != Sets.end(); ++ds) diff --git a/src/DataIO_Std.h b/src/DataIO_Std.h index 087be23cca..74292bfe06 100644 --- a/src/DataIO_Std.h +++ b/src/DataIO_Std.h @@ -38,6 +38,7 @@ class DataIO_Std : public DataIO { int WriteData3D(CpptrajFile&, DataSetList const&); int WriteSet2D(DataSet const&, CpptrajFile&); int WriteSet3D(DataSet const&, CpptrajFile&); + int WriteParameters(CpptrajFile&, DataSetList const&) const; modeType mode_; ///< Read mode precType prec_; ///< 3d reads, data set precision diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index def78e59b9..94b4bc1b36 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -15,9 +15,16 @@ size_t ParameterSet::DataSize() const { (hydrophilicAtomTypes_.size() * NameType::DataSize())); } +/** Write parameters out to file with given name. */ void ParameterSet::Debug(const char* fnameIn) const { CpptrajFile Out; Out.OpenWrite( fnameIn ); + Print( Out ); + Out.CloseFile(); +} + +/** Write parameters out to given file. */ +void ParameterSet::Print(CpptrajFile& Out) const { if (!name_.empty()) Out.Printf("Parameter set: %s\n", ParamSetName().c_str()); if (!NBname_.empty()) diff --git a/src/ParameterSet.h b/src/ParameterSet.h index d842f6a8dc..d565f29868 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -3,6 +3,7 @@ #include "ParameterTypes.h" #include "ParameterHolders.h" #include "AtomType.h" +class CpptrajFile; /// Hold a set of parameters for atom types, bonds, angles, etc. class ParameterSet { public: @@ -32,9 +33,12 @@ class ParameterSet { ParmHolder const& HB() const { return HBparm_; } std::string const& NbParamName() const { return NBname_; } std::string ParamSetName() const; - + /// Write parameters to file with given name void Debug(const char*) const; + /// Write parameters to stdout void Debug() const { return Debug(""); } + /// Print parameters to given file + void Print(CpptrajFile&) const; /// Used to track what parameters were updated during UpdateParams class UpdateCount { diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 347343a149..8d28b6c184 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -226,7 +226,7 @@ DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_OpenDx.o : DataIO_OpenDx.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_OpenDx.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridDbl.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Peaks.o : DataIO_Peaks.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Peaks.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Vector_Scalar.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_RemLog.o : DataIO_RemLog.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_RemLog.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_Std.o : DataIO_Std.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Std.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_Std.o : DataIO_Std.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Std.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Parameters.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_VecTraj.o : DataIO_VecTraj.cpp ActionFrameCounter.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_VecTraj.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Vector.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h DataIO_XVG.o : DataIO_XVG.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_XVG.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Xplor.o : DataIO_Xplor.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h From d860e66a4904ae31af4ab9adfe771aa426754f60 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 09:50:43 -0500 Subject: [PATCH 0097/1492] Hide more debug info --- src/AmberParamFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 579d89c24d..20eda87552 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -429,7 +429,7 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb // Off-diagonal NB modifications if (assign_offdiag(prm, Offdiag)) return 1; - prm.Debug(); // TODO debug level + if (debug_ > 0) prm.Debug(); infile.CloseFile(); return 0; @@ -489,7 +489,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, prm.SetHasLJparams( true ); } // Otherwise assume another nonbond section } else { - mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); + if (debug_ > 0) mprintf("SECTION %i change to %i\n", (int)section, (int)section + 1); section = (SectionType)((int)section + 1); } } @@ -625,7 +625,7 @@ int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, // Do off diagonal NB mods if (assign_offdiag(prm, Offdiag)) return 1; - prm.Debug(); // TODO debug level + if (debug_ > 0) prm.Debug(); infile.CloseFile(); return 0; } From b9c7d85852e0eb124f6ae95e780b8797c92bf2dd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 10:40:46 -0500 Subject: [PATCH 0098/1492] When updating dihedral, report multiplicity --- src/AmberParamFile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 20eda87552..18e7a343cf 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -192,9 +192,11 @@ const types.AddName( symbols[3] ); ParameterHolders::RetType ret = prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), true); - if (ret == ParameterHolders::UPDATED) - mprintf("Warning: Redefining dihedral type %s - %s - %s - %s\n", - *(types[0]), *(types[1]), *(types[2]), *(types[3])); + if (ret == ParameterHolders::UPDATED) { + mprintf("Warning: Redefining dihedral type %s - %s - %s - %s (PN=%g)\n", + *(types[0]), *(types[1]), *(types[2]), *(types[3]), PN); + //mprintf("DEBUG: %s\n", ptr); + } return 0; } From b59d31f50df9ae9058dda347631e326edf75b8e9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 11:09:19 -0500 Subject: [PATCH 0099/1492] Start adding frcmod read test --- test/Test_ReadAmberFF/RunTest.sh | 15 +++++++++++++++ test/Test_ReadAmberFF/frcmod.tip3pf | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 test/Test_ReadAmberFF/RunTest.sh create mode 100644 test/Test_ReadAmberFF/frcmod.tip3pf diff --git a/test/Test_ReadAmberFF/RunTest.sh b/test/Test_ReadAmberFF/RunTest.sh new file mode 100755 index 0000000000..c403f6d4ff --- /dev/null +++ b/test/Test_ReadAmberFF/RunTest.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. ../MasterTest.sh + +CleanFiles cpptraj.in tip3pf.parm.dat + +INPUT='-i cpptraj.in' + +cat > cpptraj.in < Date: Tue, 21 Nov 2023 11:12:10 -0500 Subject: [PATCH 0100/1492] Ensure we skip leading whitespace --- src/AmberParamFile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 18e7a343cf..1663fad019 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -383,6 +383,8 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb SectionType section = UNKNOWN; ptr = infile.Line(); while (ptr != 0) { + // Advance to first non-space char + while (*ptr == ' ' && *ptr != '\0') ++ptr; // Is this a recognized section keyword? if (*ptr != '\0') { std::string line(ptr); From 08aaf110eee6ccf1f061ee5cb8c55cb025c673c9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 11:12:40 -0500 Subject: [PATCH 0101/1492] Add frcmod read test save --- test/Test_ReadAmberFF/RunTest.sh | 1 + test/Test_ReadAmberFF/tip3pf.parm.dat.save | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 test/Test_ReadAmberFF/tip3pf.parm.dat.save diff --git a/test/Test_ReadAmberFF/RunTest.sh b/test/Test_ReadAmberFF/RunTest.sh index c403f6d4ff..951aaa5680 100755 --- a/test/Test_ReadAmberFF/RunTest.sh +++ b/test/Test_ReadAmberFF/RunTest.sh @@ -11,5 +11,6 @@ readdata frcmod.tip3pf as frcmod name PARM writedata tip3pf.parm.dat PARM EOF RunCpptraj "Test read Amber force modification file." +DoTest tip3pf.parm.dat.save tip3pf.parm.dat EndTest diff --git a/test/Test_ReadAmberFF/tip3pf.parm.dat.save b/test/Test_ReadAmberFF/tip3pf.parm.dat.save new file mode 100644 index 0000000000..caf195f526 --- /dev/null +++ b/test/Test_ReadAmberFF/tip3pf.parm.dat.save @@ -0,0 +1,9 @@ +Parameter set: This is TIP3P (model F) of Price and Brooks, JCP 121:10096, 2004 +Atom Types: + Name TypeIdx Radius Depth Mass Polar. + OW 0 1.7926 0.0980 16.0000 0.0000 + HW 1 0.0000 0.0000 1.0080 0.0000 +Bond parameters: + Type1 Type2 : Rk Req + OW HW : 553.0000 0.9572 + HW HW : 553.0000 1.5136 From fc22746d6c82301a92a624db925241955ce55e20 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 21 Nov 2023 11:17:50 -0500 Subject: [PATCH 0102/1492] Add read amber FF file --- test/Test_ReadAmberFF/RunTest.sh | 8 +- test/Test_ReadAmberFF/toyrna.parm.dat.save | 137 +++++++++++++++++++++ 2 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 test/Test_ReadAmberFF/toyrna.parm.dat.save diff --git a/test/Test_ReadAmberFF/RunTest.sh b/test/Test_ReadAmberFF/RunTest.sh index 951aaa5680..b75a167ece 100755 --- a/test/Test_ReadAmberFF/RunTest.sh +++ b/test/Test_ReadAmberFF/RunTest.sh @@ -2,15 +2,19 @@ . ../MasterTest.sh -CleanFiles cpptraj.in tip3pf.parm.dat +CleanFiles cpptraj.in tip3pf.parm.dat toyrna.parm.dat INPUT='-i cpptraj.in' cat > cpptraj.in < Date: Tue, 21 Nov 2023 11:20:52 -0500 Subject: [PATCH 0103/1492] Add combo test --- test/Test_ReadAmberFF/RunTest.sh | 11 +- .../toyrna.tip3pf.parm.dat.save | 141 ++++++++++++++++++ 2 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 test/Test_ReadAmberFF/toyrna.tip3pf.parm.dat.save diff --git a/test/Test_ReadAmberFF/RunTest.sh b/test/Test_ReadAmberFF/RunTest.sh index b75a167ece..67bc7b4045 100755 --- a/test/Test_ReadAmberFF/RunTest.sh +++ b/test/Test_ReadAmberFF/RunTest.sh @@ -2,19 +2,24 @@ . ../MasterTest.sh -CleanFiles cpptraj.in tip3pf.parm.dat toyrna.parm.dat +CleanFiles cpptraj.in tip3pf.parm.dat toyrna.parm.dat toyrna.tip3pf.parm.dat INPUT='-i cpptraj.in' cat > cpptraj.in < Date: Tue, 28 Nov 2023 14:40:34 -0500 Subject: [PATCH 0104/1492] Start GenerateAngles --- src/Structure/CMakeLists.txt | 1 + src/Structure/GenerateAngles.cpp | 29 +++++++++++++++++++++++++++++ src/Structure/GenerateAngles.h | 10 ++++++++++ src/Structure/structuredepend | 1 + src/Structure/structurefiles | 1 + 5 files changed, 42 insertions(+) create mode 100644 src/Structure/GenerateAngles.cpp create mode 100644 src/Structure/GenerateAngles.h diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index 88701e311c..c88fecfe3f 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -5,6 +5,7 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp + ${CMAKE_CURRENT_LIST_DIR}/GenerateAngles.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp ${CMAKE_CURRENT_LIST_DIR}/Model.cpp diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp new file mode 100644 index 0000000000..94c0dbcc20 --- /dev/null +++ b/src/Structure/GenerateAngles.cpp @@ -0,0 +1,29 @@ +#include "GenerateAngles.h" +#include "../CpptrajStdio.h" +#include "../ParameterTypes.h" +#include "../Topology.h" +#include // std::sort + +int Cpptraj::Structure::GenerateAngles(Topology& topIn) { + if (topIn.Nbonds() < 1) { + mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); + return 0; + } + // Create a combined bonds array + BondArray allBonds; + allBonds.reserve(topIn.Nbonds()); + + for (BondArray::const_iterator it = topIn.Bonds().begin(); it != topIn.Bonds().end(); ++it) + allBonds.push_back( *it ); + for (BondArray::const_iterator it = topIn.BondsH().begin(); it != topIn.BondsH().end(); ++it) + allBonds.push_back( *it ); + std::sort( allBonds.begin(), allBonds.end() ); + + mprintf("DEBUG: Sorted bonds:\n"); + for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) + mprintf("\t%s - %s\n", + topIn.AtomMaskName(it->A1()).c_str(), + topIn.AtomMaskName(it->A2()).c_str()); + + return 0; +} diff --git a/src/Structure/GenerateAngles.h b/src/Structure/GenerateAngles.h new file mode 100644 index 0000000000..b3e1c141c2 --- /dev/null +++ b/src/Structure/GenerateAngles.h @@ -0,0 +1,10 @@ +#ifndef INC_STRUCTURE_GENERATEANGLES_H +#define INC_STRUCTURE_GENERATEANGLES_H +class Topology; +namespace Cpptraj { +namespace Structure { +/// Generate angles from bonds in a Topology +int GenerateAngles(Topology&); +} +} +#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 786f57a3d6..bd21185aeb 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -3,6 +3,7 @@ Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Co Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h +GenerateAngles.o : GenerateAngles.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateAngles.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 0a0a55cc57..a6449d535b 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -5,6 +5,7 @@ STRUCTURE_SOURCES= \ Disulfide.cpp \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ + GenerateAngles.cpp \ HisProt.cpp \ InternalCoords.cpp \ Model.cpp \ From c196851dbbdb53dde026cf8ae56c30926c6fecee Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 28 Nov 2023 14:41:31 -0500 Subject: [PATCH 0105/1492] Update depends --- src/cpptrajdepend | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 8d28b6c184..4759c572ca 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -444,6 +444,7 @@ Structure/Chirality.o : Structure/Chirality.cpp Atom.h AtomMask.h AtomType.h Box Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/GenerateAngles.o : Structure/GenerateAngles.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h From 7dcc62f33708661f77f733eca87e38b0c3cf790e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 28 Nov 2023 14:55:12 -0500 Subject: [PATCH 0106/1492] Enumerate angles, ignoring doubles --- src/Structure/GenerateAngles.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 94c0dbcc20..7d0e0c6607 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -4,6 +4,21 @@ #include "../Topology.h" #include // std::sort +static inline void enumerateAngles(int at1, int at2, Topology const& topIn) { + Atom const& A2 = topIn[at2]; + if (A2.Nbonds() > 1) { + for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) + { + if (*bat != at1 && at1 < *bat) { + mprintf("%s - %s - %s\n", + topIn.AtomMaskName(at1).c_str(), + topIn.AtomMaskName(at2).c_str(), + topIn.AtomMaskName(*bat).c_str()); + } + } + } +} + int Cpptraj::Structure::GenerateAngles(Topology& topIn) { if (topIn.Nbonds() < 1) { mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); @@ -25,5 +40,15 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { topIn.AtomMaskName(it->A1()).c_str(), topIn.AtomMaskName(it->A2()).c_str()); + // Angles + AngleArray angles; + AngleArray anglesH; + for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) + { + // Forward direction. A1-A2-X + enumerateAngles( it->A1(), it->A2(), topIn ); + // Reverse direction. A2-A1-X + enumerateAngles( it->A2(), it->A1(), topIn ); + } return 0; } From b4aec9f01caea49262af4dbf9bf2a0dba7924a3f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 28 Nov 2023 15:23:17 -0500 Subject: [PATCH 0107/1492] Add dihedral enumeration --- src/Structure/GenerateAngles.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 7d0e0c6607..246537ae25 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -19,6 +19,30 @@ static inline void enumerateAngles(int at1, int at2, Topology const& topIn) { } } +static inline void enumerateDihedrals(int at1, int at2, Topology const& topIn) { + Atom const& A1 = topIn[at1]; + Atom const& A2 = topIn[at2]; + if (A1.Nbonds() > 1 && A2.Nbonds() > 1) { + for (Atom::bond_iterator bat1 = A1.bondbegin(); bat1 != A1.bondend(); ++bat1) + { + if (*bat1 != at2) { + for (Atom::bond_iterator bat2 = A2.bondbegin(); bat2 != A2.bondend(); ++bat2) + { + if (*bat2 != at1) { + mprintf("%s - %s - %s - %s\n", + topIn.AtomMaskName(*bat1).c_str(), + topIn.AtomMaskName(at1).c_str(), + topIn.AtomMaskName(at2).c_str(), + topIn.AtomMaskName(*bat2).c_str()); + } + } + } + } + } +} + + + int Cpptraj::Structure::GenerateAngles(Topology& topIn) { if (topIn.Nbonds() < 1) { mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); @@ -49,6 +73,8 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { enumerateAngles( it->A1(), it->A2(), topIn ); // Reverse direction. A2-A1-X enumerateAngles( it->A2(), it->A1(), topIn ); + // Dihedrals + enumerateDihedrals( it->A1(), it->A2(), topIn ); } return 0; } From 186cb89cd8ac92cc2f32736576c20ef600f19bd0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 29 Nov 2023 15:01:07 -0500 Subject: [PATCH 0108/1492] Generate angles during sequence --- src/Exec_Sequence.cpp | 9 +++++++++ src/cpptrajdepend | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 63a69b2bf1..89fe0f823d 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "AssociatedData_Connect.h" #include "Structure/Builder.h" +#include "Structure/GenerateAngles.h" /** Generate and build the specified sequence. */ int Exec_Sequence::generate_sequence(DataSet_Coords* OUT, @@ -114,6 +115,14 @@ const } } + // Generate angles and dihedrals + if (combinedTop.Nbonds() > 0) { + if (Cpptraj::Structure::GenerateAngles(combinedTop)) { + mprinterr("Error: Angle generation failed.\n"); + return 1; + } + } + OUT->CoordsSetup(combinedTop, CombinedFrame.CoordsInfo()); OUT->AddFrame( CombinedFrame ); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 4759c572ca..fe1b3bb225 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -330,7 +330,7 @@ Exec_ReadInput.o : Exec_ReadInput.cpp Action.h ActionList.h ActionState.h Analys Exec_RotateDihedral.o : Exec_RotateDihedral.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DihedralSearch.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RotateDihedral.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_RunAnalysis.o : Exec_RunAnalysis.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RunAnalysis.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ScaleDihedralK.o : Exec_ScaleDihedralK.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ScaleDihedralK.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_SequenceAlign.o : Exec_SequenceAlign.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_SequenceAlign.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Set.o : Exec_Set.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Set.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Show.o : Exec_Show.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Show.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From 97e2969f00040163221f79015029553a6afc942e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 29 Nov 2023 16:08:30 -0500 Subject: [PATCH 0109/1492] Actually add dihedrals and angles --- src/Structure/GenerateAngles.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 246537ae25..838fabfbeb 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -4,12 +4,13 @@ #include "../Topology.h" #include // std::sort -static inline void enumerateAngles(int at1, int at2, Topology const& topIn) { +static inline void enumerateAngles(int at1, int at2, Topology& topIn) { Atom const& A2 = topIn[at2]; if (A2.Nbonds() > 1) { for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) { if (*bat != at1 && at1 < *bat) { + topIn.AddAngle(at1, at2, *bat); mprintf("%s - %s - %s\n", topIn.AtomMaskName(at1).c_str(), topIn.AtomMaskName(at2).c_str(), @@ -19,7 +20,7 @@ static inline void enumerateAngles(int at1, int at2, Topology const& topIn) { } } -static inline void enumerateDihedrals(int at1, int at2, Topology const& topIn) { +static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { Atom const& A1 = topIn[at1]; Atom const& A2 = topIn[at2]; if (A1.Nbonds() > 1 && A2.Nbonds() > 1) { @@ -29,6 +30,7 @@ static inline void enumerateDihedrals(int at1, int at2, Topology const& topIn) { for (Atom::bond_iterator bat2 = A2.bondbegin(); bat2 != A2.bondend(); ++bat2) { if (*bat2 != at1) { + topIn.AddDihedral(*bat1, at1, at2, *bat2); mprintf("%s - %s - %s - %s\n", topIn.AtomMaskName(*bat1).c_str(), topIn.AtomMaskName(at1).c_str(), @@ -48,6 +50,14 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); return 0; } + if (topIn.Nangles() > 0) { + mprintf("Warning: Topology '%s' already has angle information.\n", topIn.c_str()); + return 0; + } + if (topIn.Ndihedrals() > 0) { + mprintf("Warning: Topology '%s' already has dihedral information.\n", topIn.c_str()); + return 0; + } // Create a combined bonds array BondArray allBonds; allBonds.reserve(topIn.Nbonds()); From dd5b97ceae3bd5529f958fa04b4997aa0a411414 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 4 Dec 2023 15:31:55 -0500 Subject: [PATCH 0110/1492] Start the build command --- src/Command.cpp | 2 ++ src/Exec_Build.cpp | 45 ++++++++++++++++++++++++++++++++ src/Exec_Build.h | 12 +++++++++ src/Structure/GenerateAngles.cpp | 27 ++++++++++++------- src/cpptrajdepend | 3 ++- src/cpptrajfiles | 1 + 6 files changed, 79 insertions(+), 11 deletions(-) create mode 100644 src/Exec_Build.cpp create mode 100644 src/Exec_Build.h diff --git a/src/Command.cpp b/src/Command.cpp index e098f8c9bd..4b3e12aed2 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -58,6 +58,7 @@ #include "Exec_ExtendedComparison.h" #include "Exec_Zmatrix.h" #include "Exec_Sequence.h" +#include "Exec_Build.h" // ----- TRAJECTORY ------------------------------------------------------------ #include "Exec_Traj.h" // ----- TOPOLOGY -------------------------------------------------------------- @@ -268,6 +269,7 @@ void Command::Init() { // SYSTEM Command::AddCmd( new Exec_System(), Cmd::EXE, 6, "gnuplot", "head", "less", "ls", "pwd", "xmgrace" ); // COORDS + Command::AddCmd( new Exec_Build(), Cmd::EXE, 1, "build" ); Command::AddCmd( new Exec_CatCrd(), Cmd::EXE, 1, "catcrd" ); Command::AddCmd( new Exec_CombineCoords(), Cmd::EXE, 1, "combinecrd" ); Command::AddCmd( new Exec_CrdAction(), Cmd::EXE, 1, "crdaction" ); diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp new file mode 100644 index 0000000000..cfb1ef171e --- /dev/null +++ b/src/Exec_Build.cpp @@ -0,0 +1,45 @@ +#include "Exec_Build.h" +#include "CpptrajStdio.h" +#include "Structure/GenerateAngles.h" + +// Exec_Build::Help() +void Exec_Build::Help() const +{ + mprintf("\tcrdset [frame <#>]\n"); +} + +// Exec_Build::Execute() +Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) +{ + // Get input coords + std::string crdset = argIn.GetStringKey("crdset"); + if (crdset.empty()) { + mprinterr("Error: Must specify input COORDS set with 'crdset'\n"); + return CpptrajState::ERR; + } + DataSet* ds = State.DSL().FindSetOfGroup( crdset, DataSet::COORDINATES ); + if (ds == 0) { + mprinterr("Error: No COORDS set found matching %s\n", crdset.c_str()); + return CpptrajState::ERR; + } + DataSet_Coords& coords = static_cast( *((DataSet_Coords*)ds) ); + // Get frame from input coords + int tgtframe = argIn.getKeyInt("frame", 1) - 1; + mprintf("\tUsing frame %i from COORDS set %s\n", tgtframe+1, coords.legend()); + if (tgtframe < 0 || tgtframe >= (int)coords.Size()) { + mprinterr("Error: Frame is out of range.\n"); + return CpptrajState::ERR; + } + Frame frameIn = coords.AllocateFrame(); + coords.GetFrame(tgtframe, frameIn); + // Get modifiable topology + Topology& topIn = *(coords.TopPtr()); + + // Generate angles + if (Cpptraj::Structure::GenerateAngles(topIn)) { + mprinterr("Error: Could not generate angles/dihedrals for '%s'\n", topIn.c_str()); + return CpptrajState::ERR; + } + + return CpptrajState::OK; +} diff --git a/src/Exec_Build.h b/src/Exec_Build.h new file mode 100644 index 0000000000..9225f7e3bf --- /dev/null +++ b/src/Exec_Build.h @@ -0,0 +1,12 @@ +#ifndef INC_EXEC_BUILD_H +#define INC_EXEC_BUILD_H +#include "Exec.h" +/// Used to build a structure +class Exec_Build : public Exec { + public: + Exec_Build() : Exec(GENERAL) {} + void Help() const; + DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Build(); } + RetType Execute(CpptrajState&, ArgList&); +}; +#endif diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 838fabfbeb..61fabb25bf 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -50,14 +50,17 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); return 0; } - if (topIn.Nangles() > 0) { + bool has_angles = topIn.Nangles() > 0; + if (has_angles) { mprintf("Warning: Topology '%s' already has angle information.\n", topIn.c_str()); - return 0; + //return 0; } - if (topIn.Ndihedrals() > 0) { + bool has_dihedrals = topIn.Ndihedrals() > 0; + if (has_dihedrals) { mprintf("Warning: Topology '%s' already has dihedral information.\n", topIn.c_str()); - return 0; + //return 0; } + if (has_angles && has_dihedrals) return 0; // Create a combined bonds array BondArray allBonds; allBonds.reserve(topIn.Nbonds()); @@ -79,12 +82,16 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { AngleArray anglesH; for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) { - // Forward direction. A1-A2-X - enumerateAngles( it->A1(), it->A2(), topIn ); - // Reverse direction. A2-A1-X - enumerateAngles( it->A2(), it->A1(), topIn ); - // Dihedrals - enumerateDihedrals( it->A1(), it->A2(), topIn ); + if (!has_angles) { + // Forward direction. A1-A2-X + enumerateAngles( it->A1(), it->A2(), topIn ); + // Reverse direction. A2-A1-X + enumerateAngles( it->A2(), it->A1(), topIn ); + } + if (!has_dihedrals) { + // Dihedrals + enumerateDihedrals( it->A1(), it->A2(), topIn ); + } } return 0; } diff --git a/src/cpptrajdepend b/src/cpptrajdepend index fe1b3bb225..e736d60b26 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -187,7 +187,7 @@ ClusterMap.o : ClusterMap.cpp AssociatedData.h ClusterMap.h Constants.h CpptrajF Cmd.o : Cmd.cpp Cmd.h DispatchObject.h CmdInput.o : CmdInput.cpp CmdInput.h StringRoutines.h CmdList.o : CmdList.cpp Cmd.h CmdList.h DispatchObject.h -Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h ActionTopWriter.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_AvgBox.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_Keep.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiPucker.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_ToroidalDiffusion.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_CalcDiffusion.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_TICA.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BoxArgs.h BufferedLine.h CharMask.h Cluster/Algorithm.h Cluster/BestReps.h Cluster/CentroidArray.h Cluster/Cframes.h Cluster/Control.h Cluster/DrawGraph.h Cluster/List.h Cluster/Metric.h Cluster/MetricArray.h Cluster/Node.h Cluster/Sieve.h Cluster/Silhouette.h ClusterMap.h Cmd.h CmdInput.h CmdList.h Command.h CompactFrameArray.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DiffusionResults.h DihedralSearch.h Dimension.h DispatchObject.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Ewald.h EwaldOptions.h Ewald_ParticleMesh.h ExclusionArray.h Exec.h Exec_AddMissingRes.h Exec_Analyze.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareClusters.h Exec_CompareEnergy.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CrdTransform.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_Emin.h Exec_ExtendedComparison.h Exec_Flatten.h Exec_GenerateAmberRst.h Exec_Graft.h Exec_Help.h Exec_HmassRepartition.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_ParseTiming.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrepareForLeap.h Exec_PrintData.h Exec_Random.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_Sequence.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h Exec_Zmatrix.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h GIST_PME.h Grid.h GridAction.h GridBin.h GridMover.h HistBin.h Hungarian.h ImageOption.h ImageTypes.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Pucker.h Pucker_PuckerMask.h Pucker_PuckerSearch.h Pucker_PuckerToken.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h SplineFxnTable.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/GistCudaSetup.cuh helpme_standalone.h molsurf.h +Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h ActionTopWriter.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_AvgBox.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_Keep.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiPucker.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_ToroidalDiffusion.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_CalcDiffusion.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_TICA.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BoxArgs.h BufferedLine.h CharMask.h Cluster/Algorithm.h Cluster/BestReps.h Cluster/CentroidArray.h Cluster/Cframes.h Cluster/Control.h Cluster/DrawGraph.h Cluster/List.h Cluster/Metric.h Cluster/MetricArray.h Cluster/Node.h Cluster/Sieve.h Cluster/Silhouette.h ClusterMap.h Cmd.h CmdInput.h CmdList.h Command.h CompactFrameArray.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DiffusionResults.h DihedralSearch.h Dimension.h DispatchObject.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Ewald.h EwaldOptions.h Ewald_ParticleMesh.h ExclusionArray.h Exec.h Exec_AddMissingRes.h Exec_Analyze.h Exec_Build.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareClusters.h Exec_CompareEnergy.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CrdTransform.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_Emin.h Exec_ExtendedComparison.h Exec_Flatten.h Exec_GenerateAmberRst.h Exec_Graft.h Exec_Help.h Exec_HmassRepartition.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_ParseTiming.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrepareForLeap.h Exec_PrintData.h Exec_Random.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_Sequence.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h Exec_Zmatrix.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h GIST_PME.h Grid.h GridAction.h GridBin.h GridMover.h HistBin.h Hungarian.h ImageOption.h ImageTypes.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Pucker.h Pucker_PuckerMask.h Pucker_PuckerSearch.h Pucker_PuckerToken.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h SplineFxnTable.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/GistCudaSetup.cuh helpme_standalone.h molsurf.h CompactFrameArray.o : CompactFrameArray.cpp Box.h CompactFrameArray.h CoordinateInfo.h CpptrajStdio.h Matrix_3x3.h Parallel.h ReplicaDimArray.h Vec3.h ComplexArray.o : ComplexArray.cpp ArrayIterator.h ComplexArray.h Constraints.o : Constraints.cpp ArgList.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h Constraints.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -288,6 +288,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index a8a487d7b1..7bcfb827aa 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -258,6 +258,7 @@ COMMON_SOURCES= \ ExclusionArray.cpp \ Exec_AddMissingRes.cpp \ Exec_Analyze.cpp \ + Exec_Build.cpp \ Exec_Calc.cpp \ Exec_CatCrd.cpp \ Exec_Change.cpp \ From 0d2c6cca5f5abdd733867521b5b9fd18bd67aafb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 11:33:08 -0500 Subject: [PATCH 0111/1492] Get parameter set(s) to use --- src/Exec_Build.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++++-- src/cpptrajdepend | 2 +- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index cfb1ef171e..0bdbd065cf 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -1,11 +1,12 @@ #include "Exec_Build.h" #include "CpptrajStdio.h" +#include "DataSet_Parameters.h" #include "Structure/GenerateAngles.h" // Exec_Build::Help() void Exec_Build::Help() const { - mprintf("\tcrdset [frame <#>]\n"); + mprintf("\tcrdset [frame <#>] [parmset ...]\n"); } // Exec_Build::Execute() @@ -35,11 +36,59 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) // Get modifiable topology Topology& topIn = *(coords.TopPtr()); - // Generate angles + // Fill in atoms with templates + + // Generate angles/dihedrals if (Cpptraj::Structure::GenerateAngles(topIn)) { mprinterr("Error: Could not generate angles/dihedrals for '%s'\n", topIn.c_str()); return CpptrajState::ERR; } + // Get parameter sets. + typedef std::vector Parray; + Parray ParamSets; + std::string parmset = argIn.GetStringKey("parmset"); + if (parmset.empty()) { + mprintf("\tNo parameter set(s) specified with 'parmset'; using any loaded sets.\n"); + // See if there are any parameter sets. + DataSetList sets = State.DSL().GetSetsOfType( "*", DataSet::PARAMETERS ); + for (DataSetList::const_iterator it = sets.begin(); it != sets.end(); ++it) + ParamSets.push_back( (DataSet_Parameters*)(*it) ); + } else { + while (!parmset.empty()) { + DataSetList sets = State.DSL().GetSetsOfType( parmset, DataSet::PARAMETERS ); + if (sets.empty()) { + mprintf("Warning: No parameter sets corresponding to '%s'\n", parmset.c_str()); + } else { + for (DataSetList::const_iterator it = sets.begin(); it != sets.end(); ++it) + ParamSets.push_back( (DataSet_Parameters*)(*it) ); + } + parmset = argIn.GetStringKey("parmset"); + } + } + if (ParamSets.empty()) { + mprinterr("Error: No parameter sets.\n"); + return CpptrajState::ERR; + } + mprintf("\tParameter sets:\n"); + for (Parray::const_iterator it = ParamSets.begin(); it != ParamSets.end(); ++it) + mprintf("\t %s\n", (*it)->legend()); + + // Combine parameters if needed + DataSet_Parameters* mainParmSet = 0; + bool free_parmset_mem = false; + if (ParamSets.size() == 1) + mainParmSet = ParamSets.front(); + else { + free_parmset_mem = true; + mainParmSet = new DataSet_Parameters(); + mprintf("\tCombining parameter sets.\n"); + ParameterSet::UpdateCount UC; + for (Parray::const_iterator it = ParamSets.begin(); it != ParamSets.end(); ++it) + mainParmSet->UpdateParamSet( *(*it), UC, State.Debug() ); + } + + if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; + return CpptrajState::OK; } diff --git a/src/cpptrajdepend b/src/cpptrajdepend index e736d60b26..1b0de8cf2f 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -288,7 +288,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From db09b5f10bf7e3e35757657a15ce3a67e2c35b11 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 11:37:49 -0500 Subject: [PATCH 0112/1492] Actually update the parameters. Not yet matching leap for angles --- src/Exec_Build.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 0bdbd065cf..56684e8f84 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -88,7 +88,14 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mainParmSet->UpdateParamSet( *(*it), UC, State.Debug() ); } + // Update parameters + Exec::RetType ret = CpptrajState::OK; + if ( topIn.UpdateParams( *mainParmSet ) ) { + mprinterr("Error: Could not update parameters for '%s'.\n", topIn.c_str()); + ret = CpptrajState::ERR; + } + if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; - return CpptrajState::OK; + return ret; } From e9b84b2f73293a3980f240240ef9cf72d82ed7eb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 12:21:21 -0500 Subject: [PATCH 0113/1492] Angle equilibrium value should be internally in radians --- src/AmberParamFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 1663fad019..7cd39078ca 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -5,6 +5,7 @@ #include "ParameterHolders.h" #include "StringRoutines.h" #include "ParameterSet.h" +#include "Constants.h" #include // sscanf const int AmberParamFile::MAXSYMLEN = 16; @@ -148,7 +149,7 @@ const types.AddName( symbols[0] ); types.AddName( symbols[1] ); types.AddName( symbols[2] ); - ParameterHolders::RetType ret = prm.AP().AddParm(types, AngleParmType(TK, TEQ), true); + ParameterHolders::RetType ret = prm.AP().AddParm(types, AngleParmType(TK, TEQ*Constants::DEGRAD), true); if (ret == ParameterHolders::UPDATED) mprintf("Warning: Redefining angle type %s - %s - %s\n", *(types[0]), *(types[1]), *(types[2])); From 18bcda9fda2deba839afc233a3c638f195b32551 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 12:21:45 -0500 Subject: [PATCH 0114/1492] Add notes about angle param units --- src/ParameterTypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 4908d653eb..6980b48209 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -101,8 +101,8 @@ class AngleParmType { return false; } private: - double tk_; - double teq_; + double tk_; ///< Angle force constant in kcal/mol*rad^2 + double teq_; ///< Angle equilibirum value in rad }; typedef std::vector AngleParmArray; /// Hold angle atom indices and parameter index From 0994987cb4265554a339bb53dda169765e4ae888 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 12:27:07 -0500 Subject: [PATCH 0115/1492] When combining param sets, just make a copy of the first --- src/Exec_Build.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 56684e8f84..3922c89c79 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -81,10 +81,12 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mainParmSet = ParamSets.front(); else { free_parmset_mem = true; - mainParmSet = new DataSet_Parameters(); mprintf("\tCombining parameter sets.\n"); + Parray::const_iterator it = ParamSets.begin(); + mainParmSet = new DataSet_Parameters( *(*it) ); + ++it; ParameterSet::UpdateCount UC; - for (Parray::const_iterator it = ParamSets.begin(); it != ParamSets.end(); ++it) + for (; it != ParamSets.end(); ++it) mainParmSet->UpdateParamSet( *(*it), UC, State.Debug() ); } From c79c80c3cf915b82db6fa7c3578f4e20c488c870 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 12:44:19 -0500 Subject: [PATCH 0116/1492] Ensure mass/polarizability are updated --- src/Topology.cpp | 22 ++++++++++++++++++++++ src/Topology.h | 1 + 2 files changed, 23 insertions(+) diff --git a/src/Topology.cpp b/src/Topology.cpp index be832190aa..f683dba573 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2564,6 +2564,24 @@ void AssignParm(std::vector const& atoms, } }*/ +/** Set parameters for atoms via given atom type parameter holder. */ +void Topology::AssignAtomTypeParm(ParmHolder const& newAtomTypeParams) +{ + for (unsigned int iat = 0; iat != atoms_.size(); iat++) + { + bool found; + TypeNameHolder atype( atoms_[iat].Type() ); + AtomType at = newAtomTypeParams.FindParam( atype, found ); + if (found) { + // Update mass + atoms_[iat].SetMass( at.Mass() ); + // Update polarizability + atoms_[iat].SetPolar( at.Polarizability() ); + } else + mprintf("Warning: Atom type parameter not found for %s\n", *atype[0]); + } +} + /** Set parameters for bonds in given bond array. */ void Topology::AssignBondParm(ParmHolder const& newBondParams, ParmHolder& currentIndices, @@ -2960,6 +2978,10 @@ int Topology::UpdateParams(ParameterSet const& set1) { } // Atom types updateCount = UpdateParameters< ParmHolder >(set0.AT(), set1.AT(), "atom type"); + if (updateCount > 0) { + mprintf("\tRegenerating atom type parameters.\n"); + AssignAtomTypeParm( set0.AT() ); + } updateCount += UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); if (updateCount > 0) { mprintf("\tRegenerating nonbond parameters.\n"); diff --git a/src/Topology.h b/src/Topology.h index 805698a1f8..410c21e2ea 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -284,6 +284,7 @@ class Topology { inline void AddAngleArray(AngleArray const&, AngleParmArray const&, int); inline void AddDihArray(DihedralArray const&, DihedralParmArray const&, int); + void AssignAtomTypeParm(ParmHolder const&); void AssignBondParm(ParmHolder const&, ParmHolder&, BondArray&, BondParmArray&, const char*); void AssignAngleParm(ParmHolder const&, ParmHolder&, AngleArray&); void AssignImproperParm(ParmHolder const&, ParmHolder&, DihedralArray&); From 1d5823c3b98e1d4ee04232c0529cb7899ae0b09f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 12:53:13 -0500 Subject: [PATCH 0117/1492] Using the update in ParameterSet --- src/Topology.cpp | 39 +++++++++++++++++++++++---------------- src/cpptrajdepend | 2 +- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index f683dba573..6f272ebe98 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -8,7 +8,6 @@ #include "AtomType.h" #include "AtomMask.h" #include "CharMask.h" -#include "UpdateParameters.h" const NonbondType Topology::LJ_EMPTY = NonbondType(); @@ -2944,49 +2943,57 @@ int Topology::UpdateParams(ParameterSet const& set1) { mprintf("DEBUG: Saving original parameters in originalp.dat, new parameters in newp.dat\n"); set0.Debug("originalp.dat"); } + // Update existing parameters with new parameters + ParameterSet::UpdateCount UC; + if (set0.UpdateParamSet( set1, UC, debug_ )) { + mprinterr("Error: Could not merge topology '%s' parameters with '%s' parameters.\n", + c_str(), set1.ParamSetName().c_str()); + return 1; + } - unsigned int updateCount; +// unsigned int updateCount; // Bond parameters - updateCount = UpdateParameters< ParmHolder >(set0.BP(), set1.BP(), "bond"); - if (updateCount > 0) { +// updateCount = UpdateParameters< ParmHolder >(set0.BP(), set1.BP(), "bond"); + if (UC.nBondsUpdated_ > 0) { mprintf("\tRegenerating bond parameters.\n"); AssignBondParams( set0.BP() ); } // Angle parameters - updateCount = UpdateParameters< ParmHolder >(set0.AP(), set1.AP(), "angle"); - if (updateCount > 0) { +// updateCount = UpdateParameters< ParmHolder >(set0.AP(), set1.AP(), "angle"); + if (UC.nAnglesUpdated_ > 0) { mprintf("\tRegenerating angle parameters.\n"); AssignAngleParams( set0.AP() ); } // Dihedral parameters - updateCount = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral"); - if (updateCount > 0) { +// updateCount = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral"); + if (UC.nDihedralsUpdated_ > 0) { mprintf("\tRegenerating dihedral parameters.\n"); AssignDihedralParams( set0.DP() ); } // Urey-Bradley - updateCount = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley"); - if (updateCount > 0) { +// updateCount = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley"); + if (UC.nUreyBradleyUpdated_ > 0) { mprintf("\tRegenerating UB parameters.\n"); AssignUBParams( set0.UB() ); } // Improper parameters - updateCount = UpdateParameters< ParmHolder >(set0.IP(), set1.IP(), "improper"); - if (updateCount > 0) { +// updateCount = UpdateParameters< ParmHolder >(set0.IP(), set1.IP(), "improper"); + if (UC.nImpropersUpdated_ > 0) { mprintf("\tRegenerating improper parameters.\n"); AssignImproperParams( set0.IP() ); } // Atom types - updateCount = UpdateParameters< ParmHolder >(set0.AT(), set1.AT(), "atom type"); - if (updateCount > 0) { +// updateCount = UpdateParameters< ParmHolder >(set0.AT(), set1.AT(), "atom type"); + if (UC.nAtomTypeUpdated_ > 0) { mprintf("\tRegenerating atom type parameters.\n"); AssignAtomTypeParm( set0.AT() ); } - updateCount += UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); - if (updateCount > 0) { +// updateCount += UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); + if (UC.nAtomTypeUpdated_ > 0) { mprintf("\tRegenerating nonbond parameters.\n"); AssignNonbondParams( set0.AT(), set0.NB() ); } + // TODO LJ14 and HB if (debug_ > 0) set0.Debug("newp.dat"); return 0; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 1b0de8cf2f..e465ed3ccb 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -464,7 +464,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h UpdateParameters.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h From 9163cfbf8d1c3dfb696b81c980514b74cfd695bd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 13:04:54 -0500 Subject: [PATCH 0118/1492] change var name to be more clear --- src/Topology.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 6f272ebe98..c2581efcc8 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2807,8 +2807,8 @@ void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams) /** Replace current nonbond parameters with given nonbond parameters. */ //TODO Accept array of atom type names? void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHolder const& newNB) { - // Generate array of existing types. - ParmHolder atomTypes; + // Generate array of only the types that are currently in Topology. + ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { if (atm->Type().len() > 0) { @@ -2821,27 +2821,27 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHol mprintf("Warning: No atom type information for type '%s'\n", *types[0]); newAT = AtomType(atm->Mass()); } - atomTypes.AddParm( types, newAT, true ); + currentAtomTypes.AddParm( types, newAT, true ); } } - if (atomTypes.size() < 1) { + if (currentAtomTypes.size() < 1) { mprintf("Warning: No atom type information in %s - cannot assign nonbond parameters.\n", c_str()); return; } // Regenerate nonbond params for existing types nonbond_.Clear(); - nonbond_.SetupLJforNtypes( atomTypes.size() ); + nonbond_.SetupLJforNtypes( currentAtomTypes.size() ); int nidx1 = 0; NameIdxMapType nameIdxMap; - for (ParmHolder::const_iterator t1 = atomTypes.begin(); t1 != atomTypes.end(); ++t1, nidx1++) + for (ParmHolder::const_iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) { NameType const& name1 = t1->first[0]; //mprintf("DEBUG: Type1= %s (%i)\n", *name1, nidx1); AtomType const& type1 = t1->second; nameIdxMap.insert( std::pair(name1, nidx1) ); int nidx2 = nidx1; - for (ParmHolder::const_iterator t2 = t1; t2 != atomTypes.end(); ++t2, nidx2++) + for (ParmHolder::const_iterator t2 = t1; t2 != currentAtomTypes.end(); ++t2, nidx2++) { NameType const& name2 = t2->first[0]; //mprintf("DEBUG:\t\tType2= %s (%i)\n", *name2, nidx2); @@ -2872,7 +2872,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHol TruncResAtomNameNum( atm - atoms_.begin() ).c_str(), *(atm->Type())); } else { - if (it->second < 0 || it->second >= (int)atomTypes.size()) { + if (it->second < 0 || it->second >= (int)currentAtomTypes.size()) { mprinterr("Internal Error: Type index for %s (type %s) out of range: %i\n", TruncResAtomNameNum( atm - atoms_.begin() ).c_str(), *(atm->Type()), it->second); From 0dd77c01df01ebc8465dc5e4a216a4f8aef8c69e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 14:28:59 -0500 Subject: [PATCH 0119/1492] Start LJ 10-12 param update --- src/Parm_CharmmPsf.cpp | 2 +- src/Topology.cpp | 33 +++++++++++++++++++++------------ src/Topology.h | 3 ++- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/Parm_CharmmPsf.cpp b/src/Parm_CharmmPsf.cpp index 8abc2cffe4..0f59b32efb 100644 --- a/src/Parm_CharmmPsf.cpp +++ b/src/Parm_CharmmPsf.cpp @@ -372,7 +372,7 @@ int Parm_CharmmPsf::ReadParm(FileName const& fname, Topology &parmOut) { // Add nonbonded parameters if (params_.HasLJparams()) { - parmOut.AssignNonbondParams( atomTypes, params_.NB() ); + parmOut.AssignNonbondParams( atomTypes, params_.NB(), params_.HB() ); } return 0; diff --git a/src/Topology.cpp b/src/Topology.cpp index c2581efcc8..1ff412c8e5 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2806,8 +2806,11 @@ void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams) /** Replace current nonbond parameters with given nonbond parameters. */ //TODO Accept array of atom type names? -void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHolder const& newNB) { - // Generate array of only the types that are currently in Topology. +void Topology::AssignNonbondParams(ParmHolder const& newTypes, + ParmHolder const& newNB, + ParmHolder const& newHB) +{ + // Generate array of only the types that are currently in Topology. TODO should this be a permanent part of Topology? ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { @@ -2849,17 +2852,23 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHol TypeNameHolder types(2); types.AddName( name1 ); types.AddName( name2 ); - // See if this parameter exists in the given nonbond array. - NonbondType LJAB; - ParmHolder::const_iterator it = newNB.GetParam( types ); - if (it == newNB.end()) { - mprintf("NB parameter for %s %s not found. Generating.\n", *name1, *name2); - LJAB = type1.LJ().Combine_LB( type2.LJ() ); + // Check LJ10-12 + ParmHolder::const_iterator hb = newHB.GetParam( types ); + if (hb != newHB.end()) { + mprintf("DEBUG: LJ 10-12 parameter found for %s %s\n", *name1, *name2); } else { - mprintf("Using existing NB parameter for %s %s\n", *name1, *name2); - LJAB = it->second; + // See if this parameter exists in the given nonbond array. + NonbondType LJAB; + ParmHolder::const_iterator it = newNB.GetParam( types ); + if (it == newNB.end()) { + mprintf("NB parameter for %s %s not found. Generating.\n", *name1, *name2); + LJAB = type1.LJ().Combine_LB( type2.LJ() ); + } else { + mprintf("Using existing NB parameter for %s %s\n", *name1, *name2); + LJAB = it->second; + } + nonbond_.AddLJterm(nidx1, nidx2, LJAB); } - nonbond_.AddLJterm(nidx1, nidx2, LJAB); } } // Reset the atom type indices. @@ -2991,7 +3000,7 @@ int Topology::UpdateParams(ParameterSet const& set1) { // updateCount += UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); if (UC.nAtomTypeUpdated_ > 0) { mprintf("\tRegenerating nonbond parameters.\n"); - AssignNonbondParams( set0.AT(), set0.NB() ); + AssignNonbondParams( set0.AT(), set0.NB(), set0.HB() ); } // TODO LJ14 and HB diff --git a/src/Topology.h b/src/Topology.h index 410c21e2ea..830c36dca7 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -156,7 +156,8 @@ class Topology { double GetVDWdepth(int) const; /// \return Lennard-Jones 6-12 parameters for given pair of atoms inline NonbondType const& GetLJparam(int, int) const; - void AssignNonbondParams(ParmHolder const&, ParmHolder const&); + void AssignNonbondParams(ParmHolder const&, ParmHolder const&, + ParmHolder const&); /// \return True if any charge is non-zero bool HasChargeInfo() const; /// Redistribute charge on atoms in topology to match target total charge From 56aedb30e23e09a0e6fa0e37366eb23fe9995002 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 14:57:47 -0500 Subject: [PATCH 0120/1492] Set default SCEE and SCNB values, attempt to read if glycam --- src/AmberParamFile.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 7cd39078ca..f62d6bf329 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -181,18 +181,29 @@ const //mprintf("DEBUG: %s %s %s %s '%s'\n", symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), ptr+pos); int IDIVF; double PK, PHASE, PN; - int nscan = sscanf(ptr+pos, "%i %lf %lf %lf", &IDIVF, &PK, &PHASE, &PN); - if (nscan != 4) { + char sSCEE[128]; + char sSCNB[128]; + int nscan = sscanf(ptr+pos, "%i %lf %lf %lf %s %s", &IDIVF, &PK, &PHASE, &PN, sSCEE, sSCNB); + if (nscan < 4) { mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); return 1; } + double scee = 1.2; // AMBER DEFAULT + double scnb = 2.0; // AMBER DEFAULT + if (nscan == 6) { + // Check for SCEE/SCNB (GLYCAM) + if (sSCEE[0] == 'S' && sSCEE[1] == 'C' && sSCEE[2] == 'E' && sSCEE[3] == 'E') + sscanf( sSCEE, "SCEE=%lf", &scee); + if (sSCNB[0] == 'S' && sSCNB[1] == 'C' && sSCNB[2] == 'N' && sSCNB[3] == 'B') + sscanf( sSCNB, "SCNB=%lf", &scnb); + } TypeNameHolder types(4); types.AddName( symbols[0] ); types.AddName( symbols[1] ); types.AddName( symbols[2] ); types.AddName( symbols[3] ); ParameterHolders::RetType ret = - prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE), true); + prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE, scee, scnb), true); if (ret == ParameterHolders::UPDATED) { mprintf("Warning: Redefining dihedral type %s - %s - %s - %s (PN=%g)\n", *(types[0]), *(types[1]), *(types[2]), *(types[3]), PN); From 457ba731a3322d3356ac9d33837d32d63b1762a1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 15:26:21 -0500 Subject: [PATCH 0121/1492] Dont set # of atom types explicitly; calculate it based on the actual number of atom types. --- src/Parm_Amber.cpp | 4 ++-- src/Topology.cpp | 27 +++++++++++++++++++++++---- src/Topology.h | 5 +---- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/Parm_Amber.cpp b/src/Parm_Amber.cpp index d75ef15d83..d6f8b6bfd0 100644 --- a/src/Parm_Amber.cpp +++ b/src/Parm_Amber.cpp @@ -669,7 +669,7 @@ int Parm_Amber::ReadPointers(int Npointers, Topology& TopIn, FortranData const& TopIn.SetNonbond().SetupLJforNtypes( values_[NTYPES] ); numLJparm_ = TopIn.Nonbond().NBarray().size(); TopIn.SetNonbond().SetNHBterms( values_[NPHB] ); - TopIn.SetNatyp( values_[NATYP] ); + //TopIn.SetNatyp( values_[NATYP] ); return 0; } @@ -2088,7 +2088,7 @@ int Parm_Amber::WriteParm(FileName const& fname, Topology const& TopOut) { // SOLTY - Currently unused but must be written. if (BufferAlloc(F_SOLTY, TopOut.NatomTypes())) return 1; - for (int idx = 0; idx != TopOut.NatomTypes(); idx++) + for (unsigned int idx = 0; idx != TopOut.NatomTypes(); idx++) file_.DblToBuffer( 0.0 ); file_.FlushBuffer(); diff --git a/src/Topology.cpp b/src/Topology.cpp index 1ff412c8e5..03241605c1 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -17,8 +17,7 @@ Topology::Topology() : ipol_(0), NsolventMolecules_(0), pindex_(0), - n_extra_pts_(0), - n_atom_types_(0) + n_extra_pts_(0) { } // Topology::SetParmName() @@ -48,6 +47,28 @@ unsigned int Topology::HeavyAtomCount() const { return hac; } +/** \return Total number of unique atom types. */ +unsigned int Topology::NatomTypes() const { + ParmHolder currentAtomTypes; + for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) + { + if (atm->Type().len() > 0) { + TypeNameHolder atype( atm->Type() ); + // Find in currentAtomTypes. + bool found; + currentAtomTypes.FindParam( atype, found ); + if (!found) { + currentAtomTypes.AddParm( atype, atm->TypeIndex(), false ); + } + } + } + mprintf("DEBUG: Unique atom types in %s\n", c_str()); + for (ParmHolder::const_iterator it = currentAtomTypes.begin(); + it != currentAtomTypes.end(); ++it) + mprintf("\t\t%s %i\n", *(it->first[0]), it->second); + return currentAtomTypes.size(); +} + /** Reset all PDB-related info. * NOTE: This routine is used by AmbPDB. */ @@ -659,7 +680,6 @@ void Topology::Resize(Pointers const& pIn) { ipol_ = 0; NsolventMolecules_ = 0; n_extra_pts_ = 0; - n_atom_types_ = 0; atoms_.resize( pIn.natom_ ); residues_.resize( pIn.nres_ ); @@ -1482,7 +1502,6 @@ Topology* Topology::ModifyByMap(std::vector const& MapIn, bool setupFullPar newParm->fileName_ = fileName_; newParm->radius_set_ = radius_set_; newParm->debug_ = debug_; - newParm->n_atom_types_ = n_atom_types_; // Reverse Atom map std::vector atomMap( atoms_.size(),-1 ); diff --git a/src/Topology.h b/src/Topology.h index 830c36dca7..cd0bc88f5b 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -25,8 +25,6 @@ class Topology { void SetGBradiiSet(std::string const& s) { radius_set_ = s; } void SetParmName(std::string const&, FileName const&); void SetDistMaskRef( Frame const& ); - /// Set value of NATYP from Amber Topology. Only needed for Amber. - void SetNatyp(int n) { n_atom_types_ = n; } // ----- Return internal variables ----------- int Ipol() const { return ipol_; } int Pindex() const { return pindex_; } @@ -35,7 +33,7 @@ class Topology { int Nmol() const { return (int)molecules_.size(); } int Nsolvent() const { return NsolventMolecules_; } int NextraPts() const { return n_extra_pts_; } - inline int NatomTypes() const { return n_atom_types_; } + unsigned int NatomTypes() const; std::string const& ParmName() const { return parmName_; } FileName const& OriginalFilename() const { return fileName_; } std::string const& GBradiiSet() const { return radius_set_; } @@ -336,7 +334,6 @@ class Topology { int NsolventMolecules_; ///< Number of molecules marked SOLVENT int pindex_; ///< Internal index used to ID Topology int n_extra_pts_; ///< Number of extra points. - int n_atom_types_; ///< Number of unique atom types. }; // ----- INLINE FUNCTIONS ------------------------------------------------------ NonbondType const& Topology::GetLJparam(int a1, int a2) const { From 33aca47b062a1db718d21d6e03e27e6e9c6ea9e3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 15:33:21 -0500 Subject: [PATCH 0122/1492] Update for corrected SOLTY --- test/Test_CharmmParams/test3.parm7.save | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/Test_CharmmParams/test3.parm7.save b/test/Test_CharmmParams/test3.parm7.save index 9746a76ce0..85bd66be2f 100644 --- a/test/Test_CharmmParams/test3.parm7.save +++ b/test/Test_CharmmParams/test3.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 10/22/18 14:47:36 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/05/23 15:27:10 %FLAG CTITLE %FORMAT(a80) %FLAG POINTERS %FORMAT(10I8) 23 12 11 11 26 12 42 19 0 0 - 114 1 11 12 19 13 22 36 1 0 + 114 1 11 12 19 13 22 36 12 0 0 0 0 0 0 0 0 1 23 0 0 %FLAG FORCE_FIELD_TYPE @@ -185,7 +185,9 @@ LYS 0.00000000E+00 %FLAG SOLTY %FORMAT(5E16.8) - 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 %FLAG LENNARD_JONES_ACOEF %FORMAT(3E24.16) 1.3165904011680079E+06 6.0933367984903236E+02 3.0882604789375229E-06 From cbb6950d47c574148528763b0a419689141e1389 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 5 Dec 2023 15:35:00 -0500 Subject: [PATCH 0123/1492] Update for fixed SOLTY --- test/Test_Charmm/strip.chamber.parm7.save | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Test_Charmm/strip.chamber.parm7.save b/test/Test_Charmm/strip.chamber.parm7.save index 433bd15132..86ca2d049d 100644 --- a/test/Test_Charmm/strip.chamber.parm7.save +++ b/test/Test_Charmm/strip.chamber.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 01/19/18 10:10:48 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/05/23 15:27:09 %FLAG CTITLE %FORMAT(a80) %FLAG POINTERS %FORMAT(10I8) 16 8 8 7 17 8 22 7 0 0 - 69 1 7 8 7 9 16 17 1 0 + 69 1 7 8 7 9 16 17 8 0 0 0 0 0 0 0 0 0 16 0 0 %FLAG FORCE_FIELD_TYPE @@ -140,7 +140,8 @@ ALA 0.00000000E+00 0.00000000E+00 6.09119909E-01 %FLAG SOLTY %FORMAT(5E16.8) - 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 %FLAG LENNARD_JONES_ACOEF %FORMAT(3E24.16) 1.9136238690375928E+06 9.3273170044881190E+04 2.5215628838626608E+03 From c79154f258d0052b72845d9c51823baca380ad86 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 09:24:05 -0500 Subject: [PATCH 0124/1492] Remove unused constructor. Add Polarizability to constructor. Add function to set type index (will not deprecate after all). --- src/AtomType.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/AtomType.h b/src/AtomType.h index 13ba56aaa4..4b1d734853 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -6,33 +6,34 @@ class AtomType { public: /// CONSTRUCTOR AtomType() : mass_(0.0), polarizability_(0.0), oidx_(-1) {} - AtomType(double r, double d, int o) : lj_(r, d), mass_(0.0), polarizability_(0.0), oidx_(o) {} // TODO deprecate - /// CONSTRUCTOR - Mass, polarizability - AtomType(double m, double p) : mass_(m), polarizability_(p), oidx_(-1) {} /// CONSTRUCTOR - Mass only AtomType(double m) : mass_(m), oidx_(-1) {} - /// CONSTRUCTOR - Radius, well depth, mass - AtomType(double r, double d, double m) : lj_(r, d), mass_(m), oidx_(-1) {} + /// CONSTRUCTOR - Mass, polarizability + AtomType(double m, double p) : mass_(m), polarizability_(p), oidx_(-1) {} + /// CONSTRUCTOR - Radius, well depth, mass, polarizability + AtomType(double r, double d, double m, double p) : lj_(r, d), mass_(m), oidx_(-1) {} + /// Set type index + void SetTypeIdx(int i) { oidx_ = i; } /// \return default LJ parameters - LJparmType const& LJ() const { return lj_; } + LJparmType const& LJ() const { return lj_; } /// \return Atom mass in amu - double Mass() const { return mass_; } + double Mass() const { return mass_; } /// \return Atomic polarizability in Ang^3 double Polarizability() const { return polarizability_; } /// \return Original atom type index. Useful when checking for off-diagonal NB parameters. - int OriginalIdx() const { return oidx_; } + int OriginalIdx() const { return oidx_; } /// \return true if LJ params are less than incoming bool operator<(AtomType const& rhs) const { return lj_ < rhs.lj_; } /// \return true if LJ params are the same bool operator==(AtomType const& rhs) const { return lj_ == rhs.lj_; } /// Used to modify LJ params LJparmType& SetLJ() { return lj_; } - /// \return data size - static size_t DataSize() { return (3*sizeof(double)) + sizeof(int); } + /// \return data size (2 double for LJparmType) + static size_t DataSize() { return (4*sizeof(double)) + sizeof(int); } private: - LJparmType lj_; ///< Default Lennard-Jones parameters (always valid for self). - double mass_; ///< Mass in amu + LJparmType lj_; ///< Default Lennard-Jones parameters (always valid for self). + double mass_; ///< Mass in amu double polarizability_; ///< Atomic polarizability in Ang^3 - int oidx_; ///< Original atom type index. TODO deprecate + int oidx_; ///< Original atom type index, for indexing nonbond parameters. }; #endif From 0b0918ec2bcdb70b31c628831125d6970c87a15e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 09:26:26 -0500 Subject: [PATCH 0125/1492] Use relative error to compare LJ types since A and B tend to be large and several orders of magnitude different from each other. --- src/ParameterTypes.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 6980b48209..141b7d8673 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -19,6 +19,13 @@ static inline bool FNE(double v1, double v2) { return (delta > Constants::SMALL); } +/// Calculate relative error of A1 from A0 TODO check A0? +static inline double RELERR(double A0, double A1) { + double delta = A0 - A1; + if (delta < 0.0) delta = -delta; + return (delta / A0); +} + // ----- BOND/ANGLE/DIHEDRAL PARAMETERS ---------------------------------------- /// Hold bond parameters class BondParmType { @@ -305,8 +312,9 @@ class HB_ParmType { typedef std::vector HB_ParmArray; /// Hold Lennard-Jones 6-12 interaction A and B parameters class NonbondType { - /** Tolerance for comparison. A little larger than SMALL because A - * and B tend to be large. + /** Tolerance for comparison. Using relative error here since A and + * B tend to be large (particularly A) and are different magnitudes + * from each other. Not using Constants::SMALL for the same reason. */ // NOTE: Probably should check __cpluscplus here instead of using a // define, but this is guaranteed to be portable. @@ -333,18 +341,18 @@ class NonbondType { } /// \return True if A and B match bool operator==(NonbondType const& rhs) const { - return ( (fabs(A_ - rhs.A_) < tol_) && - (fabs(B_ - rhs.B_) < tol_) ); + return ( RELERR(A_, rhs.A_) < tol_ && + RELERR(B_, rhs.B_) < tol_ ); } /// \return True if A and B do not match bool operator!=(NonbondType const& rhs) const { - return ( (fabs(A_ - rhs.A_) > tol_) || - (fabs(B_ - rhs.B_) > tol_) ); + return ( RELERR(A_, rhs.A_) > tol_ || + RELERR(B_, rhs.B_) > tol_ ); } /// \return True if A less than zero, or B if A is equal. bool operator<(NonbondType const& rhs) const { if (*this != rhs) { - if ( (fabs(A_ - rhs.A_) < tol_) ) + if ( RELERR(A_, rhs.A_) < tol_ ) return (B_ < rhs.B_); else return (A_ < rhs.A_); From cc6cff7832cd02855521431b57085c9d7c52e657 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 09:29:13 -0500 Subject: [PATCH 0126/1492] Get rid of all dependence on map; no need since we can store type index in AtomType. Start a new strategy for combine; use UpdateParams to re-generate the proper parameters for the combined top. --- src/Topology.cpp | 292 ++++++++++++----------------------------------- src/Topology.h | 3 + 2 files changed, 74 insertions(+), 221 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 03241605c1..fb72193fcd 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -1,5 +1,4 @@ #include // find -#include // For atom types in append #include // For large system molecule search #include "Topology.h" #include "CpptrajStdio.h" @@ -2105,43 +2104,6 @@ void Topology::AddDihArray(DihedralArray const& darray, DihedralParmArray const& dih->Type() ), dp[dih->Idx()] ); } -/// Map type indices to LJ parameters -class TypeArray { - public: - typedef std::map Tarray; - typedef Tarray::const_iterator const_iterator; - typedef std::pair Tpair; - TypeArray() {} - size_t size() const { return types_.size(); } - const_iterator begin() const { return types_.begin(); } - const_iterator end() const { return types_.end(); } - AtomType const& LastType() const { return lastType_->second; } - /// Add params for atom to array if not present - int AddAtomType(Atom const& atom, int anum, Topology const& top) { - if (atom.TypeIndex() < 0 || atom.Type().len() < 1) { - mprintf("Warning: Invalid atom type information in '%s'\n", top.c_str()); - return 1; - } - //mprintf("DEBUG: %s %s %i %s\n", *(atom.Name()), *(atom.Type()), anum, top.c_str()); - // See if index already present. - Tarray::iterator it = types_.find( atom.TypeIndex() ); - if (it == types_.end()) { - AtomType type(top.GetVDWradius(anum), top.GetVDWdepth(anum), atom.TypeIndex()); - //mprintf("\tAdding [%4zu] %4i %s %12.5g %12.5g (%s)\n", types_.size(), - // atom.TypeIndex(), *(atom.Type()), - // type.Radius(), type.Depth(), top.c_str()); - std::pair ret = types_.insert( Tpair(atom.TypeIndex(), type) ); - lastType_ = ret.first; - } - return 0; - } - /// Add to array - void AddType(int idx, AtomType const& typeIn) { types_.insert(Tpair(idx, typeIn)); } - private: - Tarray types_; - Tarray::iterator lastType_; -}; - /** This template can be used when doing Append() on a generic std::vector array * of type T. The array will be appended to a given array of the same type. * If one is empty and the other is not, values will be filled in if necessary. @@ -2174,45 +2136,11 @@ int Topology::AppendTop(Topology const& NewTop) { int atomOffset = (int)atoms_.size(); //int resOffset = (int)residues_.size(); - // NONBONDS - // Make sure that either both topologies have non-bond parameters or neither - // do. If the current topology is empty just check incoming topology. - bool doNonBond = true; - if (atoms_.empty()) { - doNonBond = NewTop.Nonbond().HasNonbond(); - } else { - doNonBond = (Nonbond().HasNonbond() && NewTop.Nonbond().HasNonbond()); - if (!doNonBond && (Nonbond().HasNonbond() != NewTop.Nonbond().HasNonbond())) { - if (Nonbond().HasNonbond()) - mprintf("Warning: Topology '%s' does not have non-bond parameters.\n", NewTop.c_str()); - else - mprintf("Warning: Topology '%s' does not have non-bond parameters.\n", c_str()); - } - } - // Create an array of existing nonbond types so we can compare to incoming. - TypeArray ExistingTypes; - if (doNonBond) { - for (atom_iterator atom = atoms_.begin(); atom != atoms_.end(); ++atom) { - if (ExistingTypes.AddAtomType(*atom, atom-atoms_.begin(), *this)) { - doNonBond = false; - break; - } - } - // DEBUG - if (debug_ > 0) { - mprintf("DEBUG: %zu existing atom type indices:\n", ExistingTypes.size()); - for (TypeArray::const_iterator ti = ExistingTypes.begin(); - ti != ExistingTypes.end(); ++ti) - mprintf("\t%8i %12.5g %12.5g\n", ti->first, ti->second.LJ().Radius(), ti->second.LJ().Depth()); - } - } - int NexistingAtomTypes = (int)ExistingTypes.size(); - int currentTypeIdx = NexistingAtomTypes; + // Save old parameters + mprintf("DEBUG: Getting old parameters.\n"); + ParameterSet oldParams = GetParameters(); - // ATOMS - typedef std::map TypeMap; - TypeMap type_newToExisting; ///< Track what existing atom type new types correspond to. - TypeArray NewTypes; + // Append NewTop atoms to this topology. for (atom_iterator atom = NewTop.begin(); atom != NewTop.end(); ++atom) { if (debug_ > 1) @@ -2222,120 +2150,32 @@ int Topology::AppendTop(Topology const& NewTop) { Residue const& res = NewTop.Res( CurrentAtom.ResNum() ); // Bonds need to be cleared and re-added. CurrentAtom.ClearBonds(); - // NONBONDS - if (doNonBond) { - if (NewTypes.AddAtomType(*atom, atom-NewTop.begin(), NewTop)) { - doNonBond = false; - } else { - // Update type index - int newTypeIdx = -1; - // Check if this atom type has already been added to existing types. - TypeMap::iterator it = type_newToExisting.find( atom->TypeIndex() ); - if (it == type_newToExisting.end()) { - // Type has not yet been mapped. See if it is an existing type. - for (TypeArray::const_iterator et = ExistingTypes.begin(); - et != ExistingTypes.end(); ++et) - if (et->second == NewTypes.LastType()) { - newTypeIdx = et->first; - type_newToExisting.insert(std::pair(atom->TypeIndex(), newTypeIdx)); - if (debug_ > 1) - mprintf("\tType (%i) matches existing type (%i)\n", - atom->TypeIndex(), newTypeIdx); - break; - } - if (newTypeIdx == -1) { - // Type not found among existing types. Need new type index. - if (debug_ > 1) - mprintf("\tNeed new type. Converting %i to %i\n", - atom->TypeIndex(), currentTypeIdx); - newTypeIdx = currentTypeIdx; - type_newToExisting.insert(std::pair(atom->TypeIndex(), newTypeIdx)); - ExistingTypes.AddType(newTypeIdx, NewTypes.LastType()); - currentTypeIdx++; - } - } else { - // Type has been mapped. - newTypeIdx = it->second; - if (debug_ > 1) - mprintf("\tType %i already present as %i.\n", atom->TypeIndex(),newTypeIdx); - } - // Update type index - CurrentAtom.SetTypeIndex( newTypeIdx ); - } - } - //AddTopAtom( CurrentAtom, Residue(res.Name(), CurrentAtom.ResNum() + resOffset + 1, AddTopAtom( CurrentAtom, Residue(res.Name(), res.OriginalResNum(), res.Icode(), res.ChainId()) ); - } // END loop over incoming atoms - // NONBONDS - if (!doNonBond) { - if (Nonbond().HasNonbond()) { - mprintf("Warning: Removing non-bond parameters\n"); - nonbond_.Clear(); - } - } else { - // DEBUG - if (debug_ > 0) { - mprintf("DEBUG: %zu new atom type indices:\n", NewTypes.size()); - for (TypeArray::const_iterator ti = NewTypes.begin(); - ti != NewTypes.end(); ++ti) - mprintf("\t%8i %12.5g %12.5g\n", ti->first, ti->second.LJ().Radius(), ti->second.LJ().Depth()); - mprintf("DEBUG: New to existing mapping:\n"); - for (TypeMap::const_iterator it = type_newToExisting.begin(); - it != type_newToExisting.end(); ++it) - mprintf("\t%6i to %6i\n", it->first, it->second); - mprintf("DEBUG: Atom Types:\n"); - for (TypeArray::const_iterator it = ExistingTypes.begin(); - it != ExistingTypes.end(); ++it) - { - mprintf("\t%8i %12.5g %12.5g (%8i)", it->first, it->second.LJ().Radius(), - it->second.LJ().Depth(), it->second.OriginalIdx()); - if (it->first >= NexistingAtomTypes) - mprintf(" (NEW)\n"); - else - mprintf(" (EXISTING)\n"); - } - } - // Set up new nonbond array. - NonbondParmType newNB; - newNB.SetupLJforNtypes( ExistingTypes.size() ); - // Go through all interactions. - for (TypeArray::const_iterator t1 = ExistingTypes.begin(); - t1 != ExistingTypes.end(); ++t1) - { - for (TypeArray::const_iterator t2 = ExistingTypes.begin(); - t2 != ExistingTypes.end(); ++t2) - { - if (t1->first >= t2->first) - { - bool OneIsNew = (t1->first >= NexistingAtomTypes); - bool TwoIsNew = (t2->first >= NexistingAtomTypes); - NonbondType LJ = LJ_EMPTY; - if (OneIsNew && TwoIsNew) { - // Both types from new topology. Look there for LJ params using - // the original atom indices. - int nbidx = NewTop.Nonbond().GetLJindex( t1->second.OriginalIdx(), - t2->second.OriginalIdx() ); - if (nbidx >= 0) - LJ = NewTop.Nonbond().NBarray( nbidx ); - } else if (!OneIsNew && !TwoIsNew) { - // Both types from existing topology. Look here for LJ params. - int nbidx = nonbond_.GetLJindex( t1->first, t2->first ); - if (nbidx >= 0) - LJ = nonbond_.NBarray( nbidx ); - } else { - // Mix new and existing. - LJ = t1->second.LJ().Combine_LB( t2->second.LJ() ); - } - if (debug_ > 1) - mprintf("DEBUG: Adding LJ term for %i %i A=%g B=%g\n", t1->first, t2->first, - LJ.A(), LJ.B()); - newNB.AddLJterm(t1->first, t2->first, LJ); - } - } - } - nonbond_ = newNB; } + // Recreate bonds for the added atoms + for (BondArray::const_iterator bond = NewTop.Bonds().begin(); bond != NewTop.Bonds().end(); ++bond) + AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); + for (BondArray::const_iterator bond = NewTop.BondsH().begin(); bond != NewTop.BondsH().end(); ++bond) + AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); + // Recreate angles for the added atoms + for (AngleArray::const_iterator angle = NewTop.Angles().begin(); angle != NewTop.Angles().end(); ++angle) + AddAngle( angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset ); + for (AngleArray::const_iterator angle = NewTop.AnglesH().begin(); angle != NewTop.AnglesH().end(); ++angle) + AddAngle( angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset ); + // Recreate dihedrals for the added atoms + for (DihedralArray::const_iterator dih = NewTop.Dihedrals().begin(); dih != NewTop.Dihedrals().end(); ++dih) + AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, + dih->A3() + atomOffset, dih->A4() + atomOffset, + dih->Type() ), -1 ); + for (DihedralArray::const_iterator dih = NewTop.DihedralsH().begin(); dih != NewTop.DihedralsH().end(); ++dih) + AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, + dih->A3() + atomOffset, dih->A4() + atomOffset, + dih->Type() ), -1 ); + // Update parameters + mprintf("DEBUG: Updating with new parameters.\n"); + updateParams( oldParams, NewTop.GetParameters() ); + // EXTRA ATOM INFO TopVecAppend appendNameType; appendNameType.Append( tree_, NewTop.tree_, NewTop.Natom() ); @@ -2349,7 +2189,7 @@ int Topology::AppendTop(Topology const& NewTop) { appendFloat.Append( occupancy_, NewTop.occupancy_, NewTop.Natom() ); appendFloat.Append( bfactor_, NewTop.bfactor_, NewTop.Natom() ); - // BONDS + /* // BONDS AddBondArray(NewTop.Bonds(), NewTop.BondParm(), atomOffset); AddBondArray(NewTop.BondsH(), NewTop.BondParm(), atomOffset); // ANGLES @@ -2357,7 +2197,7 @@ int Topology::AppendTop(Topology const& NewTop) { AddAngleArray(NewTop.AnglesH(), NewTop.AngleParm(), atomOffset); // DIHEDRALS AddDihArray(NewTop.Dihedrals(), NewTop.DihedralParm(), atomOffset); - AddDihArray(NewTop.DihedralsH(), NewTop.DihedralParm(), atomOffset); + AddDihArray(NewTop.DihedralsH(), NewTop.DihedralParm(), atomOffset);*/ // TODO append missing stuff? @@ -2441,36 +2281,37 @@ static inline void GetDihedralParams(DihedralParmHolder& DP, std::vector c } } -/** Used to map type names to type indices to access nonbond parameters. */ -typedef std::map NameIdxMapType; - /** \param atomTypes Output array of atom types. - * \param NB1 Current nonbond parameters. - * \param atoms Array of atoms. - * \param NB0 Output array of nonbond parameters. + * \param NB1 Output array of nonbond parameters. + * \param atoms Current array of atoms. + * \param NB0 Current nonbond parameters. */ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolder& NB1, std::vector const& atoms, NonbondParmType const& NB0, int debugIn) { - // TODO check for off-diagonal terms if (NB0.HasNonbond()) { - // Map type names to type indices to access nonbond parameters. - NameIdxMapType nameIdxMap; + // Nonbonded parameters are present. for (std::vector::const_iterator atm = atoms.begin(); atm != atoms.end(); ++atm) { // TODO check for blank type name? - TypeNameHolder types(1); - types.AddName( atm->Type() ); + TypeNameHolder atype( atm->Type() ); + // Check for self parameters to back-calculate LJ depth/radius int idx = NB0.GetLJindex( atm->TypeIndex(), atm->TypeIndex() ); - ParameterHolders::RetType ret; + AtomType thisType; if (idx > -1) { NonbondType const& LJ = NB0.NBarray( idx ); - ret = atomTypes.AddParm( types, AtomType(LJ.Radius(), LJ.Depth(), atm->Mass()), true ); - } else - ret = atomTypes.AddParm( types, AtomType(atm->Mass()), true ); - if (ret == ParameterHolders::ADDED) - nameIdxMap.insert( std::pair(atm->Type(), atm->TypeIndex()) ); + thisType = AtomType(LJ.Radius(), LJ.Depth(), atm->Mass(), atm->Polar()); + } else { + // TODO LJ 10-12 + thisType = AtomType(atm->Mass(), atm->Polar()); + } + thisType.SetTypeIdx( atm->TypeIndex() ); + ParameterHolders::RetType ret = atomTypes.AddParm( atype, thisType, true ); + if (ret == ParameterHolders::ADDED) { + mprintf("DEBUG: New atom type: %s R=%g D=%g M=%g P=%g\n", *(atype[0]), thisType.LJ().Radius(), thisType.LJ().Depth(), thisType.Mass(), thisType.Polarizability()); + } } - // Do atom type pairs + // Do atom type pairs, check for off-diagonal elements. + // Explicitly store pairs instead of regenerating to avoid round-off issues. unsigned int nModifiedOffDiagonal = 0; for (ParmHolder::const_iterator i1 = atomTypes.begin(); i1 != atomTypes.end(); ++i1) { @@ -2483,10 +2324,8 @@ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHoldersecond; NonbondType lj0 = type1.LJ().Combine_LB( type2.LJ() ); // Extract original A and B parameters. - NameIdxMapType::const_iterator t1 = nameIdxMap.find( name1 ); - NameIdxMapType::const_iterator t2 = nameIdxMap.find( name2 ); - int idx1 = t1->second; - int idx2 = t2->second; + int idx1 = type1.OriginalIdx();//t1->second; + int idx2 = type2.OriginalIdx();//t2->second; int idx = NB0.GetLJindex( idx1, idx2 ); if (idx < 0) { mprinterr("Error: No off-diagonal LJ for %s %s (%i %i)\n", @@ -2497,13 +2336,16 @@ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolder 0) { + //if (debugIn > 0) { double deltaA = fabs(lj0.A() - lj1.A()); double deltaB = fabs(lj0.B() - lj1.B()); mprintf("DEBUG: Potential off-diagonal LJ: %s %s expect A=%g B=%g, actual A=%g B=%g\n", *name1, *name2, lj0.A(), lj0.B(), lj1.A(), lj1.B()); mprintf("DEBUG:\tdeltaA= %g deltaB= %g\n", deltaA, deltaB); - } + double pe_a = (fabs(lj0.A() - lj1.A()) / lj0.A()); + double pe_b = (fabs(lj0.B() - lj1.B()) / lj0.B()); + mprintf("DEBUG:\tPEA= %g PEB= %g\n", pe_a, pe_b); + //} } TypeNameHolder types(2); types.AddName( name1 ); @@ -2514,9 +2356,10 @@ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolder 0) mprintf("Warning: %u modified off-diagonal LJ terms present.\n", nModifiedOffDiagonal); } else { + // No nonbonded parameters. Just save mass/polarizability. for (std::vector::const_iterator atm = atoms.begin(); atm != atoms.end(); ++atm) if (atm->Type().len() > 0) - atomTypes.AddParm( TypeNameHolder(atm->Type()), AtomType(atm->Mass()), true ); + atomTypes.AddParm( TypeNameHolder(atm->Type()), AtomType(atm->Mass(), atm->Polar()), true ); } } @@ -2854,14 +2697,16 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, // Regenerate nonbond params for existing types nonbond_.Clear(); nonbond_.SetupLJforNtypes( currentAtomTypes.size() ); + // Set type indices int nidx1 = 0; - NameIdxMapType nameIdxMap; + for (ParmHolder::iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) + t1->second.SetTypeIdx( nidx1 ); + nidx1 = 0; for (ParmHolder::const_iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) { NameType const& name1 = t1->first[0]; //mprintf("DEBUG: Type1= %s (%i)\n", *name1, nidx1); AtomType const& type1 = t1->second; - nameIdxMap.insert( std::pair(name1, nidx1) ); int nidx2 = nidx1; for (ParmHolder::const_iterator t2 = t1; t2 != currentAtomTypes.end(); ++t2, nidx2++) { @@ -2894,18 +2739,18 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, for (std::vector::iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { int tidx = -1; - NameIdxMapType::const_iterator it = nameIdxMap.find( atm->Type() ); - if (it == nameIdxMap.end()) { + ParmHolder::const_iterator it = currentAtomTypes.GetParam( TypeNameHolder(atm->Type()) ); + if (it == currentAtomTypes.end()) { mprintf("Warning: Atom type not found for %s (type %s)\n", TruncResAtomNameNum( atm - atoms_.begin() ).c_str(), *(atm->Type())); } else { - if (it->second < 0 || it->second >= (int)currentAtomTypes.size()) { + if (it->second.OriginalIdx() < 0 || it->second.OriginalIdx() >= (int)currentAtomTypes.size()) { mprinterr("Internal Error: Type index for %s (type %s) out of range: %i\n", TruncResAtomNameNum( atm - atoms_.begin() ).c_str(), - *(atm->Type()), it->second); + *(atm->Type()), it->second.OriginalIdx()); } else - tidx = it->second; + tidx = it->second.OriginalIdx(); } atm->SetTypeIndex( tidx ); } @@ -2964,6 +2809,11 @@ int Topology::RedistributeCharge(double charge) { /** Update/add to parameters in this topology with those from given set. */ int Topology::UpdateParams(ParameterSet const& set1) { ParameterSet set0 = GetParameters(); + return updateParams(set0, set1); +} + +/** Update/add to parameters in this topology by combining those from given sets. */ +int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { // Check if (set0.AT().size() < 1) mprintf("Warning: No atom type information in '%s'\n", c_str()); diff --git a/src/Topology.h b/src/Topology.h index cd0bc88f5b..28acbd863e 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -283,6 +283,9 @@ class Topology { inline void AddAngleArray(AngleArray const&, AngleParmArray const&, int); inline void AddDihArray(DihedralArray const&, DihedralParmArray const&, int); + /// Update parameters in this Topology with those from combined sets. + int updateParams(ParameterSet&, ParameterSet const&); + void AssignAtomTypeParm(ParmHolder const&); void AssignBondParm(ParmHolder const&, ParmHolder&, BondArray&, BondParmArray&, const char*); void AssignAngleParm(ParmHolder const&, ParmHolder&, AngleArray&); From bf2c7a8e611a7d05173c298c08e89177aabb5bab Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 10:52:10 -0500 Subject: [PATCH 0127/1492] Add 'extra' keyword to dihedral print command for printing SCEE/SCNB --- src/Exec_Top.cpp | 7 ++++--- src/TopInfo.cpp | 21 ++++++++++++++------- src/TopInfo.h | 4 ++-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/Exec_Top.cpp b/src/Exec_Top.cpp index 253e7ede25..ae4ac0528d 100644 --- a/src/Exec_Top.cpp +++ b/src/Exec_Top.cpp @@ -100,7 +100,7 @@ Exec::RetType Exec_AngleInfo::Execute(CpptrajState& State, ArgList& argIn) { } // ----------------------------------------------------------------------------- void Exec_DihedralInfo::Help() const { - mprintf("\t[%s] [] [ ]\n\t[out ]\n", DataSetList::TopIdxArgs); + mprintf("\t[%s] [] [ ]\n\t[out ] [extra]\n", DataSetList::TopIdxArgs); mprintf(" For specified topology (first by default) either print dihedral info for all\n" " atoms in , or print info for dihedrals with first atom in ,\n" " second atom in , third atom in , and fourth atom in .\n"); @@ -112,12 +112,13 @@ Exec::RetType Exec_DihedralInfo::Execute(CpptrajState& State, ArgList& argIn) { "Error: selection please use 4 masks.\n"); return CpptrajState::ERR; } + bool printExtraInfo = argIn.hasKey("extra"); TopInfo info; if (CommonSetup(info, State, argIn, "Dihedral info")) return CpptrajState::ERR; std::string mask1 = argIn.GetMaskNext(); std::string mask2 = argIn.GetMaskNext(); std::string mask3 = argIn.GetMaskNext(); - if (info.PrintDihedralInfo( mask1, mask2, mask3, argIn.GetMaskNext(), false )) + if (info.PrintDihedralInfo( mask1, mask2, mask3, argIn.GetMaskNext(), false, printExtraInfo )) return CpptrajState::ERR; return CpptrajState::OK; } @@ -141,7 +142,7 @@ Exec::RetType Exec_ImproperInfo::Execute(CpptrajState& State, ArgList& argIn) { std::string mask1 = argIn.GetMaskNext(); std::string mask2 = argIn.GetMaskNext(); std::string mask3 = argIn.GetMaskNext(); - if (info.PrintDihedralInfo( mask1, mask2, mask3, argIn.GetMaskNext(), true )) + if (info.PrintDihedralInfo( mask1, mask2, mask3, argIn.GetMaskNext(), true, false )) return CpptrajState::ERR; return CpptrajState::OK; } diff --git a/src/TopInfo.cpp b/src/TopInfo.cpp index 6c8256403c..69c0796484 100644 --- a/src/TopInfo.cpp +++ b/src/TopInfo.cpp @@ -589,7 +589,8 @@ int TopInfo::PrintAngleInfo(std::string const& mask1exp, std::string const& mask // TopInfo::PrintDihedrals() void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray const& dihedralparm, CharMask const& mask1, CharMask const& mask2, - CharMask const& mask3, CharMask const& mask4, int nw, int& nd) const + CharMask const& mask3, CharMask const& mask4, int nw, int& nd, + bool printExtraInfo) const { if (darray.empty()) return; for (DihedralArray::const_iterator dih = darray.begin(); @@ -618,9 +619,12 @@ void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray cons else if (dih->Type() == DihedralType::BOTH ) type = 'B'; outfile_->Printf("%c %*i", type, nw, nd); int didx = dih->Idx(); - if ( didx > -1 ) + if ( didx > -1 ) { outfile_->Printf(" %7.3f %5.2f %4.1f",dihedralparm[didx].Pk(),dihedralparm[didx].Phase(), dihedralparm[didx].Pn()); + if (printExtraInfo) + outfile_->Printf(" %4.1f %4.1f", dihedralparm[didx].SCEE(), dihedralparm[didx].SCNB()); + } if ( !coords_.empty() ) outfile_->Printf(" %7.2f", Torsion( coords_.XYZ(atom1), coords_.XYZ(atom2), @@ -648,7 +652,7 @@ void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray cons // TopInfo::PrintDihedralInfo() int TopInfo::PrintDihedralInfo(std::string const& mask1exp, std::string const& mask2exp, std::string const& mask3exp, std::string const& mask4exp, - bool printImpropers) const + bool printImpropers, bool printExtraInfo) const { CharMask mask1( mask1exp ); if (SetupMask( mask1 )) return 1; @@ -675,8 +679,11 @@ int TopInfo::PrintDihedralInfo(std::string const& mask1exp, std::string const& m } int nw = std::max(3, DigitWidth(n_torsions)); outfile_->Printf("# %*s", nw, label); - if (hasParams) + if (hasParams) { outfile_->Printf(" %7s %5s %4s", "PK", "Phase", "PN"); + if (printExtraInfo) + outfile_->Printf(" %4s %4s", "SCEE", "SCNB"); + } if (!coords_.empty()) outfile_->Printf(" %7s", "Value"); outfile_->Printf(" %-*s %-*s %-*s %-*s %*s %*s %*s %*s %*s %*s %*s %*s\n", @@ -688,10 +695,10 @@ int TopInfo::PrintDihedralInfo(std::string const& mask1exp, std::string const& m max_type_len_, "T3", max_type_len_, "T4"); int nd = 1; if (printImpropers) { - PrintDihedrals( parm_->Chamber().Impropers(), parm_->Chamber().ImproperParm(), mask1, mask2, mask3, mask4, nw, nd ); + PrintDihedrals( parm_->Chamber().Impropers(), parm_->Chamber().ImproperParm(), mask1, mask2, mask3, mask4, nw, nd, printExtraInfo ); } else { - PrintDihedrals( parm_->DihedralsH(), parm_->DihedralParm(), mask1, mask2, mask3, mask4, nw, nd ); - PrintDihedrals( parm_->Dihedrals(), parm_->DihedralParm(), mask1, mask2, mask3, mask4, nw, nd ); + PrintDihedrals( parm_->DihedralsH(), parm_->DihedralParm(), mask1, mask2, mask3, mask4, nw, nd, printExtraInfo ); + PrintDihedrals( parm_->Dihedrals(), parm_->DihedralParm(), mask1, mask2, mask3, mask4, nw, nd, printExtraInfo ); } return 0; } diff --git a/src/TopInfo.h b/src/TopInfo.h index bb62d983cb..bb7fa11da8 100644 --- a/src/TopInfo.h +++ b/src/TopInfo.h @@ -26,7 +26,7 @@ class TopInfo { int PrintBondInfo(std::string const&, std::string const&, bool) const; int PrintAngleInfo(std::string const&, std::string const&, std::string const&) const; int PrintDihedralInfo(std::string const&, std::string const&, - std::string const&, std::string const&,bool) const; + std::string const&, std::string const&,bool,bool) const; int PrintChargeInfo(std::string const&, double&) const; int PrintMassInfo(std::string const&, double&) const; private: @@ -45,7 +45,7 @@ class TopInfo { int, int&) const; void PrintDihedrals(DihedralArray const&, DihedralParmArray const&, CharMask const&, CharMask const&, - CharMask const&, CharMask const&, int, int&) const; + CharMask const&, CharMask const&, int, int&,bool) const; CpptrajFile* outfile_; Topology const* parm_; From d517d767671dd54c74a59bb599efe916e055651c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 10:53:22 -0500 Subject: [PATCH 0128/1492] Replace == comparison of floating point numbers with FEQ() --- src/ParameterTypes.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 141b7d8673..21a16bca43 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -166,10 +166,10 @@ class DihedralParmType { FEQ(scnb_, rhs.scnb_) ); } bool operator<(DihedralParmType const& rhs) const { - if (pk_ == rhs.pk_) { - if (pn_ == rhs.pn_) { - if (phase_ == rhs.phase_) { - if (scee_ == rhs.scee_) { + if (FEQ(pk_, rhs.pk_)) { + if (FEQ(pn_, rhs.pn_)) { + if (FEQ(phase_, rhs.phase_)) { + if (FEQ(scee_, rhs.scee_)) { return (scnb_ < rhs.scnb_); } else return (scee_ < rhs.scee_); } else return (phase_ < rhs.phase_); From ca8d1f8669b39ebd8435073a649db5c01243fe50 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 14:11:57 -0500 Subject: [PATCH 0129/1492] Add != operator that depends only on atom indices --- src/ParameterTypes.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 21a16bca43..9098f561a4 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -252,6 +252,13 @@ class DihedralType { } else return (a2_ < rhs.a2_); } else return (a1_ < rhs.a1_); } + /// \return true if any atom indices do not match + bool operator!=(DihedralType const& rhs) const { + return (a1_ != rhs.a1_ || + a2_ != rhs.a2_ || + a3_ != rhs.a3_ || + a4_ != rhs.a4_); + } private: int a1_; int a2_; From 80340763424718ad318f2a0cb0cddfc155082054 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 14:12:31 -0500 Subject: [PATCH 0130/1492] Atom order swapping for dihedrals is Amber specific so put it in Parm_Amber --- src/Parm_Amber.cpp | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/src/Parm_Amber.cpp b/src/Parm_Amber.cpp index d6f8b6bfd0..771974345c 100644 --- a/src/Parm_Amber.cpp +++ b/src/Parm_Amber.cpp @@ -1611,20 +1611,38 @@ int Parm_Amber::WriteAngles(FlagType flag, AngleArray const& ANG) { /** Amber dihedral array. Indices must be x3, parameters index +1. End * dihedrals have the third atom index negative, impropers have fourth. + * Because of this, atom index 0 cannot be in the third or fourth + * position. If this happens, reverse the ordering. */ int Parm_Amber::WriteDihedrals(FlagType flag, DihedralArray const& DIH) { if (BufferAlloc(flag, DIH.size()*5)) return 1; for (DihedralArray::const_iterator it = DIH.begin(); it != DIH.end(); ++it) { - file_.IntToBuffer( it->A1()*3 ); - file_.IntToBuffer( it->A2()*3 ); + int dihIdxs[4]; + if (it->Type() != DihedralType::NORMAL && (it->A3() == 0 || it->A4() == 0)) { + mprintf("Warning: Had to turn torsion around to avoid K,L == 0\n"); + mprintf("Warning: Old order (i j k l): %i %i %i %i\n", it->A1(), it->A2(), it->A3(), it->A4()); + dihIdxs[0] = it->A4()*3; + dihIdxs[1] = it->A3()*3; + dihIdxs[2] = it->A2()*3; + dihIdxs[3] = it->A1()*3; + mprintf("Warning: New order (i j k l): %i %i %i %i\n", it->A4(), it->A3(), it->A2(), it->A1()); + } else { + dihIdxs[0] = it->A1()*3; + dihIdxs[1] = it->A2()*3; + dihIdxs[2] = it->A3()*3; + dihIdxs[3] = it->A4()*3; + } + + file_.IntToBuffer( dihIdxs[0] ); + file_.IntToBuffer( dihIdxs[1] ); if ( it->Type() == DihedralType::BOTH || it->Type() == DihedralType::END) - file_.IntToBuffer( -(it->A3()*3) ); + file_.IntToBuffer( -(dihIdxs[2]) ); else - file_.IntToBuffer( it->A3()*3 ); + file_.IntToBuffer( dihIdxs[2] ); if ( it->Type() == DihedralType::BOTH || it->Type() == DihedralType::IMPROPER) - file_.IntToBuffer( -(it->A4()*3) ); + file_.IntToBuffer( -(dihIdxs[3]) ); else - file_.IntToBuffer( it->A4()*3 ); + file_.IntToBuffer( dihIdxs[3] ); file_.IntToBuffer( it->Idx()+1 ); } file_.FlushBuffer(); @@ -1872,7 +1890,8 @@ int Parm_Amber::WriteParm(FileName const& fname, Topology const& TopOut) { file_.IntToBuffer( TopOut.BondParm().size() ); // NUMBND file_.IntToBuffer( TopOut.AngleParm().size() ); // NUMANG file_.IntToBuffer( TopOut.DihedralParm().size() ); // NPTRA - file_.IntToBuffer( TopOut.NatomTypes() ); // NATYP, only for SOLTY + unsigned int n_unique_atom_types = TopOut.NatomTypes(); + file_.IntToBuffer( n_unique_atom_types ); // NATYP, only for SOLTY file_.IntToBuffer( TopOut.Nonbond().HBarray().size() ); // NPHB file_.IntToBuffer( 0 ); // IFPERT file_.IntToBuffer( 0 ); // NBPER @@ -2087,8 +2106,8 @@ int Parm_Amber::WriteParm(FileName const& fname, Topology const& TopOut) { } // SOLTY - Currently unused but must be written. - if (BufferAlloc(F_SOLTY, TopOut.NatomTypes())) return 1; - for (unsigned int idx = 0; idx != TopOut.NatomTypes(); idx++) + if (BufferAlloc(F_SOLTY, n_unique_atom_types)) return 1; + for (unsigned int idx = 0; idx != n_unique_atom_types; idx++) file_.DblToBuffer( 0.0 ); file_.FlushBuffer(); From 1ca054a915a2a99ec6fe1a6c8155dfcf1c0f056b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 14:14:40 -0500 Subject: [PATCH 0131/1492] Fix assignment of dihedral parameters since in Amber impropers are lumped in with the regular dihedrals. Add some debug info. --- src/Topology.cpp | 176 +++++++++++++++++++++++++++++++---------------- src/Topology.h | 4 +- 2 files changed, 118 insertions(+), 62 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index fb72193fcd..1f7a57a66c 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -1962,10 +1962,10 @@ DihedralArray Topology::StripDihedralArray(DihedralArray const& dihIn, std::vect if (newA4 != -1) { // Since in Amber improper/end dihedrals are stored as negative #s, // atom index 0 cannot be in 3rd or 4th position. Reverse. - if (olddih->Type() != DihedralType::NORMAL && (newA3 == 0 || newA4 == 0)) - dihOut.push_back( DihedralType( newA4, newA3, newA2, newA1, - olddih->Type(), olddih->Idx() ) ); - else + //if (olddih->Type() != DihedralType::NORMAL && (newA3 == 0 || newA4 == 0)) + // dihOut.push_back( DihedralType( newA4, newA3, newA2, newA1, + // olddih->Type(), olddih->Idx() ) ); + //else dihOut.push_back( DihedralType( newA1, newA2, newA3, newA4, olddih->Type(), olddih->Idx() ) ); } @@ -2134,11 +2134,13 @@ template class TopVecAppend { // Topology::AppendTop() int Topology::AppendTop(Topology const& NewTop) { int atomOffset = (int)atoms_.size(); + mprintf("DEBUG: Appending '%s' to '%s' (offset= %i)\n", NewTop.c_str(), c_str(), atomOffset); //int resOffset = (int)residues_.size(); // Save old parameters mprintf("DEBUG: Getting old parameters.\n"); ParameterSet oldParams = GetParameters(); + oldParams.Debug(); // DEBUG // Append NewTop atoms to this topology. for (atom_iterator atom = NewTop.begin(); atom != NewTop.end(); ++atom) @@ -2167,11 +2169,11 @@ int Topology::AppendTop(Topology const& NewTop) { for (DihedralArray::const_iterator dih = NewTop.Dihedrals().begin(); dih != NewTop.Dihedrals().end(); ++dih) AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, dih->A3() + atomOffset, dih->A4() + atomOffset, - dih->Type() ), -1 ); + dih->Type() ) ); for (DihedralArray::const_iterator dih = NewTop.DihedralsH().begin(); dih != NewTop.DihedralsH().end(); ++dih) AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, dih->A3() + atomOffset, dih->A4() + atomOffset, - dih->Type() ), -1 ); + dih->Type() ) ); // Update parameters mprintf("DEBUG: Updating with new parameters.\n"); updateParams( oldParams, NewTop.GetParameters() ); @@ -2264,7 +2266,7 @@ static inline void GetImproperParams(ParmHolder& IP, std::vect } // GetDihedralParams() -static inline void GetDihedralParams(DihedralParmHolder& DP, std::vector const& atoms, DihedralArray const& dih, DihedralParmArray const& dpa) { +static inline void GetDihedralParams(DihedralParmHolder& DP, ParmHolder& IP, std::vector const& atoms, DihedralArray const& dih, DihedralParmArray const& dpa) { for (DihedralArray::const_iterator b = dih.begin(); b != dih.end(); ++b) { if (b->Idx() != -1) { @@ -2274,9 +2276,27 @@ static inline void GetDihedralParams(DihedralParmHolder& DP, std::vector c types.AddName( atoms[b->A3()].Type() ); types.AddName( atoms[b->A4()].Type() ); //mprintf("DEBUG: dihedral %li ( %i %i %i %i )\n", b - dih.begin() + 1, b->A1()+1, b->A2()+1, b->A3()+1, b->A4()+1); - ParameterHolders::RetType ret = DP.AddParm( types, dpa[b->Idx()], false ); - if (ret == ParameterHolders::ERR) + //mprintf("DEBUG: dihedral %li %s %s %s %s idx=%i type=%i PK=%g PN=%g Phase=%g SCEE=%g SCNB=%g\n", b - dih.begin() + 1, + // *(types[0]), *(types[1]), *(types[2]), *(types[3]), b->Idx(), (int)b->Type(), + // dpa[b->Idx()].Pk(), dpa[b->Idx()].Pn(), dpa[b->Idx()].Phase(), dpa[b->Idx()].SCEE(), dpa[b->Idx()].SCNB()); + ParameterHolders::RetType ret; + if (b->IsImproper()) { + ret = IP.AddParm( types, dpa[b->Idx()], false ); + } else { + ret = DP.AddParm( types, dpa[b->Idx()], false ); + } + if (ret == ParameterHolders::ERR) { paramOverwriteWarning("dihedral"); + mprintf("Warning: Dihedral %s %s %s %s PK=%g PN=%g Phase=%g SCEE=%g SCNB=%g\n", + *(types[0]), *(types[1]), *(types[2]), *(types[3]), + dpa[b->Idx()].Pk(), dpa[b->Idx()].Pn(), dpa[b->Idx()].Phase(), dpa[b->Idx()].SCEE(), dpa[b->Idx()].SCNB()); + //bool found; + //DihedralParmArray dpa = DP.FindParam(types, found); + //mprintf("Warning: Existing params:\n"); + //for (DihedralParmArray::const_iterator d = dpa.begin(); d != dpa.end(); ++d) + // mprintf("Warning:\t\tPK=%g PN=%g Phase=%g SCEE=%g SCNB=%g\n", + // d->Pk(), d->Pn(), d->Phase(), d->SCEE(), d->SCNB()); + } } } } @@ -2289,6 +2309,7 @@ static inline void GetDihedralParams(DihedralParmHolder& DP, std::vector c static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolder& NB1, std::vector const& atoms, NonbondParmType const& NB0, int debugIn) { if (NB0.HasNonbond()) { + mprintf("DEBUG: Topology has nonbond parameters.\n"); // Nonbonded parameters are present. for (std::vector::const_iterator atm = atoms.begin(); atm != atoms.end(); ++atm) { @@ -2356,6 +2377,7 @@ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolder 0) mprintf("Warning: %u modified off-diagonal LJ terms present.\n", nModifiedOffDiagonal); } else { + mprintf("DEBUG: Topology does not have nonbond parameters.\n"); // No nonbonded parameters. Just save mass/polarizability. for (std::vector::const_iterator atm = atoms.begin(); atm != atoms.end(); ++atm) if (atm->Type().len() > 0) @@ -2375,8 +2397,8 @@ ParameterSet Topology::GetParameters() const { GetAngleParams( Params.AP(), atoms_, angles_, angleparm_); GetAngleParams( Params.AP(), atoms_, anglesh_, angleparm_); // Dihedral parameters. - GetDihedralParams( Params.DP(), atoms_, dihedrals_, dihedralparm_); - GetDihedralParams( Params.DP(), atoms_, dihedralsh_, dihedralparm_); + GetDihedralParams( Params.DP(), Params.IP(), atoms_, dihedrals_, dihedralparm_); + GetDihedralParams( Params.DP(), Params.IP(), atoms_, dihedralsh_, dihedralparm_); // CHARMM parameters if (chamber_.HasChamber()) { // UB parameters @@ -2578,24 +2600,27 @@ void Topology::AssignImproperParams(ParmHolder const& newImpro /** Set parameters for dihedrals in given dihedral array. */ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, + ParmHolder const& newImproperParams, DihedralArray& dihedralsIn) { // Dihedrals can be a bit of a pain since there can be multiple // multiplicities for a single dihedral type. In case multiplicities // change, start with a fresh dihedral array containing only unique // dihedrals. - DihedralArray tmpdih = dihedralsIn; - std::sort( tmpdih.begin(), tmpdih.end() ); + //DihedralArray tmpdih = dihedralsIn; + //std::sort( tmpdih.begin(), tmpdih.end() ); + // Assume dihedrals with multiple terms are consecutive already DihedralArray dihedrals; - for (DihedralArray::iterator dih = tmpdih.begin(); dih != tmpdih.end(); ++dih) { + for (DihedralArray::const_iterator dih = dihedralsIn.begin(); dih != dihedralsIn.end(); ++dih) { if (dihedrals.empty()) dihedrals.push_back( *dih ); else { - DihedralType const& last = dihedrals.back(); - if ( last.A1() != dih->A1() || - last.A2() != dih->A2() || - last.A3() != dih->A3() || - last.A4() != dih->A4() ) + if ( *dih != dihedrals.back() ) + //DihedralType const& last = dihedrals.back(); + //if ( last.A1() != dih->A1() || + // last.A2() != dih->A2() || + // last.A3() != dih->A3() || + // last.A4() != dih->A4() ) dihedrals.push_back( *dih ); } } @@ -2604,7 +2629,9 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, dihedralsIn.size(), dihedrals.size()); ParmHolder< std::vector > currentIndices; + ParmHolder< int > improperIndices; dihedralsIn.clear(); + // Loop over all dihedrals for (DihedralArray::iterator dih = dihedrals.begin(); dih != dihedrals.end(); ++dih) { TypeNameHolder types(4); types.AddName( atoms_[dih->A1()].Type() ); @@ -2612,58 +2639,86 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, types.AddName( atoms_[dih->A3()].Type() ); types.AddName( atoms_[dih->A4()].Type() ); bool found; - // See if parameter already present. - std::vector idxs = currentIndices.FindParam( types, found ); - if (!found) { - // Not yet present; search in newDihedralParams for parameter(s). - DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); - if (found) { - for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) - { + if (dih->IsImproper()) { + // ----- This is actually an improper dihedral. ---------------- + int idx = improperIndices.FindParam( types, found ); + if (!found) { + // Not yet present; search in newImproperParams for parameter + DihedralParmType ip = newImproperParams.FindParam( types, found ); + if (found) { // Add parameter and save the index - int idx = (int)dihedralparm_.size(); - idxs.push_back( idx ); - dihedralparm_.push_back( *it ); - } - currentIndices.AddParm( types, idxs, false ); + idx = (int)dihedralparm_.size(); + improperIndices.AddParm( types, idx, false ); + dihedralparm_.push_back( ip ); + } else + idx = -1; + } + if (idx == -1) { + mprintf("Warning: Improper parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + } - } - if (idxs.empty()) { - mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(dih->A1()).c_str(), - TruncResAtomNameNum(dih->A2()).c_str(), - TruncResAtomNameNum(dih->A3()).c_str(), - TruncResAtomNameNum(dih->A4()).c_str(), - *types[0], *types[1], *types[3], *types[4]); DihedralType mydih = *dih; - mydih.SetIdx( -1 ); + mydih.SetIdx( idx ); dihedralsIn.push_back( mydih ); } else { - bool multi = idxs.size() > 1; - // Actually add the dihedrals - for (std::vector::const_iterator dpidx = idxs.begin(); dpidx != idxs.end(); ++dpidx) - { - DihedralType mydih = *dih; - mydih.SetIdx( *dpidx ); - if (multi) { - // If there are multiple parameters for the same dihedral, all but - // one of the 1-4 calcs need to be skipped. - if (dpidx+1 != idxs.end()) - mydih.SetSkip14(true); - else - mydih.SetSkip14(false); + // -----Regular dihedral. See if parameter already present. ---- + std::vector idxs = currentIndices.FindParam( types, found ); + if (!found) { + // Not yet present; search in newDihedralParams for parameter(s). + DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); + if (found) { + for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) + { + // Add parameter and save the index + int idx = (int)dihedralparm_.size(); + idxs.push_back( idx ); + dihedralparm_.push_back( *it ); + } + currentIndices.AddParm( types, idxs, false ); } + } + if (idxs.empty()) { + mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + DihedralType mydih = *dih; + mydih.SetIdx( -1 ); dihedralsIn.push_back( mydih ); + } else { + bool multi = idxs.size() > 1; + // Actually add the dihedrals + for (std::vector::const_iterator dpidx = idxs.begin(); dpidx != idxs.end(); ++dpidx) + { + DihedralType mydih = *dih; + mydih.SetIdx( *dpidx ); + if (multi) { + // If there are multiple parameters for the same dihedral, all but + // one of the 1-4 calcs need to be skipped. + if (dpidx+1 != idxs.end()) + mydih.SetSkip14(true); + else + mydih.SetSkip14(false); + } + dihedralsIn.push_back( mydih ); + } } } - } + } // END loop over all dihedrals } /** Replace any current dihedral parameters with given dihedral parameters. */ -void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams) { +void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, ParmHolder const& newImproperParams) { dihedralparm_.clear(); - AssignDihedralParm( newDihedralParams, dihedrals_ ); - AssignDihedralParm( newDihedralParams, dihedralsh_ ); + AssignDihedralParm( newDihedralParams, newImproperParams, dihedrals_ ); + AssignDihedralParm( newDihedralParams, newImproperParams, dihedralsh_ ); } /** Replace current nonbond parameters with given nonbond parameters. */ @@ -2814,7 +2869,8 @@ int Topology::UpdateParams(ParameterSet const& set1) { /** Update/add to parameters in this topology by combining those from given sets. */ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { - // Check + set1.Debug(); // DEBUG + // Check TODO is this necessary? if (set0.AT().size() < 1) mprintf("Warning: No atom type information in '%s'\n", c_str()); if (debug_ > 0) { @@ -2846,7 +2902,7 @@ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { // updateCount = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral"); if (UC.nDihedralsUpdated_ > 0) { mprintf("\tRegenerating dihedral parameters.\n"); - AssignDihedralParams( set0.DP() ); + AssignDihedralParams( set0.DP(), set0.IP() ); } // Urey-Bradley // updateCount = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley"); diff --git a/src/Topology.h b/src/Topology.h index 28acbd863e..9f5917964c 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -138,7 +138,7 @@ class Topology { void AddDihedral(DihedralType const&, bool); void AddDihedral(DihedralType const&, DihedralParmType const&); void AssignImproperParams(ParmHolder const&); - void AssignDihedralParams(DihedralParmHolder const&); + void AssignDihedralParams(DihedralParmHolder const&, ParmHolder const&); // ----- CMAP-specific routines -------------- bool HasCmap() const { return !cmapGrid_.empty(); } CmapGridArray const& CmapGrid() const { return cmapGrid_; } @@ -290,7 +290,7 @@ class Topology { void AssignBondParm(ParmHolder const&, ParmHolder&, BondArray&, BondParmArray&, const char*); void AssignAngleParm(ParmHolder const&, ParmHolder&, AngleArray&); void AssignImproperParm(ParmHolder const&, ParmHolder&, DihedralArray&); - void AssignDihedralParm(DihedralParmHolder const&, DihedralArray&); + void AssignDihedralParm(DihedralParmHolder const&, ParmHolder const&, DihedralArray&); static const NonbondType LJ_EMPTY; std::vector atoms_; From 36eca562e0717ef71d85058eb4999351d1d1c2fb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 14:30:46 -0500 Subject: [PATCH 0132/1492] By convention calculate the first 1-4, skip the rest --- src/Topology.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 1f7a57a66c..3ae22b843e 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2702,10 +2702,10 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, if (multi) { // If there are multiple parameters for the same dihedral, all but // one of the 1-4 calcs need to be skipped. - if (dpidx+1 != idxs.end()) - mydih.SetSkip14(true); - else + if (dpidx == idxs.begin()) mydih.SetSkip14(false); + else + mydih.SetSkip14(true); } dihedralsIn.push_back( mydih ); } From 2816fc329adc9b6f3d7636d79b3ef9550e7097a8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 15:54:40 -0500 Subject: [PATCH 0133/1492] Ensure dihedral parameter array is packed when assigning parameters --- src/Topology.cpp | 81 ++++++++++++++++-------------------------------- src/Topology.h | 6 ++-- 2 files changed, 30 insertions(+), 57 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 3ae22b843e..c32257e5c4 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -513,7 +513,7 @@ int Topology::CommonSetup(bool molsearch, bool renumberResidues) // TODO: Make bond parm assignment / molecule search optional? // Assign default lengths if necessary (for e.g. CheckStructure) if (bondparm_.empty()) - AssignBondParameters(); + generateBondParameters(); if (molsearch) { // Determine molecule info from bonds if (DetermineMolecules()) @@ -747,8 +747,8 @@ void Topology::AddBondParam(BondType& bnd, BP_mapType& bpMap) bnd.SetIdx( bp_idx ); } -// Topology::AssignBondParameters() -void Topology::AssignBondParameters() { +/** Fill in bond parameters based on atomic element types. */ +void Topology::generateBondParameters() { mprintf("Warning: Determining bond length parameters from element types for '%s'.\n", c_str()); bondparm_.clear(); // Hold indices into bondparm for unique element pairs @@ -939,25 +939,21 @@ void Topology::AddAngle(AngleType const& angIn, bool isH) { } // ----------------------------------------------- -// Topology::AddTorsionParm() /** Check if given dihedral parm exists in given dihedral parm array. Add if not. * \return Index in dihedral parm array. */ -int Topology::AddTorsionParm(DihedralParmArray& dparray, DihedralParmType const& DPin) +int Topology::addTorsionParm(DihedralParmArray& dparray, DihedralParmType const& DPin) { // See if the DihedralParm exists. int pidx = -1; for (DihedralParmArray::const_iterator dp = dparray.begin(); dp != dparray.end(); ++dp) - if ( fabs(DPin.Pk() - dp->Pk() ) < Constants::SMALL && - fabs(DPin.Pn() - dp->Pn() ) < Constants::SMALL && - fabs(DPin.Phase() - dp->Phase()) < Constants::SMALL && - fabs(DPin.SCEE() - dp->SCEE() ) < Constants::SMALL && - fabs(DPin.SCNB() - dp->SCNB() ) < Constants::SMALL ) - { + { + if (DPin == *dp) { pidx = (int)(dp - dparray.begin()); break; } + } if (pidx == -1) { pidx = (int)dparray.size(); dparray.push_back( DPin ); @@ -997,7 +993,7 @@ DihedralType Topology::SetTorsionParmIndex(DihedralType const& dihIn, /** Add given dihedral with given dihedral parm to dihedral array. */ void Topology::AddDihedral(DihedralType const& dih, DihedralParmType const& DPin) { - int pidx = AddTorsionParm(dihedralparm_, DPin); + int pidx = addTorsionParm(dihedralparm_, DPin); if (CheckTorsionRange(dih, "dihedral")) return; AddDihedral(dih, pidx); } @@ -1028,7 +1024,7 @@ void Topology::AddDihedral(DihedralType const& dihIn, bool isH) { /** Add given Charmm improper with given improper parm to Charmm improper array. */ void Topology::AddCharmmImproper(DihedralType const& imp, DihedralParmType const& IPin) { - int pidx = AddTorsionParm(chamber_.SetImproperParm(), IPin); + int pidx = addTorsionParm(chamber_.SetImproperParm(), IPin); if (CheckTorsionRange(imp, "CHARMM improper")) return; AddCharmmImproper(imp, pidx); } @@ -2628,8 +2624,8 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, mprintf("DEBUG: %zu incoming dihedrals, %zu unique dihedrals.\n", dihedralsIn.size(), dihedrals.size()); - ParmHolder< std::vector > currentIndices; - ParmHolder< int > improperIndices; + //ParmHolder< std::vector > currentIndices; + //ParmHolder< int > improperIndices; dihedralsIn.clear(); // Loop over all dihedrals for (DihedralArray::iterator dih = dihedrals.begin(); dih != dihedrals.end(); ++dih) { @@ -2641,48 +2637,26 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, bool found; if (dih->IsImproper()) { // ----- This is actually an improper dihedral. ---------------- - int idx = improperIndices.FindParam( types, found ); + DihedralParmType ip = newImproperParams.FindParam( types, found ); + int idx; if (!found) { - // Not yet present; search in newImproperParams for parameter - DihedralParmType ip = newImproperParams.FindParam( types, found ); - if (found) { - // Add parameter and save the index - idx = (int)dihedralparm_.size(); - improperIndices.AddParm( types, idx, false ); - dihedralparm_.push_back( ip ); - } else - idx = -1; - } - if (idx == -1) { + idx = -1; mprintf("Warning: Improper parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(dih->A1()).c_str(), TruncResAtomNameNum(dih->A2()).c_str(), TruncResAtomNameNum(dih->A3()).c_str(), TruncResAtomNameNum(dih->A4()).c_str(), *types[0], *types[1], *types[2], *types[3]); - + } else { + idx = addTorsionParm( dihedralparm_, ip ); } DihedralType mydih = *dih; mydih.SetIdx( idx ); dihedralsIn.push_back( mydih ); } else { // -----Regular dihedral. See if parameter already present. ---- - std::vector idxs = currentIndices.FindParam( types, found ); + DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); if (!found) { - // Not yet present; search in newDihedralParams for parameter(s). - DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); - if (found) { - for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) - { - // Add parameter and save the index - int idx = (int)dihedralparm_.size(); - idxs.push_back( idx ); - dihedralparm_.push_back( *it ); - } - currentIndices.AddParm( types, idxs, false ); - } - } - if (idxs.empty()) { mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(dih->A1()).c_str(), TruncResAtomNameNum(dih->A2()).c_str(), @@ -2693,20 +2667,17 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, mydih.SetIdx( -1 ); dihedralsIn.push_back( mydih ); } else { - bool multi = idxs.size() > 1; // Actually add the dihedrals - for (std::vector::const_iterator dpidx = idxs.begin(); dpidx != idxs.end(); ++dpidx) - { + for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) { DihedralType mydih = *dih; - mydih.SetIdx( *dpidx ); - if (multi) { - // If there are multiple parameters for the same dihedral, all but - // one of the 1-4 calcs need to be skipped. - if (dpidx == idxs.begin()) - mydih.SetSkip14(false); - else - mydih.SetSkip14(true); - } + int idx = addTorsionParm( dihedralparm_, *it ); + // If there are multiple parameters for the same dihedral, all but + // one of the 1-4 calcs need to be skipped. + if (it == dpa.begin()) + mydih.SetSkip14(false); + else + mydih.SetSkip14(true); + mydih.SetIdx( idx ); dihedralsIn.push_back( mydih ); } } diff --git a/src/Topology.h b/src/Topology.h index 9f5917964c..525a4bc7ee 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -250,8 +250,10 @@ class Topology { // NOTE: Use set so that elements are always sorted. typedef std::vector< std::set > BP_mapType; void AddBondParam(BondType&, BP_mapType&); - void AssignBondParameters(); - static inline int AddTorsionParm(DihedralParmArray&, DihedralParmType const&); + /// Fill in bond parameters with estimations based on atomic element types + void generateBondParameters(); + /// \return Index of existing/added dihedral parameter in given array + static inline int addTorsionParm(DihedralParmArray&, DihedralParmType const&); bool CheckTorsionRange(DihedralType const& dihIn, const char*) const; static inline DihedralType SetTorsionParmIndex(DihedralType const&, DihedralParmArray const&, From 62cb3cd1e41e1cfd345d8621fee146dc0dd71249 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 6 Dec 2023 19:51:00 -0500 Subject: [PATCH 0134/1492] Add addBondParm. Change name to genBondParam to better reflect what it does. --- src/Topology.cpp | 29 +++++++++++++++++++++++++---- src/Topology.h | 5 ++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index c32257e5c4..18205f3fe2 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -723,9 +723,30 @@ void Topology::SetAtomBondInfo(BondArray const& bonds) { } // ----------------------------------------------------------------------------- -// Topology::AddBondParam() +/** Check if given bond parm exists in given bond parm array. Add if not. + * \return Index in bond parm array. + */ +int Topology::addBondParm(BondParmArray& bparray, BondParmType const& BPin) +{ + // See if the BondParm exists. + int pidx = -1; + for (BondParmArray::const_iterator bp = bparray.begin(); + bp != bparray.end(); ++bp) + { + if (BPin == *bp) { + pidx = (int)(bp - bparray.begin()); + break; + } + } + if (pidx == -1) { + pidx = (int)bparray.size(); + bparray.push_back( BPin ); + } + return pidx; +} + /** Create parameters for given bond based on element types. */ -void Topology::AddBondParam(BondType& bnd, BP_mapType& bpMap) +void Topology::genBondParam(BondType& bnd, BP_mapType& bpMap) { unsigned int bp_idx; Atom::AtomicElementType a1Elt = atoms_[bnd.A1()].Element(); @@ -754,9 +775,9 @@ void Topology::generateBondParameters() { // Hold indices into bondparm for unique element pairs BP_mapType bpMap; for (BondArray::iterator bnd = bondsh_.begin(); bnd != bondsh_.end(); ++bnd) - AddBondParam( *bnd, bpMap ); + genBondParam( *bnd, bpMap ); for (BondArray::iterator bnd = bonds_.begin(); bnd != bonds_.end(); ++bnd) - AddBondParam( *bnd, bpMap ); + genBondParam( *bnd, bpMap ); } // Topology::AddBond() diff --git a/src/Topology.h b/src/Topology.h index 525a4bc7ee..527961064b 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -249,11 +249,14 @@ class Topology { void SetAtomBondInfo(BondArray const&); // NOTE: Use set so that elements are always sorted. typedef std::vector< std::set > BP_mapType; - void AddBondParam(BondType&, BP_mapType&); + /// Generate a bond parameter for the given bond based on atom elements + void genBondParam(BondType&, BP_mapType&); /// Fill in bond parameters with estimations based on atomic element types void generateBondParameters(); /// \return Index of existing/added dihedral parameter in given array static inline int addTorsionParm(DihedralParmArray&, DihedralParmType const&); + /// \return Index of existing/added bond parameter in given array + static inline int addBondParm(BondParmArray&, BondParmType const&); bool CheckTorsionRange(DihedralType const& dihIn, const char*) const; static inline DihedralType SetTorsionParmIndex(DihedralType const&, DihedralParmArray const&, From 8867369f6a6a2576cc6f6a06862734ce7aaef635 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 08:26:45 -0500 Subject: [PATCH 0135/1492] Use addBondParm routine --- src/Topology.cpp | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 18205f3fe2..764af6bc36 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -783,18 +783,7 @@ void Topology::generateBondParameters() { // Topology::AddBond() void Topology::AddBond(int atom1, int atom2, BondParmType const& BPin) { // See if the BondParm exists. - int pidx = -1; - for (BondParmArray::const_iterator bp = bondparm_.begin(); bp != bondparm_.end(); ++bp) - if ( fabs(BPin.Rk() - bp->Rk() ) < Constants::SMALL && - fabs(BPin.Req() - bp->Req()) < Constants::SMALL ) - { - pidx = (int)(bp - bondparm_.begin()); - break; - } - if (pidx == -1) { - pidx = (int)bondparm_.size(); - bondparm_.push_back( BPin ); - } + int pidx = addBondParm( bondparm_, BPin );; AddBond( atom1, atom2, pidx ); } @@ -2492,24 +2481,17 @@ void Topology::AssignBondParm(ParmHolder const& newBondParams, types.AddName( atoms_[bnd->A1()].Type() ); types.AddName( atoms_[bnd->A2()].Type() ); bool found; - // See if parameter already present. - int idx = currentIndices.FindParam( types, found ); + // See if parameter is present. + int idx = -1; + BondParmType bp = newBondParams.FindParam( types, found ); if (!found) { - // Search in new - BondParmType bp = newBondParams.FindParam( types, found ); - if (found) { - // Add parameter - idx = (int)bpa.size(); - bpa.push_back( bp ); - currentIndices.AddParm( types, idx, false ); - } else - idx = -1; - } - if (idx == -1) mprintf("Warning: parameter not found for %s %s-%s (%s-%s)\n", desc, TruncResAtomNameNum(bnd->A1()).c_str(), TruncResAtomNameNum(bnd->A2()).c_str(), *types[0], *types[1]); + } else { + idx = addBondParm( bondparm_, bp ); + } bnd->SetIdx( idx ); } } From 0da9ef9f840b16ae0327da7e176d3037804be661 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 10:59:07 -0500 Subject: [PATCH 0136/1492] Ensure angle/improper parameters are packed --- src/Topology.cpp | 200 +++++++++++++++++++++-------------------------- src/Topology.h | 8 +- 2 files changed, 95 insertions(+), 113 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 764af6bc36..2c8bcb3af9 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -898,21 +898,32 @@ void Topology::AddBond(BondType const& bndIn, bool isH) { atoms_[bndIn.A2()].AddBondToIdx( bndIn.A1() ); } -// Topology::AddAngle() -void Topology::AddAngle(int atom1, int atom2, int atom3, AngleParmType const& APin) { +/** Check if given angle parm exists in given angle parm array. Add if not. + * \return Index in angle parm array. + */ +int Topology::addAngleParm(AngleParmArray& aparray, AngleParmType const& APin) +{ // See if the AngleParm exists. int pidx = -1; - for (AngleParmArray::const_iterator ap = angleparm_.begin(); ap != angleparm_.end(); ++ap) - if ( fabs(APin.Tk() - ap->Tk() ) < Constants::SMALL && - fabs(APin.Teq() - ap->Teq()) < Constants::SMALL ) - { - pidx = (int)(ap - angleparm_.begin()); + for (AngleParmArray::const_iterator ap = aparray.begin(); + ap != aparray.end(); ++ap) + { + if (APin == *ap) { + pidx = (int)(ap - aparray.begin()); break; } + } if (pidx == -1) { - pidx = (int)angleparm_.size(); - angleparm_.push_back( APin ); + pidx = (int)aparray.size(); + aparray.push_back( APin ); } + return pidx; +} + +// Topology::AddAngle() +void Topology::AddAngle(int atom1, int atom2, int atom3, AngleParmType const& APin) { + // See if the AngleParm exists. + int pidx = addAngleParm( angleparm_, APin ); AddAngle( atom1, atom2, atom3, pidx ); } @@ -2473,7 +2484,6 @@ void Topology::AssignAtomTypeParm(ParmHolder const& newAtomTypeParams) /** Set parameters for bonds in given bond array. */ void Topology::AssignBondParm(ParmHolder const& newBondParams, - ParmHolder& currentIndices, BondArray& bonds, BondParmArray& bpa, const char* desc) { for (BondArray::iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { @@ -2499,22 +2509,18 @@ void Topology::AssignBondParm(ParmHolder const& newBondParams, /** Replace any current bond parameters with given bond parameters. */ void Topology::AssignBondParams(ParmHolder const& newBondParams) { bondparm_.clear(); - ParmHolder currentIndices; - //AssignParm( atoms, newBondParams, currentIndices, bonds_, bondparm_ ); - AssignBondParm( newBondParams, currentIndices, bonds_, bondparm_, "bond" ); - AssignBondParm( newBondParams, currentIndices, bondsh_, bondparm_, "bond" ); + AssignBondParm( newBondParams, bonds_, bondparm_, "bond" ); + AssignBondParm( newBondParams, bondsh_, bondparm_, "bond" ); } /** Replace any current Urey-Bradley parameters with given UB parameters. */ void Topology::AssignUBParams(ParmHolder const& newBondParams) { chamber_.SetUBparm().clear(); - ParmHolder currentIndices; - AssignBondParm( newBondParams, currentIndices, chamber_.SetUB(), chamber_.SetUBparm(), "UB term" ); + AssignBondParm( newBondParams, chamber_.SetUB(), chamber_.SetUBparm(), "UB term" ); } /** Set parameters for angles in given angle array. */ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, - ParmHolder& currentIndices, AngleArray& angles) { for (AngleArray::iterator ang = angles.begin(); ang != angles.end(); ++ang) { @@ -2523,25 +2529,18 @@ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, types.AddName( atoms_[ang->A2()].Type() ); types.AddName( atoms_[ang->A3()].Type() ); bool found; - // See if parameter already present. - int idx = currentIndices.FindParam( types, found ); + // See if parameter is present. + int idx = -1; + AngleParmType ap = newAngleParams.FindParam( types, found ); if (!found) { - // Search in new - AngleParmType ap = newAngleParams.FindParam( types, found ); - if (found) { - // Add parameter - idx = (int)angleparm_.size(); - angleparm_.push_back( ap ); - currentIndices.AddParm( types, idx, false ); - } else - idx = -1; - } - if (idx == -1) mprintf("Warning: Angle parameter not found for angle %s-%s-%s (%s-%s-%s)\n", TruncResAtomNameNum(ang->A1()).c_str(), TruncResAtomNameNum(ang->A2()).c_str(), TruncResAtomNameNum(ang->A3()).c_str(), *types[0], *types[1], *types[3]); + } else { + idx = addAngleParm( angleparm_, ap ); + } ang->SetIdx( idx ); } } @@ -2549,14 +2548,12 @@ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, /** Replace any current angle parameters with given angle parameters. */ void Topology::AssignAngleParams(ParmHolder const& newAngleParams) { angleparm_.clear(); - ParmHolder currentIndices; - AssignAngleParm( newAngleParams, currentIndices, angles_ ); - AssignAngleParm( newAngleParams, currentIndices, anglesh_ ); + AssignAngleParm( newAngleParams, angles_ ); + AssignAngleParm( newAngleParams, anglesh_ ); } -/** Set parameters for dihedrals in given dihedral array. */ +/** Set parameters for improper dihedrals in given improper dihedral array. */ void Topology::AssignImproperParm(ParmHolder const& newImproperParams, - ParmHolder& currentIndices, DihedralArray& impropers) { for (DihedralArray::iterator imp = impropers.begin(); imp != impropers.end(); ++imp) { @@ -2566,26 +2563,19 @@ void Topology::AssignImproperParm(ParmHolder const& newImprope types.AddName( atoms_[imp->A3()].Type() ); types.AddName( atoms_[imp->A4()].Type() ); bool found; - // See if parameter already present. - int idx = currentIndices.FindParam( types, found ); + // See if parameter is present. + int idx = -1; + DihedralParmType ip = newImproperParams.FindParam( types, found ); if (!found) { - // Search in new - DihedralParmType ip = newImproperParams.FindParam( types, found ); - if (found) { - // Add parameter - idx = (int)chamber_.ImproperParm().size(); - chamber_.SetImproperParm().push_back( ip ); - currentIndices.AddParm( types, idx, false ); - } else - idx = -1; - } - if (idx == -1) mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(imp->A1()).c_str(), TruncResAtomNameNum(imp->A2()).c_str(), TruncResAtomNameNum(imp->A3()).c_str(), TruncResAtomNameNum(imp->A4()).c_str(), *types[0], *types[1], *types[3], *types[4]); + } else { + idx = addTorsionParm( chamber_.SetImproperParm(), ip ); + } imp->SetIdx( idx ); } } @@ -2593,8 +2583,7 @@ void Topology::AssignImproperParm(ParmHolder const& newImprope /** Replace any current improper parameters with given improper parameters. */ void Topology::AssignImproperParams(ParmHolder const& newImproperParams) { chamber_.SetImproperParm().clear(); - ParmHolder currentIndices; - AssignImproperParm( newImproperParams, currentIndices, chamber_.SetImpropers() ); + AssignImproperParm( newImproperParams, chamber_.SetImpropers() ); } /** Set parameters for dihedrals in given dihedral array. */ @@ -2615,11 +2604,6 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, dihedrals.push_back( *dih ); else { if ( *dih != dihedrals.back() ) - //DihedralType const& last = dihedrals.back(); - //if ( last.A1() != dih->A1() || - // last.A2() != dih->A2() || - // last.A3() != dih->A3() || - // last.A4() != dih->A4() ) dihedrals.push_back( *dih ); } } @@ -2627,8 +2611,6 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, mprintf("DEBUG: %zu incoming dihedrals, %zu unique dihedrals.\n", dihedralsIn.size(), dihedrals.size()); - //ParmHolder< std::vector > currentIndices; - //ParmHolder< int > improperIndices; dihedralsIn.clear(); // Loop over all dihedrals for (DihedralArray::iterator dih = dihedrals.begin(); dih != dihedrals.end(); ++dih) { @@ -2641,10 +2623,9 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, if (dih->IsImproper()) { // ----- This is actually an improper dihedral. ---------------- DihedralParmType ip = newImproperParams.FindParam( types, found ); - int idx; + int idx = -1; if (!found) { - idx = -1; - mprintf("Warning: Improper parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(dih->A1()).c_str(), TruncResAtomNameNum(dih->A2()).c_str(), TruncResAtomNameNum(dih->A3()).c_str(), @@ -2785,56 +2766,6 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, } } -/** \return True if any atom has a non-zero charge. */ -bool Topology::HasChargeInfo() const { - for (std::vector::const_iterator at = atoms_.begin(); - at != atoms_.end(); ++at) - if (at->Charge() > 0.0 || at->Charge() < 0.0) - return true; - return false; -} - -/** Redistribute charge on atoms to match given total target charge. */ -int Topology::RedistributeCharge(double charge) { - //mprintf("DEBUG: Redistribute charge for %s, total charge = %g\n", topIn.c_str(), charge); - double pcharge = 0; - double ncharge = 0; - for (unsigned int iat = 0; iat != atoms_.size(); iat++) { - if (atoms_[iat].Charge() > 0) - pcharge += atoms_[iat].Charge(); - else if (atoms_[iat].Charge() < 0) - ncharge += atoms_[iat].Charge(); - } - //if (fabs(pcharge) < Constants::SMALL) - bool PchargeZero = false; - if (pcharge == 0) { - mprintf("\tTotal positive charge is 0.0\n"); - PchargeZero = true; - } - bool NchargeZero = false; - //if (fabs(ncharge) < Constants::SMALL) - if (ncharge == 0) { - mprintf("\tTotal negative charge is 0.0\n"); - NchargeZero = true; - } - if (!PchargeZero && !NchargeZero) { - //double total_charge = 0; - for (unsigned int iat = 0; iat != atoms_.size(); iat++) { - double delta = atoms_[iat].Charge() * (charge - pcharge - ncharge) / (pcharge - ncharge); - if (atoms_[iat].Charge() >= 0) { - atoms_[iat].SetCharge( atoms_[iat].Charge() + delta ); - } else { - atoms_[iat].SetCharge( atoms_[iat].Charge() - delta ); - } - //total_charge += topIn[iat].Charge(); - } - //mprintf("DEBUG: Total charge after redistribute: %g\n", total_charge); - } - return 0; -} - -// ----------------------------------------------------------------------------- - /** Update/add to parameters in this topology with those from given set. */ int Topology::UpdateParams(ParameterSet const& set1) { ParameterSet set0 = GetParameters(); @@ -2906,3 +2837,52 @@ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { if (debug_ > 0) set0.Debug("newp.dat"); return 0; } + +// ----------------------------------------------------------------------------- +/** \return True if any atom has a non-zero charge. */ +bool Topology::HasChargeInfo() const { + for (std::vector::const_iterator at = atoms_.begin(); + at != atoms_.end(); ++at) + if (at->Charge() > 0.0 || at->Charge() < 0.0) + return true; + return false; +} + +/** Redistribute charge on atoms to match given total target charge. */ +int Topology::RedistributeCharge(double charge) { + //mprintf("DEBUG: Redistribute charge for %s, total charge = %g\n", topIn.c_str(), charge); + double pcharge = 0; + double ncharge = 0; + for (unsigned int iat = 0; iat != atoms_.size(); iat++) { + if (atoms_[iat].Charge() > 0) + pcharge += atoms_[iat].Charge(); + else if (atoms_[iat].Charge() < 0) + ncharge += atoms_[iat].Charge(); + } + //if (fabs(pcharge) < Constants::SMALL) + bool PchargeZero = false; + if (pcharge == 0) { + mprintf("\tTotal positive charge is 0.0\n"); + PchargeZero = true; + } + bool NchargeZero = false; + //if (fabs(ncharge) < Constants::SMALL) + if (ncharge == 0) { + mprintf("\tTotal negative charge is 0.0\n"); + NchargeZero = true; + } + if (!PchargeZero && !NchargeZero) { + //double total_charge = 0; + for (unsigned int iat = 0; iat != atoms_.size(); iat++) { + double delta = atoms_[iat].Charge() * (charge - pcharge - ncharge) / (pcharge - ncharge); + if (atoms_[iat].Charge() >= 0) { + atoms_[iat].SetCharge( atoms_[iat].Charge() + delta ); + } else { + atoms_[iat].SetCharge( atoms_[iat].Charge() - delta ); + } + //total_charge += topIn[iat].Charge(); + } + //mprintf("DEBUG: Total charge after redistribute: %g\n", total_charge); + } + return 0; +} diff --git a/src/Topology.h b/src/Topology.h index 527961064b..baa7c31418 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -257,6 +257,8 @@ class Topology { static inline int addTorsionParm(DihedralParmArray&, DihedralParmType const&); /// \return Index of existing/added bond parameter in given array static inline int addBondParm(BondParmArray&, BondParmType const&); + /// \return Index of existing/added angle parameter in given array + static inline int addAngleParm(AngleParmArray&, AngleParmType const&); bool CheckTorsionRange(DihedralType const& dihIn, const char*) const; static inline DihedralType SetTorsionParmIndex(DihedralType const&, DihedralParmArray const&, @@ -292,9 +294,9 @@ class Topology { int updateParams(ParameterSet&, ParameterSet const&); void AssignAtomTypeParm(ParmHolder const&); - void AssignBondParm(ParmHolder const&, ParmHolder&, BondArray&, BondParmArray&, const char*); - void AssignAngleParm(ParmHolder const&, ParmHolder&, AngleArray&); - void AssignImproperParm(ParmHolder const&, ParmHolder&, DihedralArray&); + void AssignBondParm(ParmHolder const&, BondArray&, BondParmArray&, const char*); + void AssignAngleParm(ParmHolder const&, AngleArray&); + void AssignImproperParm(ParmHolder const&, DihedralArray&); void AssignDihedralParm(DihedralParmHolder const&, ParmHolder const&, DihedralArray&); static const NonbondType LJ_EMPTY; From 8be515320d92d4ffb581bcfd8c3c1c154d6017e6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 12:43:14 -0500 Subject: [PATCH 0137/1492] Use passed in bond parameter array so UB terms are also assigned. Make const. --- src/Topology.cpp | 39 ++------------------------------------- src/Topology.h | 2 +- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 2c8bcb3af9..fa9fb01292 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2428,42 +2428,6 @@ ParameterSet Topology::GetParameters() const { } // ----------------------------------------------------------------------------- -/** Set parameters in array V for objects in array U using parameters from array T. - */ -/* -template -void AssignParm(std::vector const& atoms, - ParmHolder const& newParams, // BondParmType - ParmHolder& currentIndices, - U& objects, // BondArray - V& currentParams) // BondParmArray -{ - for (typename U::iterator obj = objects.begin(); obj != objects.end(); ++obj) { - TypeNameHolder types(obj->Nidx()); - for (unsigned int idx = 0; idx != obj->Nidx(); idx++) - types.AddName( atoms[obj->Atom(idx)].Type() ); - bool found; - // See if parameter already present. - int idx = currentIndices.FindParam( types, found ); - if (!found) { - // Search in new - T param = newParams.FindParam( types, found ); - if (found) { - // Add parameter - idx = (int)currentParams.size(); - currentParams.push_back( param ); - } else - idx = -1; - } - //if (idx == -1) - // mprintf("Warning: Bond parameter not found for bond %s-%s (%s-%s)\n", - // TruncResAtomNameNum(bnd->A1()).c_str(), - // TruncResAtomNameNum(bnd->A2()).c_str(), - // *types[0], *types[1]); - obj->SetIdx( idx ); - } -}*/ - /** Set parameters for atoms via given atom type parameter holder. */ void Topology::AssignAtomTypeParm(ParmHolder const& newAtomTypeParams) { @@ -2485,6 +2449,7 @@ void Topology::AssignAtomTypeParm(ParmHolder const& newAtomTypeParams) /** Set parameters for bonds in given bond array. */ void Topology::AssignBondParm(ParmHolder const& newBondParams, BondArray& bonds, BondParmArray& bpa, const char* desc) +const { for (BondArray::iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { TypeNameHolder types(2); @@ -2500,7 +2465,7 @@ void Topology::AssignBondParm(ParmHolder const& newBondParams, TruncResAtomNameNum(bnd->A2()).c_str(), *types[0], *types[1]); } else { - idx = addBondParm( bondparm_, bp ); + idx = addBondParm( bpa, bp ); } bnd->SetIdx( idx ); } diff --git a/src/Topology.h b/src/Topology.h index baa7c31418..cd0afac3b7 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -294,7 +294,7 @@ class Topology { int updateParams(ParameterSet&, ParameterSet const&); void AssignAtomTypeParm(ParmHolder const&); - void AssignBondParm(ParmHolder const&, BondArray&, BondParmArray&, const char*); + void AssignBondParm(ParmHolder const&, BondArray&, BondParmArray&, const char*) const; void AssignAngleParm(ParmHolder const&, AngleArray&); void AssignImproperParm(ParmHolder const&, DihedralArray&); void AssignDihedralParm(DihedralParmHolder const&, ParmHolder const&, DihedralArray&); From a3df3f26b3bf09d705b2c1137a4c9e495b4c9cf7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 12:58:43 -0500 Subject: [PATCH 0138/1492] Ensure LJ 1012 term is added --- src/Topology.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index fa9fb01292..1f906897b6 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2672,10 +2672,11 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, // Regenerate nonbond params for existing types nonbond_.Clear(); nonbond_.SetupLJforNtypes( currentAtomTypes.size() ); - // Set type indices + // Set type indices in order. int nidx1 = 0; for (ParmHolder::iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) t1->second.SetTypeIdx( nidx1 ); + // Loop over all atom type pairs nidx1 = 0; for (ParmHolder::const_iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) { @@ -2691,10 +2692,11 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, TypeNameHolder types(2); types.AddName( name1 ); types.AddName( name2 ); - // Check LJ10-12 + // Check for LJ10-12 first ParmHolder::const_iterator hb = newHB.GetParam( types ); if (hb != newHB.end()) { - mprintf("DEBUG: LJ 10-12 parameter found for %s %s\n", *name1, *name2); + mprintf("LJ 10-12 parameter found for %s %s\n", *name1, *name2); + nonbond_.AddHBterm(nidx1, nidx2, hb->second); } else { // See if this parameter exists in the given nonbond array. NonbondType LJAB; @@ -2797,7 +2799,7 @@ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { mprintf("\tRegenerating nonbond parameters.\n"); AssignNonbondParams( set0.AT(), set0.NB(), set0.HB() ); } - // TODO LJ14 and HB + // TODO LJ14 if (debug_ > 0) set0.Debug("newp.dat"); return 0; From e544085d06b47840d66b5a8bd3994ac3aa197e88 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 13:59:27 -0500 Subject: [PATCH 0139/1492] Have the < and == operators take mass and polarizability into account --- src/AtomType.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/AtomType.h b/src/AtomType.h index 4b1d734853..659e84fc8e 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -22,10 +22,24 @@ class AtomType { double Polarizability() const { return polarizability_; } /// \return Original atom type index. Useful when checking for off-diagonal NB parameters. int OriginalIdx() const { return oidx_; } - /// \return true if LJ params are less than incoming - bool operator<(AtomType const& rhs) const { return lj_ < rhs.lj_; } - /// \return true if LJ params are the same - bool operator==(AtomType const& rhs) const { return lj_ == rhs.lj_; } + /// \return true if mass, polarizability, or LJ params are less than incoming + bool operator<(AtomType const& rhs) const { + if (FEQ(mass_, rhs.mass_)) { + if (FEQ(polarizability_, rhs.polarizability_)) { + return lj_ < rhs.lj_; + } else { + return polarizability_ < rhs.polarizability_; + } + } else { + return mass_ < rhs.mass_; + } + } + /// \return true if mass, polarizability, and LJ params are the same + bool operator==(AtomType const& rhs) const { + return (FEQ(mass_, rhs.mass_) && + FEQ(polarizability_, rhs.polarizability_) && + lj_ == rhs.lj_); + } /// Used to modify LJ params LJparmType& SetLJ() { return lj_; } /// \return data size (2 double for LJparmType) From 7b231274367deb9016f3dee3d5bfadf23174f327 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 14:38:32 -0500 Subject: [PATCH 0140/1492] Pack the nonbond array by detecting equivalent types --- src/Topology.cpp | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 1f906897b6..dc1ddb95d4 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -46,9 +46,10 @@ unsigned int Topology::HeavyAtomCount() const { return hac; } -/** \return Total number of unique atom types. */ +/** \return Total number of unique nonbonded atom types. */ unsigned int Topology::NatomTypes() const { - ParmHolder currentAtomTypes; + return nonbond_.Ntypes(); +/* ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { if (atm->Type().len() > 0) { @@ -65,7 +66,7 @@ unsigned int Topology::NatomTypes() const { for (ParmHolder::const_iterator it = currentAtomTypes.begin(); it != currentAtomTypes.end(); ++it) mprintf("\t\t%s %i\n", *(it->first[0]), it->second); - return currentAtomTypes.size(); + return currentAtomTypes.size();*/ } /** Reset all PDB-related info. @@ -2671,20 +2672,33 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, } // Regenerate nonbond params for existing types nonbond_.Clear(); - nonbond_.SetupLJforNtypes( currentAtomTypes.size() ); // Set type indices in order. - int nidx1 = 0; - for (ParmHolder::iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) - t1->second.SetTypeIdx( nidx1 ); + for (ParmHolder::iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1) + t1->second.SetTypeIdx( -1 ); + int n_unique_lj_types = 0; + for (ParmHolder::iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1) + { + if (t1->second.OriginalIdx() == -1) { + t1->second.SetTypeIdx( n_unique_lj_types ); + // Look for equivalent nonbond types + for (ParmHolder::iterator t2 = t1 + 1; t2 != currentAtomTypes.end(); ++t2) { + if (t2->second.OriginalIdx() == -1 && t1->second.LJ() == t2->second.LJ()) { + mprintf("DEBUG: Type %s equivalent to type %s\n", *(t1->first[0]), *(t2->first[0])); + t2->second.SetTypeIdx( n_unique_lj_types ); + } + } + n_unique_lj_types++; + } + } + mprintf("DEBUG: Setting up nonbond array for %i unique LJ types.\n", n_unique_lj_types); + nonbond_.SetupLJforNtypes( n_unique_lj_types ); // Loop over all atom type pairs - nidx1 = 0; - for (ParmHolder::const_iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1, nidx1++) + for (ParmHolder::const_iterator t1 = currentAtomTypes.begin(); t1 != currentAtomTypes.end(); ++t1) { NameType const& name1 = t1->first[0]; //mprintf("DEBUG: Type1= %s (%i)\n", *name1, nidx1); AtomType const& type1 = t1->second; - int nidx2 = nidx1; - for (ParmHolder::const_iterator t2 = t1; t2 != currentAtomTypes.end(); ++t2, nidx2++) + for (ParmHolder::const_iterator t2 = t1; t2 != currentAtomTypes.end(); ++t2) { NameType const& name2 = t2->first[0]; //mprintf("DEBUG:\t\tType2= %s (%i)\n", *name2, nidx2); @@ -2696,7 +2710,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHolder::const_iterator hb = newHB.GetParam( types ); if (hb != newHB.end()) { mprintf("LJ 10-12 parameter found for %s %s\n", *name1, *name2); - nonbond_.AddHBterm(nidx1, nidx2, hb->second); + nonbond_.AddHBterm(t1->second.OriginalIdx(), t2->second.OriginalIdx(), hb->second); } else { // See if this parameter exists in the given nonbond array. NonbondType LJAB; @@ -2708,7 +2722,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, mprintf("Using existing NB parameter for %s %s\n", *name1, *name2); LJAB = it->second; } - nonbond_.AddLJterm(nidx1, nidx2, LJAB); + nonbond_.AddLJterm(t1->second.OriginalIdx(), t2->second.OriginalIdx(), LJAB); } } } From 1d5d5dc7fc133e996bc55276536f23bf7fe11936 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 14:48:38 -0500 Subject: [PATCH 0141/1492] Need total number of unique atoms for solty array, not unique LJ types --- src/Parm_Amber.cpp | 2 +- src/Topology.cpp | 9 ++++----- src/Topology.h | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Parm_Amber.cpp b/src/Parm_Amber.cpp index 771974345c..9552a3e141 100644 --- a/src/Parm_Amber.cpp +++ b/src/Parm_Amber.cpp @@ -1890,7 +1890,7 @@ int Parm_Amber::WriteParm(FileName const& fname, Topology const& TopOut) { file_.IntToBuffer( TopOut.BondParm().size() ); // NUMBND file_.IntToBuffer( TopOut.AngleParm().size() ); // NUMANG file_.IntToBuffer( TopOut.DihedralParm().size() ); // NPTRA - unsigned int n_unique_atom_types = TopOut.NatomTypes(); + unsigned int n_unique_atom_types = TopOut.NuniqueAtomTypes(); file_.IntToBuffer( n_unique_atom_types ); // NATYP, only for SOLTY file_.IntToBuffer( TopOut.Nonbond().HBarray().size() ); // NPHB file_.IntToBuffer( 0 ); // IFPERT diff --git a/src/Topology.cpp b/src/Topology.cpp index dc1ddb95d4..8af9c36c43 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -46,10 +46,9 @@ unsigned int Topology::HeavyAtomCount() const { return hac; } -/** \return Total number of unique nonbonded atom types. */ -unsigned int Topology::NatomTypes() const { - return nonbond_.Ntypes(); -/* ParmHolder currentAtomTypes; +/** \return Total number of unique atom types. */ +unsigned int Topology::NuniqueAtomTypes() const { + ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { if (atm->Type().len() > 0) { @@ -66,7 +65,7 @@ unsigned int Topology::NatomTypes() const { for (ParmHolder::const_iterator it = currentAtomTypes.begin(); it != currentAtomTypes.end(); ++it) mprintf("\t\t%s %i\n", *(it->first[0]), it->second); - return currentAtomTypes.size();*/ + return currentAtomTypes.size(); } /** Reset all PDB-related info. diff --git a/src/Topology.h b/src/Topology.h index cd0afac3b7..7ef90fa9bd 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -33,7 +33,8 @@ class Topology { int Nmol() const { return (int)molecules_.size(); } int Nsolvent() const { return NsolventMolecules_; } int NextraPts() const { return n_extra_pts_; } - unsigned int NatomTypes() const; + /// \return number of unique atom types + unsigned int NuniqueAtomTypes() const; std::string const& ParmName() const { return parmName_; } FileName const& OriginalFilename() const { return fileName_; } std::string const& GBradiiSet() const { return radius_set_; } From 0228fb6482a804b0388e5f6afe68452e0f4485d2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 7 Dec 2023 16:16:39 -0500 Subject: [PATCH 0142/1492] Some attempts at bond sorting to match leap --- src/Exec_UpdateParameters.cpp | 3 +++ src/Topology.cpp | 46 +++++++++++++++++++++++++++++++++-- src/Topology.h | 1 + 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/Exec_UpdateParameters.cpp b/src/Exec_UpdateParameters.cpp index d42b174e29..c07ede5e7d 100644 --- a/src/Exec_UpdateParameters.cpp +++ b/src/Exec_UpdateParameters.cpp @@ -44,6 +44,9 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn mprintf("\tUpdating parameters in topology '%s' using those in set '%s'\n", top.c_str(), ds->legend()); + // Sort topology bond arrays to be consistent with LEaP + top.SortBonds(); + if (ds->Type() == DataSet::PARAMETERS) top.UpdateParams(static_cast( *ds )); else if (ds->Type() == DataSet::TOPOLOGY) { diff --git a/src/Topology.cpp b/src/Topology.cpp index 8af9c36c43..b94c1a36b8 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -1,9 +1,9 @@ -#include // find +#include // find, copy, fill #include // For large system molecule search #include "Topology.h" #include "CpptrajStdio.h" #include "StringRoutines.h" // integerToString -#include "Constants.h" // RADDEG, SMALL +#include "Constants.h" // SMALL #include "AtomType.h" #include "AtomMask.h" #include "CharMask.h" @@ -898,6 +898,12 @@ void Topology::AddBond(BondType const& bndIn, bool isH) { atoms_[bndIn.A2()].AddBondToIdx( bndIn.A1() ); } +/** Sort bond arrays. May want to do this to e.g. match LEAP bond ordering. */ +void Topology::SortBonds() { + std::sort(bonds_.begin(), bonds_.end()); + std::sort(bondsh_.begin(), bondsh_.end()); +} + /** Check if given angle parm exists in given angle parm array. Add if not. * \return Index in angle parm array. */ @@ -2476,6 +2482,42 @@ void Topology::AssignBondParams(ParmHolder const& newBondParams) { bondparm_.clear(); AssignBondParm( newBondParams, bonds_, bondparm_, "bond" ); AssignBondParm( newBondParams, bondsh_, bondparm_, "bond" ); +/** // Try to match leap bond ordering. Appears to be by index with priority + // given to heavy atoms. + BondArray tmpBonds; + tmpBonds.resize( bonds_.size() + bondsh_.size() ); + std::copy( bonds_.begin(), bonds_.end(), tmpBonds.begin() ); + std::copy( bondsh_.begin(), bondsh_.end(), tmpBonds.begin() + bonds_.size() ); + std::sort( tmpBonds.begin(), tmpBonds.end() );**/ +/* + BondArray::iterator b1 = bonds_.begin(); + BondArray::iterator b2 = bondsh_.begin(); + while (b1 != bonds_.end() || b2 != bondsh_.end()) { + int iat = b1->A1(); + tmpBonds.push_back( *b1 ); + ++b1; + while (b1 != bonds_.end() && b1->A1() == iat) { + tmpBonds.push_back( *b1 ); + ++b1; + } + while (b2 != bondsh_.end() && b2->A1() == iat) { + tmpBonds.push_back( *b2 ); + ++b2; + } + } + if (tmpBonds.size() != bonds_.size() + bondsh_.size()) { + mprinterr("Internal Error: AssignBondParams: Size of temp. bonds array %zu != total # bonds %zu\n", + tmpBonds.size(), bonds_.size() + bondsh_.size()); + }*/ +/** AssignBondParm( newBondParams, tmpBonds, bondparm_, "bond" ); + bonds_.clear(); + bondsh_.clear(); + for (BondArray::const_iterator it = tmpBonds.begin(); it != tmpBonds.end(); ++it) + if ( atoms_[it->A1()].Element() == Atom::HYDROGEN || + atoms_[it->A2()].Element() == Atom::HYDROGEN) + bondsh_.push_back( *it ); + else + bonds_.push_back( *it );**/ } /** Replace any current Urey-Bradley parameters with given UB parameters. */ diff --git a/src/Topology.h b/src/Topology.h index 7ef90fa9bd..10f3d3996c 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -115,6 +115,7 @@ class Topology { void AddBond(BondType const&, bool); void AddBond(int, int, BondParmType const&); int RemoveBond(int, int); + void SortBonds(); void AssignBondParams(ParmHolder const&); // ----- Angle-specific routines ------------- size_t Nangles() const { return angles_.size()+anglesh_.size(); } From 5bc700bcf886e7ecfd3c6910b21e3f11085cd791 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 08:48:45 -0500 Subject: [PATCH 0143/1492] Add a verbosity option --- src/UpdateParameters.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/UpdateParameters.h b/src/UpdateParameters.h index 9dcd79b04c..ea7221eceb 100644 --- a/src/UpdateParameters.h +++ b/src/UpdateParameters.h @@ -20,8 +20,9 @@ static inline void PrintParmType(HB_ParmType const& hb) { mprintf(" %12.4E %12.4 * \param0 Parameters to add to/update. * \param1 New parameters. * \param desc Description of parameters. + * \param verbose Verbosity: 0 - silent, 1 - updated only, 2 - updated & same, 3 - all */ -template int UpdateParameters(T& param0, T const& param1, const char* desc) +template int UpdateParameters(T& param0, T const& param1, const char* desc, int verbose) { // DEBUG // mprintf("DEBUG: Current %s Parameters:\n", desc); @@ -33,16 +34,20 @@ template int UpdateParameters(T& param0, T const& param1, const cha { ParameterHolders::RetType ret = param0.AddParm( newp->first, newp->second, true ); if (ret != ParameterHolders::ERR) { + bool print = false; if (ret == ParameterHolders::ADDED) { - mprintf("\tAdded NEW %s parameter:", desc); + if (verbose > 2) { mprintf("\tAdded NEW %s parameter:", desc); print = true; } updateCount++; } else if (ret == ParameterHolders::UPDATED) { - mprintf("\tUpdated %s parameter:", desc); + if (verbose > 0) { mprintf("\tUpdated %s parameter:", desc); print = true; } updateCount++; - } else if (ret == ParameterHolders::SAME) - mprintf("\tParameter for %s already present:", desc); - mprintf(" %s", newp->first.TypeString().c_str()); - PrintParmType( newp->second ); + } else if (ret == ParameterHolders::SAME) { + if (verbose > 1) { mprintf("\tParameter for %s already present:", desc); print = true; } + } + if (print) { + mprintf(" %s", newp->first.TypeString().c_str()); + PrintParmType( newp->second ); + } //mprintf(" %s %s %12.4f %12.4f\n", // *(newp->first[0]), *(newp->first[1]), newp->second.Rk(), newp->second.Req()); } From dc7ef75e4fd47f179a80619511d4d536e870c789 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 08:49:30 -0500 Subject: [PATCH 0144/1492] Use debug in place of verbosity for now --- src/DataIO_AmberFF.cpp | 2 +- src/DataIO_CharmmRtfPrm.cpp | 4 ++-- src/DataIO_Std.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DataIO_AmberFF.cpp b/src/DataIO_AmberFF.cpp index 07fc9487ef..94378f3d30 100644 --- a/src/DataIO_AmberFF.cpp +++ b/src/DataIO_AmberFF.cpp @@ -95,7 +95,7 @@ int DataIO_AmberFF::WriteData(FileName const& fname, DataSetList const& dsl) it != toWrite.end(); ++it) { ParameterSet::UpdateCount UC; - prm.UpdateParamSet( *(*it), UC, debug_ ); + prm.UpdateParamSet( *(*it), UC, debug_, debug_ ); // FIXME verbose } return outfile.WriteParams( prm, fname, debug_ ); } diff --git a/src/DataIO_CharmmRtfPrm.cpp b/src/DataIO_CharmmRtfPrm.cpp index 9fc751ac05..917b02bac8 100644 --- a/src/DataIO_CharmmRtfPrm.cpp +++ b/src/DataIO_CharmmRtfPrm.cpp @@ -79,14 +79,14 @@ int DataIO_CharmmRtfPrm::WriteData(FileName const& fname, DataSetList const& dsl { mprintf("\tUsing parameter set '%s'\n", (*it)->legend()); DataSet_Parameters const& dsPrm = static_cast( *(*it) ); - pout.UpdateParamSet( dsPrm, ucount, debug_ ); + pout.UpdateParamSet( dsPrm, ucount, debug_, debug_ ); // FIXME verbose } else if ( (*it)->Type() == DataSet::TOPOLOGY ) { mprintf("\tUsing parameters from topology '%s'\n", (*it)->legend()); // Convert topology to parameter set DataSet_Topology const& dsTop = static_cast( *(*it) ); - pout.UpdateParamSet( dsTop.Top().GetParameters(), ucount, debug_ ); + pout.UpdateParamSet( dsTop.Top().GetParameters(), ucount, debug_, debug_ ); // FIXME verbose } else { mprintf("Warning: '%s' is not a valid parameter/topology set, skipping.\n", (*it)->legend()); diff --git a/src/DataIO_Std.cpp b/src/DataIO_Std.cpp index 466399d77e..8fecb410da 100644 --- a/src/DataIO_Std.cpp +++ b/src/DataIO_Std.cpp @@ -1198,7 +1198,7 @@ int DataIO_Std::WriteParameters(CpptrajFile& file, DataSetList const& Sets) cons if ((*it)->Type() == DataSet::PARAMETERS) { DataSet_Parameters const& param = static_cast( *(*it) ); ParameterSet::UpdateCount UC; - prm.UpdateParamSet( param, UC, debug_ ); + prm.UpdateParamSet( param, UC, debug_, debug_ ); // FIXME verbose } else { mprintf("Warning: Set '%s' is not a parameter set, skipping.\n", (*it)->legend()); } From 62d269dd877db7bd2d4a174ef9d3e6ff951c2cd0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 08:50:22 -0500 Subject: [PATCH 0145/1492] Add summary function and verbosity argument --- src/ParameterSet.cpp | 39 ++++++++++++++++++++++++++++----------- src/ParameterSet.h | 4 +++- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 94b4bc1b36..ff6dc6c5b7 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -23,6 +23,23 @@ void ParameterSet::Debug(const char* fnameIn) const { Out.CloseFile(); } +/** Write summary to stdout. */ +void ParameterSet::Summary() const { + mprintf("\tParameter set: %s\n", ParamSetName().c_str()); + mprintf("\t %zu atom types:", atomTypes_.size()); + for (ParmHolder::const_iterator at = atomTypes_.begin(); at != atomTypes_.end(); ++at) + mprintf(" %s", *(at->first[0])); + mprintf("\n"); + mprintf("\t %zu LJ 6-12 parameters.\n", nbParm_.size()); + mprintf("\t %zu LJ 6-12 1-4 parameters.\n", nb14Parm_.size()); + mprintf("\t %zu LJ 10-12 parameters.\n", HBparm_.size()); + mprintf("\t %zu bond parameters.\n", bondParm_.size()); + mprintf("\t %zu angle parameters.\n", angleParm_.size()); + mprintf("\t %zu UB parameters.\n", ubParm_.size()); + mprintf("\t %zu dihedral parameters.\n", dihParm_.size()); + mprintf("\t %zu improper parameters.\n", impParm_.size()); +} + /** Write parameters out to given file. */ void ParameterSet::Print(CpptrajFile& Out) const { if (!name_.empty()) @@ -35,7 +52,7 @@ void ParameterSet::Print(CpptrajFile& Out) const { Out.Printf("\t%6s %8li %12.4f %12.4f %12.4f %12.4f\n", *(at->first[0]), at - atomTypes_.begin(), at->second.LJ().Radius(), at->second.LJ().Depth(), at->second.Mass(), at->second.Polarizability()); } if (!nbParm_.empty()) { - Out.Printf("LJ parameters:\n"); + Out.Printf("LJ 6-12 parameters:\n"); Out.Printf("\t%6s %6s : %12s %12s\n", "Type1", "Type2", "A", "B"); for (ParmHolder::const_iterator nb = nbParm_.begin(); nb != nbParm_.end(); ++nb) Out.Printf("\t%6s %6s : %12.4E %12.4E\n", (*nb->first[0]), (*nb->first[1]), nb->second.A(), nb->second.B()); @@ -93,7 +110,7 @@ void ParameterSet::Print(CpptrajFile& Out) const { } /** Update/add to parameters in this topology with those from given set. */ -int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int debugIn) { +int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int debugIn, int verbose) { ParameterSet& set0 = *this; // Check if (debugIn > 0) { @@ -103,23 +120,23 @@ int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int } // Bond parameters - uc.nBondsUpdated_ = UpdateParameters< ParmHolder >(set0.BP(), set1.BP(), "bond"); + uc.nBondsUpdated_ = UpdateParameters< ParmHolder >(set0.BP(), set1.BP(), "bond", verbose); // Angle parameters - uc.nAnglesUpdated_ = UpdateParameters< ParmHolder >(set0.AP(), set1.AP(), "angle"); + uc.nAnglesUpdated_ = UpdateParameters< ParmHolder >(set0.AP(), set1.AP(), "angle", verbose); // Dihedral/improper parameters - uc.nDihedralsUpdated_ = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral"); + uc.nDihedralsUpdated_ = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral", verbose); // Improper parameters - uc.nImpropersUpdated_ = UpdateParameters< ParmHolder >(set0.IP(), set1.IP(), "improper"); + uc.nImpropersUpdated_ = UpdateParameters< ParmHolder >(set0.IP(), set1.IP(), "improper", verbose); // Urey-Bradley parameters - uc.nUreyBradleyUpdated_ = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley"); + uc.nUreyBradleyUpdated_ = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley", verbose); // Atom types - uc.nAtomTypeUpdated_ = UpdateParameters< ParmHolder >(set0.AT(), set1.AT(), "atom type"); + uc.nAtomTypeUpdated_ = UpdateParameters< ParmHolder >(set0.AT(), set1.AT(), "atom type", verbose); // LJ Pairs - uc.nLJparamsUpdated_ = UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B"); + uc.nLJparamsUpdated_ = UpdateParameters< ParmHolder >(set0.NB(), set1.NB(), "LJ A-B", verbose); // LJ 1-4 Pairs - uc.nLJ14paramsUpdated_ = UpdateParameters< ParmHolder >(set0.NB14(), set1.NB14(), "LJ A-B 1-4"); + uc.nLJ14paramsUpdated_ = UpdateParameters< ParmHolder >(set0.NB14(), set1.NB14(), "LJ A-B 1-4", verbose); // HB LJ 10-12 Pairs - uc.nHBparamsUpdated_ = UpdateParameters< ParmHolder >(set0.HB(), set1.HB(), "LJ HB 10-12"); + uc.nHBparamsUpdated_ = UpdateParameters< ParmHolder >(set0.HB(), set1.HB(), "LJ HB 10-12", verbose); if (debugIn > 0) set0.Debug("newp.dat"); return 0; diff --git a/src/ParameterSet.h b/src/ParameterSet.h index d565f29868..072e4c598f 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -39,6 +39,8 @@ class ParameterSet { void Debug() const { return Debug(""); } /// Print parameters to given file void Print(CpptrajFile&) const; + /// Print a summary to stdout + void Summary() const; /// Used to track what parameters were updated during UpdateParams class UpdateCount { @@ -59,7 +61,7 @@ class ParameterSet { unsigned int nHBparamsUpdated_; }; /// Update this set with parameters from given set - int UpdateParamSet(ParameterSet const&, UpdateCount&, int); + int UpdateParamSet(ParameterSet const&, UpdateCount&, int, int); /// Add hydrophilic atom type int AddHydrophilicAtomType(NameType const&); /// Set parameter set name From 5e46c6a8e622a966242572e80933fd10bde61eaa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 08:50:58 -0500 Subject: [PATCH 0146/1492] Hide some debug info --- src/Topology.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index b94c1a36b8..0693255632 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2163,7 +2163,7 @@ int Topology::AppendTop(Topology const& NewTop) { // Save old parameters mprintf("DEBUG: Getting old parameters.\n"); ParameterSet oldParams = GetParameters(); - oldParams.Debug(); // DEBUG + oldParams.Summary(); // DEBUG // Append NewTop atoms to this topology. for (atom_iterator atom = NewTop.begin(); atom != NewTop.end(); ++atom) @@ -2350,8 +2350,10 @@ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolderTypeIndex() ); ParameterHolders::RetType ret = atomTypes.AddParm( atype, thisType, true ); - if (ret == ParameterHolders::ADDED) { - mprintf("DEBUG: New atom type: %s R=%g D=%g M=%g P=%g\n", *(atype[0]), thisType.LJ().Radius(), thisType.LJ().Depth(), thisType.Mass(), thisType.Polarizability()); + if (debugIn > 0) { + if (ret == ParameterHolders::ADDED) { + mprintf("DEBUG: New atom type: %s R=%g D=%g M=%g P=%g\n", *(atype[0]), thisType.LJ().Radius(), thisType.LJ().Depth(), thisType.Mass(), thisType.Polarizability()); + } } } // Do atom type pairs, check for off-diagonal elements. @@ -2689,6 +2691,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHolder const& newNB, ParmHolder const& newHB) { + static const int verbose = 0 ; // FIXME temporarily silence output // Generate array of only the types that are currently in Topology. TODO should this be a permanent part of Topology? ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) @@ -2750,17 +2753,17 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, // Check for LJ10-12 first ParmHolder::const_iterator hb = newHB.GetParam( types ); if (hb != newHB.end()) { - mprintf("LJ 10-12 parameter found for %s %s\n", *name1, *name2); + if (verbose > 0) mprintf("LJ 10-12 parameter found for %s %s\n", *name1, *name2); nonbond_.AddHBterm(t1->second.OriginalIdx(), t2->second.OriginalIdx(), hb->second); } else { // See if this parameter exists in the given nonbond array. NonbondType LJAB; ParmHolder::const_iterator it = newNB.GetParam( types ); if (it == newNB.end()) { - mprintf("NB parameter for %s %s not found. Generating.\n", *name1, *name2); + if (verbose > 0) mprintf("NB parameter for %s %s not found. Generating.\n", *name1, *name2); LJAB = type1.LJ().Combine_LB( type2.LJ() ); } else { - mprintf("Using existing NB parameter for %s %s\n", *name1, *name2); + if (verbose > 0) mprintf("Using existing NB parameter for %s %s\n", *name1, *name2); LJAB = it->second; } nonbond_.AddLJterm(t1->second.OriginalIdx(), t2->second.OriginalIdx(), LJAB); @@ -2796,7 +2799,7 @@ int Topology::UpdateParams(ParameterSet const& set1) { /** Update/add to parameters in this topology by combining those from given sets. */ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { - set1.Debug(); // DEBUG + set1.Summary(); // DEBUG // Check TODO is this necessary? if (set0.AT().size() < 1) mprintf("Warning: No atom type information in '%s'\n", c_str()); @@ -2806,7 +2809,7 @@ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { } // Update existing parameters with new parameters ParameterSet::UpdateCount UC; - if (set0.UpdateParamSet( set1, UC, debug_ )) { + if (set0.UpdateParamSet( set1, UC, debug_, debug_ )) { // FIXME verbose mprinterr("Error: Could not merge topology '%s' parameters with '%s' parameters.\n", c_str(), set1.ParamSetName().c_str()); return 1; From 4bc848e90c8939bdf2010665d23981c87e7a47e4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 08:51:09 -0500 Subject: [PATCH 0147/1492] Use debug in place of verbosity for now --- src/Exec_Build.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 3922c89c79..dee7222833 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -87,7 +87,7 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) ++it; ParameterSet::UpdateCount UC; for (; it != ParamSets.end(); ++it) - mainParmSet->UpdateParamSet( *(*it), UC, State.Debug() ); + mainParmSet->UpdateParamSet( *(*it), UC, State.Debug(), State.Debug() ); // FIXME verbose } // Update parameters From 51c4190590a9d58ce2e125af5c51ffcab8ca5f3a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 09:38:06 -0500 Subject: [PATCH 0148/1492] Add keyword 'noindices' to make comparing parameters easier (only dihedrals for now and hidden) --- src/Exec_Top.cpp | 2 ++ src/TopInfo.cpp | 14 ++++++++++---- src/TopInfo.h | 3 +++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Exec_Top.cpp b/src/Exec_Top.cpp index ae4ac0528d..89f40e53e1 100644 --- a/src/Exec_Top.cpp +++ b/src/Exec_Top.cpp @@ -47,6 +47,8 @@ static int CommonSetup(TopInfo& info, CpptrajState& State, ArgList& argIn, const } if (argIn.hasKey("nointrares")) info.SetNoIntraRes(true); + if (argIn.hasKey("noindices")) + info.SetPrintParameterIndices(false); return err; } diff --git a/src/TopInfo.cpp b/src/TopInfo.cpp index 69c0796484..8a54ebaeb5 100644 --- a/src/TopInfo.cpp +++ b/src/TopInfo.cpp @@ -18,7 +18,8 @@ TopInfo::TopInfo() : amn_width_(0), max_aname_len_(0), toStdout_(false), - noIntraRes_(false) + noIntraRes_(false), + printIndices_(true) {} /// CONSTRUCTOR - To Stdout @@ -30,7 +31,8 @@ TopInfo::TopInfo(Topology const* pIn) : max_type_len_(0), max_aname_len_(0), toStdout_(false), - noIntraRes_(false) + noIntraRes_(false), + printIndices_(true) { SetupTopInfo( 0, pIn, 0 ); } @@ -42,7 +44,8 @@ TopInfo::~TopInfo() { } // TopInfo::SetupTopInfo() -int TopInfo::SetupTopInfo(CpptrajFile* fIn, Topology const* pIn, DataSet_Coords* cIn) { +int TopInfo::SetupTopInfo(CpptrajFile* fIn, Topology const* pIn, DataSet_Coords* cIn) +{ if (cIn == 0 && pIn == 0) { mprinterr("Internal Error: TopInfo: Null topology\n"); return 1; @@ -617,7 +620,10 @@ void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray cons if (dih->Type() == DihedralType::END ) type = 'E'; else if (dih->Type() == DihedralType::IMPROPER) type = 'I'; else if (dih->Type() == DihedralType::BOTH ) type = 'B'; - outfile_->Printf("%c %*i", type, nw, nd); + if (printIndices_) + outfile_->Printf("%c %*i", type, nw, nd); + else + outfile_->Printf("%c %*c", type, nw, ' '); int didx = dih->Idx(); if ( didx > -1 ) { outfile_->Printf(" %7.3f %5.2f %4.1f",dihedralparm[didx].Pk(),dihedralparm[didx].Phase(), diff --git a/src/TopInfo.h b/src/TopInfo.h index bb7fa11da8..a7f219edf5 100644 --- a/src/TopInfo.h +++ b/src/TopInfo.h @@ -17,6 +17,8 @@ class TopInfo { void SetNoIntraRes(bool b) { noIntraRes_ = b; } int SetupTopInfo(CpptrajFile*, Topology const*, DataSet_Coords*); int SetupTopInfo(Topology const* p, DataSet_Coords* c) { return SetupTopInfo(0, p, c); } + /// Toggle printing of parameter indices + void SetPrintParameterIndices(bool b) { printIndices_ = b; } int PrintAtomInfo(std::string const&) const; int PrintShortResInfo(std::string const&, int) const; @@ -56,5 +58,6 @@ class TopInfo { int max_aname_len_; ///< Max width of atom name in topology bool toStdout_; bool noIntraRes_; ///< If true, ignore intra-residue bonds/angles/dihedrals etc + bool printIndices_; ///< If true, print leading indices }; #endif From 9314248d566b33c56ae64d1dc66783750d56f1bb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 11:18:39 -0500 Subject: [PATCH 0149/1492] Fix detection of 1-4 interactions. Make sure we are looking for cases where A1 and A4 are already part of a bond or angle. --- src/Topology.cpp | 71 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 0693255632..0d58b42d01 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2621,13 +2621,22 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, dihedralsIn.size(), dihedrals.size()); dihedralsIn.clear(); + // Keep track of 1-4 interactions + typedef std::pair Ipair; + typedef std::set Imap; + Imap PairMap; // Loop over all dihedrals for (DihedralArray::iterator dih = dihedrals.begin(); dih != dihedrals.end(); ++dih) { + TypeNameHolder types(4); types.AddName( atoms_[dih->A1()].Type() ); types.AddName( atoms_[dih->A2()].Type() ); types.AddName( atoms_[dih->A3()].Type() ); types.AddName( atoms_[dih->A4()].Type() ); +// mprintf("DEBUG: Assigning dihedral %4i %4i %4i %4i (%2s %2s %2s %2s) isImproper=%i skip14=%i\n", +// dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, +// *types[0], *types[1], *types[2], *types[3], +// (int)dih->IsImproper(), (int)dih->Skip14()); bool found; if (dih->IsImproper()) { // ----- This is actually an improper dihedral. ---------------- @@ -2645,6 +2654,9 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, } DihedralType mydih = *dih; mydih.SetIdx( idx ); + mydih.SetImproper( true ); + // Always skip impropers FIXME is this always true? + mydih.SetSkip14( true ); dihedralsIn.push_back( mydih ); } else { // -----Regular dihedral. See if parameter already present. ---- @@ -2660,18 +2672,73 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, mydih.SetIdx( -1 ); dihedralsIn.push_back( mydih ); } else { - // Actually add the dihedrals + // Actually add parameters for this dihedral. + // Determine if this is actually a 1-4 interaction by making + // sure that A4 isnt part of a bond or angle with A1. + bool skip14 = false; + for (Atom::bond_iterator bat1 = atoms_[dih->A1()].bondbegin(); + bat1 != atoms_[dih->A1()].bondend(); ++bat1) + { + if (*bat1 != dih->A2()) { + if (*bat1 == dih->A4()) { + skip14 = true; + break; + } + // Loop over angles, dih->A1() - bat1 - bat2 + for (Atom::bond_iterator bat2 = atoms_[*bat1].bondbegin(); + bat2 != atoms_[*bat1].bondend(); ++bat2) + { + //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG + // mprintf("DEBUG: %4i %4i %4i %4i Checking angle %4i %4i %4i\n", dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, dih->A1()+1, *bat1 + 1, *bat2 + 1); + //} + if (*bat2 != *bat1) { + if (*bat2 == dih->A4()) { + skip14 = true; + break; + } + } + } // END loop over bat1 bonded atoms + if (skip14) break; + } + } // END loop over dih->A1() bonded atoms + if (!skip14) { + // Determine if 1-4 interaction already calculated by previous dihedral. + // Make the lower end atom first. + Ipair pair14; + if (dih->A1() < dih->A4()) { + pair14.first = dih->A1(); + pair14.second = dih->A4(); + } else { + pair14.first = dih->A4(); + pair14.second = dih->A1(); + } + Imap::const_iterator it = PairMap.find( pair14 ); + if (it == PairMap.end()) { + skip14 = false; + PairMap.insert( pair14 ); + } else { + skip14 = true; + } + } + // Loop over multiplicities + //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG + // mprintf("DEBUG: Skip14= %i\n", (int)skip14); + //} for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) { DihedralType mydih = *dih; int idx = addTorsionParm( dihedralparm_, *it ); // If there are multiple parameters for the same dihedral, all but // one of the 1-4 calcs need to be skipped. if (it == dpa.begin()) - mydih.SetSkip14(false); + mydih.SetSkip14(skip14); else mydih.SetSkip14(true); mydih.SetIdx( idx ); dihedralsIn.push_back( mydih ); +// mprintf("DEBUG: Assigned %4i %4i %4i %4i (%2s %2s %2s %2s) isImproper=%i skip14=%i\n", +// mydih.A1()+1, mydih.A2()+1, mydih.A3()+1, mydih.A4()+1, +// *types[0], *types[1], *types[2], *types[3], +// (int)mydih.IsImproper(), (int)mydih.Skip14()); } } } From b8ba20cb0b5d84d4b9a0dfb8efe3192e1325078d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 13:44:26 -0500 Subject: [PATCH 0150/1492] Actually want to test the combined topology --- test/Test_CombineCrd/RunTest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Test_CombineCrd/RunTest.sh b/test/Test_CombineCrd/RunTest.sh index e241b2b7e0..ed8b4e1fd4 100755 --- a/test/Test_CombineCrd/RunTest.sh +++ b/test/Test_CombineCrd/RunTest.sh @@ -71,7 +71,7 @@ crdaction TCS strip !:TCS combinecrd FabI NDP TCS parmname combinedParm crdname combinedCrd # Get recombined system energies. Should match exactly. crdaction combinedCrd energy out E2.dat noheader -parmwrite out FabI.NDP.TCS.parm7 +parmwrite out FabI.NDP.TCS.parm7 crdset combinedCrd EOF RunCpptraj "Split coords and recombine test." DoTest E1.dat E2.dat From ad7559c26217c8bb9c2cc4f5eda287a71a98e809 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 13:47:40 -0500 Subject: [PATCH 0151/1492] Disable bond sort for now. Use improper dihedral detection. --- src/Topology.cpp | 26 +++++++++++++++++++++----- src/Topology.h | 2 +- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 0d58b42d01..e4dd1cb7ed 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -899,10 +899,10 @@ void Topology::AddBond(BondType const& bndIn, bool isH) { } /** Sort bond arrays. May want to do this to e.g. match LEAP bond ordering. */ -void Topology::SortBonds() { +/*void Topology::SortBonds() { std::sort(bonds_.begin(), bonds_.end()); std::sort(bondsh_.begin(), bondsh_.end()); -} +}*/ /** Check if given angle parm exists in given angle parm array. Add if not. * \return Index in angle parm array. @@ -2595,7 +2595,10 @@ void Topology::AssignImproperParams(ParmHolder const& newImpro AssignImproperParm( newImproperParams, chamber_.SetImpropers() ); } -/** Set parameters for dihedrals in given dihedral array. */ +/** Set parameters for dihedrals in given dihedral array. + * Bond and angle information must be set up prior to calling + * this function in order for improper and 1-4 detection to work. + */ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, ParmHolder const& newImproperParams, DihedralArray& dihedralsIn) @@ -2637,8 +2640,20 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, // dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, // *types[0], *types[1], *types[2], *types[3], // (int)dih->IsImproper(), (int)dih->Skip14()); + // Determine improper + bool isImproper = (!atoms_[dih->A1()].IsBondedTo(dih->A2())) || + (!atoms_[dih->A2()].IsBondedTo(dih->A3())) || + (!atoms_[dih->A3()].IsBondedTo(dih->A4())); + if (isImproper != dih->IsImproper()) { + mprintf("Warning: dihedral %s-%s-%s-%s improper status %i does not match detected (%i)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + (int)dih->IsImproper(), (int)isImproper); + } bool found; - if (dih->IsImproper()) { + if (isImproper) { // ----- This is actually an improper dihedral. ---------------- DihedralParmType ip = newImproperParams.FindParam( types, found ); int idx = -1; @@ -2655,7 +2670,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, DihedralType mydih = *dih; mydih.SetIdx( idx ); mydih.SetImproper( true ); - // Always skip impropers FIXME is this always true? + // Always skip 1-4 for impropers mydih.SetSkip14( true ); dihedralsIn.push_back( mydih ); } else { @@ -2718,6 +2733,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, PairMap.insert( pair14 ); } else { skip14 = true; + //mprintf("DEBUG: Prior 1-4 calc detected.\n"); } } // Loop over multiplicities diff --git a/src/Topology.h b/src/Topology.h index 10f3d3996c..466de2d36d 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -115,7 +115,7 @@ class Topology { void AddBond(BondType const&, bool); void AddBond(int, int, BondParmType const&); int RemoveBond(int, int); - void SortBonds(); + //void SortBonds(); void AssignBondParams(ParmHolder const&); // ----- Angle-specific routines ------------- size_t Nangles() const { return angles_.size()+anglesh_.size(); } From fb513b8bf16844954a5801a5246b45b05b9b6691 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 13:48:04 -0500 Subject: [PATCH 0152/1492] Not trying to sort bonds. --- src/Exec_UpdateParameters.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exec_UpdateParameters.cpp b/src/Exec_UpdateParameters.cpp index c07ede5e7d..329056f7f4 100644 --- a/src/Exec_UpdateParameters.cpp +++ b/src/Exec_UpdateParameters.cpp @@ -45,7 +45,7 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn top.c_str(), ds->legend()); // Sort topology bond arrays to be consistent with LEaP - top.SortBonds(); + //top.SortBonds(); if (ds->Type() == DataSet::PARAMETERS) top.UpdateParams(static_cast( *ds )); From c183cb8e42aac70c543c77b5e85f526b18bc4fc3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 11 Dec 2023 14:38:20 -0500 Subject: [PATCH 0153/1492] Update for fixed SOLTY array --- test/Test_Strip/ligand.tz2.truncoct.parm7.save | 10 +++------- test/Test_Strip/receptor.tz2.truncoct.parm7.save | 6 +++--- test/Test_Strip/strip.pdb.chignolin.parm7.save | 7 +++---- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/test/Test_Strip/ligand.tz2.truncoct.parm7.save b/test/Test_Strip/ligand.tz2.truncoct.parm7.save index edd97a00fc..401565ec6c 100644 --- a/test/Test_Strip/ligand.tz2.truncoct.parm7.save +++ b/test/Test_Strip/ligand.tz2.truncoct.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 02/04/15 10:39:23 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/11/23 13:48:31 %FLAG TITLE %FORMAT(20a4) %FLAG POINTERS %FORMAT(10I8) 3 2 3 0 0 0 0 0 0 0 - 4 1 0 0 0 2 0 0 23 1 + 4 1 0 0 0 2 0 0 2 1 0 0 0 0 0 0 0 2 3 0 0 %FLAG ATOM_NAME @@ -64,11 +64,7 @@ WAT %FLAG SOLTY %FORMAT(5E16.8) - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 %FLAG LENNARD_JONES_ACOEF %FORMAT(5E16.8) 5.81935564E+05 0.00000000E+00 0.00000000E+00 diff --git a/test/Test_Strip/receptor.tz2.truncoct.parm7.save b/test/Test_Strip/receptor.tz2.truncoct.parm7.save index e2f17a97d8..e068c06d11 100644 --- a/test/Test_Strip/receptor.tz2.truncoct.parm7.save +++ b/test/Test_Strip/receptor.tz2.truncoct.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 02/04/15 10:39:23 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/11/23 13:48:31 %FLAG TITLE %FORMAT(20a4) %FLAG POINTERS %FORMAT(10I8) 220 12 104 123 233 169 481 372 0 0 - 1211 13 123 169 372 31 68 35 23 0 + 1211 13 123 169 372 31 68 35 21 0 0 0 0 0 0 0 0 2 24 0 0 %FLAG ATOM_NAME @@ -310,7 +310,7 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 %FLAG LENNARD_JONES_ACOEF %FORMAT(5E16.8) 9.44293233E+05 2.12601181E+03 1.39982777E-01 9.95480466E+05 2.56678134E+03 diff --git a/test/Test_Strip/strip.pdb.chignolin.parm7.save b/test/Test_Strip/strip.pdb.chignolin.parm7.save index 7baa301340..3e96e8af45 100644 --- a/test/Test_Strip/strip.pdb.chignolin.parm7.save +++ b/test/Test_Strip/strip.pdb.chignolin.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 10/16/20 10:23:23 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/11/23 13:48:31 %FLAG TITLE %FORMAT(20a4) default_name %FLAG POINTERS %FORMAT(10I8) 93 5 0 98 0 136 0 387 0 0 - 385 10 98 136 387 28 48 88 24 0 + 385 10 98 136 387 28 48 88 17 0 0 0 0 0 0 0 0 0 14 0 0 %FLAG ATOM_NAME @@ -249,8 +249,7 @@ TYR TYR ASP PRO GLU THR GLY THR TRP TYR 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 %FLAG LENNARD_JONES_ACOEF %FORMAT(5E16.8) 9.44293233E+05 9.95480466E+05 1.04308023E+06 8.82619071E+05 9.24822270E+05 From c7536bc1d97f11c3388539a72e35affe71616ed2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 12 Dec 2023 10:39:11 -0500 Subject: [PATCH 0154/1492] Go back to the previous way of appending, should be less computationally intensive --- src/Topology.cpp | 329 +++++++++++++++++++++++++---------------------- 1 file changed, 175 insertions(+), 154 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index e4dd1cb7ed..fee49a5508 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -7,6 +7,7 @@ #include "AtomType.h" #include "AtomMask.h" #include "CharMask.h" +#include "UpdateParameters.h" const NonbondType Topology::LJ_EMPTY = NonbondType(); @@ -2078,159 +2079,6 @@ void Topology::StripDihedralParmArray(DihedralArray& newDihedralArray, std::vect } } -// Topology::AddBondArray() -void Topology::AddBondArray(BondArray const& barray, BondParmArray const& bp, int atomOffset) { - if (bp.empty()) { - for (BondArray::const_iterator bond = barray.begin(); bond != barray.end(); ++bond) - AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); - } else { - bool missingParameters = false; - for (BondArray::const_iterator bond = barray.begin(); bond != barray.end(); ++bond) { - if (bond->Idx() > -1) - AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset, bp[bond->Idx()] ); - else { - missingParameters = true; - AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); - } - } - if (missingParameters) - mprintf("Warning: Some bonds were missing parameters.\n"); - } -} - -// Topology::AddAngleArray() -void Topology::AddAngleArray(AngleArray const& aarray, AngleParmArray const& ap, int atomOffset) { - if (ap.empty()) - for (AngleArray::const_iterator angle = aarray.begin(); angle != aarray.end(); ++angle) - AddAngle( angle->A1() + atomOffset, - angle->A2() + atomOffset, - angle->A3() + atomOffset ); - else - for (AngleArray::const_iterator angle = aarray.begin(); angle != aarray.end(); ++angle) - AddAngle( angle->A1() + atomOffset, - angle->A2() + atomOffset, - angle->A3() + atomOffset, ap[angle->Idx()] ); -} - -// Topology::AddDihArray() -void Topology::AddDihArray(DihedralArray const& darray, DihedralParmArray const& dp, int atomOffset) -{ - if (dp.empty()) - for (DihedralArray::const_iterator dih = darray.begin(); dih != darray.end(); ++dih) - AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, - dih->A3() + atomOffset, dih->A4() + atomOffset, - dih->Type() ), -1 ); - else - for (DihedralArray::const_iterator dih = darray.begin(); dih != darray.end(); ++dih) - AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, - dih->A3() + atomOffset, dih->A4() + atomOffset, - dih->Type() ), dp[dih->Idx()] ); -} - -/** This template can be used when doing Append() on a generic std::vector array - * of type T. The array will be appended to a given array of the same type. - * If one is empty and the other is not, values will be filled in if necessary. - */ -template class TopVecAppend { - public: - /// CONSTRUCTOR - TopVecAppend() {} - /// Append current array to given array of same type - void Append(std::vector& arrayOut, std::vector const& arrayToAdd, unsigned int expectedSize) - { - if (arrayToAdd.empty() && arrayOut.empty()) { - // Both arrays are empty. Nothing to do. - return; - } else if (arrayToAdd.empty()) { - // The current array is empty but the given array is not. Fill in - // array to append with blank values. - for (unsigned int idx = 0; idx != expectedSize; idx++) - arrayOut.push_back( T() ); - } else { - // Append current array to array to given array. TODO use std::copy? - for (typename std::vector::const_iterator it = arrayToAdd.begin(); it != arrayToAdd.end(); ++it) - arrayOut.push_back( *it ); - } - } -}; - -// Topology::AppendTop() -int Topology::AppendTop(Topology const& NewTop) { - int atomOffset = (int)atoms_.size(); - mprintf("DEBUG: Appending '%s' to '%s' (offset= %i)\n", NewTop.c_str(), c_str(), atomOffset); - //int resOffset = (int)residues_.size(); - - // Save old parameters - mprintf("DEBUG: Getting old parameters.\n"); - ParameterSet oldParams = GetParameters(); - oldParams.Summary(); // DEBUG - - // Append NewTop atoms to this topology. - for (atom_iterator atom = NewTop.begin(); atom != NewTop.end(); ++atom) - { - if (debug_ > 1) - mprintf("DBG: %6li %s %s %4i\n", atom-NewTop.begin(), - *(atom->Name()), *(atom->Type()), atom->TypeIndex()); - Atom CurrentAtom = *atom; - Residue const& res = NewTop.Res( CurrentAtom.ResNum() ); - // Bonds need to be cleared and re-added. - CurrentAtom.ClearBonds(); - AddTopAtom( CurrentAtom, Residue(res.Name(), res.OriginalResNum(), - res.Icode(), res.ChainId()) ); - } - // Recreate bonds for the added atoms - for (BondArray::const_iterator bond = NewTop.Bonds().begin(); bond != NewTop.Bonds().end(); ++bond) - AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); - for (BondArray::const_iterator bond = NewTop.BondsH().begin(); bond != NewTop.BondsH().end(); ++bond) - AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); - // Recreate angles for the added atoms - for (AngleArray::const_iterator angle = NewTop.Angles().begin(); angle != NewTop.Angles().end(); ++angle) - AddAngle( angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset ); - for (AngleArray::const_iterator angle = NewTop.AnglesH().begin(); angle != NewTop.AnglesH().end(); ++angle) - AddAngle( angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset ); - // Recreate dihedrals for the added atoms - for (DihedralArray::const_iterator dih = NewTop.Dihedrals().begin(); dih != NewTop.Dihedrals().end(); ++dih) - AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, - dih->A3() + atomOffset, dih->A4() + atomOffset, - dih->Type() ) ); - for (DihedralArray::const_iterator dih = NewTop.DihedralsH().begin(); dih != NewTop.DihedralsH().end(); ++dih) - AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, - dih->A3() + atomOffset, dih->A4() + atomOffset, - dih->Type() ) ); - // Update parameters - mprintf("DEBUG: Updating with new parameters.\n"); - updateParams( oldParams, NewTop.GetParameters() ); - - // EXTRA ATOM INFO - TopVecAppend appendNameType; - appendNameType.Append( tree_, NewTop.tree_, NewTop.Natom() ); - TopVecAppend appendInt; - appendInt.Append( ijoin_, NewTop.ijoin_, NewTop.Natom() ); - appendInt.Append( irotat_, NewTop.irotat_, NewTop.Natom() ); - appendInt.Append( pdbSerialNum_, NewTop.pdbSerialNum_, NewTop.Natom() ); - TopVecAppend appendChar; - appendChar.Append( atom_altloc_, NewTop.atom_altloc_, NewTop.Natom() ); - TopVecAppend appendFloat; - appendFloat.Append( occupancy_, NewTop.occupancy_, NewTop.Natom() ); - appendFloat.Append( bfactor_, NewTop.bfactor_, NewTop.Natom() ); - - /* // BONDS - AddBondArray(NewTop.Bonds(), NewTop.BondParm(), atomOffset); - AddBondArray(NewTop.BondsH(), NewTop.BondParm(), atomOffset); - // ANGLES - AddAngleArray(NewTop.Angles(), NewTop.AngleParm(), atomOffset); - AddAngleArray(NewTop.AnglesH(), NewTop.AngleParm(), atomOffset); - // DIHEDRALS - AddDihArray(NewTop.Dihedrals(), NewTop.DihedralParm(), atomOffset); - AddDihArray(NewTop.DihedralsH(), NewTop.DihedralParm(), atomOffset);*/ - - // TODO append missing stuff? - - // Re-set up this topology - // TODO: Could get expensive for multiple appends. - return CommonSetup(); -} - // ----------------------------------------------------------------------------- static void paramOverwriteWarning(const char* type) { mprintf("Warning: An existing %s parameter would have been overwritten. This\n" @@ -2435,6 +2283,179 @@ ParameterSet Topology::GetParameters() const { return Params; } +// ----------------------------------------------------------------------------- +// Topology::AddBondArray() +void Topology::AddBondArray(BondArray const& barray, BondParmArray const& bp, int atomOffset) { + if (bp.empty()) { + for (BondArray::const_iterator bond = barray.begin(); bond != barray.end(); ++bond) + AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); + } else { + bool missingParameters = false; + for (BondArray::const_iterator bond = barray.begin(); bond != barray.end(); ++bond) { + if (bond->Idx() > -1) + AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset, bp[bond->Idx()] ); + else { + missingParameters = true; + AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); + } + } + if (missingParameters) + mprintf("Warning: Some bonds were missing parameters.\n"); + } +} + +// Topology::AddAngleArray() +void Topology::AddAngleArray(AngleArray const& aarray, AngleParmArray const& ap, int atomOffset) { + if (ap.empty()) + for (AngleArray::const_iterator angle = aarray.begin(); angle != aarray.end(); ++angle) + AddAngle( angle->A1() + atomOffset, + angle->A2() + atomOffset, + angle->A3() + atomOffset ); + else + for (AngleArray::const_iterator angle = aarray.begin(); angle != aarray.end(); ++angle) + AddAngle( angle->A1() + atomOffset, + angle->A2() + atomOffset, + angle->A3() + atomOffset, ap[angle->Idx()] ); +} + +// Topology::AddDihArray() +void Topology::AddDihArray(DihedralArray const& darray, DihedralParmArray const& dp, int atomOffset) +{ + if (dp.empty()) + for (DihedralArray::const_iterator dih = darray.begin(); dih != darray.end(); ++dih) + AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, + dih->A3() + atomOffset, dih->A4() + atomOffset, + dih->Type() ), -1 ); + else + for (DihedralArray::const_iterator dih = darray.begin(); dih != darray.end(); ++dih) + AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, + dih->A3() + atomOffset, dih->A4() + atomOffset, + dih->Type() ), dp[dih->Idx()] ); +} + +/** This template can be used when doing Append() on a generic std::vector array + * of type T. The array will be appended to a given array of the same type. + * If one is empty and the other is not, values will be filled in if necessary. + */ +template class TopVecAppend { + public: + /// CONSTRUCTOR + TopVecAppend() {} + /// Append current array to given array of same type + void Append(std::vector& arrayOut, std::vector const& arrayToAdd, unsigned int expectedSize) + { + if (arrayToAdd.empty() && arrayOut.empty()) { + // Both arrays are empty. Nothing to do. + return; + } else if (arrayToAdd.empty()) { + // The current array is empty but the given array is not. Fill in + // array to append with blank values. + for (unsigned int idx = 0; idx != expectedSize; idx++) + arrayOut.push_back( T() ); + } else { + // Append current array to array to given array. TODO use std::copy? + for (typename std::vector::const_iterator it = arrayToAdd.begin(); it != arrayToAdd.end(); ++it) + arrayOut.push_back( *it ); + } + } +}; + +// Topology::AppendTop() +int Topology::AppendTop(Topology const& NewTop) { + int atomOffset = (int)atoms_.size(); + mprintf("DEBUG: Appending '%s' to '%s' (offset= %i)\n", NewTop.c_str(), c_str(), atomOffset); + //int resOffset = (int)residues_.size(); + +// NOTE: Lines commented out with //# can be used to test appending via the +// parameter update functionality. This is slower, but is a good test +// that the parameter update function is working correctly. +//# // Save old parameters +//# mprintf("DEBUG: Getting old parameters.\n"); +//# ParameterSet oldParams = GetParameters(); +//# oldParams.Summary(); // DEBUG + // Save nonbonded parameters from each topology TODO LJ 10-12 + ParmHolder myAtomTypes, newAtomTypes; + ParmHolder myNB, newNB; + //ParmHolder myHB, newHB; + GetLJAtomTypes( myAtomTypes, myNB, atoms_, nonbond_, debug_ ); + GetLJAtomTypes( newAtomTypes, newNB, NewTop.atoms_, NewTop.nonbond_, debug_ ); + int nAtomTypeUpdated = UpdateParameters< ParmHolder >( myAtomTypes, newAtomTypes, "atom type", 1 ); // TODO verbose + int nLJparamsUpdated = UpdateParameters< ParmHolder >( myNB, newNB, "LJ A-B", 1 ); // TODO verbose + mprintf("\t%i atom types updated, %i LJ params updated.\n", nAtomTypeUpdated, nLJparamsUpdated); + + // Append NewTop atoms to this topology. + for (atom_iterator atom = NewTop.begin(); atom != NewTop.end(); ++atom) + { + if (debug_ > 1) + mprintf("DBG: %6li %s %s %4i\n", atom-NewTop.begin(), + *(atom->Name()), *(atom->Type()), atom->TypeIndex()); + Atom CurrentAtom = *atom; + Residue const& res = NewTop.Res( CurrentAtom.ResNum() ); + // Bonds need to be cleared and re-added. + CurrentAtom.ClearBonds(); + AddTopAtom( CurrentAtom, Residue(res.Name(), res.OriginalResNum(), + res.Icode(), res.ChainId()) ); + } +//# // Recreate bonds for the added atoms +//# for (BondArray::const_iterator bond = NewTop.Bonds().begin(); bond != NewTop.Bonds().end(); ++bond) +//# AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); +//# for (BondArray::const_iterator bond = NewTop.BondsH().begin(); bond != NewTop.BondsH().end(); ++bond) +//# AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); +//# // Recreate angles for the added atoms +//# for (AngleArray::const_iterator angle = NewTop.Angles().begin(); angle != NewTop.Angles().end(); ++angle) +//# AddAngle( angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset ); +//# for (AngleArray::const_iterator angle = NewTop.AnglesH().begin(); angle != NewTop.AnglesH().end(); ++angle) +//# AddAngle( angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset ); +//# // Recreate dihedrals for the added atoms +//# for (DihedralArray::const_iterator dih = NewTop.Dihedrals().begin(); dih != NewTop.Dihedrals().end(); ++dih) +//# AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, +//# dih->A3() + atomOffset, dih->A4() + atomOffset, +//# dih->Type() ) ); +//# for (DihedralArray::const_iterator dih = NewTop.DihedralsH().begin(); dih != NewTop.DihedralsH().end(); ++dih) +//# AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, +//# dih->A3() + atomOffset, dih->A4() + atomOffset, +//# dih->Type() ) ); +//# // Update parameters +//# mprintf("DEBUG: Updating with new parameters.\n"); +//# updateParams( oldParams, NewTop.GetParameters() ); + + // EXTRA ATOM INFO + TopVecAppend appendNameType; + appendNameType.Append( tree_, NewTop.tree_, NewTop.Natom() ); + TopVecAppend appendInt; + appendInt.Append( ijoin_, NewTop.ijoin_, NewTop.Natom() ); + appendInt.Append( irotat_, NewTop.irotat_, NewTop.Natom() ); + appendInt.Append( pdbSerialNum_, NewTop.pdbSerialNum_, NewTop.Natom() ); + TopVecAppend appendChar; + appendChar.Append( atom_altloc_, NewTop.atom_altloc_, NewTop.Natom() ); + TopVecAppend appendFloat; + appendFloat.Append( occupancy_, NewTop.occupancy_, NewTop.Natom() ); + appendFloat.Append( bfactor_, NewTop.bfactor_, NewTop.Natom() ); + + // BONDS + AddBondArray(NewTop.Bonds(), NewTop.BondParm(), atomOffset); + AddBondArray(NewTop.BondsH(), NewTop.BondParm(), atomOffset); + // ANGLES + AddAngleArray(NewTop.Angles(), NewTop.AngleParm(), atomOffset); + AddAngleArray(NewTop.AnglesH(), NewTop.AngleParm(), atomOffset); + // DIHEDRALS + AddDihArray(NewTop.Dihedrals(), NewTop.DihedralParm(), atomOffset); + AddDihArray(NewTop.DihedralsH(), NewTop.DihedralParm(), atomOffset); + // UREY-BRADLEY TODO + // IMPROPERS TODO + // CMAP TODO + + // Need to regenerate nonbonded info TODO verbose TODO LJ 10-12 + mprintf("\tRegenerating nonbond parameters.\n"); + AssignNonbondParams( myAtomTypes, myNB, ParmHolder() ); //FIXME LJ 10-12 + + // TODO append missing stuff? + + // Re-set up this topology + // TODO: Could get expensive for multiple appends. + return CommonSetup(); +} + // ----------------------------------------------------------------------------- /** Set parameters for atoms via given atom type parameter holder. */ void Topology::AssignAtomTypeParm(ParmHolder const& newAtomTypeParams) @@ -2810,7 +2831,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, // Look for equivalent nonbond types for (ParmHolder::iterator t2 = t1 + 1; t2 != currentAtomTypes.end(); ++t2) { if (t2->second.OriginalIdx() == -1 && t1->second.LJ() == t2->second.LJ()) { - mprintf("DEBUG: Type %s equivalent to type %s\n", *(t1->first[0]), *(t2->first[0])); + mprintf("DEBUG: Type %s equivalent to type %s\n", *(t2->first[0]), *(t1->first[0])); t2->second.SetTypeIdx( n_unique_lj_types ); } } From 7be6340d19c3c004d36c61fc8a14da029bfc5e94 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 12 Dec 2023 12:15:49 -0500 Subject: [PATCH 0155/1492] Do not pack arrays by default --- src/Topology.cpp | 285 ++++++++++++++++++++++++++++------------------- 1 file changed, 169 insertions(+), 116 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index fee49a5508..101c8adc1f 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2480,21 +2480,29 @@ void Topology::AssignBondParm(ParmHolder const& newBondParams, BondArray& bonds, BondParmArray& bpa, const char* desc) const { + ParmHolder currentTypes; for (BondArray::iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { TypeNameHolder types(2); types.AddName( atoms_[bnd->A1()].Type() ); types.AddName( atoms_[bnd->A2()].Type() ); bool found; // See if parameter is present. - int idx = -1; - BondParmType bp = newBondParams.FindParam( types, found ); + int idx = currentTypes.FindParam(types, found); if (!found) { - mprintf("Warning: parameter not found for %s %s-%s (%s-%s)\n", desc, - TruncResAtomNameNum(bnd->A1()).c_str(), - TruncResAtomNameNum(bnd->A2()).c_str(), - *types[0], *types[1]); - } else { - idx = addBondParm( bpa, bp ); + idx = -1; + // Not yet present in current types. + BondParmType bp = newBondParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: parameter not found for %s %s-%s (%s-%s)\n", desc, + TruncResAtomNameNum(bnd->A1()).c_str(), + TruncResAtomNameNum(bnd->A2()).c_str(), + *types[0], *types[1]); + } else { + //idx = addBondParm( bpa, bp ); TODO handle array packing + idx = (int)bpa.size(); + bpa.push_back( bp ); + currentTypes.AddParm(types, idx, false); + } } bnd->SetIdx( idx ); } @@ -2553,6 +2561,7 @@ void Topology::AssignUBParams(ParmHolder const& newBondParams) { void Topology::AssignAngleParm(ParmHolder const& newAngleParams, AngleArray& angles) { + ParmHolder currentTypes; for (AngleArray::iterator ang = angles.begin(); ang != angles.end(); ++ang) { TypeNameHolder types(3); types.AddName( atoms_[ang->A1()].Type() ); @@ -2560,16 +2569,27 @@ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, types.AddName( atoms_[ang->A3()].Type() ); bool found; // See if parameter is present. - int idx = -1; - AngleParmType ap = newAngleParams.FindParam( types, found ); + int idx = currentTypes.FindParam( types, found ); if (!found) { - mprintf("Warning: Angle parameter not found for angle %s-%s-%s (%s-%s-%s)\n", - TruncResAtomNameNum(ang->A1()).c_str(), - TruncResAtomNameNum(ang->A2()).c_str(), - TruncResAtomNameNum(ang->A3()).c_str(), - *types[0], *types[1], *types[3]); + idx = -1; + // Not yet present in current types + AngleParmType ap = newAngleParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: Angle parameter not found for angle %s-%s-%s (%s-%s-%s)\n", + TruncResAtomNameNum(ang->A1()).c_str(), + TruncResAtomNameNum(ang->A2()).c_str(), + TruncResAtomNameNum(ang->A3()).c_str(), + *types[0], *types[1], *types[2]); + } else { + //idx = addAngleParm( angleparm_, ap ); // TODO uncomment for array packing + idx = (int)angleparm_.size(); + angleparm_.push_back( ap ); + mprintf("DEBUG: New angle type for %s-%s-%s (Tk=%g Teq=%g) idx=%i\n", *types[0], *types[1], *types[2], ap.Tk(), ap.Teq(), idx); + currentTypes.AddParm(types, idx, false); + } } else { - idx = addAngleParm( angleparm_, ap ); + AngleParmType const& ap = angleparm_[idx]; + mprintf("DEBUG: Existing angle type for %s-%s-%s (Tk=%g Teq=%g) idx=%i\n", *types[0], *types[1], *types[2], ap.Tk(), ap.Teq(), idx); } ang->SetIdx( idx ); } @@ -2586,6 +2606,7 @@ void Topology::AssignAngleParams(ParmHolder const& newAngleParams void Topology::AssignImproperParm(ParmHolder const& newImproperParams, DihedralArray& impropers) { + ParmHolder currentTypes; for (DihedralArray::iterator imp = impropers.begin(); imp != impropers.end(); ++imp) { TypeNameHolder types(4); types.AddName( atoms_[imp->A1()].Type() ); @@ -2594,17 +2615,24 @@ void Topology::AssignImproperParm(ParmHolder const& newImprope types.AddName( atoms_[imp->A4()].Type() ); bool found; // See if parameter is present. - int idx = -1; - DihedralParmType ip = newImproperParams.FindParam( types, found ); + int idx = currentTypes.FindParam( types, found ); if (!found) { - mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(imp->A1()).c_str(), - TruncResAtomNameNum(imp->A2()).c_str(), - TruncResAtomNameNum(imp->A3()).c_str(), - TruncResAtomNameNum(imp->A4()).c_str(), - *types[0], *types[1], *types[3], *types[4]); - } else { - idx = addTorsionParm( chamber_.SetImproperParm(), ip ); + idx = -1; + // Not yet present in current types + DihedralParmType ip = newImproperParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(imp->A1()).c_str(), + TruncResAtomNameNum(imp->A2()).c_str(), + TruncResAtomNameNum(imp->A3()).c_str(), + TruncResAtomNameNum(imp->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + } else { + //idx = addTorsionParm( chamber_.SetImproperParm(), ip ); // TODO handle array packing + idx = (int)chamber_.ImproperParm().size(); + chamber_.SetImproperParm().push_back( ip ); + currentTypes.AddParm(types, idx, false); + } } imp->SetIdx( idx ); } @@ -2644,6 +2672,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, mprintf("DEBUG: %zu incoming dihedrals, %zu unique dihedrals.\n", dihedralsIn.size(), dihedrals.size()); + ParmHolder< std::vector > currentTypes; dihedralsIn.clear(); // Keep track of 1-4 interactions typedef std::pair Ipair; @@ -2676,108 +2705,128 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, bool found; if (isImproper) { // ----- This is actually an improper dihedral. ---------------- - DihedralParmType ip = newImproperParams.FindParam( types, found ); - int idx = -1; + std::vector idxs = currentTypes.FindParam( types, found ); if (!found) { - mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(dih->A1()).c_str(), - TruncResAtomNameNum(dih->A2()).c_str(), - TruncResAtomNameNum(dih->A3()).c_str(), - TruncResAtomNameNum(dih->A4()).c_str(), - *types[0], *types[1], *types[2], *types[3]); - } else { - idx = addTorsionParm( dihedralparm_, ip ); + // Not yet present in current types + DihedralParmType ip = newImproperParams.FindParam( types, found ); + if (!found) { + idxs.push_back( -1 ); + mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + } else { + //int idx = addTorsionParm( dihedralparm_, ip ); // TODO handle array packing + int idx = (int)dihedralparm_.size(); + dihedralparm_.push_back( ip ); + idxs.push_back( idx ); + currentTypes.AddParm(types, idxs, false); + } } DihedralType mydih = *dih; - mydih.SetIdx( idx ); + mydih.SetIdx( idxs.front() ); mydih.SetImproper( true ); // Always skip 1-4 for impropers mydih.SetSkip14( true ); dihedralsIn.push_back( mydih ); } else { - // -----Regular dihedral. See if parameter already present. ---- - DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); - if (!found) { - mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(dih->A1()).c_str(), - TruncResAtomNameNum(dih->A2()).c_str(), - TruncResAtomNameNum(dih->A3()).c_str(), - TruncResAtomNameNum(dih->A4()).c_str(), - *types[0], *types[1], *types[2], *types[3]); - DihedralType mydih = *dih; - mydih.SetIdx( -1 ); - dihedralsIn.push_back( mydih ); - } else { - // Actually add parameters for this dihedral. - // Determine if this is actually a 1-4 interaction by making - // sure that A4 isnt part of a bond or angle with A1. - bool skip14 = false; - for (Atom::bond_iterator bat1 = atoms_[dih->A1()].bondbegin(); - bat1 != atoms_[dih->A1()].bondend(); ++bat1) - { - if (*bat1 != dih->A2()) { - if (*bat1 == dih->A4()) { - skip14 = true; - break; - } - // Loop over angles, dih->A1() - bat1 - bat2 - for (Atom::bond_iterator bat2 = atoms_[*bat1].bondbegin(); - bat2 != atoms_[*bat1].bondend(); ++bat2) - { - //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG - // mprintf("DEBUG: %4i %4i %4i %4i Checking angle %4i %4i %4i\n", dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, dih->A1()+1, *bat1 + 1, *bat2 + 1); - //} - if (*bat2 != *bat1) { - if (*bat2 == dih->A4()) { - skip14 = true; - break; - } - } - } // END loop over bat1 bonded atoms - if (skip14) break; - } - } // END loop over dih->A1() bonded atoms - if (!skip14) { - // Determine if 1-4 interaction already calculated by previous dihedral. - // Make the lower end atom first. - Ipair pair14; - if (dih->A1() < dih->A4()) { - pair14.first = dih->A1(); - pair14.second = dih->A4(); - } else { - pair14.first = dih->A4(); - pair14.second = dih->A1(); - } - Imap::const_iterator it = PairMap.find( pair14 ); - if (it == PairMap.end()) { - skip14 = false; - PairMap.insert( pair14 ); - } else { + // -----Regular dihedral. -------------------------------------- + // Determine if this is actually a 1-4 interaction by making + // sure that A4 isnt part of a bond or angle with A1. + bool skip14 = false; + for (Atom::bond_iterator bat1 = atoms_[dih->A1()].bondbegin(); + bat1 != atoms_[dih->A1()].bondend(); ++bat1) + { + if (*bat1 != dih->A2()) { + if (*bat1 == dih->A4()) { skip14 = true; - //mprintf("DEBUG: Prior 1-4 calc detected.\n"); + break; } + // Loop over angles, dih->A1() - bat1 - bat2 + for (Atom::bond_iterator bat2 = atoms_[*bat1].bondbegin(); + bat2 != atoms_[*bat1].bondend(); ++bat2) + { + //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG + // mprintf("DEBUG: %4i %4i %4i %4i Checking angle %4i %4i %4i\n", dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, dih->A1()+1, *bat1 + 1, *bat2 + 1); + //} + if (*bat2 != *bat1) { + if (*bat2 == dih->A4()) { + skip14 = true; + break; + } + } + } // END loop over bat1 bonded atoms + if (skip14) break; } - // Loop over multiplicities - //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG - // mprintf("DEBUG: Skip14= %i\n", (int)skip14); - //} - for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) { - DihedralType mydih = *dih; - int idx = addTorsionParm( dihedralparm_, *it ); - // If there are multiple parameters for the same dihedral, all but - // one of the 1-4 calcs need to be skipped. - if (it == dpa.begin()) - mydih.SetSkip14(skip14); - else - mydih.SetSkip14(true); - mydih.SetIdx( idx ); - dihedralsIn.push_back( mydih ); -// mprintf("DEBUG: Assigned %4i %4i %4i %4i (%2s %2s %2s %2s) isImproper=%i skip14=%i\n", -// mydih.A1()+1, mydih.A2()+1, mydih.A3()+1, mydih.A4()+1, -// *types[0], *types[1], *types[2], *types[3], -// (int)mydih.IsImproper(), (int)mydih.Skip14()); + } // END loop over dih->A1() bonded atoms + if (!skip14) { + // Determine if 1-4 interaction already calculated by previous dihedral. + // Make the lower end atom first. + Ipair pair14; + if (dih->A1() < dih->A4()) { + pair14.first = dih->A1(); + pair14.second = dih->A4(); + } else { + pair14.first = dih->A4(); + pair14.second = dih->A1(); + } + Imap::const_iterator it = PairMap.find( pair14 ); + if (it == PairMap.end()) { + skip14 = false; + PairMap.insert( pair14 ); + } else { + skip14 = true; + //mprintf("DEBUG: Prior 1-4 calc detected.\n"); } } + //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG + // mprintf("DEBUG: Skip14= %i\n", (int)skip14); + //} + + // See if parameter already present. ---- + std::vector idxs = currentTypes.FindParam( types, found ); + if (!found) { + // Not yet present in current types + DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + idxs.push_back( -1 ); + } else { + // Loop over multiplicities + for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) { + //int idx = addTorsionParm( dihedralparm_, *it ); // TODO handle array packing + int idx = (int)dihedralparm_.size(); + dihedralparm_.push_back( *it ); + idxs.push_back( idx ); + } // END loop over dihedral multiplicities + currentTypes.AddParm(types, idxs, false); + } // END parameters found for this dihedral + } + // Actually add parameters for this dihedral. + for (std::vector::const_iterator idx = idxs.begin(); idx != idxs.end(); ++idx) + { + DihedralType mydih = *dih; + mydih.SetImproper( false ); + // If there are multiple parameters for the same dihedral, all but + // one of the 1-4 calcs need to be skipped. + if (idx == idxs.begin()) + mydih.SetSkip14(skip14); + else + mydih.SetSkip14(true); + mydih.SetIdx( *idx ); + dihedralsIn.push_back( mydih ); +// mprintf("DEBUG: Assigned %4i %4i %4i %4i (%2s %2s %2s %2s) isImproper=%i skip14=%i\n", +// mydih.A1()+1, mydih.A2()+1, mydih.A3()+1, mydih.A4()+1, +// *types[0], *types[1], *types[2], *types[3], +// (int)mydih.IsImproper(), (int)mydih.Skip14()); + } // END loop over dihedral parameter indices } } // END loop over all dihedrals } @@ -2895,7 +2944,11 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, } } -/** Update/add to parameters in this topology with those from given set. */ +/** Update/add to parameters in this topology with those from given set. + * NOTE: This routine is separate from updateParams() to allow that + * routine to be used by AppendTop() for testing the parameter + * update code with topology appending. + */ int Topology::UpdateParams(ParameterSet const& set1) { ParameterSet set0 = GetParameters(); return updateParams(set0, set1); From 3a546737998fddc9e525fc93d7b50bc58fa5deb5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 12 Dec 2023 13:01:20 -0500 Subject: [PATCH 0156/1492] The first duplicated dihedral is used for 1-4 instead of the last dihedral. --- test/Test_CharmmParams/test3.parm7.save | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/Test_CharmmParams/test3.parm7.save b/test/Test_CharmmParams/test3.parm7.save index 85bd66be2f..f400305054 100644 --- a/test/Test_CharmmParams/test3.parm7.save +++ b/test/Test_CharmmParams/test3.parm7.save @@ -1,4 +1,4 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 12/05/23 15:27:10 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/12/23 12:16:22 %FLAG CTITLE %FORMAT(a80) @@ -352,20 +352,20 @@ LYS 33 30 39 42 32 33 30 39 45 32 33 30 39 48 33 36 30 39 42 32 36 30 39 45 32 36 30 39 48 33 - 42 39 48 51 34 42 39 48 54 35 - 45 39 48 51 34 45 39 48 54 35 + 42 39 48 51 34 45 39 48 51 34 + 42 39 48 54 35 45 39 48 54 35 51 48 54 57 36 51 48 54 60 36 %FLAG DIHEDRALS_WITHOUT_HYDROGEN %FORMAT(10I8) - 0 6 -12 21 1 0 6 -12 21 2 - 0 6 12 21 3 0 6 63 66 4 - 6 12 -21 30 5 6 12 -21 30 6 - 6 12 21 30 7 12 6 63 66 8 - 12 21 -30 39 9 12 21 -30 39 10 - 12 21 30 39 11 21 12 -6 63 12 - 21 12 -6 63 13 21 12 6 63 14 - 21 30 39 48 15 30 39 -48 54 16 - 30 39 48 54 17 39 48 54 57 18 + 0 6 12 21 1 0 6 -12 21 2 + 0 6 -12 21 3 0 6 63 66 4 + 6 12 21 30 5 6 12 -21 30 6 + 6 12 -21 30 7 12 6 63 66 8 + 12 21 30 39 9 12 21 -30 39 10 + 12 21 -30 39 11 21 12 6 63 12 + 21 12 -6 63 13 21 12 -6 63 14 + 21 30 39 48 15 30 39 48 54 16 + 30 39 -48 54 17 39 48 54 57 18 39 48 54 60 18 %FLAG EXCLUDED_ATOMS_LIST %FORMAT(10I8) From 8b9b6b145903db7a3dcb353f55f208ab67713fa4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 09:11:34 -0500 Subject: [PATCH 0157/1492] Add genangles keyword --- src/Exec_UpdateParameters.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Exec_UpdateParameters.cpp b/src/Exec_UpdateParameters.cpp index 329056f7f4..7f7414393e 100644 --- a/src/Exec_UpdateParameters.cpp +++ b/src/Exec_UpdateParameters.cpp @@ -2,13 +2,15 @@ #include "CpptrajStdio.h" #include "DataSet_Parameters.h" #include "DataSet_Topology.h" +#include "Structure/GenerateAngles.h" const char* Exec_UpdateParameters::disclaimer_ = "Warning: This command is provided for convenience only.\nWarning: For editing topology files, ParmEd is a much better alternative.\n"; // Exec_UpdateParameters::Help() void Exec_UpdateParameters::Help() const { - mprintf("\t%s setname \n", DataSetList::TopArgs); + mprintf("\tsetname [genangles]\n" + "\t%s\n", DataSetList::TopArgs); mprintf(" Update parameters in specified topology with those from .\n" " can either be a parameter set or a topology. If a\n" " parameter from does not exist in the topology it\n" @@ -21,6 +23,7 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn { mprintf("%s", disclaimer_); std::string dsname = argIn.GetStringKey("setname"); + bool genAngles = argIn.hasKey("genangles"); if (dsname.empty()) { mprinterr("Error: Specify parameter set.\n"); return CpptrajState::ERR; @@ -43,10 +46,19 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn mprintf("\tUpdating parameters in topology '%s' using those in set '%s'\n", top.c_str(), ds->legend()); + if (genAngles) + mprintf("\tWill attempt to generate angle/dihedral information from bonds.\n"); // Sort topology bond arrays to be consistent with LEaP //top.SortBonds(); + if (genAngles) { + if (Cpptraj::Structure::GenerateAngles( top )) { + mprinterr("Error: Could not generate angle/dihedral information.\n"); + return CpptrajState::ERR; + } + } + if (ds->Type() == DataSet::PARAMETERS) top.UpdateParams(static_cast( *ds )); else if (ds->Type() == DataSet::TOPOLOGY) { From fa3aebabded84f758f25460cb629da29fbc5b2f8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 10:20:03 -0500 Subject: [PATCH 0158/1492] Try a different way of appending; go back to using updateParams to make parameter assignment more consistent. Leap seems to pack dihedral arrays but not angles or bonds so go back to the old behavior for dihedrals to be consistent with leap. --- src/Topology.cpp | 356 ++++++++++++++++++++++++++++------------------- 1 file changed, 211 insertions(+), 145 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 101c8adc1f..35f5d064b5 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2156,6 +2156,10 @@ static inline void GetDihedralParams(DihedralParmHolder& DP, ParmHolderIdx()], false ); } + // DEBUG + //if (ret == ParameterHolders::ADDED) { + // mprintf("DEBUG: Added %s %s %s %s idx=%i isImproper=%i\n", *(types[0]), *(types[1]), *(types[2]), *(types[3]), b->Idx(), (int)b->IsImproper()); + //} if (ret == ParameterHolders::ERR) { paramOverwriteWarning("dihedral"); mprintf("Warning: Dihedral %s %s %s %s PK=%g PN=%g Phase=%g SCEE=%g SCNB=%g\n", @@ -2360,6 +2364,46 @@ template class TopVecAppend { } }; +/// Add bonds to array with given atom offset +static inline void addBondsWithOffset(BondArray& bondsOut, BondArray const& bondsIn, int atomOffset, std::vectorconst& atoms) { + // By convention any hydrogen atom should come second + for (BondArray::const_iterator bond = bondsIn.begin(); bond != bondsIn.end(); ++bond) + { + int atom1 = bond->A1() + atomOffset; + int atom2 = bond->A2() + atomOffset; + bool a1H = (atoms[atom1].Element() == Atom::HYDROGEN); + //bool a2H = (atoms[atom2].Element() == Atom::HYDROGEN); + //mprintf("\t\t\tAdding bond %i to %i (isH=%i)\n",atom1+1,atom2+1,(int)isH); + if (a1H) + bondsOut.push_back( BondType(atom2, atom1, -1) ); + else + bondsOut.push_back( BondType(atom1, atom2, -1) ); + //if (a1H || a2H) { + // if (a1H) + // bondsh_.push_back( BondType(atom2, atom1, pidx) ); + // else + // bondsh_.push_back( BondType(atom1, atom2, pidx) ); + //} else + // bonds_.push_back( BondType( atom1, atom2, pidx ) ); + //bondsOut.push_back( BondType(bond->A1() + atomOffset, bond->A2() + atomOffset, -1) ); + } +} + +/// Add angles to array with given offset +static inline void addAnglesWithOffset(AngleArray& anglesOut, AngleArray const& anglesIn, int atomOffset) { + for (AngleArray::const_iterator angle = anglesIn.begin(); angle != anglesIn.end(); ++angle) + anglesOut.push_back( AngleType(angle->A1() + atomOffset, angle->A2() + atomOffset, angle->A3() + atomOffset, -1) ); +} + +/// Add dihedrals to array with given offset +static inline void addDihedralsWithOffset(DihedralArray& dihedralsOut, DihedralArray const& dihedralsIn, int atomOffset) +{ + for (DihedralArray::const_iterator dih = dihedralsIn.begin(); dih != dihedralsIn.end(); ++dih) + dihedralsOut.push_back( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, + dih->A3() + atomOffset, dih->A4() + atomOffset, + dih->Type(), -1 ) ); +} + // Topology::AppendTop() int Topology::AppendTop(Topology const& NewTop) { int atomOffset = (int)atoms_.size(); @@ -2369,11 +2413,11 @@ int Topology::AppendTop(Topology const& NewTop) { // NOTE: Lines commented out with //# can be used to test appending via the // parameter update functionality. This is slower, but is a good test // that the parameter update function is working correctly. -//# // Save old parameters -//# mprintf("DEBUG: Getting old parameters.\n"); -//# ParameterSet oldParams = GetParameters(); -//# oldParams.Summary(); // DEBUG - // Save nonbonded parameters from each topology TODO LJ 10-12 + // Save old parameters + mprintf("DEBUG: Getting old parameters.\n"); + ParameterSet oldParams = GetParameters(); + oldParams.Summary(); // DEBUG +/* // Save nonbonded parameters from each topology TODO LJ 10-12 ParmHolder myAtomTypes, newAtomTypes; ParmHolder myNB, newNB; //ParmHolder myHB, newHB; @@ -2381,7 +2425,7 @@ int Topology::AppendTop(Topology const& NewTop) { GetLJAtomTypes( newAtomTypes, newNB, NewTop.atoms_, NewTop.nonbond_, debug_ ); int nAtomTypeUpdated = UpdateParameters< ParmHolder >( myAtomTypes, newAtomTypes, "atom type", 1 ); // TODO verbose int nLJparamsUpdated = UpdateParameters< ParmHolder >( myNB, newNB, "LJ A-B", 1 ); // TODO verbose - mprintf("\t%i atom types updated, %i LJ params updated.\n", nAtomTypeUpdated, nLJparamsUpdated); + mprintf("\t%i atom types updated, %i LJ params updated.\n", nAtomTypeUpdated, nLJparamsUpdated);*/ // Append NewTop atoms to this topology. for (atom_iterator atom = NewTop.begin(); atom != NewTop.end(); ++atom) @@ -2393,10 +2437,21 @@ int Topology::AppendTop(Topology const& NewTop) { Residue const& res = NewTop.Res( CurrentAtom.ResNum() ); // Bonds need to be cleared and re-added. CurrentAtom.ClearBonds(); + for (Atom::bond_iterator bat = atom->bondbegin(); bat != atom->bondend(); ++bat) + CurrentAtom.AddBondToIdx( *bat + atomOffset ); + AddTopAtom( CurrentAtom, Residue(res.Name(), res.OriginalResNum(), res.Icode(), res.ChainId()) ); } -//# // Recreate bonds for the added atoms + // Recreate bonds for the added atoms + addBondsWithOffset( bonds_, NewTop.Bonds(), atomOffset, atoms_ ); + addBondsWithOffset( bondsh_, NewTop.BondsH(), atomOffset, atoms_ ); + addBondsWithOffset( chamber_.SetUB(), NewTop.chamber_.UB(), atomOffset, atoms_ ); + addAnglesWithOffset( angles_, NewTop.Angles(), atomOffset ); + addAnglesWithOffset( anglesh_, NewTop.AnglesH(), atomOffset ); + addDihedralsWithOffset( dihedrals_, NewTop.Dihedrals(), atomOffset ); + addDihedralsWithOffset( dihedralsh_, NewTop.DihedralsH(), atomOffset ); + addDihedralsWithOffset( chamber_.SetImpropers(), NewTop.chamber_.Impropers(), atomOffset ); //# for (BondArray::const_iterator bond = NewTop.Bonds().begin(); bond != NewTop.Bonds().end(); ++bond) //# AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); //# for (BondArray::const_iterator bond = NewTop.BondsH().begin(); bond != NewTop.BondsH().end(); ++bond) @@ -2415,9 +2470,9 @@ int Topology::AppendTop(Topology const& NewTop) { //# AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, //# dih->A3() + atomOffset, dih->A4() + atomOffset, //# dih->Type() ) ); -//# // Update parameters -//# mprintf("DEBUG: Updating with new parameters.\n"); -//# updateParams( oldParams, NewTop.GetParameters() ); + // Update parameters + mprintf("DEBUG: Updating with new parameters.\n"); + updateParams( oldParams, NewTop.GetParameters() ); // EXTRA ATOM INFO TopVecAppend appendNameType; @@ -2432,7 +2487,7 @@ int Topology::AppendTop(Topology const& NewTop) { appendFloat.Append( occupancy_, NewTop.occupancy_, NewTop.Natom() ); appendFloat.Append( bfactor_, NewTop.bfactor_, NewTop.Natom() ); - // BONDS +/* // BONDS AddBondArray(NewTop.Bonds(), NewTop.BondParm(), atomOffset); AddBondArray(NewTop.BondsH(), NewTop.BondParm(), atomOffset); // ANGLES @@ -2447,7 +2502,7 @@ int Topology::AppendTop(Topology const& NewTop) { // Need to regenerate nonbonded info TODO verbose TODO LJ 10-12 mprintf("\tRegenerating nonbond parameters.\n"); - AssignNonbondParams( myAtomTypes, myNB, ParmHolder() ); //FIXME LJ 10-12 + AssignNonbondParams( myAtomTypes, myNB, ParmHolder() ); //FIXME LJ 10-12*/ // TODO append missing stuff? @@ -2506,6 +2561,25 @@ const } bnd->SetIdx( idx ); } +/* + for (BondArray::iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { + TypeNameHolder types(2); + types.AddName( atoms_[bnd->A1()].Type() ); + types.AddName( atoms_[bnd->A2()].Type() ); + bool found; + // See if parameter is present. + int idx = -1; + BondParmType bp = newBondParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: parameter not found for %s %s-%s (%s-%s)\n", desc, + TruncResAtomNameNum(bnd->A1()).c_str(), + TruncResAtomNameNum(bnd->A2()).c_str(), + *types[0], *types[1]); + } else { + idx = addBondParm( bpa, bp ); + } + bnd->SetIdx( idx ); + }*/ } /** Replace any current bond parameters with given bond parameters. */ @@ -2584,15 +2658,33 @@ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, //idx = addAngleParm( angleparm_, ap ); // TODO uncomment for array packing idx = (int)angleparm_.size(); angleparm_.push_back( ap ); - mprintf("DEBUG: New angle type for %s-%s-%s (Tk=%g Teq=%g) idx=%i\n", *types[0], *types[1], *types[2], ap.Tk(), ap.Teq(), idx); + //mprintf("DEBUG: New angle type for %s-%s-%s (Tk=%g Teq=%g) idx=%i\n", *types[0], *types[1], *types[2], ap.Tk(), ap.Teq(), idx); currentTypes.AddParm(types, idx, false); } - } else { - AngleParmType const& ap = angleparm_[idx]; - mprintf("DEBUG: Existing angle type for %s-%s-%s (Tk=%g Teq=%g) idx=%i\n", *types[0], *types[1], *types[2], ap.Tk(), ap.Teq(), idx); } ang->SetIdx( idx ); } +/* + for (AngleArray::iterator ang = angles.begin(); ang != angles.end(); ++ang) { + TypeNameHolder types(3); + types.AddName( atoms_[ang->A1()].Type() ); + types.AddName( atoms_[ang->A2()].Type() ); + types.AddName( atoms_[ang->A3()].Type() ); + bool found; + // See if parameter is present. + int idx = -1; + AngleParmType ap = newAngleParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: Angle parameter not found for angle %s-%s-%s (%s-%s-%s)\n", + TruncResAtomNameNum(ang->A1()).c_str(), + TruncResAtomNameNum(ang->A2()).c_str(), + TruncResAtomNameNum(ang->A3()).c_str(), + *types[0], *types[1], *types[3]); + } else { + idx = addAngleParm( angleparm_, ap ); + } + ang->SetIdx( idx ); + }*/ } /** Replace any current angle parameters with given angle parameters. */ @@ -2606,7 +2698,6 @@ void Topology::AssignAngleParams(ParmHolder const& newAngleParams void Topology::AssignImproperParm(ParmHolder const& newImproperParams, DihedralArray& impropers) { - ParmHolder currentTypes; for (DihedralArray::iterator imp = impropers.begin(); imp != impropers.end(); ++imp) { TypeNameHolder types(4); types.AddName( atoms_[imp->A1()].Type() ); @@ -2615,24 +2706,17 @@ void Topology::AssignImproperParm(ParmHolder const& newImprope types.AddName( atoms_[imp->A4()].Type() ); bool found; // See if parameter is present. - int idx = currentTypes.FindParam( types, found ); + int idx = -1; + DihedralParmType ip = newImproperParams.FindParam( types, found ); if (!found) { - idx = -1; - // Not yet present in current types - DihedralParmType ip = newImproperParams.FindParam( types, found ); - if (!found) { - mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(imp->A1()).c_str(), - TruncResAtomNameNum(imp->A2()).c_str(), - TruncResAtomNameNum(imp->A3()).c_str(), - TruncResAtomNameNum(imp->A4()).c_str(), - *types[0], *types[1], *types[2], *types[3]); - } else { - //idx = addTorsionParm( chamber_.SetImproperParm(), ip ); // TODO handle array packing - idx = (int)chamber_.ImproperParm().size(); - chamber_.SetImproperParm().push_back( ip ); - currentTypes.AddParm(types, idx, false); - } + mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(imp->A1()).c_str(), + TruncResAtomNameNum(imp->A2()).c_str(), + TruncResAtomNameNum(imp->A3()).c_str(), + TruncResAtomNameNum(imp->A4()).c_str(), + *types[0], *types[1], *types[3], *types[4]); + } else { + idx = addTorsionParm( chamber_.SetImproperParm(), ip ); } imp->SetIdx( idx ); } @@ -2672,7 +2756,6 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, mprintf("DEBUG: %zu incoming dihedrals, %zu unique dihedrals.\n", dihedralsIn.size(), dihedrals.size()); - ParmHolder< std::vector > currentTypes; dihedralsIn.clear(); // Keep track of 1-4 interactions typedef std::pair Ipair; @@ -2705,128 +2788,108 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, bool found; if (isImproper) { // ----- This is actually an improper dihedral. ---------------- - std::vector idxs = currentTypes.FindParam( types, found ); + DihedralParmType ip = newImproperParams.FindParam( types, found ); + int idx = -1; if (!found) { - // Not yet present in current types - DihedralParmType ip = newImproperParams.FindParam( types, found ); - if (!found) { - idxs.push_back( -1 ); - mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(dih->A1()).c_str(), - TruncResAtomNameNum(dih->A2()).c_str(), - TruncResAtomNameNum(dih->A3()).c_str(), - TruncResAtomNameNum(dih->A4()).c_str(), - *types[0], *types[1], *types[2], *types[3]); - } else { - //int idx = addTorsionParm( dihedralparm_, ip ); // TODO handle array packing - int idx = (int)dihedralparm_.size(); - dihedralparm_.push_back( ip ); - idxs.push_back( idx ); - currentTypes.AddParm(types, idxs, false); - } + mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + } else { + idx = addTorsionParm( dihedralparm_, ip ); } DihedralType mydih = *dih; - mydih.SetIdx( idxs.front() ); + mydih.SetIdx( idx ); mydih.SetImproper( true ); // Always skip 1-4 for impropers mydih.SetSkip14( true ); dihedralsIn.push_back( mydih ); } else { - // -----Regular dihedral. -------------------------------------- - // Determine if this is actually a 1-4 interaction by making - // sure that A4 isnt part of a bond or angle with A1. - bool skip14 = false; - for (Atom::bond_iterator bat1 = atoms_[dih->A1()].bondbegin(); - bat1 != atoms_[dih->A1()].bondend(); ++bat1) - { - if (*bat1 != dih->A2()) { - if (*bat1 == dih->A4()) { + // -----Regular dihedral. See if parameter already present. ---- + DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); + if (!found) { + mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); + DihedralType mydih = *dih; + mydih.SetIdx( -1 ); + dihedralsIn.push_back( mydih ); + } else { + // Actually add parameters for this dihedral. + // Determine if this is actually a 1-4 interaction by making + // sure that A4 isnt part of a bond or angle with A1. + bool skip14 = false; + for (Atom::bond_iterator bat1 = atoms_[dih->A1()].bondbegin(); + bat1 != atoms_[dih->A1()].bondend(); ++bat1) + { + if (*bat1 != dih->A2()) { + if (*bat1 == dih->A4()) { + skip14 = true; + break; + } + // Loop over angles, dih->A1() - bat1 - bat2 + for (Atom::bond_iterator bat2 = atoms_[*bat1].bondbegin(); + bat2 != atoms_[*bat1].bondend(); ++bat2) + { + //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG + // mprintf("DEBUG: %4i %4i %4i %4i Checking angle %4i %4i %4i\n", dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, dih->A1()+1, *bat1 + 1, *bat2 + 1); + //} + if (*bat2 != *bat1) { + if (*bat2 == dih->A4()) { + skip14 = true; + break; + } + } + } // END loop over bat1 bonded atoms + if (skip14) break; + } + } // END loop over dih->A1() bonded atoms + if (!skip14) { + // Determine if 1-4 interaction already calculated by previous dihedral. + // Make the lower end atom first. + Ipair pair14; + if (dih->A1() < dih->A4()) { + pair14.first = dih->A1(); + pair14.second = dih->A4(); + } else { + pair14.first = dih->A4(); + pair14.second = dih->A1(); + } + Imap::const_iterator it = PairMap.find( pair14 ); + if (it == PairMap.end()) { + skip14 = false; + PairMap.insert( pair14 ); + } else { skip14 = true; - break; + //mprintf("DEBUG: Prior 1-4 calc detected.\n"); } - // Loop over angles, dih->A1() - bat1 - bat2 - for (Atom::bond_iterator bat2 = atoms_[*bat1].bondbegin(); - bat2 != atoms_[*bat1].bondend(); ++bat2) - { - //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG - // mprintf("DEBUG: %4i %4i %4i %4i Checking angle %4i %4i %4i\n", dih->A1()+1, dih->A2()+1, dih->A3()+1, dih->A4()+1, dih->A1()+1, *bat1 + 1, *bat2 + 1); - //} - if (*bat2 != *bat1) { - if (*bat2 == dih->A4()) { - skip14 = true; - break; - } - } - } // END loop over bat1 bonded atoms - if (skip14) break; - } - } // END loop over dih->A1() bonded atoms - if (!skip14) { - // Determine if 1-4 interaction already calculated by previous dihedral. - // Make the lower end atom first. - Ipair pair14; - if (dih->A1() < dih->A4()) { - pair14.first = dih->A1(); - pair14.second = dih->A4(); - } else { - pair14.first = dih->A4(); - pair14.second = dih->A1(); } - Imap::const_iterator it = PairMap.find( pair14 ); - if (it == PairMap.end()) { - skip14 = false; - PairMap.insert( pair14 ); - } else { - skip14 = true; - //mprintf("DEBUG: Prior 1-4 calc detected.\n"); + // Loop over multiplicities + //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG + // mprintf("DEBUG: Skip14= %i\n", (int)skip14); + //} + for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) { + DihedralType mydih = *dih; + int idx = addTorsionParm( dihedralparm_, *it ); + // If there are multiple parameters for the same dihedral, all but + // one of the 1-4 calcs need to be skipped. + if (it == dpa.begin()) + mydih.SetSkip14(skip14); + else + mydih.SetSkip14(true); + mydih.SetIdx( idx ); + dihedralsIn.push_back( mydih ); +// mprintf("DEBUG: Assigned %4i %4i %4i %4i (%2s %2s %2s %2s) isImproper=%i skip14=%i\n", +// mydih.A1()+1, mydih.A2()+1, mydih.A3()+1, mydih.A4()+1, +// *types[0], *types[1], *types[2], *types[3], +// (int)mydih.IsImproper(), (int)mydih.Skip14()); } } - //if (dih->A1() == 442 && dih->A4() == 444) { // DEBUG - // mprintf("DEBUG: Skip14= %i\n", (int)skip14); - //} - - // See if parameter already present. ---- - std::vector idxs = currentTypes.FindParam( types, found ); - if (!found) { - // Not yet present in current types - DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); - if (!found) { - mprintf("Warning: Dihedral parameters not found for dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(dih->A1()).c_str(), - TruncResAtomNameNum(dih->A2()).c_str(), - TruncResAtomNameNum(dih->A3()).c_str(), - TruncResAtomNameNum(dih->A4()).c_str(), - *types[0], *types[1], *types[2], *types[3]); - idxs.push_back( -1 ); - } else { - // Loop over multiplicities - for (DihedralParmArray::const_iterator it = dpa.begin(); it != dpa.end(); ++it) { - //int idx = addTorsionParm( dihedralparm_, *it ); // TODO handle array packing - int idx = (int)dihedralparm_.size(); - dihedralparm_.push_back( *it ); - idxs.push_back( idx ); - } // END loop over dihedral multiplicities - currentTypes.AddParm(types, idxs, false); - } // END parameters found for this dihedral - } - // Actually add parameters for this dihedral. - for (std::vector::const_iterator idx = idxs.begin(); idx != idxs.end(); ++idx) - { - DihedralType mydih = *dih; - mydih.SetImproper( false ); - // If there are multiple parameters for the same dihedral, all but - // one of the 1-4 calcs need to be skipped. - if (idx == idxs.begin()) - mydih.SetSkip14(skip14); - else - mydih.SetSkip14(true); - mydih.SetIdx( *idx ); - dihedralsIn.push_back( mydih ); -// mprintf("DEBUG: Assigned %4i %4i %4i %4i (%2s %2s %2s %2s) isImproper=%i skip14=%i\n", -// mydih.A1()+1, mydih.A2()+1, mydih.A3()+1, mydih.A4()+1, -// *types[0], *types[1], *types[2], *types[3], -// (int)mydih.IsImproper(), (int)mydih.Skip14()); - } // END loop over dihedral parameter indices } } // END loop over all dihedrals } @@ -2956,7 +3019,7 @@ int Topology::UpdateParams(ParameterSet const& set1) { /** Update/add to parameters in this topology by combining those from given sets. */ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { - set1.Summary(); // DEBUG + //set1.Summary(); // DEBUG // Check TODO is this necessary? if (set0.AT().size() < 1) mprintf("Warning: No atom type information in '%s'\n", c_str()); @@ -2971,6 +3034,9 @@ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { c_str(), set1.ParamSetName().c_str()); return 1; } + mprintf("DEBUG: Updated parameters.\n"); + set0.Summary(); + //set0.Debug(); // unsigned int updateCount; // Bond parameters From 67ca80f8a21181b99b723a250f51b4b8dd9dd502 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 10:35:49 -0500 Subject: [PATCH 0159/1492] updateparameters now packs dihedral parameters --- test/Test_CharmmParams/test3.parm7.save | 76 +++++++++---------------- 1 file changed, 28 insertions(+), 48 deletions(-) diff --git a/test/Test_CharmmParams/test3.parm7.save b/test/Test_CharmmParams/test3.parm7.save index f400305054..3a34b026b1 100644 --- a/test/Test_CharmmParams/test3.parm7.save +++ b/test/Test_CharmmParams/test3.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 12/12/23 12:16:22 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/13/23 10:09:59 %FLAG CTITLE %FORMAT(a80) %FLAG POINTERS %FORMAT(10I8) 23 12 11 11 26 12 42 19 0 0 - 114 1 11 12 19 13 22 36 12 0 + 114 1 11 12 19 13 22 19 12 0 0 0 0 0 0 0 0 1 23 0 0 %FLAG FORCE_FIELD_TYPE @@ -123,51 +123,31 @@ LYS 8.80000000E-01 0.00000000E+00 1.90000000E+00 0.00000000E+00 6.30000000E-01 1.00000000E-02 1.50000000E-01 1.40000000E+00 1.00000000E-01 1.50000000E-01 1.00000000E-01 3.50000000E-01 4.20000000E-01 1.91000000E+00 1.90000000E-01 - 1.10000000E+00 2.00000000E-01 2.20000000E+00 2.00000000E-01 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 1.90000000E-01 2.00000000E-01 2.00000000E-01 - 0.00000000E+00 1.90000000E-01 2.00000000E-01 1.90000000E-01 1.90000000E-01 - 2.00000000E-01 1.90000000E-01 1.90000000E-01 0.00000000E+00 0.00000000E+00 - 1.92500000E+00 + 1.10000000E+00 2.00000000E-01 2.20000000E+00 1.92500000E+00 %FLAG DIHEDRAL_PERIODICITY %FORMAT(5E16.8) 1.00000000E+00 2.00000000E+00 3.00000000E+00 1.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 1.00000000E+00 2.00000000E+00 4.00000000E+00 6.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 3.00000000E+00 - 1.00000000E+00 3.00000000E+00 2.00000000E+00 3.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 3.00000000E+00 3.00000000E+00 3.00000000E+00 - 1.00000000E+00 3.00000000E+00 3.00000000E+00 3.00000000E+00 3.00000000E+00 - 3.00000000E+00 3.00000000E+00 3.00000000E+00 1.00000000E+00 1.00000000E+00 - 2.00000000E+00 + 1.00000000E+00 3.00000000E+00 2.00000000E+00 2.00000000E+00 %FLAG DIHEDRAL_PHASE %FORMAT(5E16.8) 3.14159265E+00 3.14159265E+00 0.00000000E+00 0.00000000E+00 3.14159265E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 3.14159265E+00 0.00000000E+00 3.14159265E+00 3.14159265E+00 3.14159265E+00 3.14159265E+00 0.00000000E+00 - 3.14159265E+00 0.00000000E+00 3.14159265E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 3.14159265E+00 + 3.14159265E+00 0.00000000E+00 3.14159265E+00 3.14159265E+00 %FLAG SCEE_SCALE_FACTOR %FORMAT(5E16.8) 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 + 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 %FLAG SCNB_SCALE_FACTOR %FORMAT(5E16.8) 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 - 1.00000000E+00 + 1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00 %FLAG CHARMM_NUM_IMPROPERS %FORMAT(10I8) 1 @@ -334,27 +314,27 @@ LYS 48 54 60 9 57 54 60 10 %FLAG DIHEDRALS_INC_HYDROGEN %FORMAT(10I8) - 0 6 12 15 19 0 6 12 18 19 - 3 0 6 9 20 3 0 6 12 21 - 3 0 6 63 22 6 12 21 24 23 - 6 12 21 27 23 9 6 12 15 24 - 9 6 12 18 24 9 6 12 21 25 - 9 6 63 66 26 12 21 30 33 27 - 12 21 30 36 27 15 12 6 63 28 - 15 12 21 24 29 15 12 21 27 29 - 15 12 21 30 27 18 12 6 63 28 - 18 12 21 24 29 18 12 21 27 29 - 18 12 21 30 27 21 30 39 42 30 - 21 30 39 45 30 24 21 30 33 29 - 24 21 30 36 29 24 21 30 39 27 - 27 21 30 33 29 27 21 30 36 29 - 27 21 30 39 27 30 39 48 51 31 - 33 30 39 42 32 33 30 39 45 32 - 33 30 39 48 33 36 30 39 42 32 - 36 30 39 45 32 36 30 39 48 33 - 42 39 48 51 34 45 39 48 51 34 - 42 39 48 54 35 45 39 48 54 35 - 51 48 54 57 36 51 48 54 60 36 + 0 6 12 15 17 0 6 12 18 17 + 3 0 6 9 4 3 0 6 12 4 + 3 0 6 63 4 6 12 21 24 15 + 6 12 21 27 15 9 6 12 15 17 + 9 6 12 18 17 9 6 12 21 17 + 9 6 63 66 4 12 21 30 33 15 + 12 21 30 36 15 15 12 6 63 17 + 15 12 21 24 15 15 12 21 27 15 + 15 12 21 30 15 18 12 6 63 17 + 18 12 21 24 15 18 12 21 27 15 + 18 12 21 30 15 21 30 39 42 15 + 21 30 39 45 15 24 21 30 33 15 + 24 21 30 36 15 24 21 30 39 15 + 27 21 30 33 15 27 21 30 36 15 + 27 21 30 39 15 30 39 48 51 17 + 33 30 39 42 15 33 30 39 45 15 + 33 30 39 48 15 36 30 39 42 15 + 36 30 39 45 15 36 30 39 48 15 + 42 39 48 51 4 45 39 48 51 4 + 42 39 48 54 4 45 39 48 54 4 + 51 48 54 57 19 51 48 54 60 19 %FLAG DIHEDRALS_WITHOUT_HYDROGEN %FORMAT(10I8) 0 6 12 21 1 0 6 -12 21 2 From 729af660ee265ec3e3e4e60420b5b550679df9f8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 11:01:56 -0500 Subject: [PATCH 0160/1492] New topology with better parameter assignment --- test/Test_CombineCrd/combinedParm.parm7.save | 781 ++++++++++--------- 1 file changed, 402 insertions(+), 379 deletions(-) diff --git a/test/Test_CombineCrd/combinedParm.parm7.save b/test/Test_CombineCrd/combinedParm.parm7.save index f04e266dab..bd4a9fa073 100644 --- a/test/Test_CombineCrd/combinedParm.parm7.save +++ b/test/Test_CombineCrd/combinedParm.parm7.save @@ -1,11 +1,11 @@ -%VERSION VERSION_STAMP = V0001.000 DATE = 08/18/20 18:40:07 +%VERSION VERSION_STAMP = V0001.000 DATE = 12/13/23 10:11:18 %FLAG TITLE %FORMAT(20a4) combinedParm %FLAG POINTERS %FORMAT(10I8) 244 14 111 141 246 194 511 408 0 0 - 1327 14 141 194 408 26 38 37 0 0 + 1327 14 141 194 408 37 75 37 27 0 0 0 0 0 0 0 0 2 24 0 0 %FLAG ATOM_NAME @@ -238,39 +238,57 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS %FLAG BOND_FORCE_CONSTANT %FORMAT(5E16.8) 5.70000000E+02 4.90000000E+02 3.20000000E+02 3.10000000E+02 3.17000000E+02 - 3.67000000E+02 4.69000000E+02 4.69000000E+02 4.47000000E+02 4.28000000E+02 - 4.27000000E+02 5.46000000E+02 3.88000000E+02 3.17000000E+02 3.37000000E+02 - 6.56000000E+02 5.53000000E+02 3.40000000E+02 4.34000000E+02 3.67000000E+02 - 4.78400000E+02 3.22800000E+02 3.72400000E+02 3.86100000E+02 3.44300000E+02 - 3.69600000E+02 + 3.67000000E+02 4.69000000E+02 4.69000000E+02 4.69000000E+02 4.47000000E+02 + 4.28000000E+02 4.27000000E+02 5.46000000E+02 3.88000000E+02 3.17000000E+02 + 3.37000000E+02 3.10000000E+02 6.56000000E+02 3.17000000E+02 3.67000000E+02 + 4.78400000E+02 3.22800000E+02 3.72400000E+02 3.86100000E+02 5.53000000E+02 + 3.40000000E+02 3.40000000E+02 4.34000000E+02 3.67000000E+02 4.34000000E+02 + 3.67000000E+02 3.40000000E+02 3.40000000E+02 4.34000000E+02 3.40000000E+02 + 3.44300000E+02 3.69600000E+02 %FLAG BOND_EQUIL_VALUE %FORMAT(5E16.8) 1.22900000E+00 1.33500000E+00 1.41000000E+00 1.52600000E+00 1.52200000E+00 - 1.47100000E+00 1.40400000E+00 1.40000000E+00 1.41900000E+00 1.38000000E+00 - 1.38100000E+00 1.35200000E+00 1.45900000E+00 1.49500000E+00 1.44900000E+00 - 1.25000000E+00 9.60000000E-01 1.09000000E+00 1.01000000E+00 1.08000000E+00 - 1.38700000E+00 1.72900000E+00 1.37300000E+00 1.36200000E+00 1.08700000E+00 - 9.74000000E-01 + 1.47100000E+00 1.40400000E+00 1.40000000E+00 1.40000000E+00 1.41900000E+00 + 1.38000000E+00 1.38100000E+00 1.35200000E+00 1.45900000E+00 1.49500000E+00 + 1.44900000E+00 1.52600000E+00 1.25000000E+00 1.52200000E+00 1.47100000E+00 + 1.38700000E+00 1.72900000E+00 1.37300000E+00 1.36200000E+00 9.60000000E-01 + 1.09000000E+00 1.09000000E+00 1.01000000E+00 1.08000000E+00 1.01000000E+00 + 1.08000000E+00 1.09000000E+00 1.09000000E+00 1.01000000E+00 1.09000000E+00 + 1.08700000E+00 9.74000000E-01 %FLAG ANGLE_FORCE_CONSTANT %FORMAT(5E16.8) 8.00000000E+01 5.00000000E+01 6.30000000E+01 5.00000000E+01 8.00000000E+01 - 7.00000000E+01 8.00000000E+01 6.30000000E+01 6.30000000E+01 6.30000000E+01 - 7.00000000E+01 7.00000000E+01 6.30000000E+01 7.00000000E+01 7.00000000E+01 - 6.30000000E+01 6.30000000E+01 7.00000000E+01 7.00000000E+01 6.30000000E+01 - 8.00000000E+01 6.30000000E+01 4.00000000E+01 8.00000000E+01 7.00000000E+01 - 5.00000000E+01 3.50000000E+01 5.50000000E+01 5.00000000E+01 5.00000000E+01 - 3.50000000E+01 6.29200000E+01 6.71800000E+01 6.97900000E+01 6.98500000E+01 - 6.33100000E+01 4.84600000E+01 4.88500000E+01 + 7.00000000E+01 8.00000000E+01 8.00000000E+01 6.30000000E+01 6.30000000E+01 + 6.30000000E+01 6.30000000E+01 6.30000000E+01 7.00000000E+01 7.00000000E+01 + 6.30000000E+01 7.00000000E+01 7.00000000E+01 6.30000000E+01 6.30000000E+01 + 7.00000000E+01 7.00000000E+01 6.30000000E+01 8.00000000E+01 6.30000000E+01 + 5.00000000E+01 4.00000000E+01 8.00000000E+01 7.00000000E+01 6.30000000E+01 + 8.00000000E+01 7.00000000E+01 6.30000000E+01 8.00000000E+01 4.00000000E+01 + 6.29200000E+01 6.71800000E+01 6.97900000E+01 6.98500000E+01 6.33100000E+01 + 5.00000000E+01 5.00000000E+01 3.50000000E+01 5.50000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 5.00000000E+01 3.50000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 5.00000000E+01 3.50000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 3.50000000E+01 3.50000000E+01 5.00000000E+01 + 3.50000000E+01 5.00000000E+01 5.00000000E+01 4.84600000E+01 4.88500000E+01 %FLAG ANGLE_EQUIL_VALUE %FORMAT(5E16.8) 2.14501057E+00 2.12755727E+00 1.93906163E+00 1.91113635E+00 2.10137732E+00 - 2.03505478E+00 1.94080696E+00 2.09439600E+00 2.14151991E+00 2.02807346E+00 - 2.31779824E+00 1.82212452E+00 1.85703112E+00 1.94778828E+00 1.89717371E+00 - 1.89891904E+00 2.35445017E+00 2.18166250E+00 2.24449438E+00 2.01760148E+00 - 1.91462701E+00 1.92160833E+00 1.91113635E+00 2.19911580E+00 2.04203610E+00 - 2.09439600E+00 1.91113635E+00 1.89368305E+00 2.14850123E+00 2.06018753E+00 - 2.09439600E+00 2.08392402E+00 2.09387240E+00 2.08043336E+00 2.09334880E+00 - 2.09352334E+00 2.09457053E+00 1.91061275E+00 + 2.03505478E+00 1.94080696E+00 1.94080696E+00 2.09439600E+00 2.09439600E+00 + 2.14151991E+00 2.09439600E+00 2.02807346E+00 2.31779824E+00 1.82212452E+00 + 1.85703112E+00 1.94778828E+00 1.89717371E+00 1.89891904E+00 2.35445017E+00 + 2.18166250E+00 2.24449438E+00 2.01760148E+00 1.91462701E+00 1.92160833E+00 + 1.91113635E+00 1.91113635E+00 2.19911580E+00 2.04203610E+00 1.93906163E+00 + 2.10137732E+00 2.03505478E+00 1.93906163E+00 1.94080696E+00 1.91113635E+00 + 2.08392402E+00 2.09387240E+00 2.08043336E+00 2.09334880E+00 2.09352334E+00 + 2.09439600E+00 1.91113635E+00 1.91113635E+00 1.89368305E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 + 2.09439600E+00 2.09439600E+00 2.09439600E+00 2.14850123E+00 2.09439600E+00 + 2.09439600E+00 2.09439600E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 2.06018753E+00 1.91113635E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 2.09439600E+00 1.91113635E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 1.91113635E+00 2.09457053E+00 1.91061275E+00 %FLAG DIHEDRAL_FORCE_CONSTANT %FORMAT(5E16.8) 2.50000000E+00 2.00000000E+00 2.00000000E+00 4.00000000E-01 0.00000000E+00 @@ -278,9 +296,9 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 2.00000000E-01 2.00000000E-01 3.62500000E+00 3.00000000E+00 3.50000000E+00 6.52500000E+00 1.67500000E+00 1.52500000E+00 1.50000000E+00 4.50000000E-01 1.58000000E+00 5.50000000E-01 2.00000000E-01 2.50000000E-01 1.80000000E-01 - 1.05000000E+01 1.10000000E+00 1.66666667E-01 2.50000000E-01 1.60000000E-01 - 8.00000000E-01 8.00000000E-02 0.00000000E+00 1.50000000E-01 1.00000000E+00 - 9.00000000E-01 1.10000000E+00 + 1.05000000E+01 1.10000000E+00 9.00000000E-01 1.10000000E+00 1.66666667E-01 + 2.50000000E-01 1.60000000E-01 8.00000000E-01 8.00000000E-02 0.00000000E+00 + 1.50000000E-01 1.00000000E+00 %FLAG DIHEDRAL_PERIODICITY %FORMAT(5E16.8) 2.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 4.00000000E+00 @@ -288,9 +306,9 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 1.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 - 2.00000000E+00 2.00000000E+00 3.00000000E+00 1.00000000E+00 3.00000000E+00 - 1.00000000E+00 3.00000000E+00 3.00000000E+00 3.00000000E+00 2.00000000E+00 - 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 3.00000000E+00 + 1.00000000E+00 3.00000000E+00 1.00000000E+00 3.00000000E+00 3.00000000E+00 + 3.00000000E+00 2.00000000E+00 %FLAG DIHEDRAL_PHASE %FORMAT(5E16.8) 3.14159400E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 @@ -298,9 +316,9 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 0.00000000E+00 0.00000000E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 0.00000000E+00 - 3.14159400E+00 3.14159400E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 3.14159400E+00 0.00000000E+00 0.00000000E+00 3.14159400E+00 - 3.14159400E+00 3.14159400E+00 + 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 3.14159400E+00 0.00000000E+00 + 0.00000000E+00 3.14159400E+00 %FLAG SCEE_SCALE_FACTOR %FORMAT(5E16.8) 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 @@ -309,8 +327,8 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 0.00000000E+00 0.00000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 - 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 0.00000000E+00 - 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 0.00000000E+00 %FLAG SCNB_SCALE_FACTOR %FORMAT(5E16.8) 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 @@ -319,132 +337,137 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 0.00000000E+00 0.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 - 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 0.00000000E+00 - 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 0.00000000E+00 %FLAG SOLTY %FORMAT(5E16.8) - + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 %FLAG LENNARD_JONES_ACOEF %FORMAT(5E16.8) 9.44293233E+05 2.12601181E+03 1.39982777E-01 9.95480466E+05 2.56678134E+03 1.04308023E+06 2.01791425E+04 9.14716912E+00 2.27401052E+04 2.01823541E+02 6.20665997E+04 5.94667300E+01 6.78771368E+04 8.79040886E+02 3.25969625E+03 - 7.44975864E+05 1.40467023E+03 7.91544157E+05 1.45985502E+04 4.66922514E+04 + 7.44975864E+05 1.40467023E+03 7.91544156E+05 1.45985502E+04 4.66922514E+04 5.81803229E+05 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 - 0.00000000E+00 0.00000000E+00 0.00000000E+00 8.82619071E+05 2.27577561E+03 - 9.24822270E+05 2.01619733E+04 6.01816484E+04 7.01803794E+05 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 8.82619071E+05 2.27577560E+03 + 9.24822269E+05 2.01619733E+04 6.01816484E+04 7.01803794E+05 0.00000000E+00 8.19971662E+05 6.06829342E+05 1.02595236E+03 6.47841731E+05 1.12780457E+04 3.69471530E+04 4.71003287E+05 0.00000000E+00 5.74393458E+05 3.79876399E+05 8.96776989E+04 1.07193646E+02 9.71708117E+04 1.41077189E+03 4.98586848E+03 6.82786631E+04 0.00000000E+00 8.61541883E+04 5.44261042E+04 7.51607703E+03 6.58473870E+04 6.63368273E+01 7.18621074E+04 9.55000044E+02 3.50301067E+03 - 4.96707306E+04 0.00000000E+00 6.37148278E+04 3.93690817E+04 5.34045360E+03 - 3.76169105E+03 7.91627154E+04 8.90987508E+01 8.59947003E+04 1.21014911E+03 - 4.33325458E+03 6.00750218E+04 0.00000000E+00 7.62451550E+04 4.77908183E+04 + 4.96707305E+04 0.00000000E+00 6.37148277E+04 3.93690817E+04 5.34045360E+03 + 3.76169105E+03 7.91627155E+04 8.90987508E+01 8.59947003E+04 1.21014911E+03 + 4.33325458E+03 6.00750218E+04 0.00000000E+00 7.62451550E+04 4.77908184E+04 6.55825601E+03 4.64559155E+03 5.71629601E+03 5.89818288E+05 1.03954408E+03 6.28541239E+05 1.11851919E+04 3.63097246E+04 4.58874091E+05 0.00000000E+00 5.57281136E+05 3.70622491E+05 5.33379252E+04 3.86654992E+04 4.68711055E+04 3.61397723E+05 1.76079018E+06 4.83020817E+03 1.83982239E+06 4.14717456E+04 1.22102013E+05 1.40513595E+06 0.00000000E+00 1.63123475E+06 1.15256113E+06 - 1.74057868E+05 1.29147101E+05 1.54217682E+05 1.11729277E+06 3.24095688E+06 + 1.74057868E+05 1.29147101E+05 1.54217681E+05 1.11729277E+06 3.24095688E+06 %FLAG LENNARD_JONES_BCOEF %FORMAT(5E16.8) 8.01323529E+02 2.09604198E+01 9.37598976E-02 7.36907417E+02 2.06278363E+01 6.75612247E+02 6.45756063E+01 7.57919667E-01 6.13981767E+01 3.56012899E+00 1.13252061E+02 1.93248820E+00 1.06076943E+02 7.42992380E+00 1.43076527E+01 - 7.50714425E+02 1.79702257E+01 6.93079947E+02 5.79323581E+01 1.03606917E+02 + 7.50714426E+02 1.79702257E+01 6.93079947E+02 5.79323582E+01 1.03606917E+02 6.99746810E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 6.53361429E+02 1.82891803E+01 - 5.99015525E+02 5.44372326E+01 9.40505980E+01 6.14502845E+02 0.00000000E+00 + 5.99015525E+02 5.44372327E+01 9.40505981E+01 6.14502845E+02 0.00000000E+00 5.31102864E+02 6.77220874E+02 1.53505284E+01 6.26720080E+02 5.08951803E+01 - 9.21192136E+01 6.29300710E+02 0.00000000E+00 5.55666448E+02 5.64885984E+02 + 9.21192136E+01 6.29300711E+02 0.00000000E+00 5.55666449E+02 5.64885984E+02 1.36131731E+02 2.59456373E+00 1.26919150E+02 9.41257003E+00 1.76949863E+01 - 1.25287818E+02 0.00000000E+00 1.12529845E+02 1.11805549E+02 2.17257828E+01 + 1.25287819E+02 0.00000000E+00 1.12529845E+02 1.11805549E+02 2.17257828E+01 1.15327881E+02 2.01792524E+00 1.07908863E+02 7.65648470E+00 1.46638650E+01 - 1.05648788E+02 0.00000000E+00 9.56748258E+01 9.40124296E+01 1.81057616E+01 - 1.50233639E+01 1.26451907E+02 2.33864085E+00 1.18043746E+02 8.61880722E+00 + 1.05648788E+02 0.00000000E+00 9.56748257E+01 9.40124296E+01 1.81057616E+01 + 1.50233639E+01 1.26451907E+02 2.33864085E+00 1.18043747E+02 8.61880723E+00 1.63092814E+01 1.16187983E+02 0.00000000E+00 1.04660679E+02 1.03580945E+02 2.00642027E+01 1.66953734E+01 1.85196588E+01 6.33305958E+02 1.46567808E+01 5.85549272E+02 4.80771660E+01 8.66220818E+01 5.89183300E+02 0.00000000E+00 - 5.19163331E+02 5.29252520E+02 1.04986921E+02 8.83744760E+01 9.73010753E+01 + 5.19163331E+02 5.29252520E+02 1.04986921E+02 8.83744760E+01 9.73010751E+01 4.95732238E+02 1.22266505E+03 3.53019992E+01 1.11939598E+03 1.03440958E+02 1.77491594E+02 1.15202544E+03 0.00000000E+00 9.92485818E+02 1.04286543E+03 2.11915736E+02 1.80470661E+02 1.97211104E+02 9.73951183E+02 1.85348706E+03 %FLAG BONDS_INC_HYDROGEN %FORMAT(10I8) - 27 30 17 18 21 18 18 24 18 12 - 15 18 0 3 19 0 6 19 0 9 - 19 96 99 20 90 93 20 84 87 20 - 78 81 20 69 72 19 63 66 20 51 - 54 18 51 57 18 45 48 18 39 42 - 19 141 144 17 129 132 18 129 135 18 - 129 138 18 123 126 18 117 120 18 111 - 114 19 210 213 20 204 207 20 198 201 - 20 192 195 20 183 186 19 177 180 20 - 165 168 18 165 171 18 159 162 18 153 - 156 19 246 249 18 246 252 18 237 240 - 18 237 243 18 231 234 18 225 228 19 - 297 300 19 297 303 19 282 285 18 282 - 288 18 276 279 18 270 273 19 318 321 - 18 318 324 18 312 315 19 381 384 19 - 381 387 19 381 390 19 372 375 18 372 - 378 18 363 366 18 363 369 18 354 357 - 18 354 360 18 345 348 18 345 351 18 - 339 342 18 333 336 19 456 459 20 450 - 453 20 444 447 20 438 441 20 429 432 - 19 423 426 20 411 414 18 411 417 18 - 405 408 18 399 402 19 501 504 17 489 - 492 18 489 495 18 489 498 18 483 486 - 18 477 480 18 471 474 19 570 573 20 - 564 567 20 558 561 20 552 555 20 543 - 546 19 537 540 20 525 528 18 525 531 - 18 519 522 18 513 516 19 633 636 19 - 633 639 19 633 642 19 624 627 18 624 - 630 18 615 618 18 615 621 18 606 609 - 18 606 612 18 597 600 18 597 603 18 - 591 594 18 585 588 19 651 654 19 651 - 657 19 699 729 25 696 726 25 690 723 - 25 681 720 26 675 717 25 672 714 25 - 666 711 25 + 27 30 25 18 21 26 18 24 26 12 + 15 27 0 3 28 0 6 28 0 9 + 28 96 99 29 90 93 29 84 87 29 + 78 81 29 69 72 30 63 66 31 51 + 54 32 51 57 32 45 48 33 39 42 + 34 141 144 25 129 132 32 129 135 32 + 129 138 32 123 126 26 117 120 33 111 + 114 34 210 213 29 204 207 29 198 201 + 29 192 195 29 183 186 30 177 180 31 + 165 168 32 165 171 32 159 162 33 153 + 156 34 246 249 32 246 252 32 237 240 + 32 237 243 32 231 234 33 225 228 34 + 297 300 34 297 303 34 282 285 32 282 + 288 32 276 279 33 270 273 34 318 321 + 33 318 324 33 312 315 34 381 384 28 + 381 387 28 381 390 28 372 375 35 372 + 378 35 363 366 32 363 369 32 354 357 + 32 354 360 32 345 348 32 345 351 32 + 339 342 33 333 336 34 456 459 29 450 + 453 29 444 447 29 438 441 29 429 432 + 30 423 426 31 411 414 32 411 417 32 + 405 408 33 399 402 34 501 504 25 489 + 492 32 489 495 32 489 498 32 483 486 + 26 477 480 33 471 474 34 570 573 29 + 564 567 29 558 561 29 552 555 29 543 + 546 30 537 540 31 525 528 32 525 531 + 32 519 522 33 513 516 34 633 636 28 + 633 639 28 633 642 28 624 627 35 624 + 630 35 615 618 32 615 621 32 606 609 + 32 606 612 32 597 600 32 597 603 32 + 591 594 33 585 588 34 651 654 34 651 + 657 34 699 729 36 696 726 36 690 723 + 36 681 720 37 675 717 36 672 714 36 + 666 711 36 %FLAG BONDS_WITHOUT_HYDROGEN %FORMAT(10I8) 33 36 1 33 39 2 18 27 3 12 18 4 12 33 5 0 12 6 105 108 1 105 111 2 96 102 7 90 96 8 - 84 90 8 78 84 8 75 78 8 75 - 102 9 69 75 10 63 69 11 60 63 - 12 60 102 13 51 60 14 45 51 4 - 45 105 5 39 45 15 147 150 1 147 - 153 2 123 129 4 123 141 3 117 123 - 4 117 147 5 111 117 15 219 222 1 + 84 90 8 78 84 8 75 78 9 75 + 102 10 69 75 11 63 69 12 60 63 + 13 60 102 14 51 60 15 45 51 4 + 45 105 5 39 45 16 147 150 1 147 + 153 2 123 129 17 123 141 3 117 123 + 4 117 147 5 111 117 16 219 222 1 219 225 2 210 216 7 204 210 8 198 - 204 8 192 198 8 189 192 8 189 216 - 9 183 189 10 177 183 11 174 177 12 - 174 216 13 165 174 14 159 165 4 159 - 219 5 153 159 15 264 267 1 264 270 - 2 255 258 16 255 261 16 246 255 5 - 237 246 4 231 237 4 231 264 5 225 - 231 15 306 309 1 306 312 2 291 294 - 1 291 297 2 282 291 5 276 282 4 - 276 306 5 270 276 15 327 330 1 327 - 333 2 318 327 5 312 318 15 393 396 - 1 393 399 2 372 381 6 363 372 4 - 354 363 4 345 354 4 339 345 4 339 - 393 5 333 339 15 465 468 1 465 471 + 204 8 192 198 8 189 192 9 189 216 + 10 183 189 11 177 183 12 174 177 13 + 174 216 14 165 174 15 159 165 4 159 + 219 5 153 159 16 264 267 1 264 270 + 2 255 258 18 255 261 18 246 255 19 + 237 246 17 231 237 4 231 264 5 225 + 231 16 306 309 1 306 312 2 291 294 + 1 291 297 2 282 291 19 276 282 4 + 276 306 5 270 276 16 327 330 1 327 + 333 2 318 327 5 312 318 16 393 396 + 1 393 399 2 372 381 20 363 372 17 + 354 363 17 345 354 17 339 345 4 339 + 393 5 333 339 16 465 468 1 465 471 2 456 462 7 450 456 8 444 450 8 - 438 444 8 435 438 8 435 462 9 429 - 435 10 423 429 11 420 423 12 420 462 - 13 411 420 14 405 411 4 405 465 5 - 399 405 15 507 510 1 507 513 2 483 - 489 4 483 501 3 477 483 4 477 507 - 5 471 477 15 579 582 1 579 585 2 + 438 444 8 435 438 9 435 462 10 429 + 435 11 423 429 12 420 423 13 420 462 + 14 411 420 15 405 411 4 405 465 5 + 399 405 16 507 510 1 507 513 2 483 + 489 17 483 501 3 477 483 4 477 507 + 5 471 477 16 579 582 1 579 585 2 570 576 7 564 570 8 558 564 8 552 - 558 8 549 552 8 549 576 9 543 549 - 10 537 543 11 534 537 12 534 576 13 - 525 534 14 519 525 4 519 579 5 513 - 519 15 645 648 1 645 651 2 624 633 - 6 615 624 4 606 615 4 597 606 4 - 591 597 4 591 645 5 585 591 15 696 + 558 8 549 552 9 549 576 10 543 549 + 11 537 543 12 534 537 13 534 576 14 + 525 534 15 519 525 4 519 579 5 513 + 519 16 645 648 1 645 651 2 624 633 + 20 615 624 17 606 615 17 597 606 17 + 591 597 4 591 645 5 585 591 16 696 699 21 693 696 21 693 705 22 690 693 21 687 690 21 687 702 22 684 687 21 684 699 21 678 684 23 672 675 21 669 @@ -453,194 +476,194 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 660 678 23 %FLAG ANGLES_INC_HYDROGEN %FORMAT(10I8) - 33 39 42 26 24 18 27 4 21 18 - 24 27 21 18 27 4 18 27 30 28 - 15 12 18 4 15 12 33 4 12 18 - 21 4 12 18 24 4 9 0 12 4 - 6 0 9 27 6 0 12 4 3 0 - 6 27 3 0 9 27 3 0 12 4 - 0 12 15 4 105 111 114 26 99 96 - 102 26 93 90 96 26 90 96 99 26 - 87 84 90 26 84 90 93 26 81 78 - 84 26 78 84 87 26 75 78 81 26 - 72 69 75 29 66 63 69 26 63 69 - 72 26 60 63 66 26 57 51 60 4 - 54 51 57 27 54 51 60 4 48 45 - 51 4 48 45 105 4 45 51 54 4 - 45 51 57 4 42 39 45 30 39 45 - 48 4 147 153 156 26 135 129 138 27 - 132 129 135 27 132 129 138 27 126 123 - 129 4 126 123 141 4 123 129 132 4 - 123 129 135 4 123 129 138 4 123 141 - 144 28 120 117 123 4 120 117 147 4 - 117 123 126 4 114 111 117 30 111 117 - 120 4 219 225 228 26 213 210 216 26 - 207 204 210 26 204 210 213 26 201 198 - 204 26 198 204 207 26 195 192 198 26 - 192 198 201 26 189 192 195 26 186 183 - 189 29 180 177 183 26 177 183 186 26 - 174 177 180 26 171 165 174 4 168 165 - 171 27 168 165 174 4 162 159 165 4 - 162 159 219 4 159 165 168 4 159 165 - 171 4 156 153 159 30 153 159 162 4 - 264 270 273 26 252 246 255 4 249 246 - 252 27 249 246 255 4 243 237 246 4 - 240 237 243 27 240 237 246 4 237 246 - 249 4 237 246 252 4 234 231 237 4 - 234 231 264 4 231 237 240 4 231 237 - 243 4 228 225 231 30 225 231 234 4 - 306 312 315 26 300 297 303 31 291 297 - 300 26 291 297 303 26 288 282 291 4 - 285 282 288 27 285 282 291 4 279 276 - 282 4 279 276 306 4 276 282 285 4 - 276 282 288 4 273 270 276 30 270 276 - 279 4 327 333 336 26 324 318 327 4 - 321 318 324 27 321 318 327 4 315 312 - 318 30 312 318 321 4 312 318 324 4 - 393 399 402 26 387 381 390 27 384 381 - 387 27 384 381 390 27 378 372 381 4 - 375 372 378 27 375 372 381 4 372 381 - 384 4 372 381 387 4 372 381 390 4 - 369 363 372 4 366 363 369 27 366 363 - 372 4 363 372 375 4 363 372 378 4 - 360 354 363 4 357 354 360 27 357 354 - 363 4 354 363 366 4 354 363 369 4 - 351 345 354 4 348 345 351 27 348 345 - 354 4 345 354 357 4 345 354 360 4 - 342 339 345 4 342 339 393 4 339 345 - 348 4 339 345 351 4 336 333 339 30 - 333 339 342 4 465 471 474 26 459 456 - 462 26 453 450 456 26 450 456 459 26 - 447 444 450 26 444 450 453 26 441 438 - 444 26 438 444 447 26 435 438 441 26 - 432 429 435 29 426 423 429 26 423 429 - 432 26 420 423 426 26 417 411 420 4 - 414 411 417 27 414 411 420 4 408 405 - 411 4 408 405 465 4 405 411 414 4 - 405 411 417 4 402 399 405 30 399 405 - 408 4 507 513 516 26 495 489 498 27 - 492 489 495 27 492 489 498 27 486 483 - 489 4 486 483 501 4 483 489 492 4 - 483 489 495 4 483 489 498 4 483 501 - 504 28 480 477 483 4 480 477 507 4 - 477 483 486 4 474 471 477 30 471 477 - 480 4 579 585 588 26 573 570 576 26 - 567 564 570 26 564 570 573 26 561 558 - 564 26 558 564 567 26 555 552 558 26 - 552 558 561 26 549 552 555 26 546 543 - 549 29 540 537 543 26 537 543 546 26 - 534 537 540 26 531 525 534 4 528 525 - 531 27 528 525 534 4 522 519 525 4 - 522 519 579 4 519 525 528 4 519 525 - 531 4 516 513 519 30 513 519 522 4 - 645 651 654 26 645 651 657 26 639 633 - 642 27 636 633 639 27 636 633 642 27 - 630 624 633 4 627 624 630 27 627 624 - 633 4 624 633 636 4 624 633 639 4 - 624 633 642 4 621 615 624 4 618 615 - 621 27 618 615 624 4 615 624 627 4 - 615 624 630 4 612 606 615 4 609 606 - 612 27 609 606 615 4 606 615 618 4 - 606 615 621 4 603 597 606 4 600 597 - 603 27 600 597 606 4 597 606 609 4 - 597 606 612 4 594 591 597 4 594 591 - 645 4 591 597 600 4 591 597 603 4 - 588 585 591 30 585 591 594 4 654 651 - 657 31 699 696 726 37 696 699 729 37 - 693 690 723 37 693 696 726 37 687 690 - 723 37 684 699 729 37 675 672 714 37 - 672 675 717 37 669 666 711 37 669 672 - 714 37 663 666 711 37 663 681 720 38 - 660 675 717 37 + 33 39 42 41 24 18 27 42 21 18 + 24 43 21 18 27 42 18 27 30 44 + 15 12 18 45 15 12 33 46 12 18 + 21 47 12 18 24 47 9 0 12 48 + 6 0 9 49 6 0 12 48 3 0 + 6 49 3 0 9 49 3 0 12 48 + 0 12 15 50 105 111 114 41 99 96 + 102 51 93 90 96 52 90 96 99 52 + 87 84 90 52 84 90 93 52 81 78 + 84 52 78 84 87 52 75 78 81 53 + 72 69 75 54 66 63 69 55 63 69 + 72 56 60 63 66 57 57 51 60 58 + 54 51 57 59 54 51 60 58 48 45 + 51 60 48 45 105 61 45 51 54 62 + 45 51 57 62 42 39 45 63 39 45 + 48 64 147 153 156 41 135 129 138 59 + 132 129 135 59 132 129 138 59 126 123 + 129 65 126 123 141 42 123 129 132 66 + 123 129 135 66 123 129 138 66 123 141 + 144 44 120 117 123 60 120 117 147 61 + 117 123 126 47 114 111 117 63 111 117 + 120 64 219 225 228 41 213 210 216 51 + 207 204 210 52 204 210 213 52 201 198 + 204 52 198 204 207 52 195 192 198 52 + 192 198 201 52 189 192 195 53 186 183 + 189 54 180 177 183 55 177 183 186 56 + 174 177 180 57 171 165 174 58 168 165 + 171 59 168 165 174 58 162 159 165 60 + 162 159 219 61 159 165 168 62 159 165 + 171 62 156 153 159 63 153 159 162 64 + 264 270 273 41 252 246 255 67 249 246 + 252 59 249 246 255 67 243 237 246 66 + 240 237 243 59 240 237 246 66 237 246 + 249 66 237 246 252 66 234 231 237 60 + 234 231 264 61 231 237 240 62 231 237 + 243 62 228 225 231 63 225 231 234 64 + 306 312 315 41 300 297 303 68 291 297 + 300 41 291 297 303 41 288 282 291 67 + 285 282 288 59 285 282 291 67 279 276 + 282 60 279 276 306 61 276 282 285 62 + 276 282 288 62 273 270 276 63 270 276 + 279 64 327 333 336 41 324 318 327 61 + 321 318 324 69 321 318 327 61 315 312 + 318 63 312 318 321 64 312 318 324 64 + 393 399 402 41 387 381 390 49 384 381 + 387 49 384 381 390 49 378 372 381 70 + 375 372 378 71 375 372 381 70 372 381 + 384 72 372 381 387 72 372 381 390 72 + 369 363 372 66 366 363 369 59 366 363 + 372 66 363 372 375 73 363 372 378 73 + 360 354 363 66 357 354 360 59 357 354 + 363 66 354 363 366 66 354 363 369 66 + 351 345 354 66 348 345 351 59 348 345 + 354 66 345 354 357 66 345 354 360 66 + 342 339 345 60 342 339 393 61 339 345 + 348 62 339 345 351 62 336 333 339 63 + 333 339 342 64 465 471 474 41 459 456 + 462 51 453 450 456 52 450 456 459 52 + 447 444 450 52 444 450 453 52 441 438 + 444 52 438 444 447 52 435 438 441 53 + 432 429 435 54 426 423 429 55 423 429 + 432 56 420 423 426 57 417 411 420 58 + 414 411 417 59 414 411 420 58 408 405 + 411 60 408 405 465 61 405 411 414 62 + 405 411 417 62 402 399 405 63 399 405 + 408 64 507 513 516 41 495 489 498 59 + 492 489 495 59 492 489 498 59 486 483 + 489 65 486 483 501 42 483 489 492 66 + 483 489 495 66 483 489 498 66 483 501 + 504 44 480 477 483 60 480 477 507 61 + 477 483 486 47 474 471 477 63 471 477 + 480 64 579 585 588 41 573 570 576 51 + 567 564 570 52 564 570 573 52 561 558 + 564 52 558 564 567 52 555 552 558 52 + 552 558 561 52 549 552 555 53 546 543 + 549 54 540 537 543 55 537 543 546 56 + 534 537 540 57 531 525 534 58 528 525 + 531 59 528 525 534 58 522 519 525 60 + 522 519 579 61 519 525 528 62 519 525 + 531 62 516 513 519 63 513 519 522 64 + 645 651 654 41 645 651 657 41 639 633 + 642 49 636 633 639 49 636 633 642 49 + 630 624 633 70 627 624 630 71 627 624 + 633 70 624 633 636 72 624 633 639 72 + 624 633 642 72 621 615 624 66 618 615 + 621 59 618 615 624 66 615 624 627 73 + 615 624 630 73 612 606 615 66 609 606 + 612 59 609 606 615 66 606 615 618 66 + 606 615 621 66 603 597 606 66 600 597 + 603 59 600 597 606 66 597 606 609 66 + 597 606 612 66 594 591 597 60 594 591 + 645 61 591 597 600 62 591 597 603 62 + 588 585 591 63 585 591 594 64 654 651 + 657 68 699 696 726 74 696 699 729 74 + 693 690 723 74 693 696 726 74 687 690 + 723 74 684 699 729 74 675 672 714 74 + 672 675 717 74 669 666 711 74 669 672 + 714 74 663 666 711 74 663 681 720 75 + 660 675 717 74 %FLAG ANGLES_WITHOUT_HYDROGEN %FORMAT(10I8) 36 33 39 1 33 39 45 2 18 12 33 3 12 18 27 4 12 33 36 5 12 33 39 6 0 12 18 7 0 12 - 33 7 108 105 111 1 105 111 117 2 - 90 96 102 8 84 90 96 8 78 75 - 102 9 78 84 90 8 75 78 84 8 - 75 102 96 10 69 75 78 11 69 75 - 102 12 63 60 102 13 63 69 75 14 - 60 63 69 15 60 102 75 16 60 102 - 96 17 51 45 105 3 51 60 63 18 - 51 60 102 19 45 51 60 20 45 105 - 108 5 45 105 111 6 39 45 51 21 - 39 45 105 22 150 147 153 1 147 153 - 159 2 129 123 141 4 123 117 147 3 - 117 123 129 23 117 123 141 4 117 147 - 150 5 117 147 153 6 111 117 123 21 - 111 117 147 22 222 219 225 1 219 225 - 231 2 204 210 216 8 198 204 210 8 - 192 189 216 9 192 198 204 8 189 192 - 198 8 189 216 210 10 183 189 192 11 - 183 189 216 12 177 174 216 13 177 183 - 189 14 174 177 183 15 174 216 189 16 - 174 216 210 17 165 159 219 3 165 174 - 177 18 165 174 216 19 159 165 174 20 + 33 8 108 105 111 1 105 111 117 2 + 90 96 102 9 84 90 96 10 78 75 + 102 11 78 84 90 10 75 78 84 12 + 75 102 96 13 69 75 78 14 69 75 + 102 15 63 60 102 16 63 69 75 17 + 60 63 69 18 60 102 75 19 60 102 + 96 20 51 45 105 3 51 60 63 21 + 51 60 102 22 45 51 60 23 45 105 + 108 5 45 105 111 6 39 45 51 24 + 39 45 105 25 150 147 153 1 147 153 + 159 2 129 123 141 26 123 117 147 3 + 117 123 129 27 117 123 141 4 117 147 + 150 5 117 147 153 6 111 117 123 24 + 111 117 147 25 222 219 225 1 219 225 + 231 2 204 210 216 9 198 204 210 10 + 192 189 216 11 192 198 204 10 189 192 + 198 12 189 216 210 13 183 189 192 14 + 183 189 216 15 177 174 216 16 177 183 + 189 17 174 177 183 18 174 216 189 19 + 174 216 210 20 165 159 219 3 165 174 + 177 21 165 174 216 22 159 165 174 23 159 219 222 5 159 219 225 6 153 159 - 165 21 153 159 219 22 267 264 270 1 - 264 270 276 2 258 255 261 24 246 255 - 258 25 246 255 261 25 237 231 264 3 - 237 246 255 3 231 237 246 23 231 264 - 267 5 231 264 270 6 225 231 237 21 - 225 231 264 22 309 306 312 1 306 312 + 165 24 153 159 219 25 267 264 270 1 + 264 270 276 2 258 255 261 28 246 255 + 258 29 246 255 261 29 237 231 264 3 + 237 246 255 30 231 237 246 27 231 264 + 267 5 231 264 270 6 225 231 237 24 + 225 231 264 25 309 306 312 1 306 312 318 2 294 291 297 1 282 276 306 3 - 282 291 294 5 282 291 297 6 276 282 - 291 3 276 306 309 5 276 306 312 6 - 270 276 282 21 270 276 306 22 330 327 + 282 291 294 31 282 291 297 32 276 282 + 291 33 276 306 309 5 276 306 312 6 + 270 276 282 24 270 276 306 25 330 327 333 1 327 333 339 2 318 327 330 5 - 318 327 333 6 312 318 327 22 396 393 - 399 1 393 399 405 2 363 372 381 7 - 354 363 372 23 345 339 393 3 345 354 - 363 23 339 345 354 23 339 393 396 5 - 339 393 399 6 333 339 345 21 333 339 - 393 22 468 465 471 1 465 471 477 2 - 450 456 462 8 444 450 456 8 438 435 - 462 9 438 444 450 8 435 438 444 8 - 435 462 456 10 429 435 438 11 429 435 - 462 12 423 420 462 13 423 429 435 14 - 420 423 429 15 420 462 435 16 420 462 - 456 17 411 405 465 3 411 420 423 18 - 411 420 462 19 405 411 420 20 405 465 - 468 5 405 465 471 6 399 405 411 21 - 399 405 465 22 510 507 513 1 507 513 - 519 2 489 483 501 4 483 477 507 3 - 477 483 489 23 477 483 501 4 477 507 - 510 5 477 507 513 6 471 477 483 21 - 471 477 507 22 582 579 585 1 579 585 - 591 2 564 570 576 8 558 564 570 8 - 552 549 576 9 552 558 564 8 549 552 - 558 8 549 576 570 10 543 549 552 11 - 543 549 576 12 537 534 576 13 537 543 - 549 14 534 537 543 15 534 576 549 16 - 534 576 570 17 525 519 579 3 525 534 - 537 18 525 534 576 19 519 525 534 20 + 318 327 333 6 312 318 327 25 396 393 + 399 1 393 399 405 2 363 372 381 34 + 354 363 372 35 345 339 393 3 345 354 + 363 35 339 345 354 27 339 393 396 5 + 339 393 399 6 333 339 345 24 333 339 + 393 25 468 465 471 1 465 471 477 2 + 450 456 462 9 444 450 456 10 438 435 + 462 11 438 444 450 10 435 438 444 12 + 435 462 456 13 429 435 438 14 429 435 + 462 15 423 420 462 16 423 429 435 17 + 420 423 429 18 420 462 435 19 420 462 + 456 20 411 405 465 3 411 420 423 21 + 411 420 462 22 405 411 420 23 405 465 + 468 5 405 465 471 6 399 405 411 24 + 399 405 465 25 510 507 513 1 507 513 + 519 2 489 483 501 26 483 477 507 3 + 477 483 489 27 477 483 501 4 477 507 + 510 5 477 507 513 6 471 477 483 24 + 471 477 507 25 582 579 585 1 579 585 + 591 2 564 570 576 9 558 564 570 10 + 552 549 576 11 552 558 564 10 549 552 + 558 12 549 576 570 13 543 549 552 14 + 543 549 576 15 537 534 576 16 537 543 + 549 17 534 537 543 18 534 576 549 19 + 534 576 570 20 525 519 579 3 525 534 + 537 21 525 534 576 22 519 525 534 23 519 579 582 5 519 579 585 6 513 519 - 525 21 513 519 579 22 648 645 651 1 - 615 624 633 7 606 615 624 23 597 591 - 645 3 597 606 615 23 591 597 606 23 + 525 24 513 519 579 25 648 645 651 1 + 615 624 633 34 606 615 624 35 597 591 + 645 3 597 606 615 35 591 597 606 27 591 645 648 5 591 645 651 6 585 591 - 597 21 585 591 645 22 696 693 705 32 - 693 696 699 33 690 687 702 32 690 693 - 696 33 690 693 705 32 687 684 699 33 - 687 690 693 33 684 687 690 33 684 687 - 702 32 684 699 696 33 678 684 687 34 - 678 684 699 34 675 660 678 34 672 669 - 708 32 669 672 675 33 666 663 681 35 - 666 669 672 33 666 669 708 32 663 660 - 675 33 663 660 678 34 663 666 669 33 - 660 663 666 33 660 663 681 35 660 675 - 672 33 660 678 684 36 + 597 24 585 591 645 25 696 693 705 36 + 693 696 699 37 690 687 702 36 690 693 + 696 37 690 693 705 36 687 684 699 37 + 687 690 693 37 684 687 690 37 684 687 + 702 36 684 699 696 37 678 684 687 38 + 678 684 699 38 675 660 678 38 672 669 + 708 36 669 672 675 37 666 663 681 39 + 666 669 672 37 666 669 708 36 663 660 + 675 37 663 660 678 38 663 666 669 37 + 660 663 666 37 660 663 681 39 660 675 + 672 37 660 678 684 40 %FLAG DIHEDRALS_INC_HYDROGEN %FORMAT(10I8) 36 33 39 42 2 36 33 -39 42 1 33 39 45 48 10 24 18 12 33 9 - 24 18 27 30 28 21 18 12 33 9 - 21 18 27 30 28 15 12 18 21 9 + 24 18 27 30 30 21 18 12 33 9 + 21 18 27 30 30 15 12 18 21 9 15 12 18 24 9 15 12 18 27 9 15 12 33 36 10 15 12 33 39 10 - 12 18 27 30 29 12 18 -27 30 30 + 12 18 27 30 31 12 18 -27 30 32 12 33 39 42 1 9 0 12 15 9 9 0 12 18 9 9 0 12 33 9 6 0 12 15 9 6 0 12 18 9 @@ -663,26 +686,26 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 54 51 60 63 10 54 51 60 102 10 51 60 63 66 16 48 45 51 54 9 48 45 51 57 9 48 45 51 60 9 - 48 45 105 108 31 48 45 -105 108 10 - 48 45 -105 108 32 48 45 105 111 10 + 48 45 105 108 33 48 45 -105 108 10 + 48 45 -105 108 34 48 45 105 111 10 45 105 111 114 1 42 39 45 48 10 42 39 45 51 10 42 39 45 105 10 39 45 51 54 9 39 45 51 57 9 150 147 153 156 2 150 147 -153 156 1 - 147 153 159 162 10 138 129 123 141 29 - 138 129 -123 141 33 135 129 123 141 29 - 135 129 -123 141 33 132 129 123 141 29 - 132 129 -123 141 33 129 123 141 144 29 - 129 123 -141 144 30 126 123 117 147 9 + 147 153 159 162 10 138 129 123 141 31 + 138 129 -123 141 35 135 129 123 141 31 + 135 129 -123 141 35 132 129 123 141 31 + 132 129 -123 141 35 129 123 141 144 31 + 129 123 -141 144 32 126 123 117 147 9 126 123 129 132 9 126 123 129 135 9 - 126 123 129 138 9 126 123 141 144 28 + 126 123 129 138 9 126 123 141 144 30 120 117 123 126 9 120 117 123 129 9 - 120 117 123 141 29 120 117 -123 141 33 - 120 117 147 150 31 120 117 -147 150 10 - 120 117 -147 150 32 120 117 147 153 10 - 117 123 129 132 30 117 123 129 135 30 - 117 123 129 138 30 117 123 141 144 29 - 117 123 -141 144 30 117 147 153 156 1 + 120 117 123 141 31 120 117 -123 141 35 + 120 117 147 150 33 120 117 -147 150 10 + 120 117 -147 150 34 120 117 147 153 10 + 117 123 129 132 32 117 123 129 135 32 + 117 123 129 138 32 117 123 141 144 31 + 117 123 -141 144 32 117 147 153 156 1 114 111 117 120 10 114 111 117 123 10 114 111 117 147 10 111 117 123 126 9 222 219 225 228 2 222 219 -225 228 1 @@ -701,8 +724,8 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 168 165 174 177 10 168 165 174 216 10 165 174 177 180 16 162 159 165 168 9 162 159 165 171 9 162 159 165 174 9 - 162 159 219 222 31 162 159 -219 222 10 - 162 159 -219 222 32 162 159 219 225 10 + 162 159 219 222 33 162 159 -219 222 10 + 162 159 -219 222 34 162 159 219 225 10 159 219 225 228 1 156 153 159 162 10 156 153 159 165 10 156 153 159 219 10 153 159 165 168 9 153 159 165 171 9 @@ -710,14 +733,14 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 264 270 276 279 10 252 246 255 258 10 252 246 255 261 10 249 246 255 258 10 249 246 255 261 10 243 237 231 264 9 - 243 237 246 249 34 243 237 246 252 34 + 243 237 246 249 36 243 237 246 252 36 243 237 246 255 9 240 237 231 264 9 - 240 237 246 249 34 240 237 246 252 34 + 240 237 246 249 36 240 237 246 252 36 240 237 246 255 9 234 231 237 240 9 234 231 237 243 9 234 231 237 246 9 - 234 231 264 267 31 234 231 -264 267 10 - 234 231 -264 267 32 234 231 264 270 10 - 231 237 246 249 30 231 237 246 252 30 + 234 231 264 267 33 234 231 -264 267 10 + 234 231 -264 267 34 234 231 264 270 10 + 231 237 246 249 32 231 237 246 252 32 231 264 270 273 1 228 225 231 234 10 228 225 231 237 10 228 225 231 264 10 225 231 237 240 9 225 231 237 243 9 @@ -725,24 +748,24 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 306 312 318 321 10 306 312 318 324 10 294 291 297 300 2 294 291 -297 300 1 294 291 297 303 2 294 291 -297 303 1 - 288 282 276 306 9 288 282 291 294 31 - 288 282 -291 294 10 288 282 -291 294 32 + 288 282 276 306 9 288 282 291 294 33 + 288 282 -291 294 10 288 282 -291 294 34 288 282 291 297 10 285 282 276 306 9 - 285 282 291 294 31 285 282 -291 294 10 - 285 282 -291 294 32 285 282 291 297 10 + 285 282 291 294 33 285 282 -291 294 10 + 285 282 -291 294 34 285 282 291 297 10 282 291 297 300 1 282 291 297 303 1 279 276 282 285 9 279 276 282 288 9 - 279 276 282 291 9 279 276 306 309 31 - 279 276 -306 309 10 279 276 -306 309 32 + 279 276 282 291 9 279 276 306 309 33 + 279 276 -306 309 10 279 276 -306 309 34 279 276 306 312 10 276 306 312 315 1 273 270 276 279 10 273 270 276 282 10 273 270 276 306 10 270 276 282 285 9 270 276 282 288 9 330 327 333 336 2 330 327 -333 336 1 327 333 339 342 10 - 324 318 327 330 31 324 318 -327 330 10 - 324 318 -327 330 32 324 318 327 333 10 - 321 318 327 330 31 321 318 -327 330 10 - 321 318 -327 330 32 321 318 327 333 10 + 324 318 327 330 33 324 318 -327 330 10 + 324 318 -327 330 34 324 318 327 333 10 + 321 318 327 330 33 321 318 -327 330 10 + 321 318 -327 330 34 321 318 327 333 10 318 327 333 336 1 315 312 318 321 10 315 312 318 324 10 315 312 318 327 10 396 393 399 402 2 396 393 -399 402 1 @@ -754,20 +777,20 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 366 363 372 375 9 366 363 372 378 9 366 363 372 381 9 363 372 381 384 9 363 372 381 387 9 363 372 381 390 9 - 360 354 363 366 34 360 354 363 369 34 - 360 354 363 372 30 357 354 363 366 34 - 357 354 363 369 34 357 354 363 372 30 + 360 354 363 366 36 360 354 363 369 36 + 360 354 363 372 32 357 354 363 366 36 + 357 354 363 369 36 357 354 363 372 32 354 363 372 375 9 354 363 372 378 9 - 351 345 339 393 9 351 345 354 357 34 - 351 345 354 360 34 351 345 354 363 30 - 348 345 339 393 9 348 345 354 357 34 - 348 345 354 360 34 348 345 354 363 30 - 345 354 363 366 30 345 354 363 369 30 + 351 345 339 393 9 351 345 354 357 36 + 351 345 354 360 36 351 345 354 363 32 + 348 345 339 393 9 348 345 354 357 36 + 348 345 354 360 36 348 345 354 363 32 + 345 354 363 366 32 345 354 363 369 32 342 339 345 348 9 342 339 345 351 9 - 342 339 345 354 9 342 339 393 396 31 - 342 339 -393 396 10 342 339 -393 396 32 - 342 339 393 399 10 339 345 354 357 30 - 339 345 354 360 30 339 393 399 402 1 + 342 339 345 354 9 342 339 393 396 33 + 342 339 -393 396 10 342 339 -393 396 34 + 342 339 393 399 10 339 345 354 357 32 + 339 345 354 360 32 339 393 399 402 1 336 333 339 342 10 336 333 339 345 10 336 333 339 393 10 333 339 345 348 9 333 339 345 351 9 468 465 471 474 2 @@ -786,26 +809,26 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 414 411 405 465 9 414 411 420 423 10 414 411 420 462 10 411 420 423 426 16 408 405 411 414 9 408 405 411 417 9 - 408 405 411 420 9 408 405 465 468 31 - 408 405 -465 468 10 408 405 -465 468 32 + 408 405 411 420 9 408 405 465 468 33 + 408 405 -465 468 10 408 405 -465 468 34 408 405 465 471 10 405 465 471 474 1 402 399 405 408 10 402 399 405 411 10 402 399 405 465 10 399 405 411 414 9 399 405 411 417 9 510 507 513 516 2 510 507 -513 516 1 507 513 519 522 10 - 498 489 483 501 29 498 489 -483 501 33 - 495 489 483 501 29 495 489 -483 501 33 - 492 489 483 501 29 492 489 -483 501 33 - 489 483 501 504 29 489 483 -501 504 30 + 498 489 483 501 31 498 489 -483 501 35 + 495 489 483 501 31 495 489 -483 501 35 + 492 489 483 501 31 492 489 -483 501 35 + 489 483 501 504 31 489 483 -501 504 32 486 483 477 507 9 486 483 489 492 9 486 483 489 495 9 486 483 489 498 9 - 486 483 501 504 28 480 477 483 486 9 - 480 477 483 489 9 480 477 483 501 29 - 480 477 -483 501 33 480 477 507 510 31 - 480 477 -507 510 10 480 477 -507 510 32 - 480 477 507 513 10 477 483 489 492 30 - 477 483 489 495 30 477 483 489 498 30 - 477 483 501 504 29 477 483 -501 504 30 + 486 483 501 504 30 480 477 483 486 9 + 480 477 483 489 9 480 477 483 501 31 + 480 477 -483 501 35 480 477 507 510 33 + 480 477 -507 510 10 480 477 -507 510 34 + 480 477 507 513 10 477 483 489 492 32 + 477 483 489 495 32 477 483 489 498 32 + 477 483 501 504 31 477 483 -501 504 32 477 507 513 516 1 474 471 477 480 10 474 471 477 483 10 474 471 477 507 10 471 477 483 486 9 582 579 585 588 2 @@ -824,8 +847,8 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 528 525 519 579 9 528 525 534 537 10 528 525 534 576 10 525 534 537 540 16 522 519 525 528 9 522 519 525 531 9 - 522 519 525 534 9 522 519 579 582 31 - 522 519 -579 582 10 522 519 -579 582 32 + 522 519 525 534 9 522 519 579 582 33 + 522 519 -579 582 10 522 519 -579 582 34 522 519 579 585 10 519 579 585 588 1 516 513 519 522 10 516 513 519 525 10 516 513 519 579 10 513 519 525 528 9 @@ -839,42 +862,42 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 618 615 624 627 9 618 615 624 630 9 618 615 624 633 9 615 624 633 636 9 615 624 633 639 9 615 624 633 642 9 - 612 606 615 618 34 612 606 615 621 34 - 612 606 615 624 30 609 606 615 618 34 - 609 606 615 621 34 609 606 615 624 30 + 612 606 615 618 36 612 606 615 621 36 + 612 606 615 624 32 609 606 615 618 36 + 609 606 615 621 36 609 606 615 624 32 606 615 624 627 9 606 615 624 630 9 - 603 597 591 645 9 603 597 606 609 34 - 603 597 606 612 34 603 597 606 615 30 - 600 597 591 645 9 600 597 606 609 34 - 600 597 606 612 34 600 597 606 615 30 - 597 606 615 618 30 597 606 615 621 30 + 603 597 591 645 9 603 597 606 609 36 + 603 597 606 612 36 603 597 606 615 32 + 600 597 591 645 9 600 597 606 609 36 + 600 597 606 612 36 600 597 606 615 32 + 597 606 615 618 32 597 606 615 621 32 594 591 597 600 9 594 591 597 603 9 - 594 591 597 606 9 594 591 645 648 31 - 594 591 -645 648 10 594 591 -645 648 32 - 594 591 645 651 10 591 597 606 609 30 - 591 597 606 612 30 591 645 651 654 1 + 594 591 597 606 9 594 591 645 648 33 + 594 591 -645 648 10 594 591 -645 648 34 + 594 591 645 651 10 591 597 606 609 32 + 591 597 606 612 32 591 645 651 654 1 591 645 651 657 1 588 585 591 594 10 588 585 591 597 10 588 585 591 645 10 585 591 597 600 9 585 591 597 603 9 90 102 -96 -99 27 84 96 -90 -93 27 78 90 -84 -87 27 75 84 -78 -81 27 - 63 75 -69 -72 35 60 69 -63 -66 27 + 63 75 -69 -72 37 60 69 -63 -66 27 33 45 -39 -42 27 105 117 -111 -114 27 204 216 -210 -213 27 198 210 -204 -207 27 192 204 -198 -201 27 189 198 -192 -195 27 - 177 189 -183 -186 35 174 183 -177 -180 27 + 177 189 -183 -186 37 174 183 -177 -180 27 147 159 -153 -156 27 219 231 -225 -228 27 - 291 300 -297 -303 35 264 276 -270 -273 27 + 291 300 -297 -303 37 264 276 -270 -273 27 306 318 -312 -315 27 327 339 -333 -336 27 450 462 -456 -459 27 444 456 -450 -453 27 438 450 -444 -447 27 435 444 -438 -441 27 - 423 435 -429 -432 35 420 429 -423 -426 27 + 423 435 -429 -432 37 420 429 -423 -426 27 393 405 -399 -402 27 465 477 -471 -474 27 564 576 -570 -573 27 558 570 -564 -567 27 552 564 -558 -561 27 549 558 -552 -555 27 - 537 549 -543 -546 35 534 543 -537 -540 27 + 537 549 -543 -546 37 534 543 -537 -540 27 507 519 -513 -516 27 579 591 -585 -588 27 - 645 654 -651 -657 35 726 696 699 729 13 + 645 654 -651 -657 37 726 696 699 729 13 714 672 675 717 13 708 669 666 711 13 708 669 672 714 13 705 693 690 723 13 705 693 696 726 13 702 687 690 723 13 @@ -883,13 +906,13 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 684 687 690 723 13 684 699 696 726 13 681 663 666 711 13 678 660 675 717 13 678 684 699 729 13 672 669 666 711 13 - 669 672 675 717 13 666 663 681 720 36 + 669 672 675 717 13 666 663 681 720 28 666 669 672 714 13 663 660 675 717 13 - 660 663 666 711 13 660 663 681 720 36 - 660 675 672 714 13 684 696 -699 -729 37 - 693 699 -696 -726 37 687 693 -690 -723 37 - 660 672 -675 -717 37 669 675 -672 -714 37 - 663 669 -666 -711 37 + 660 663 666 711 13 660 663 681 720 28 + 660 675 672 714 13 684 696 -699 -729 29 + 693 699 -696 -726 29 687 693 -690 -723 29 + 660 672 -675 -717 29 669 675 -672 -714 29 + 663 669 -666 -711 29 %FLAG DIHEDRALS_WITHOUT_HYDROGEN %FORMAT(10I8) 36 33 39 45 1 33 39 45 51 2 @@ -1085,17 +1108,17 @@ SER TRP THR TRP GLU ASN GLY LYS TRP THR TRP LYS NHE TCS 684 687 690 693 13 684 699 -696 693 13 678 660 663 681 13 678 684 687 690 13 678 684 687 702 13 678 684 699 696 13 - 675 660 663 681 13 675 660 678 684 36 + 675 660 663 681 13 675 660 678 684 28 675 672 669 708 13 672 675 660 678 13 669 666 663 681 13 666 663 660 675 13 666 663 660 678 13 666 669 -672 675 13 - 663 660 675 672 13 663 660 678 684 36 + 663 660 675 672 13 663 660 678 684 28 663 666 -669 672 13 663 666 669 708 13 660 663 666 669 13 660 675 -672 669 13 - 660 678 684 687 36 660 678 684 699 36 - 690 696 -693 -705 37 684 690 -687 -702 37 - 687 699 -684 -678 37 666 672 -669 -708 37 - 660 666 -663 -681 37 678 660 -675 -663 37 + 660 678 684 687 28 660 678 684 699 28 + 690 696 -693 -705 29 684 690 -687 -702 29 + 687 699 -684 -678 29 666 672 -669 -708 29 + 660 666 -663 -681 29 663 675 -660 -678 29 %FLAG EXCLUDED_ATOMS_LIST %FORMAT(10I8) 2 3 4 5 6 7 8 9 10 12 From 859832583e5ec017fcd2efe1d002501003c5d021 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 11:02:18 -0500 Subject: [PATCH 0161/1492] Add actual test save topology. Was previously writing out the unchanged topology and checking that. This topology produces the exact same energies as the previous. --- test/Test_CombineCrd/FabI.NDP.TCS.parm7.save | 20961 +++++++++++++++++ 1 file changed, 20961 insertions(+) create mode 100644 test/Test_CombineCrd/FabI.NDP.TCS.parm7.save diff --git a/test/Test_CombineCrd/FabI.NDP.TCS.parm7.save b/test/Test_CombineCrd/FabI.NDP.TCS.parm7.save new file mode 100644 index 0000000000..82b717ac5b --- /dev/null +++ b/test/Test_CombineCrd/FabI.NDP.TCS.parm7.save @@ -0,0 +1,20961 @@ +%VERSION VERSION_STAMP = V0001.000 DATE = 12/13/23 10:11:19 +%FLAG TITLE +%FORMAT(20a4) +combinedParm +%FLAG POINTERS +%FORMAT(10I8) + 4143 18 2060 2125 4682 2878 8776 7180 0 0 + 22768 270 2125 2878 7180 73 149 66 50 0 + 0 0 0 0 0 0 0 2 70 0 + 0 +%FLAG ATOM_NAME +%FORMAT(20a4) +N H1 H2 H3 CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N +H CA HA2 HA3 C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ +CE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 +HD21HD22HD23C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA2 HA3 +C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 +HZ2 HZ3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 +NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 +HD11HD12HD13C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21 +HD22HD23C O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12 +HD13C O N H CA HA CB HB CG2 HG21HG22HG23OG1 HG1 C O N H CA +HA2 HA3 C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22 +HD23C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23 +C O N H CA HA CB HB2 HB3 OG HG C O N H CA HA CB HB2 HB3 +CG OD1 ND2 HD21HD22C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 +CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB2 HB3 OG HG C O +N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O N +H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 +HE1 CZ OH HH CE2 HE2 CD2 HD2 C O N H CA HA2 HA3 C O N H CA +HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O N H CA HA +CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE +HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB1 HB2 HB3 C O N H +CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N H CA HA CB +HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 CG +HG2 HG3 CD HD2 HD3 NE HE CZ NH1 HH11HH12NH2 HH21HH22C O N H CA HA +CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA2 HA3 C O N H +CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 +OE2 C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23 +C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG +CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA HA CB HB CG2 HG21 +HG22HG23OG1 HG1 C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ OH +HH CE2 HE2 CD2 HD2 C O N H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22 +HG23C O N H CA HA2 HA3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 +CD OE1 NE2 HE21HE22C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ +HZ CE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 +CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB2 HB3 CG OD1 OD2 C +O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 NE HE CZ NH1 HH11HH12 +NH2 HH21HH22C O N H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C +O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA +CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H +CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA +HA CB HB2 HB3 SG HG C O N H CA HA CB HB1 HB2 HB3 C O N H +CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA CB HB2 HB3 +CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 +CG OD1 ND2 HD21HD22C O N CD HD2 HD3 CG HG2 HG3 CB HB2 HB3 CA HA C +O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB1 HB2 HB3 C +O N H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA +HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N CD HD2 HD3 +CG HG2 HG3 CB HB2 HB3 CA HA C O N H CA HA CB HB2 HB3 SG HG C +O N H CA HA CB HB2 HB3 CG OD1 OD2 C O N H CA HA CB HB CG1 +HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB CG2 HG21HG22HG23CG1 +HG12HG13CD1 HD11HD12HD13C O N H CA HA CB HB2 HB3 OG HG C O N +H CA HA CB HB2 HB3 CG OD1 OD2 C O N H CA HA CB HB2 HB3 CG HG2 +HG3 CD OE1 NE2 HE21HE22C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 +OE2 C O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13 +C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 +HZ2 HZ3 C O N H CA HA CB HB2 HB3 CG OD1 OD2 C O N H CA HA +CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA CB +HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA HA CB +HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 CG HG2 +HG3 CD OE1 OE2 C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 +HD21HD22HD23C O N H CA HA2 HA3 C O N H CA HA CB HB2 HB3 CG +HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB +CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 CG CD1 HD1 +NE1 HE1 CE2 CZ2 HZ2 CH2 HH2 CZ3 HZ3 CE3 HE3 CD2 C O N H CA HA CB HB2 +HB3 CG OD1 OD2 C O N H CA HA2 HA3 C O N H CA HA CB HB2 HB3 +CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA CB HB2 HB3 CG +OD1 OD2 C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB +CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O N H CA HA CB HB CG1 +HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 CG ND1 CE1 HE1 +NE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 OG HG C O N H CA +HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O N H CA HA +CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ +CE2 HE2 CD2 HD2 C O N H CA HA CB HB1 HB2 HB3 C O N CD HD2 HD3 +CG HG2 HG3 CB HB2 HB3 CA HA C O N H CA HA CB HB2 HB3 CG HG2 HG3 +CD HD2 HD3 NE HE CZ NH1 HH11HH12NH2 HH21HH22C O N H CA HA CB HB2 +HB3 CG OD1 OD2 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 NE2 HE21 +HE22C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23 +C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA +HA2 HA3 C O N H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H +CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H +CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O N H CA +HA CB HB2 HB3 CG OD1 OD2 C O N H CA HA CB HB2 HB3 SG HG C O +N H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA +CB HB CG2 HG21HG22HG23OG1 HG1 C O N H CA HA CB HB2 HB3 CG HG2 HG3 +CD HD2 HD3 NE HE CZ NH1 HH11HH12NH2 HH21HH22C O N H CA HA CB HB2 +HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA2 HA3 C O N H CA HA +CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA HA +CB HB2 HB3 OG HG C O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13 +CD1 HD11HD12HD13C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA +CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 +CG OD1 OD2 C O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11 +HD12HD13C O N H CA HA CB HB2 HB3 OG HG C O N H CA HA CB +HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ OH HH +CE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 OG HG C O N H CA +HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA +HA CB HB1 HB2 HB3 C O N H CA HA CB HB1 HB2 HB3 C O N H CA +HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA +CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE +HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 +OE2 C O N H CA HA2 HA3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 +CD HD2 HD3 NE HE CZ NH1 HH11HH12NH2 HH21HH22C O N H CA HA CB HB2 +HB3 OG HG C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 +C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N +H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C +O N H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA HA CB +HB2 HB3 CG HG2 HG3 CD HD2 HD3 NE HE CZ NH1 HH11HH12NH2 HH21HH22C O N +H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA HA CB HB1 HB2 +HB3 C O N H CA HA CB HB2 HB3 OG HG C O N H CA HA CB HB2 +HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N H CA HA CB HB CG1 HG11HG12 +HG13CG2 HG21HG22HG23C O N H CA HA CB HB1 HB2 HB3 C O N H CA +HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA +CB HB CG2 HG21HG22HG23OG1 HG1 C O N H CA HA CB HB2 HB3 CG CD1 HD1 +CE1 HE1 CZ OH HH CE2 HE2 CD2 HD2 C O N H CA HA CB HB CG2 HG21HG22 +HG23CG1 HG12HG13CD1 HD11HD12HD13C O N H CA HA2 HA3 C O N H CA +HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 +C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 +HZ2 HZ3 C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 +HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N CD HD2 HD3 CG HG2 HG3 CB HB2 +HB3 CA HA C O N H CA HA CB HB2 HB3 OG HG C O N H CA HA +CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ OH HH CE2 HE2 CD2 HD2 C O N H CA +HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA HA CB HB CG2 HG21HG22 +HG23OG1 HG1 C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 +C O N H CA HA2 HA3 C O N H CA HA CB HB CG1 HG11HG12HG13CG2 +HG21HG22HG23C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB +HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA +HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 OG HG C O N H +CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA +HA CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA CB HB1 HB2 HB3 +C O N H CA HA CB HB CG2 HG21HG22HG23OG1 HG1 C O N H CA HA +CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 CG +HG2 HG3 CD HD2 HD3 NE HE CZ NH1 HH11HH12NH2 HH21HH22C O N H CA HA +CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ OH HH CE2 HE2 CD2 HD2 C O N H CA +HA CB HB CG2 HG21HG22HG23OG1 HG1 C O N H CA HA CB HB1 HB2 HB3 C +O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O +N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 CG HG CD1 +HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA2 HA3 C O N H CA HA +CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA CB HB2 HB3 CG OD1 +OD2 C O N H CA HA2 HA3 C O N H CA HA CB HB CG2 HG21HG22HG23 +CG1 HG12HG13CD1 HD11HD12HD13C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD +HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB CG1 HG11HG12 +HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C +O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB CG1 HG11HG12 +HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 OG HG C O N H +CA HA CB HB1 HB2 HB3 C O N H CA HA2 HA3 C O N CD HD2 HD3 CG +HG2 HG3 CB HB2 HB3 CA HA C O N H CA HA CB HB CG2 HG21HG22HG23CG1 +HG12HG13CD1 HD11HD12HD13C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 +HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB CG2 HG21HG22HG23 +OG1 HG1 C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22 +HD23C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB1 HB2 +HB3 C O N H CA HA CB HB2 HB3 OG HG C O N H CA HA2 HA3 C +O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O +N H CA HA CB HB2 HB3 OG HG C O N H CA HA CB HB2 HB3 CG OD1 +ND2 HD21HD22C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ HZ CE2 +HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 +HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 +CE HE2 HE3 NZ HZ1 HZ2 HZ3 C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD +CE HE1 HE2 HE3 C O N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 +HD21HD22HD23C O N H CA HA CB HB2 HB3 CG OD1 OD2 C O N H CA +HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ OH HH CE2 HE2 CD2 HD2 C O N H +CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA HA CB HB1 HB2 HB3 +C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N +H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB +HB2 HB3 OG HG C O N CD HD2 HD3 CG HG2 HG3 CB HB2 HB3 CA HA C O +N H CA HA CB HB2 HB3 CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N +H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 HZ3 C +O N H CA HA CB HB2 HB3 CG HG2 HG3 CD HD2 HD3 CE HE2 HE3 NZ HZ1 HZ2 +HZ3 C O N H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA +HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 +CG OD1 OD2 C O N H CA HA CB HB CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11 +HD12HD13C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C +O N H CA HA CB HB2 HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA +CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA2 HA3 C O N +H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA HA CB HB CG2 +HG21HG22HG23OG1 HG1 C O N H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22 +HG23C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB2 HB3 +CG CD1 HD1 CE1 HE1 CZ HZ CE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 +CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA CB HB2 HB3 SG +HG C O N H CA HA CB HB2 HB3 OG HG C O N H CA HA CB HB2 +HB3 CG OD1 OD2 C O N H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 +HE3 C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA CB HB CG2 +HG21HG22HG23OG1 HG1 C O N H CA HA2 HA3 C O N H CA HA CB HB +CG2 HG21HG22HG23CG1 HG12HG13CD1 HD11HD12HD13C O N H CA HA CB HB CG2 +HG21HG22HG23OG1 HG1 C O N H CA HA2 HA3 C O N H CA HA CB HB2 +HB3 CG HG2 HG3 CD OE1 OE2 C O N H CA HA CB HB CG1 HG11HG12HG13CG2 +HG21HG22HG23C O N H CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C +O N H CA HA CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O N H +CA HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 +HB3 CG OD1 OD2 C O N H CA HA CB HB1 HB2 HB3 C O N H CA HA2 +HA3 C O N H CA HA CB HB2 HB3 CG CD1 HD1 CE1 HE1 CZ OH HH CE2 HE2 +CD2 HD2 C O N H CA HA CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C +O N H CA HA CB HB2 HB3 SG HG C O N H CA HA CB HB CG1 HG11 +HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 OG HG C O N +H CA HA CB HB2 HB3 CG HG2 HG3 SD CE HE1 HE2 HE3 C O N H CA HA2 +HA3 C O N H CA HA CB HB2 HB3 CG OD1 ND2 HD21HD22C O N H CA +HA CB HB CG1 HG11HG12HG13CG2 HG21HG22HG23C O N H CA HA CB HB2 HB3 +CG HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA CB HB2 HB3 CG +HG CD1 HD11HD12HD13CD2 HD21HD22HD23C O N H CA HA CB HB2 HB3 CG HG2 +HG3 CD OE1 OE2 C O N H CA HA CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 +HD2 C O N H CA HA CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O +N H CA HA CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O N H CA +HA CB HB2 HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O N H CA HA CB HB2 +HB3 CG ND1 CE1 HE1 NE2 HE2 CD2 HD2 C O N H CA HA CB HB2 HB3 CG ND1 +CE1 HE1 NE2 HE2 CD2 HD2 C O OXT P1 O1 O2 O3 C1 C2 O4 C3 O5 C4 O6 +C5 N1 C6 N2 C7 C8 N3 N4 C9 N5 C10 O7 P2 O8 O9 O10 C11 C12 O11 C13 +O12 C14 O13 C15 N6 C16 C17 C18 O14 N7 C19 C20 C21 H51 H52 H53 H54 H55 H56 H57 +H58 H60 H64 H65 H67 H73 H74 H75 H76 H77 H78 H79 H80 H92 H86 H87 H90 H89 H81 C1 +C2 C3 C4 C5 C6 O1 O2 C7 C8 C9 C10 C11 C12 CL2 CL3 CL1 H18 H19 H20 H21 +H22 H23 H24 +%FLAG CHARGE +%FORMAT(5E16.8) + 2.90099016E+00 3.61530432E+00 3.61530432E+00 3.61530432E+00 4.02712830E-01 + 2.03360868E+00 1.57622895E+00 2.27778750E-01 2.27778750E-01 6.08624820E-01 + 5.32091160E-01 5.32091160E-01 -5.05486602E+00 -6.21380430E-01 1.08787131E+00 + 1.08787131E+00 1.08787131E+00 1.11575143E+01 -1.04104000E+01 -7.57501011E+00 + 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.37335200E-02 1.78214094E+00 + -6.25024890E-01 5.37557850E-01 5.37557850E-01 2.15023140E-01 -2.28872088E+00 + 2.42356590E+00 -3.10507992E+00 2.60578890E+00 -1.95343056E+00 2.36343231E+00 + -3.10507992E+00 2.60578890E+00 -2.28872088E+00 2.42356590E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 + -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 + 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -6.33953817E+00 + 5.00566581E+00 -4.37335200E+00 2.59849998E+00 -1.71289620E-01 6.59647260E-01 + 6.59647260E-01 3.40757010E-01 1.87689690E-01 1.87689690E-01 -8.72848170E-01 + 1.13160483E+00 1.13160483E+00 -2.60578890E-01 2.06823105E+00 2.06823105E+00 + -7.02287442E+00 6.19558200E+00 6.19558200E+00 6.19558200E+00 1.33769904E+01 + -1.07402236E+01 -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 + 2.37436569E+00 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 + 1.60720686E+00 -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 + 3.38934780E-01 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 -2.00809746E+00 + 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 1.82223000E+00 + 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 + -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 + 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 + 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -7.08847470E-01 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 + 1.16987166E+00 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 + 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 + 8.32759110E-01 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 + 1.82223000E+00 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.53735270E-01 + 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 -1.19283176E+01 + 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 + 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 + 4.95464337E+00 -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 + 6.41424960E-01 -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 + 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 + -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 + 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 + 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -2.55112200E-02 1.59627348E+00 -2.76978960E-01 5.37557850E-01 + 5.37557850E-01 -2.00445300E-02 -3.47317038E+00 3.09596877E+00 -4.26584043E+00 + 3.01761288E+00 5.87851398E+00 -1.01662212E+01 7.27434216E+00 -4.26584043E+00 + 3.01761288E+00 -3.47317038E+00 3.09596877E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.08787131E+00 + 1.58351787E+00 2.37436569E+00 3.40757010E-01 -5.83842492E+00 1.60720686E+00 + 1.60720686E+00 1.60720686E+00 -7.83558900E-01 4.30046280E-01 4.30046280E-01 + -1.20267180E+00 3.38934780E-01 3.38934780E-01 3.38934780E-01 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 2.59849998E+00 + -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 1.87689690E-01 + 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 -2.60578890E-01 + 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 6.19558200E+00 + 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.31868510E-01 1.60356240E+00 6.23202660E-01 4.39157430E-01 4.39157430E-01 + 3.28001400E-02 8.01781200E-01 8.01781200E-01 -4.98744351E+00 -9.76715280E-01 + 1.24640532E+00 1.24640532E+00 1.24640532E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.05871563E+00 2.47823280E+00 -1.34845020E-01 + 6.68758410E-01 6.68758410E-01 3.40392564E+00 -9.89835336E+00 2.97934605E+00 + 2.61490005E+00 -5.09313285E+00 6.08442597E+00 -4.02166161E+00 3.39299226E+00 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.80522051E+00 + 2.84267880E+00 -1.27556100E-02 5.95869210E-01 5.95869210E-01 7.10669700E-01 + 5.19335550E-01 5.19335550E-01 8.85603780E-01 1.25187201E+00 1.25187201E+00 + -9.64870785E+00 6.29762688E+00 1.47163295E+01 -1.57203782E+01 8.15994594E+00 + 8.15994594E+00 -1.57203782E+01 8.15994594E+00 8.15994594E+00 1.33769904E+01 + -1.07402236E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 2.01356415E+00 + 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 -7.74447750E-01 + -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 + 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 + 7.23425310E-01 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 + 2.47823280E-01 -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 + -1.49204192E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.37335200E-02 + 1.78214094E+00 -6.25024890E-01 5.37557850E-01 5.37557850E-01 2.15023140E-01 + -2.28872088E+00 2.42356590E+00 -3.10507992E+00 2.60578890E+00 -1.95343056E+00 + 2.36343231E+00 -3.10507992E+00 2.60578890E+00 -2.28872088E+00 2.42356590E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -7.08847470E-01 + 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 1.16987166E+00 + 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -2.55112200E-02 1.59627348E+00 + -2.76978960E-01 5.37557850E-01 5.37557850E-01 -2.00445300E-02 -3.47317038E+00 + 3.09596877E+00 -4.26584043E+00 3.01761288E+00 5.87851398E+00 -1.01662212E+01 + 7.27434216E+00 -4.26584043E+00 3.01761288E+00 -3.47317038E+00 3.09596877E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 + 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -5.64891300E-02 1.54889550E+00 -6.56002800E-02 + 3.11601330E-01 3.11601330E-01 -1.17533835E+00 6.41424960E-01 6.41424960E-01 + 1.26663207E+01 -1.10900918E+01 -1.71417176E+01 7.74629973E+00 7.74629973E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.37335200E-02 + 1.78214094E+00 -6.25024890E-01 5.37557850E-01 5.37557850E-01 2.15023140E-01 + -2.28872088E+00 2.42356590E+00 -3.10507992E+00 2.60578890E+00 -1.95343056E+00 + 2.36343231E+00 -3.10507992E+00 2.60578890E+00 -2.28872088E+00 2.42356590E+00 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -6.33953817E+00 5.00566581E+00 -4.80522051E+00 2.84267880E+00 + -1.27556100E-02 5.95869210E-01 5.95869210E-01 7.10669700E-01 5.19335550E-01 + 5.19335550E-01 8.85603780E-01 1.25187201E+00 1.25187201E+00 -9.64870785E+00 + 6.29762688E+00 1.47163295E+01 -1.57203782E+01 8.15994594E+00 8.15994594E+00 + -1.57203782E+01 8.15994594E+00 8.15994594E+00 1.33769904E+01 -1.07402236E+01 + -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 + -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 + -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 2.01356415E+00 + 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 -7.74447750E-01 + -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 9.77808618E+00 + -1.06035564E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 2.59849998E+00 + -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 1.87689690E-01 + 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 -2.60578890E-01 + 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 6.19558200E+00 + 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 3.88134990E-01 + 2.04818652E+00 -2.24316513E+00 2.02631976E+00 2.02631976E+00 -5.68353537E+00 + 3.52237059E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 + 7.23425310E-01 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 + 2.47823280E-01 -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 + -1.49204192E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 + -4.37335200E-02 1.78214094E+00 -6.25024890E-01 5.37557850E-01 5.37557850E-01 + 2.15023140E-01 -2.28872088E+00 2.42356590E+00 -3.10507992E+00 2.60578890E+00 + -1.95343056E+00 2.36343231E+00 -3.10507992E+00 2.60578890E+00 -2.28872088E+00 + 2.42356590E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 + 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 + 1.08841798E+01 -1.03484442E+01 -4.64304204E+00 3.49868160E-01 7.12491930E-01 + 7.12491930E-01 3.44401470E-01 3.88134990E-01 3.88134990E-01 -1.27556100E-01 + 4.61024190E-01 4.61024190E-01 -4.84713180E-01 1.16804943E+00 1.07438681E+01 + -1.04741780E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 + 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 + 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 + -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 + -1.03484442E+01 -4.64304204E+00 3.49868160E-01 7.12491930E-01 7.12491930E-01 + 3.44401470E-01 3.88134990E-01 3.88134990E-01 -1.27556100E-01 4.61024190E-01 + 4.61024190E-01 -4.84713180E-01 1.16804943E+00 1.07438681E+01 -1.04741780E+01 + -7.57501011E+00 4.95464337E+00 3.88134990E-01 2.04818652E+00 -2.24316513E+00 + 2.02631976E+00 2.02631976E+00 -5.68353537E+00 3.52237059E+00 1.08841798E+01 + -1.03484442E+01 -9.40817349E+00 5.35006728E+00 6.94269630E-01 1.60356240E+00 + -5.52135690E-01 -2.22312060E-01 -2.22312060E-01 1.45669066E+01 -1.46033512E+01 + -1.46033512E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 + -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 + -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 + 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 + 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 + -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -5.64891300E-02 1.54889550E+00 + -6.56002800E-02 3.11601330E-01 3.11601330E-01 -1.17533835E+00 6.41424960E-01 + 6.41424960E-01 1.26663207E+01 -1.10900918E+01 -1.71417176E+01 7.74629973E+00 + 7.74629973E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 + 7.23425310E-01 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 + 2.47823280E-01 -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 + -1.49204192E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 + -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 -5.83842492E+00 + 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 4.30046280E-01 + 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 3.38934780E-01 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 + -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.37335200E-02 1.78214094E+00 -6.25024890E-01 + 5.37557850E-01 5.37557850E-01 2.15023140E-01 -2.28872088E+00 2.42356590E+00 + -3.10507992E+00 2.60578890E+00 -1.95343056E+00 2.36343231E+00 -3.10507992E+00 + 2.60578890E+00 -2.28872088E+00 2.42356590E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 + -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 + -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 2.01356415E+00 + 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 -7.74447750E-01 + -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 + -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 + 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -5.01113250E-01 2.04636429E+00 -9.11115000E-02 + 6.17735970E-01 6.17735970E-01 -2.57845545E+00 -2.98481274E+00 3.75743826E+00 + -6.22838214E+00 6.21744876E+00 2.51467740E+00 -4.73962023E+00 2.86454556E+00 + -2.06640882E+00 2.58209991E+00 -3.59343756E+00 2.63676681E+00 -4.34966301E+00 + 3.09779100E+00 2.26503189E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 + 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 6.94269630E-01 + 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 -2.22312060E-01 1.45669066E+01 + -1.46033512E+01 -1.46033512E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 + 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 + 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 + -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 + 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 + 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.05871563E+00 2.47823280E+00 -1.34845020E-01 6.68758410E-01 + 6.68758410E-01 3.40392564E+00 -9.89835336E+00 2.97934605E+00 2.61490005E+00 + -5.09313285E+00 6.08442597E+00 -4.02166161E+00 3.39299226E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.53735270E-01 1.53613989E+00 + 3.85766091E+00 6.41424960E-01 6.41424960E-01 -1.19283176E+01 7.79003325E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.08787131E+00 + 1.58351787E+00 2.37436569E+00 3.40757010E-01 -5.83842492E+00 1.60720686E+00 + 1.60720686E+00 1.60720686E+00 -7.83558900E-01 4.30046280E-01 4.30046280E-01 + -1.20267180E+00 3.38934780E-01 3.38934780E-01 3.38934780E-01 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.37335200E-02 1.78214094E+00 + -6.25024890E-01 5.37557850E-01 5.37557850E-01 2.15023140E-01 -2.28872088E+00 + 2.42356590E+00 -3.10507992E+00 2.60578890E+00 -1.95343056E+00 2.36343231E+00 + -3.10507992E+00 2.60578890E+00 -2.28872088E+00 2.42356590E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -4.64304204E+00 3.49868160E-01 7.12491930E-01 7.12491930E-01 + 3.44401470E-01 3.88134990E-01 3.88134990E-01 -1.27556100E-01 4.61024190E-01 + 4.61024190E-01 -4.84713180E-01 1.16804943E+00 1.07438681E+01 -1.04741780E+01 + -6.33953817E+00 5.00566581E+00 -4.80522051E+00 2.84267880E+00 -1.27556100E-02 + 5.95869210E-01 5.95869210E-01 7.10669700E-01 5.19335550E-01 5.19335550E-01 + 8.85603780E-01 1.25187201E+00 1.25187201E+00 -9.64870785E+00 6.29762688E+00 + 1.47163295E+01 -1.57203782E+01 8.15994594E+00 8.15994594E+00 -1.57203782E+01 + 8.15994594E+00 8.15994594E+00 1.33769904E+01 -1.07402236E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -5.64891300E-02 1.54889550E+00 + -6.56002800E-02 3.11601330E-01 3.11601330E-01 -1.17533835E+00 6.41424960E-01 + 6.41424960E-01 1.26663207E+01 -1.10900918E+01 -1.71417176E+01 7.74629973E+00 + 7.74629973E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 + 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 + -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 + 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 + 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 + 1.45231731E+00 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 + 7.64607708E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.37335200E-02 1.78214094E+00 -6.25024890E-01 5.37557850E-01 5.37557850E-01 + 2.15023140E-01 -2.28872088E+00 2.42356590E+00 -3.10507992E+00 2.60578890E+00 + -1.95343056E+00 2.36343231E+00 -3.10507992E+00 2.60578890E+00 -2.28872088E+00 + 2.42356590E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 -5.83842492E+00 + 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 4.30046280E-01 + 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 3.38934780E-01 + 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 6.94269630E-01 + 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 -2.22312060E-01 1.45669066E+01 + -1.46033512E+01 -1.46033512E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 + 4.95464337E+00 3.88134990E-01 2.04818652E+00 -2.24316513E+00 2.02631976E+00 + 2.02631976E+00 -5.68353537E+00 3.52237059E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 + -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -7.08847470E-01 1.83498561E+00 + 6.65842842E+00 7.83558900E-02 -4.44259674E+00 1.16987166E+00 1.16987166E+00 + 1.16987166E+00 -1.23200970E+01 7.47478746E+00 1.08841798E+01 -1.03484442E+01 + -6.33953817E+00 5.00566581E+00 -4.80522051E+00 2.84267880E+00 -1.27556100E-02 + 5.95869210E-01 5.95869210E-01 7.10669700E-01 5.19335550E-01 5.19335550E-01 + 8.85603780E-01 1.25187201E+00 1.25187201E+00 -9.64870785E+00 6.29762688E+00 + 1.47163295E+01 -1.57203782E+01 8.15994594E+00 8.15994594E+00 -1.57203782E+01 + 8.15994594E+00 8.15994594E+00 1.33769904E+01 -1.07402236E+01 -9.40817349E+00 + 5.35006728E+00 7.23425310E-01 2.01356415E+00 1.02044880E+00 -3.15245790E-01 + -3.15245790E-01 2.47823280E-01 -7.74447750E-01 -7.74447750E-01 1.46762404E+01 + -1.49204192E+01 -1.49204192E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 + 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.37335200E-02 1.78214094E+00 + -6.25024890E-01 5.37557850E-01 5.37557850E-01 2.15023140E-01 -2.28872088E+00 + 2.42356590E+00 -3.10507992E+00 2.60578890E+00 -1.95343056E+00 2.36343231E+00 + -3.10507992E+00 2.60578890E+00 -2.28872088E+00 2.42356590E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.53735270E-01 1.53613989E+00 + 3.85766091E+00 6.41424960E-01 6.41424960E-01 -1.19283176E+01 7.79003325E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.08787131E+00 + 1.58351787E+00 2.37436569E+00 3.40757010E-01 -5.83842492E+00 1.60720686E+00 + 1.60720686E+00 1.60720686E+00 -7.83558900E-01 4.30046280E-01 4.30046280E-01 + -1.20267180E+00 3.38934780E-01 3.38934780E-01 3.38934780E-01 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.05871563E+00 2.47823280E+00 + -1.34845020E-01 6.68758410E-01 6.68758410E-01 3.40392564E+00 -9.89835336E+00 + 2.97934605E+00 2.61490005E+00 -5.09313285E+00 6.08442597E+00 -4.02166161E+00 + 3.39299226E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 + 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 -2.22312060E-01 + 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 -1.06035564E+01 + -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 + 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 + -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 + 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 + 6.41424960E-01 -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 + 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -2.55112200E-02 1.59627348E+00 -2.76978960E-01 + 5.37557850E-01 5.37557850E-01 -2.00445300E-02 -3.47317038E+00 3.09596877E+00 + -4.26584043E+00 3.01761288E+00 5.87851398E+00 -1.01662212E+01 7.27434216E+00 + -4.26584043E+00 3.01761288E+00 -3.47317038E+00 3.09596877E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.53735270E-01 1.53613989E+00 + 3.85766091E+00 6.41424960E-01 6.41424960E-01 -1.19283176E+01 7.79003325E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.37335200E-02 + 1.78214094E+00 -6.25024890E-01 5.37557850E-01 5.37557850E-01 2.15023140E-01 + -2.28872088E+00 2.42356590E+00 -3.10507992E+00 2.60578890E+00 -1.95343056E+00 + 2.36343231E+00 -3.10507992E+00 2.60578890E+00 -2.28872088E+00 2.42356590E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 + 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 + -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 2.59849998E+00 + -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 1.87689690E-01 + 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 -2.60578890E-01 + 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 6.19558200E+00 + 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -9.40817349E+00 5.35006728E+00 + 7.23425310E-01 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 + 2.47823280E-01 -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 + -1.49204192E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 + -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 + -6.33953817E+00 5.00566581E+00 -4.80522051E+00 2.84267880E+00 -1.27556100E-02 + 5.95869210E-01 5.95869210E-01 7.10669700E-01 5.19335550E-01 5.19335550E-01 + 8.85603780E-01 1.25187201E+00 1.25187201E+00 -9.64870785E+00 6.29762688E+00 + 1.47163295E+01 -1.57203782E+01 8.15994594E+00 8.15994594E+00 -1.57203782E+01 + 8.15994594E+00 8.15994594E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 + 4.95464337E+00 -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 + 6.41424960E-01 -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 + 4.39157430E-01 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 + -4.98744351E+00 -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.31868510E-01 + 1.60356240E+00 6.23202660E-01 4.39157430E-01 4.39157430E-01 3.28001400E-02 + 8.01781200E-01 8.01781200E-01 -4.98744351E+00 -9.76715280E-01 1.24640532E+00 + 1.24640532E+00 1.24640532E+00 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 + 5.00566581E+00 -4.37335200E+00 2.59849998E+00 -1.71289620E-01 6.59647260E-01 + 6.59647260E-01 3.40757010E-01 1.87689690E-01 1.87689690E-01 -8.72848170E-01 + 1.13160483E+00 1.13160483E+00 -2.60578890E-01 2.06823105E+00 2.06823105E+00 + -7.02287442E+00 6.19558200E+00 6.19558200E+00 6.19558200E+00 1.33769904E+01 + -1.07402236E+01 -7.57501011E+00 4.95464337E+00 2.60578890E-01 1.90969704E+00 + -3.71917143E+00 1.45231731E+00 1.45231731E+00 1.29924999E+01 -1.08076461E+01 + -1.67481159E+01 7.64607708E+00 7.64607708E+00 1.08841798E+01 -1.03484442E+01 + -6.33953817E+00 5.00566581E+00 -4.80522051E+00 2.84267880E+00 -1.27556100E-02 + 5.95869210E-01 5.95869210E-01 7.10669700E-01 5.19335550E-01 5.19335550E-01 + 8.85603780E-01 1.25187201E+00 1.25187201E+00 -9.64870785E+00 6.29762688E+00 + 1.47163295E+01 -1.57203782E+01 8.15994594E+00 8.15994594E+00 -1.57203782E+01 + 8.15994594E+00 8.15994594E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 + 4.95464337E+00 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 + 1.45231731E+00 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 + 7.64607708E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 + -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 4.39157430E-01 + 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 -4.98744351E+00 + -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 + 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 + 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 + -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -7.08847470E-01 1.83498561E+00 + 6.65842842E+00 7.83558900E-02 -4.44259674E+00 1.16987166E+00 1.16987166E+00 + 1.16987166E+00 -1.23200970E+01 7.47478746E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -2.55112200E-02 1.59627348E+00 -2.76978960E-01 + 5.37557850E-01 5.37557850E-01 -2.00445300E-02 -3.47317038E+00 3.09596877E+00 + -4.26584043E+00 3.01761288E+00 5.87851398E+00 -1.01662212E+01 7.27434216E+00 + -4.26584043E+00 3.01761288E+00 -3.47317038E+00 3.09596877E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 + 2.37436569E+00 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 + 1.60720686E+00 -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 + 3.38934780E-01 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 + 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 + -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 + 9.77808618E+00 -1.06035564E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 + 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 + 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 4.39157430E-01 + 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 -4.98744351E+00 + -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 1.08841798E+01 + -1.03484442E+01 -4.64304204E+00 3.49868160E-01 7.12491930E-01 7.12491930E-01 + 3.44401470E-01 3.88134990E-01 3.88134990E-01 -1.27556100E-01 4.61024190E-01 + 4.61024190E-01 -4.84713180E-01 1.16804943E+00 1.07438681E+01 -1.04741780E+01 + -7.57501011E+00 4.95464337E+00 -4.53735270E-01 1.53613989E+00 3.85766091E+00 + 6.41424960E-01 6.41424960E-01 -1.19283176E+01 7.79003325E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -2.55112200E-02 1.59627348E+00 + -2.76978960E-01 5.37557850E-01 5.37557850E-01 -2.00445300E-02 -3.47317038E+00 + 3.09596877E+00 -4.26584043E+00 3.01761288E+00 5.87851398E+00 -1.01662212E+01 + 7.27434216E+00 -4.26584043E+00 3.01761288E+00 -3.47317038E+00 3.09596877E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 2.60578890E-01 + 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 1.29924999E+01 + -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -7.08847470E-01 1.83498561E+00 + 6.65842842E+00 7.83558900E-02 -4.44259674E+00 1.16987166E+00 1.16987166E+00 + 1.16987166E+00 -1.23200970E+01 7.47478746E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 + 4.39157430E-01 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 + -4.98744351E+00 -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 + 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 + 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 + -6.33953817E+00 5.00566581E+00 -4.37335200E+00 2.59849998E+00 -1.71289620E-01 + 6.59647260E-01 6.59647260E-01 3.40757010E-01 1.87689690E-01 1.87689690E-01 + -8.72848170E-01 1.13160483E+00 1.13160483E+00 -2.60578890E-01 2.06823105E+00 + 2.06823105E+00 -7.02287442E+00 6.19558200E+00 6.19558200E+00 6.19558200E+00 + 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.53735270E-01 + 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 -1.19283176E+01 + 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 + 2.01356415E+00 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 + -7.74447750E-01 -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 + 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -7.08847470E-01 + 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 1.16987166E+00 + 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 + 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 -4.80522051E+00 + 2.84267880E+00 -1.27556100E-02 5.95869210E-01 5.95869210E-01 7.10669700E-01 + 5.19335550E-01 5.19335550E-01 8.85603780E-01 1.25187201E+00 1.25187201E+00 + -9.64870785E+00 6.29762688E+00 1.47163295E+01 -1.57203782E+01 8.15994594E+00 + 8.15994594E+00 -1.57203782E+01 8.15994594E+00 8.15994594E+00 1.33769904E+01 + -1.07402236E+01 -7.57501011E+00 4.95464337E+00 -2.55112200E-02 1.59627348E+00 + -2.76978960E-01 5.37557850E-01 5.37557850E-01 -2.00445300E-02 -3.47317038E+00 + 3.09596877E+00 -4.26584043E+00 3.01761288E+00 5.87851398E+00 -1.01662212E+01 + 7.27434216E+00 -4.26584043E+00 3.01761288E+00 -3.47317038E+00 3.09596877E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -7.08847470E-01 + 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 1.16987166E+00 + 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 + -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 -3.32556975E+00 + 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 -2.00809746E+00 + 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 1.82223000E+00 + 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 + -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 2.01356415E+00 + 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 -7.74447750E-01 + -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 9.77808618E+00 + -1.06035564E+01 -9.40817349E+00 5.35006728E+00 6.94269630E-01 1.60356240E+00 + -5.52135690E-01 -2.22312060E-01 -2.22312060E-01 1.45669066E+01 -1.46033512E+01 + -1.46033512E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 + -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 + 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 + -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 + 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 + 5.00566581E+00 -4.37335200E+00 2.59849998E+00 -1.71289620E-01 6.59647260E-01 + 6.59647260E-01 3.40757010E-01 1.87689690E-01 1.87689690E-01 -8.72848170E-01 + 1.13160483E+00 1.13160483E+00 -2.60578890E-01 2.06823105E+00 2.06823105E+00 + -7.02287442E+00 6.19558200E+00 6.19558200E+00 6.19558200E+00 1.33769904E+01 + -1.07402236E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 + 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 2.60578890E-01 + 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 1.29924999E+01 + -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 + 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.53735270E-01 + 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 -1.19283176E+01 + 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 + -4.64304204E+00 3.49868160E-01 7.12491930E-01 7.12491930E-01 3.44401470E-01 + 3.88134990E-01 3.88134990E-01 -1.27556100E-01 4.61024190E-01 4.61024190E-01 + -4.84713180E-01 1.16804943E+00 1.07438681E+01 -1.04741780E+01 -7.57501011E+00 + 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 + -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 + 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 + 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 5.00566581E+00 + -4.37335200E+00 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 + 3.40757010E-01 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 + 1.13160483E+00 -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 + 6.19558200E+00 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 + -7.57501011E+00 4.95464337E+00 -7.08847470E-01 1.83498561E+00 6.65842842E+00 + 7.83558900E-02 -4.44259674E+00 1.16987166E+00 1.16987166E+00 1.16987166E+00 + -1.23200970E+01 7.47478746E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 + 8.32759110E-01 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 + 1.82223000E+00 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 + -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.59201960E-01 1.27191654E+00 1.27191654E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 + 2.37436569E+00 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 + 1.60720686E+00 -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 + 3.38934780E-01 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.53735270E-01 1.53613989E+00 3.85766091E+00 + 6.41424960E-01 6.41424960E-01 -1.19283176E+01 7.79003325E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 2.60578890E-01 1.90969704E+00 + -3.71917143E+00 1.45231731E+00 1.45231731E+00 1.29924999E+01 -1.08076461E+01 + -1.67481159E+01 7.64607708E+00 7.64607708E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.37335200E-02 1.78214094E+00 -6.25024890E-01 + 5.37557850E-01 5.37557850E-01 2.15023140E-01 -2.28872088E+00 2.42356590E+00 + -3.10507992E+00 2.60578890E+00 -1.95343056E+00 2.36343231E+00 -3.10507992E+00 + 2.60578890E+00 -2.28872088E+00 2.42356590E+00 1.08841798E+01 -1.03484442E+01 + -6.33953817E+00 5.00566581E+00 -4.37335200E+00 2.59849998E+00 -1.71289620E-01 + 6.59647260E-01 6.59647260E-01 3.40757010E-01 1.87689690E-01 1.87689690E-01 + -8.72848170E-01 1.13160483E+00 1.13160483E+00 -2.60578890E-01 2.06823105E+00 + 2.06823105E+00 -7.02287442E+00 6.19558200E+00 6.19558200E+00 6.19558200E+00 + 1.33769904E+01 -1.07402236E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 + 2.59849998E+00 -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 + 1.87689690E-01 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 + -2.60578890E-01 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 + 6.19558200E+00 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 + 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 4.39157430E-01 + 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 -4.98744351E+00 + -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 + -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 + -9.40817349E+00 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 + -2.22312060E-01 -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 + 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -2.55112200E-02 + 1.59627348E+00 -2.76978960E-01 5.37557850E-01 5.37557850E-01 -2.00445300E-02 + -3.47317038E+00 3.09596877E+00 -4.26584043E+00 3.01761288E+00 5.87851398E+00 + -1.01662212E+01 7.27434216E+00 -4.26584043E+00 3.01761288E+00 -3.47317038E+00 + 3.09596877E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 + 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 + 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.31868510E-01 + 1.60356240E+00 6.23202660E-01 4.39157430E-01 4.39157430E-01 3.28001400E-02 + 8.01781200E-01 8.01781200E-01 -4.98744351E+00 -9.76715280E-01 1.24640532E+00 + 1.24640532E+00 1.24640532E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -4.53735270E-01 1.53613989E+00 3.85766091E+00 + 6.41424960E-01 6.41424960E-01 -1.19283176E+01 7.79003325E+00 1.08841798E+01 + -1.03484442E+01 -4.64304204E+00 3.49868160E-01 7.12491930E-01 7.12491930E-01 + 3.44401470E-01 3.88134990E-01 3.88134990E-01 -1.27556100E-01 4.61024190E-01 + 4.61024190E-01 -4.84713180E-01 1.16804943E+00 1.07438681E+01 -1.04741780E+01 + -7.57501011E+00 4.95464337E+00 -9.43915140E-01 1.68009606E+00 -2.00809746E+00 + 8.32759110E-01 8.32759110E-01 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 + 1.82223000E+00 1.82223000E+00 1.82223000E+00 -7.50940983E+00 1.82223000E+00 + 1.82223000E+00 1.82223000E+00 1.08841798E+01 -1.03484442E+01 -6.33953817E+00 + 5.00566581E+00 -4.37335200E+00 2.59849998E+00 -1.71289620E-01 6.59647260E-01 + 6.59647260E-01 3.40757010E-01 1.87689690E-01 1.87689690E-01 -8.72848170E-01 + 1.13160483E+00 1.13160483E+00 -2.60578890E-01 2.06823105E+00 2.06823105E+00 + -7.02287442E+00 6.19558200E+00 6.19558200E+00 6.19558200E+00 1.33769904E+01 + -1.07402236E+01 -6.33953817E+00 5.00566581E+00 -4.37335200E+00 2.59849998E+00 + -1.71289620E-01 6.59647260E-01 6.59647260E-01 3.40757010E-01 1.87689690E-01 + 1.87689690E-01 -8.72848170E-01 1.13160483E+00 1.13160483E+00 -2.60578890E-01 + 2.06823105E+00 2.06823105E+00 -7.02287442E+00 6.19558200E+00 6.19558200E+00 + 6.19558200E+00 1.33769904E+01 -1.07402236E+01 -7.57501011E+00 4.95464337E+00 + 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 + 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 + 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 5.35006728E+00 + 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 -2.22312060E-01 + 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 -1.06035564E+01 + -7.57501011E+00 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 + 3.40757010E-01 -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 + -7.83558900E-01 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 + 3.38934780E-01 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 4.39157430E-01 + 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 -4.98744351E+00 + -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 1.08841798E+01 + -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 2.01356415E+00 + 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 -7.74447750E-01 + -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 + 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 + 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 + 1.45231731E+00 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 + 7.64607708E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -7.08847470E-01 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 + 1.16987166E+00 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 + 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.37335200E-02 1.78214094E+00 -6.25024890E-01 5.37557850E-01 5.37557850E-01 + 2.15023140E-01 -2.28872088E+00 2.42356590E+00 -3.10507992E+00 2.60578890E+00 + -1.95343056E+00 2.36343231E+00 -3.10507992E+00 2.60578890E+00 -2.28872088E+00 + 2.42356590E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 3.88134990E-01 + 2.04818652E+00 -2.24316513E+00 2.02631976E+00 2.02631976E+00 -5.68353537E+00 + 3.52237059E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 + -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -4.31868510E-01 1.60356240E+00 + 6.23202660E-01 4.39157430E-01 4.39157430E-01 3.28001400E-02 8.01781200E-01 + 8.01781200E-01 -4.98744351E+00 -9.76715280E-01 1.24640532E+00 1.24640532E+00 + 1.24640532E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 6.14091510E-01 1.49969529E+00 -3.32556975E+00 1.09880469E+00 1.09880469E+00 + 1.09880469E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -7.08847470E-01 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 + 1.16987166E+00 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 + 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.08787131E+00 1.58351787E+00 2.37436569E+00 3.40757010E-01 + -5.83842492E+00 1.60720686E+00 1.60720686E+00 1.60720686E+00 -7.83558900E-01 + 4.30046280E-01 4.30046280E-01 -1.20267180E+00 3.38934780E-01 3.38934780E-01 + 3.38934780E-01 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -7.08847470E-01 1.83498561E+00 6.65842842E+00 7.83558900E-02 -4.44259674E+00 + 1.16987166E+00 1.16987166E+00 1.16987166E+00 -1.23200970E+01 7.47478746E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 + 1.27191654E+00 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 + 5.35006728E+00 7.23425310E-01 2.01356415E+00 1.02044880E+00 -3.15245790E-01 + -3.15245790E-01 2.47823280E-01 -7.74447750E-01 -7.74447750E-01 1.46762404E+01 + -1.49204192E+01 -1.49204192E+01 9.77808618E+00 -1.06035564E+01 -7.57501011E+00 + 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.59445125E+00 1.76574087E+00 5.43935655E+00 + -5.41202310E-01 -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 + -5.81655816E+00 1.44138393E+00 1.44138393E+00 1.44138393E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.05871563E+00 2.47823280E+00 + -1.34845020E-01 6.68758410E-01 6.68758410E-01 3.40392564E+00 -9.89835336E+00 + 2.97934605E+00 2.61490005E+00 -5.09313285E+00 6.08442597E+00 -4.02166161E+00 + 3.39299226E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -1.59445125E+00 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 + 1.44138393E+00 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -9.40817349E+00 + 5.35006728E+00 6.94269630E-01 1.60356240E+00 -5.52135690E-01 -2.22312060E-01 + -2.22312060E-01 1.45669066E+01 -1.46033512E+01 -1.46033512E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 6.14091510E-01 1.49969529E+00 + -3.32556975E+00 1.09880469E+00 1.09880469E+00 1.09880469E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 + 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -2.55112200E-02 1.59627348E+00 -2.76978960E-01 5.37557850E-01 5.37557850E-01 + -2.00445300E-02 -3.47317038E+00 3.09596877E+00 -4.26584043E+00 3.01761288E+00 + 5.87851398E+00 -1.01662212E+01 7.27434216E+00 -4.26584043E+00 3.01761288E+00 + -3.47317038E+00 3.09596877E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.05871563E+00 2.47823280E+00 -1.34845020E-01 6.68758410E-01 + 6.68758410E-01 3.40392564E+00 -9.89835336E+00 2.97934605E+00 2.61490005E+00 + -5.09313285E+00 6.08442597E+00 -4.02166161E+00 3.39299226E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 3.88134990E-01 2.04818652E+00 + -2.24316513E+00 2.02631976E+00 2.02631976E+00 -5.68353537E+00 3.52237059E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 + 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -4.53735270E-01 1.53613989E+00 3.85766091E+00 6.41424960E-01 6.41424960E-01 + -1.19283176E+01 7.79003325E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -4.31868510E-01 1.60356240E+00 6.23202660E-01 4.39157430E-01 + 4.39157430E-01 3.28001400E-02 8.01781200E-01 8.01781200E-01 -4.98744351E+00 + -9.76715280E-01 1.24640532E+00 1.24640532E+00 1.24640532E+00 1.08841798E+01 + -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -4.59201960E-01 1.27191654E+00 + 1.27191654E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + 2.60578890E-01 1.90969704E+00 -3.71917143E+00 1.45231731E+00 1.45231731E+00 + 1.29924999E+01 -1.08076461E+01 -1.67481159E+01 7.64607708E+00 7.64607708E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.59445125E+00 + 1.76574087E+00 5.43935655E+00 -5.41202310E-01 -5.81655816E+00 1.44138393E+00 + 1.44138393E+00 1.44138393E+00 -5.81655816E+00 1.44138393E+00 1.44138393E+00 + 1.44138393E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -9.43915140E-01 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 + 6.43429413E+00 -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 + 1.82223000E+00 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -9.43915140E-01 + 1.68009606E+00 -2.00809746E+00 8.32759110E-01 8.32759110E-01 6.43429413E+00 + -6.57825030E-01 -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 + -7.50940983E+00 1.82223000E+00 1.82223000E+00 1.82223000E+00 1.08841798E+01 + -1.03484442E+01 -9.40817349E+00 5.35006728E+00 7.23425310E-01 2.01356415E+00 + 1.02044880E+00 -3.15245790E-01 -3.15245790E-01 2.47823280E-01 -7.74447750E-01 + -7.74447750E-01 1.46762404E+01 -1.49204192E+01 -1.49204192E+01 9.77808618E+00 + -1.06035564E+01 -7.57501011E+00 4.95464337E+00 -1.05871563E+00 2.47823280E+00 + -1.34845020E-01 6.68758410E-01 6.68758410E-01 3.40392564E+00 -9.89835336E+00 + 2.97934605E+00 2.61490005E+00 -5.09313285E+00 6.08442597E+00 -4.02166161E+00 + 3.39299226E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 + -1.05871563E+00 2.47823280E+00 -1.34845020E-01 6.68758410E-01 6.68758410E-01 + 3.40392564E+00 -9.89835336E+00 2.97934605E+00 2.61490005E+00 -5.09313285E+00 + 6.08442597E+00 -4.02166161E+00 3.39299226E+00 1.08841798E+01 -1.03484442E+01 + -7.57501011E+00 4.95464337E+00 -1.05871563E+00 2.47823280E+00 -1.34845020E-01 + 6.68758410E-01 6.68758410E-01 3.40392564E+00 -9.89835336E+00 2.97934605E+00 + 2.61490005E+00 -5.09313285E+00 6.08442597E+00 -4.02166161E+00 3.39299226E+00 + 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 4.95464337E+00 -1.05871563E+00 + 2.47823280E+00 -1.34845020E-01 6.68758410E-01 6.68758410E-01 3.40392564E+00 + -9.89835336E+00 2.97934605E+00 2.61490005E+00 -5.09313285E+00 6.08442597E+00 + -4.02166161E+00 3.39299226E+00 1.08841798E+01 -1.03484442E+01 -7.57501011E+00 + 4.95464337E+00 -1.05871563E+00 2.47823280E+00 -1.34845020E-01 6.68758410E-01 + 6.68758410E-01 3.40392564E+00 -9.89835336E+00 2.97934605E+00 2.61490005E+00 + -5.09313285E+00 6.08442597E+00 -4.02166161E+00 3.39299226E+00 1.08841798E+01 + -1.03484442E+01 -6.96274083E+00 4.88539863E+00 -4.91819877E+00 3.00667950E+00 + -1.94614164E+00 1.12978260E+00 1.12978260E+00 4.96375452E+00 -1.00532429E+01 + 2.83903434E+00 2.63858904E+00 -4.86535410E+00 6.04798137E+00 -4.71593124E+00 + 3.56610411E+00 1.44247727E+01 -1.46962850E+01 -1.46962850E+01 1.71771964E+01 + -1.33087844E+01 -1.33087844E+01 -6.50120642E+00 -1.22016521E-01 1.44710573E+00 + -7.15799277E+00 2.13253755E+00 -1.17149344E+01 1.87662357E+00 -1.15203932E+01 + 1.11651677E+00 3.24703164E-01 1.13637907E+00 -1.15916970E+01 2.65666556E+00 + 1.17945112E+01 -1.58192524E+01 -1.38306528E+01 9.69357115E+00 -1.37259839E+01 + 7.47564391E+00 -7.61695784E+00 2.32850563E+01 -1.47146348E+01 -1.47146348E+01 + -1.07613797E+01 5.63069070E-01 1.80765216E+00 -6.72767316E+00 2.51832186E+00 + -1.24385420E+01 2.26685412E+00 -1.16932499E+01 5.12046630E-01 1.77496135E+00 + -2.90244794E-01 -8.37952466E-01 1.17635880E+01 -1.00322690E+01 -1.43580244E+01 + -6.60193929E-01 -2.37688037E+00 1.57129071E+00 1.05057026E+00 1.05057026E+00 + 2.98701764E+00 2.67922477E+00 8.12805692E+00 1.06279743E+00 7.46002740E+00 + 3.07978737E+00 4.06251601E+00 7.12209484E+00 7.12209484E+00 1.42758965E+00 + 2.01048458E+00 2.01048458E+00 1.44626751E+00 2.25555629E+00 8.14755478E+00 + 3.06460819E+00 7.84355215E+00 3.26388726E+00 2.69646306E+00 6.91802331E+00 + 6.91802331E+00 3.41894082E+00 3.34060315E+00 4.13908611E+00 -7.10669700E-02 + 2.60761113E+00 -2.71512270E+00 8.45514720E-01 -2.73334500E+00 -1.80400770E+00 + -4.46810796E+00 -8.83963773E+00 2.02449753E+00 8.01781200E-02 -1.84045230E+00 + 2.55112200E-02 -1.74934080E+00 -2.97023490E+00 -1.04596002E+00 -1.44685062E+00 + -1.46507292E+00 3.11601330E+00 2.82445650E+00 2.84267880E+00 8.03603430E+00 + 3.02490180E+00 2.84267880E+00 2.89734570E+00 +%FLAG ATOMIC_NUMBER +%FORMAT(10I8) + 7 1 1 1 6 1 6 1 1 6 + 1 1 16 6 1 1 1 6 8 7 + 1 6 1 1 6 8 7 1 6 1 + 6 1 1 6 6 1 6 1 6 1 + 6 1 6 1 6 8 7 1 6 1 + 6 1 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 1 6 8 7 1 6 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 1 1 6 1 1 7 1 + 1 1 6 8 7 1 6 1 6 1 + 1 6 1 1 6 1 1 6 1 1 + 7 1 1 1 6 8 7 1 6 1 + 6 1 6 1 1 1 6 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 6 1 6 1 1 1 6 1 + 1 1 6 8 7 1 6 1 6 1 + 6 1 1 1 6 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 6 + 1 1 1 8 1 6 8 7 1 6 + 1 1 6 8 7 1 6 1 6 1 + 1 6 1 6 1 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 8 + 1 6 8 7 1 6 1 6 1 1 + 6 8 7 1 1 6 8 7 1 6 + 1 6 1 1 6 1 1 6 1 1 + 6 1 1 7 1 1 1 6 8 7 + 1 6 1 6 1 1 8 1 6 8 + 7 1 6 1 6 1 6 1 1 1 + 6 1 1 6 1 1 1 6 8 7 + 1 6 1 6 1 1 1 6 8 7 + 1 6 1 6 1 1 6 6 1 6 + 1 6 8 1 6 1 6 1 6 8 + 7 1 6 1 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 6 1 1 6 1 1 6 + 1 1 7 1 1 1 6 8 7 1 + 6 1 6 1 1 1 6 8 7 1 + 6 1 6 1 1 6 1 1 16 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 6 7 6 1 7 1 6 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 1 1 7 1 6 7 1 + 1 7 1 1 6 8 7 1 6 1 + 6 1 1 6 1 1 6 8 8 6 + 8 7 1 6 1 1 6 8 7 1 + 6 1 6 1 1 1 6 8 7 1 + 6 1 6 1 1 6 1 1 6 8 + 8 6 8 7 1 6 1 6 1 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 6 1 6 1 6 1 6 1 6 1 + 6 8 7 1 6 1 6 1 6 1 + 1 1 8 1 6 8 7 1 6 1 + 6 1 1 6 6 1 6 1 6 8 + 1 6 1 6 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 1 6 8 7 1 6 1 1 6 8 + 7 1 6 1 6 1 1 6 1 1 + 6 8 7 1 1 6 8 7 1 6 + 1 6 1 1 6 6 1 6 1 6 + 1 6 1 6 1 6 8 7 1 6 + 1 6 1 1 6 1 1 6 1 1 + 6 1 1 7 1 1 1 6 8 7 + 1 6 1 6 1 1 6 8 8 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 1 1 7 1 6 7 1 1 + 7 1 1 6 8 7 1 6 1 6 + 1 6 1 1 1 6 1 1 1 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 6 1 1 6 1 1 6 + 1 1 7 1 1 1 6 8 7 1 + 6 1 6 1 1 6 1 6 1 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 16 1 6 8 7 1 + 6 1 6 1 1 1 6 8 7 1 + 6 1 6 1 1 6 1 1 6 8 + 8 6 8 7 1 6 1 6 1 1 + 6 6 1 6 1 6 1 6 1 6 + 1 6 8 7 1 6 1 6 1 1 + 6 8 7 1 1 6 8 7 6 1 + 1 6 1 1 6 1 1 6 1 6 + 8 7 1 6 1 6 1 1 1 6 + 8 7 1 6 1 6 1 1 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 1 6 1 1 1 + 6 1 1 1 6 8 7 6 1 1 + 6 1 1 6 1 1 6 1 6 8 + 7 1 6 1 6 1 1 16 1 6 + 8 7 1 6 1 6 1 1 6 8 + 8 6 8 7 1 6 1 6 1 6 + 1 1 1 6 1 1 1 6 8 7 + 1 6 1 6 1 6 1 1 1 6 + 1 1 6 1 1 1 6 8 7 1 + 6 1 6 1 1 8 1 6 8 7 + 1 6 1 6 1 1 6 8 8 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 8 7 1 1 6 8 7 1 + 6 1 6 1 1 6 1 1 6 8 + 8 6 8 7 1 6 1 6 1 6 + 1 1 1 6 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 1 1 6 1 1 7 1 + 1 1 6 8 7 1 6 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 6 6 1 6 1 6 1 6 + 1 6 1 6 8 7 1 6 1 6 + 1 6 1 1 1 6 1 1 1 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 1 1 6 1 1 7 1 + 1 1 6 8 7 1 6 1 6 1 + 6 1 1 1 6 1 1 1 6 8 + 7 1 6 1 6 1 1 6 6 1 + 7 1 6 6 1 6 1 6 1 6 + 1 6 6 8 7 1 6 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 1 6 8 7 1 6 1 6 1 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 8 8 6 8 7 1 6 1 6 1 + 1 1 6 8 7 1 6 1 6 1 + 6 1 1 1 6 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 6 + 1 1 1 6 1 1 1 6 8 7 + 1 6 1 6 1 1 6 7 6 1 + 7 1 6 1 6 8 7 1 6 1 + 6 1 1 8 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 6 6 1 6 1 6 1 + 6 1 6 1 6 8 7 1 6 1 + 6 1 1 1 6 8 7 6 1 1 + 6 1 1 6 1 1 6 1 6 8 + 7 1 6 1 6 1 1 6 1 1 + 6 1 1 7 1 6 7 1 1 7 + 1 1 6 8 7 1 6 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 6 1 1 6 8 7 1 + 1 6 8 7 1 6 1 6 1 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 8 8 6 8 7 1 6 + 1 1 6 8 7 1 6 1 6 1 + 1 6 8 7 1 1 6 8 7 1 + 6 1 6 1 1 6 6 1 6 1 + 6 1 6 1 6 1 6 8 7 1 + 6 1 6 1 6 1 1 1 6 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 8 8 6 8 7 + 1 6 1 6 1 1 16 1 6 8 + 7 1 6 1 6 1 6 1 1 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 6 1 1 1 8 1 6 8 + 7 1 6 1 6 1 1 6 1 1 + 6 1 1 7 1 6 7 1 1 7 + 1 1 6 8 7 1 6 1 6 1 + 1 6 1 1 6 8 8 6 8 7 + 1 6 1 1 6 8 7 1 6 1 + 6 1 1 6 6 1 6 1 6 1 + 6 1 6 1 6 8 7 1 6 1 + 6 1 1 8 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 6 7 6 1 7 1 6 + 1 6 8 7 1 6 1 6 1 1 + 6 8 8 6 8 7 1 6 1 6 + 1 6 1 1 1 6 1 1 6 1 + 1 1 6 8 7 1 6 1 6 1 + 1 8 1 6 8 7 1 6 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 6 6 1 6 1 6 8 1 + 6 1 6 1 6 8 7 1 6 1 + 6 1 1 8 1 6 8 7 1 6 + 1 6 1 1 6 6 1 6 1 6 + 1 6 1 6 1 6 8 7 1 6 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 1 6 1 1 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 6 1 1 6 1 1 6 + 1 1 7 1 1 1 6 8 7 1 + 6 1 6 1 1 6 1 1 6 8 + 8 6 8 7 1 6 1 1 6 8 + 7 1 6 1 6 1 1 6 1 1 + 6 1 1 7 1 6 7 1 1 7 + 1 1 6 8 7 1 6 1 6 1 + 1 8 1 6 8 7 1 6 1 6 + 1 1 6 1 1 16 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 16 6 1 1 1 6 8 7 + 1 6 1 6 1 1 6 1 1 6 + 1 1 6 1 1 7 1 1 1 6 + 8 7 1 6 1 6 1 1 6 8 + 7 1 1 6 8 7 1 6 1 6 + 1 1 6 1 1 6 1 1 7 1 + 6 7 1 1 7 1 1 6 8 7 + 1 6 1 6 1 1 6 8 7 1 + 1 6 8 7 1 6 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 8 1 6 8 7 1 6 1 6 1 + 1 6 1 1 16 6 1 1 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 1 6 1 1 1 + 6 1 1 1 6 8 7 1 6 1 + 6 1 6 1 1 1 8 1 6 8 + 7 1 6 1 6 1 1 6 6 1 + 6 1 6 8 1 6 1 6 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 6 1 1 6 1 1 1 6 8 + 7 1 6 1 1 6 8 7 1 6 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 1 1 6 8 8 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 1 1 6 1 1 7 1 + 1 1 6 8 7 1 6 1 6 1 + 1 1 6 8 7 1 6 1 6 1 + 1 6 1 1 16 6 1 1 1 6 + 8 7 6 1 1 6 1 1 6 1 + 1 6 1 6 8 7 1 6 1 6 + 1 1 8 1 6 8 7 1 6 1 + 6 1 1 6 6 1 6 1 6 8 + 1 6 1 6 1 6 8 7 1 6 + 1 6 1 1 6 8 7 1 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 8 1 6 8 7 1 6 1 6 + 1 1 6 1 1 16 6 1 1 1 + 6 8 7 1 6 1 1 6 8 7 + 1 6 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 6 1 1 6 1 1 6 1 + 1 7 1 1 1 6 8 7 1 6 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 8 1 6 8 7 1 + 6 1 6 1 1 6 1 6 1 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 1 1 6 8 8 + 6 8 7 1 6 1 6 1 1 1 + 6 8 7 1 6 1 6 1 6 1 + 1 1 8 1 6 8 7 1 6 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 6 1 1 7 1 6 7 1 + 1 7 1 1 6 8 7 1 6 1 + 6 1 1 6 6 1 6 1 6 8 + 1 6 1 6 1 6 8 7 1 6 + 1 6 1 6 1 1 1 8 1 6 + 8 7 1 6 1 6 1 1 1 6 + 8 7 1 6 1 6 1 1 6 1 + 6 1 1 1 6 1 1 1 6 8 + 7 1 6 1 6 1 1 1 6 8 + 7 1 6 1 6 1 1 6 1 6 + 1 1 1 6 1 1 1 6 8 7 + 1 6 1 1 6 8 7 1 6 1 + 6 1 1 6 1 1 6 8 8 6 + 8 7 1 6 1 6 1 1 6 8 + 8 6 8 7 1 6 1 1 6 8 + 7 1 6 1 6 1 6 1 1 1 + 6 1 1 6 1 1 1 6 8 7 + 1 6 1 6 1 1 6 1 1 6 + 1 1 6 1 1 7 1 1 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 6 8 7 1 1 6 + 8 7 1 6 1 6 1 1 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 6 1 1 1 6 8 7 1 6 + 1 6 1 1 8 1 6 8 7 1 + 6 1 6 1 1 1 6 8 7 1 + 6 1 1 6 8 7 6 1 1 6 + 1 1 6 1 1 6 1 6 8 7 + 1 6 1 6 1 6 1 1 1 6 + 1 1 6 1 1 1 6 8 7 1 + 6 1 6 1 1 6 1 1 6 1 + 1 6 1 1 7 1 1 1 6 8 + 7 1 6 1 6 1 6 1 1 1 + 8 1 6 8 7 1 6 1 6 1 + 1 6 1 6 1 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 8 1 6 8 7 1 6 1 1 6 + 8 7 1 6 1 6 1 6 1 1 + 1 6 1 1 6 1 1 1 6 8 + 7 1 6 1 6 1 1 8 1 6 + 8 7 1 6 1 6 1 1 6 8 + 7 1 1 6 8 7 1 6 1 6 + 1 1 6 6 1 6 1 6 1 6 + 1 6 1 6 8 7 1 6 1 6 + 1 1 6 1 1 6 1 1 6 1 + 1 7 1 1 1 6 8 7 1 6 + 1 6 1 1 6 1 1 6 1 1 + 6 1 1 7 1 1 1 6 8 7 + 1 6 1 6 1 1 6 1 1 16 + 6 1 1 1 6 8 7 1 6 1 + 6 1 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 6 8 8 6 8 7 1 6 + 1 6 1 1 6 6 1 6 1 6 + 8 1 6 1 6 1 6 8 7 1 + 6 1 6 1 1 6 8 7 1 1 + 6 8 7 1 6 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 1 16 6 1 1 1 6 8 7 + 1 6 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 1 8 1 6 8 7 6 1 1 + 6 1 1 6 1 1 6 1 6 8 + 7 1 6 1 6 1 1 6 1 6 + 1 1 1 6 1 1 1 6 8 7 + 1 6 1 6 1 1 6 1 1 6 + 1 1 6 1 1 7 1 1 1 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 1 1 6 1 1 7 1 1 + 1 6 8 7 1 6 1 6 1 1 + 6 8 7 1 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 6 8 8 6 8 7 1 6 1 6 + 1 6 1 1 1 6 1 1 6 1 + 1 1 6 8 7 1 6 1 6 1 + 1 6 1 1 16 6 1 1 1 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 1 6 8 7 + 1 6 1 6 1 1 6 8 7 1 + 1 6 8 7 1 6 1 6 1 6 + 1 1 1 8 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 6 6 1 6 1 6 1 6 1 6 + 1 6 8 7 1 6 1 6 1 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 16 + 1 6 8 7 1 6 1 6 1 1 + 8 1 6 8 7 1 6 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 6 1 1 16 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 1 6 8 7 1 6 1 6 1 6 + 1 1 1 8 1 6 8 7 1 6 + 1 1 6 8 7 1 6 1 6 1 + 6 1 1 1 6 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 6 + 1 1 1 8 1 6 8 7 1 6 + 1 1 6 8 7 1 6 1 6 1 + 1 6 1 1 6 8 8 6 8 7 + 1 6 1 6 1 6 1 1 1 6 + 1 1 1 6 8 7 1 6 1 6 + 1 6 1 1 1 6 1 1 1 6 + 8 7 1 6 1 6 1 1 6 7 + 6 1 7 1 6 1 6 8 7 1 + 6 1 6 1 6 1 1 1 6 1 + 1 1 6 8 7 1 6 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 1 6 8 7 1 6 1 + 1 6 8 7 1 6 1 6 1 1 + 6 6 1 6 1 6 8 1 6 1 + 6 1 6 8 7 1 6 1 6 1 + 1 6 7 6 1 7 1 6 1 6 + 8 7 1 6 1 6 1 1 16 1 + 6 8 7 1 6 1 6 1 6 1 + 1 1 6 1 1 1 6 8 7 1 + 6 1 6 1 1 8 1 6 8 7 + 1 6 1 6 1 1 6 1 1 16 + 6 1 1 1 6 8 7 1 6 1 + 1 6 8 7 1 6 1 6 1 1 + 6 8 7 1 1 6 8 7 1 6 + 1 6 1 6 1 1 1 6 1 1 + 1 6 8 7 1 6 1 6 1 1 + 6 1 6 1 1 1 6 1 1 1 + 6 8 7 1 6 1 6 1 1 6 + 1 6 1 1 1 6 1 1 1 6 + 8 7 1 6 1 6 1 1 6 1 + 1 6 8 8 6 8 7 1 6 1 + 6 1 1 6 7 6 1 7 1 6 + 1 6 8 7 1 6 1 6 1 1 + 6 7 6 1 7 1 6 1 6 8 + 7 1 6 1 6 1 1 6 7 6 + 1 7 1 6 1 6 8 7 1 6 + 1 6 1 1 6 7 6 1 7 1 + 6 1 6 8 7 1 6 1 6 1 + 1 6 7 6 1 7 1 6 1 6 + 8 7 1 6 1 6 1 1 6 7 + 6 1 7 1 6 1 6 8 8 15 + 8 8 8 6 6 8 6 8 6 8 + 6 7 6 7 6 6 7 7 6 7 + 6 8 15 8 8 8 6 6 8 6 + 8 6 8 6 7 6 6 6 8 7 + 6 6 6 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 6 + 6 6 6 6 6 8 8 6 6 6 + 6 6 6 17 17 17 1 1 1 1 + 1 1 1 +%FLAG MASS +%FORMAT(5E16.8) + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 3.20600000E+01 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.60000000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.20100000E+01 + 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 3.20600000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 3.20600000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.40100000E+01 + 1.20100000E+01 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 3.20600000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 3.20600000E+01 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 3.20600000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.60000000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.60000000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 3.20600000E+01 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 3.20600000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.60000000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.40100000E+01 + 1.20100000E+01 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.60000000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 3.20600000E+01 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.40100000E+01 + 1.20100000E+01 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.20100000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.20100000E+01 + 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.40100000E+01 1.20100000E+01 1.00800000E+00 1.40100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.00800000E+00 1.20100000E+01 1.40100000E+01 1.20100000E+01 1.00800000E+00 + 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 1.20100000E+01 + 1.60000000E+01 1.40100000E+01 1.00800000E+00 1.20100000E+01 1.00800000E+00 + 1.20100000E+01 1.00800000E+00 1.00800000E+00 1.20100000E+01 1.40100000E+01 + 1.20100000E+01 1.00800000E+00 1.40100000E+01 1.00800000E+00 1.20100000E+01 + 1.00800000E+00 1.20100000E+01 1.60000000E+01 1.60000000E+01 3.09700000E+01 + 1.60000000E+01 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.20100000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.20100000E+01 1.60000000E+01 + 1.20100000E+01 1.40100000E+01 1.20100000E+01 1.40100000E+01 1.20100000E+01 + 1.20100000E+01 1.40100000E+01 1.40100000E+01 1.20100000E+01 1.40100000E+01 + 1.20100000E+01 1.60000000E+01 3.09700000E+01 1.60000000E+01 1.60000000E+01 + 1.60000000E+01 1.20100000E+01 1.20100000E+01 1.60000000E+01 1.20100000E+01 + 1.60000000E+01 1.20100000E+01 1.60000000E+01 1.20100000E+01 1.40100000E+01 + 1.20100000E+01 1.20100000E+01 1.20100000E+01 1.60000000E+01 1.40100000E+01 + 1.20100000E+01 1.20100000E+01 1.20100000E+01 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.20100000E+01 + 1.20100000E+01 1.20100000E+01 1.20100000E+01 1.20100000E+01 1.20100000E+01 + 1.60000000E+01 1.60000000E+01 1.20100000E+01 1.20100000E+01 1.20100000E+01 + 1.20100000E+01 1.20100000E+01 1.20100000E+01 3.54500000E+01 3.54500000E+01 + 3.54500000E+01 1.00800000E+00 1.00800000E+00 1.00800000E+00 1.00800000E+00 + 1.00800000E+00 1.00800000E+00 1.00800000E+00 +%FLAG ATOM_TYPE_INDEX +%FORMAT(10I8) + 1 2 2 2 3 4 3 5 5 3 + 6 6 7 3 6 6 6 8 9 1 + 2 3 6 6 8 9 1 2 3 6 + 3 5 5 8 8 10 8 10 8 10 + 8 10 8 10 8 9 1 2 3 6 + 3 5 5 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 5 8 9 1 2 3 6 6 + 8 9 1 2 3 6 3 5 5 3 + 5 5 3 5 5 3 4 4 1 2 + 2 2 8 9 1 2 3 6 3 5 + 5 3 5 5 3 5 5 3 4 4 + 1 2 2 2 8 9 1 2 3 6 + 3 5 3 5 5 5 3 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 3 5 3 5 5 5 3 5 + 5 5 8 9 1 2 3 6 3 5 + 3 5 5 5 3 5 5 3 5 5 + 5 8 9 1 2 3 6 3 6 3 + 5 5 5 11 12 8 9 1 2 3 + 6 6 8 9 1 2 3 6 3 5 + 5 3 5 3 5 5 5 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 6 6 11 + 12 8 9 1 2 3 6 3 5 5 + 8 9 1 2 2 8 9 1 2 3 + 6 3 5 5 3 5 5 3 5 5 + 3 4 4 1 2 2 2 8 9 1 + 2 3 6 3 6 6 11 12 8 9 + 1 2 3 6 3 5 3 5 5 5 + 3 5 5 3 5 5 5 8 9 1 + 2 3 6 3 5 5 5 8 9 1 + 2 3 6 3 5 5 8 8 10 8 + 10 8 11 12 8 10 8 10 8 9 + 1 2 3 6 6 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 3 5 5 3 5 5 3 + 4 4 1 2 2 2 8 9 1 2 + 3 6 3 5 5 5 8 9 1 2 + 3 6 3 5 5 3 6 6 7 3 + 6 6 6 8 9 1 2 3 6 3 + 5 5 8 1 8 13 1 2 8 14 + 8 9 1 2 3 6 3 5 5 3 + 5 5 3 6 6 1 2 8 1 2 + 2 1 2 2 8 9 1 2 3 6 + 3 5 5 3 5 5 8 9 9 8 + 9 1 2 3 6 6 8 9 1 2 + 3 6 3 5 5 5 8 9 1 2 + 3 6 3 5 5 3 5 5 8 9 + 9 8 9 1 2 3 6 3 5 5 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 5 5 5 + 8 9 1 2 3 6 3 5 5 8 + 8 10 8 10 8 10 8 10 8 10 + 8 9 1 2 3 6 3 6 3 5 + 5 5 11 12 8 9 1 2 3 6 + 3 5 5 8 8 10 8 10 8 11 + 12 8 10 8 10 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 5 8 9 1 2 3 6 6 8 9 + 1 2 3 6 3 5 5 3 5 5 + 8 9 1 2 2 8 9 1 2 3 + 6 3 5 5 8 8 10 8 10 8 + 10 8 10 8 10 8 9 1 2 3 + 6 3 5 5 3 5 5 3 5 5 + 3 4 4 1 2 2 2 8 9 1 + 2 3 6 3 5 5 8 9 9 8 + 9 1 2 3 6 3 5 5 3 5 + 5 3 6 6 1 2 8 1 2 2 + 1 2 2 8 9 1 2 3 6 3 + 5 3 5 5 5 3 5 5 5 8 + 9 1 2 3 6 3 5 5 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 3 5 5 3 5 5 3 + 4 4 1 2 2 2 8 9 1 2 + 3 6 3 5 5 3 5 3 5 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 6 6 7 2 8 9 1 2 + 3 6 3 5 5 5 8 9 1 2 + 3 6 3 5 5 3 5 5 8 9 + 9 8 9 1 2 3 6 3 5 5 + 8 8 10 8 10 8 10 8 10 8 + 10 8 9 1 2 3 6 3 5 5 + 8 9 1 2 2 8 9 1 3 6 + 6 3 5 5 3 5 5 3 6 8 + 9 1 2 3 6 3 5 5 5 8 + 9 1 2 3 6 3 5 5 5 8 + 9 1 2 3 6 3 5 3 5 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 5 5 3 5 3 5 5 5 + 3 5 5 5 8 9 1 3 6 6 + 3 5 5 3 5 5 3 6 8 9 + 1 2 3 6 3 6 6 7 2 8 + 9 1 2 3 6 3 5 5 8 9 + 9 8 9 1 2 3 6 3 5 3 + 5 5 5 3 5 5 5 8 9 1 + 2 3 6 3 5 3 5 5 5 3 + 5 5 3 5 5 5 8 9 1 2 + 3 6 3 6 6 11 12 8 9 1 + 2 3 6 3 5 5 8 9 9 8 + 9 1 2 3 6 3 5 5 3 5 + 5 8 9 1 2 2 8 9 1 2 + 3 6 3 5 5 3 5 5 8 9 + 9 8 9 1 2 3 6 3 5 3 + 5 5 5 3 5 5 3 5 5 5 + 8 9 1 2 3 6 3 5 5 3 + 5 5 3 5 5 3 4 4 1 2 + 2 2 8 9 1 2 3 6 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 8 8 10 8 10 8 10 8 + 10 8 10 8 9 1 2 3 6 3 + 5 3 5 5 5 3 5 5 5 8 + 9 1 2 3 6 3 5 5 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 6 + 8 9 1 2 3 6 3 5 5 3 + 5 5 3 5 5 3 4 4 1 2 + 2 2 8 9 1 2 3 6 3 5 + 3 5 5 5 3 5 5 5 8 9 + 1 2 3 6 3 5 5 8 8 14 + 1 2 8 8 10 8 10 8 10 8 + 10 8 8 9 1 2 3 6 3 5 + 5 8 9 9 8 9 1 2 3 6 + 6 8 9 1 2 3 6 3 5 5 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 5 5 8 + 9 9 8 9 1 2 3 6 3 5 + 5 5 8 9 1 2 3 6 3 5 + 3 5 5 5 3 5 5 3 5 5 + 5 8 9 1 2 3 6 3 5 3 + 5 5 5 3 5 5 5 8 9 1 + 2 3 6 3 5 5 8 1 8 13 + 1 2 8 14 8 9 1 2 3 6 + 3 6 6 11 12 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 8 8 10 8 10 8 10 + 8 10 8 10 8 9 1 2 3 6 + 3 5 5 5 8 9 1 3 6 6 + 3 5 5 3 5 5 3 6 8 9 + 1 2 3 6 3 5 5 3 5 5 + 3 6 6 1 2 8 1 2 2 1 + 2 2 8 9 1 2 3 6 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 3 5 5 8 9 1 2 + 2 8 9 1 2 3 6 3 5 5 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 5 5 3 + 5 5 8 9 9 8 9 1 2 3 + 6 6 8 9 1 2 3 6 3 5 + 5 8 9 1 2 2 8 9 1 2 + 3 6 3 5 5 8 8 10 8 10 + 8 10 8 10 8 10 8 9 1 2 + 3 6 3 5 3 5 5 5 3 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 5 5 8 9 9 8 9 1 + 2 3 6 3 6 6 7 2 8 9 + 1 2 3 6 3 5 3 5 5 5 + 3 5 5 5 8 9 1 2 3 6 + 3 6 3 5 5 5 11 12 8 9 + 1 2 3 6 3 5 5 3 5 5 + 3 6 6 1 2 8 1 2 2 1 + 2 2 8 9 1 2 3 6 3 5 + 5 3 5 5 8 9 9 8 9 1 + 2 3 6 6 8 9 1 2 3 6 + 3 5 5 8 8 10 8 10 8 10 + 8 10 8 10 8 9 1 2 3 6 + 3 6 6 11 12 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 8 1 8 13 1 2 8 + 14 8 9 1 2 3 6 3 5 5 + 8 9 9 8 9 1 2 3 6 3 + 5 3 5 5 5 3 5 5 3 5 + 5 5 8 9 1 2 3 6 3 6 + 6 11 12 8 9 1 2 3 6 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 8 8 10 8 10 8 11 12 + 8 10 8 10 8 9 1 2 3 6 + 3 6 6 11 12 8 9 1 2 3 + 6 3 5 5 8 8 10 8 10 8 + 10 8 10 8 10 8 9 1 2 3 + 6 3 5 5 5 8 9 1 2 3 + 6 3 5 5 5 8 9 1 2 3 + 6 3 5 5 3 5 3 5 5 5 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 5 8 9 1 2 3 6 + 3 5 5 3 5 5 3 5 5 3 + 4 4 1 2 2 2 8 9 1 2 + 3 6 3 5 5 3 5 5 8 9 + 9 8 9 1 2 3 6 6 8 9 + 1 2 3 6 3 5 5 3 5 5 + 3 6 6 1 2 8 1 2 2 1 + 2 2 8 9 1 2 3 6 3 6 + 6 11 12 8 9 1 2 3 6 3 + 5 5 3 6 6 7 3 6 6 6 + 8 9 1 2 3 6 3 5 5 3 + 6 6 7 3 6 6 6 8 9 1 + 2 3 6 3 5 5 3 5 5 3 + 5 5 3 4 4 1 2 2 2 8 + 9 1 2 3 6 3 5 5 8 9 + 1 2 2 8 9 1 2 3 6 3 + 5 5 3 5 5 3 6 6 1 2 + 8 1 2 2 1 2 2 8 9 1 + 2 3 6 3 5 5 8 9 1 2 + 2 8 9 1 2 3 6 3 5 5 + 5 8 9 1 2 3 6 3 6 6 + 11 12 8 9 1 2 3 6 3 5 + 5 3 6 6 7 3 6 6 6 8 + 9 1 2 3 6 3 5 3 5 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 5 5 5 8 9 1 2 3 + 6 3 5 5 3 5 3 5 5 5 + 3 5 5 5 8 9 1 2 3 6 + 3 6 3 5 5 5 11 12 8 9 + 1 2 3 6 3 5 5 8 8 10 + 8 10 8 11 12 8 10 8 10 8 + 9 1 2 3 6 3 5 3 5 5 + 5 3 5 5 3 5 5 5 8 9 + 1 2 3 6 6 8 9 1 2 3 + 6 3 5 5 5 8 9 1 2 3 + 6 3 5 5 3 5 5 8 9 9 + 8 9 1 2 3 6 3 5 5 3 + 5 5 3 5 5 3 4 4 1 2 + 2 2 8 9 1 2 3 6 3 5 + 5 5 8 9 1 2 3 6 3 5 + 5 3 6 6 7 3 6 6 6 8 + 9 1 3 6 6 3 5 5 3 5 + 5 3 6 8 9 1 2 3 6 3 + 6 6 11 12 8 9 1 2 3 6 + 3 5 5 8 8 10 8 10 8 11 + 12 8 10 8 10 8 9 1 2 3 + 6 3 5 5 8 9 1 2 2 8 + 9 1 2 3 6 3 6 3 5 5 + 5 11 12 8 9 1 2 3 6 3 + 5 5 3 6 6 7 3 6 6 6 + 8 9 1 2 3 6 6 8 9 1 + 2 3 6 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 3 5 5 3 5 5 3 4 + 4 1 2 2 2 8 9 1 2 3 + 6 3 5 5 5 8 9 1 2 3 + 6 3 6 6 11 12 8 9 1 2 + 3 6 3 5 5 3 5 3 5 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 5 5 3 5 5 8 9 9 + 8 9 1 2 3 6 3 5 5 5 + 8 9 1 2 3 6 3 6 3 5 + 5 5 11 12 8 9 1 2 3 6 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 5 5 3 + 5 5 3 6 6 1 2 8 1 2 + 2 1 2 2 8 9 1 2 3 6 + 3 5 5 8 8 10 8 10 8 11 + 12 8 10 8 10 8 9 1 2 3 + 6 3 6 3 5 5 5 11 12 8 + 9 1 2 3 6 3 5 5 5 8 + 9 1 2 3 6 3 5 5 3 5 + 3 5 5 5 3 5 5 5 8 9 + 1 2 3 6 3 5 5 5 8 9 + 1 2 3 6 3 5 5 3 5 3 + 5 5 5 3 5 5 5 8 9 1 + 2 3 6 6 8 9 1 2 3 6 + 3 5 5 3 5 5 8 9 9 8 + 9 1 2 3 6 3 5 5 8 9 + 9 8 9 1 2 3 6 6 8 9 + 1 2 3 6 3 5 3 5 5 5 + 3 5 5 3 5 5 5 8 9 1 + 2 3 6 3 5 5 3 5 5 3 + 5 5 3 4 4 1 2 2 2 8 + 9 1 2 3 6 3 5 3 5 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 5 5 8 9 1 2 2 8 + 9 1 2 3 6 3 5 5 5 8 + 9 1 2 3 6 3 5 3 5 5 + 5 3 5 5 5 8 9 1 2 3 + 6 3 6 6 11 12 8 9 1 2 + 3 6 3 5 5 5 8 9 1 2 + 3 6 6 8 9 1 3 6 6 3 + 5 5 3 5 5 3 6 8 9 1 + 2 3 6 3 5 3 5 5 5 3 + 5 5 3 5 5 5 8 9 1 2 + 3 6 3 5 5 3 5 5 3 5 + 5 3 4 4 1 2 2 2 8 9 + 1 2 3 6 3 6 3 5 5 5 + 11 12 8 9 1 2 3 6 3 5 + 5 3 5 3 5 5 5 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 5 8 9 1 2 3 6 3 6 6 + 11 12 8 9 1 2 3 6 6 8 + 9 1 2 3 6 3 5 3 5 5 + 5 3 5 5 3 5 5 5 8 9 + 1 2 3 6 3 6 6 11 12 8 + 9 1 2 3 6 3 5 5 8 9 + 1 2 2 8 9 1 2 3 6 3 + 5 5 8 8 10 8 10 8 10 8 + 10 8 10 8 9 1 2 3 6 3 + 5 5 3 5 5 3 5 5 3 4 + 4 1 2 2 2 8 9 1 2 3 + 6 3 5 5 3 5 5 3 5 5 + 3 4 4 1 2 2 2 8 9 1 + 2 3 6 3 5 5 3 6 6 7 + 3 6 6 6 8 9 1 2 3 6 + 3 5 5 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 5 5 8 9 9 8 9 1 2 3 + 6 3 5 5 8 8 10 8 10 8 + 11 12 8 10 8 10 8 9 1 2 + 3 6 3 5 5 8 9 1 2 2 + 8 9 1 2 3 6 3 5 5 5 + 8 9 1 2 3 6 3 5 5 3 + 6 6 7 3 6 6 6 8 9 1 + 2 3 6 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 6 6 11 12 8 9 1 3 6 6 + 3 5 5 3 5 5 3 6 8 9 + 1 2 3 6 3 5 5 3 5 3 + 5 5 5 3 5 5 5 8 9 1 + 2 3 6 3 5 5 3 5 5 3 + 5 5 3 4 4 1 2 2 2 8 + 9 1 2 3 6 3 5 5 3 5 + 5 3 5 5 3 4 4 1 2 2 + 2 8 9 1 2 3 6 3 5 5 + 8 9 1 2 2 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 8 9 9 8 9 1 2 3 6 3 + 5 3 5 5 5 3 5 5 3 5 + 5 5 8 9 1 2 3 6 3 5 + 5 3 6 6 7 3 6 6 6 8 + 9 1 2 3 6 3 5 5 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 6 8 9 1 + 2 3 6 3 5 5 8 9 1 2 + 2 8 9 1 2 3 6 3 6 3 + 5 5 5 11 12 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 8 8 10 8 10 8 10 8 10 8 + 10 8 9 1 2 3 6 3 5 5 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 6 6 7 + 2 8 9 1 2 3 6 3 6 6 + 11 12 8 9 1 2 3 6 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 3 6 6 7 3 6 6 + 6 8 9 1 2 3 6 3 5 5 + 5 8 9 1 2 3 6 3 6 3 + 5 5 5 11 12 8 9 1 2 3 + 6 6 8 9 1 2 3 6 3 5 + 3 5 5 5 3 5 5 3 5 5 + 5 8 9 1 2 3 6 3 6 3 + 5 5 5 11 12 8 9 1 2 3 + 6 6 8 9 1 2 3 6 3 5 + 5 3 5 5 8 9 9 8 9 1 + 2 3 6 3 5 3 5 5 5 3 + 5 5 5 8 9 1 2 3 6 3 + 5 3 5 5 5 3 5 5 5 8 + 9 1 2 3 6 3 5 5 8 1 + 8 13 1 2 8 14 8 9 1 2 + 3 6 3 5 3 5 5 5 3 5 + 5 5 8 9 1 2 3 6 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 5 8 9 1 2 3 6 + 6 8 9 1 2 3 6 3 5 5 + 8 8 10 8 10 8 11 12 8 10 + 8 10 8 9 1 2 3 6 3 5 + 5 8 1 8 13 1 2 8 14 8 + 9 1 2 3 6 3 6 6 7 2 + 8 9 1 2 3 6 3 5 3 5 + 5 5 3 5 5 5 8 9 1 2 + 3 6 3 6 6 11 12 8 9 1 + 2 3 6 3 5 5 3 6 6 7 + 3 6 6 6 8 9 1 2 3 6 + 6 8 9 1 2 3 6 3 5 5 + 8 9 1 2 2 8 9 1 2 3 + 6 3 5 3 5 5 5 3 5 5 + 5 8 9 1 2 3 6 3 5 5 + 3 5 3 5 5 5 3 5 5 5 + 8 9 1 2 3 6 3 5 5 3 + 5 3 5 5 5 3 5 5 5 8 + 9 1 2 3 6 3 5 5 3 5 + 5 8 9 9 8 9 1 2 3 6 + 3 5 5 8 1 8 13 1 2 8 + 14 8 9 1 2 3 6 3 5 5 + 8 1 8 13 1 2 8 14 8 9 + 1 2 3 6 3 5 5 8 1 8 + 13 1 2 8 14 8 9 1 2 3 + 6 3 5 5 8 1 8 13 1 2 + 8 14 8 9 1 2 3 6 3 5 + 5 8 1 8 13 1 2 8 14 8 + 9 1 2 3 6 3 5 5 8 1 + 8 13 1 2 8 14 8 9 9 15 + 9 9 16 3 3 16 3 11 3 11 + 3 1 8 1 8 8 1 1 8 1 + 8 16 15 9 9 16 3 3 16 3 + 11 3 11 3 1 8 8 8 9 1 + 8 8 8 6 6 6 6 12 6 12 + 17 13 2 2 13 6 6 6 6 12 + 6 12 17 10 2 2 10 10 10 8 + 8 8 8 8 8 16 11 8 8 8 + 8 8 8 18 18 18 10 10 10 12 + 10 10 10 +%FLAG NUMBER_EXCLUDED_ATOMS +%FORMAT(10I8) + 12 6 5 4 13 7 10 6 5 8 + 3 2 4 3 2 1 1 7 3 7 + 4 7 4 3 7 3 10 4 12 7 + 12 5 4 10 8 4 6 3 5 3 + 3 2 1 1 7 3 10 4 13 7 + 15 6 5 10 8 7 3 2 1 3 + 2 1 1 7 3 10 4 10 7 6 + 3 2 1 7 3 7 4 7 4 3 + 7 3 10 4 13 7 12 6 5 10 + 5 4 9 5 4 6 5 4 3 2 + 1 1 7 3 10 4 13 7 12 6 + 5 10 5 4 9 5 4 6 5 4 + 3 2 1 1 7 3 10 4 16 7 + 15 9 8 3 2 1 7 5 4 3 + 2 1 1 7 3 10 4 13 7 15 + 6 5 10 8 7 3 2 1 3 2 + 1 1 7 3 10 4 16 7 15 9 + 8 3 2 1 7 5 4 3 2 1 + 1 7 3 10 4 14 7 10 7 6 + 3 2 1 2 1 7 3 7 4 7 + 4 3 7 3 10 4 13 7 15 6 + 5 10 8 7 3 2 1 3 2 1 + 1 7 3 10 4 13 7 15 6 5 + 10 8 7 3 2 1 3 2 1 1 + 7 3 10 4 11 7 7 4 3 2 + 1 7 3 10 4 12 7 10 5 4 + 5 3 2 1 1 7 3 10 4 13 + 7 12 6 5 10 5 4 9 5 4 + 6 5 4 3 2 1 1 7 3 10 + 4 11 7 7 4 3 2 1 7 3 + 10 4 16 7 15 9 8 3 2 1 + 7 5 4 3 2 1 1 7 3 10 + 4 10 7 6 3 2 1 7 3 10 + 4 12 7 12 5 4 10 8 4 7 + 3 6 4 1 3 2 1 1 7 3 + 7 4 7 4 3 7 3 10 4 16 + 7 15 9 8 3 2 1 7 5 4 + 3 2 1 1 7 3 10 4 10 7 + 6 3 2 1 7 3 10 4 13 7 + 12 6 5 10 5 4 9 5 4 6 + 5 4 3 2 1 1 7 3 10 4 + 10 7 6 3 2 1 7 3 10 4 + 13 7 10 6 5 8 3 2 4 3 + 2 1 1 7 3 10 4 12 7 11 + 5 4 8 6 5 3 3 2 1 1 + 7 3 10 4 13 7 12 6 5 9 + 5 4 7 4 3 8 3 6 5 2 + 1 2 1 1 7 3 10 4 13 7 + 11 6 5 6 4 3 2 1 1 7 + 3 7 4 7 4 3 7 3 10 4 + 10 7 6 3 2 1 7 3 10 4 + 13 7 11 6 5 6 4 3 2 1 + 1 7 3 10 4 13 7 15 6 5 + 10 8 7 3 2 1 3 2 1 1 + 7 3 10 4 10 7 6 3 2 1 + 7 3 10 4 12 7 12 5 4 10 + 8 4 6 3 5 3 3 2 1 1 + 7 3 10 4 14 7 10 7 6 3 + 2 1 2 1 7 3 10 4 12 7 + 12 5 4 10 8 4 7 3 6 4 + 1 3 2 1 1 7 3 10 4 16 + 7 12 9 8 3 2 1 4 2 1 + 1 7 3 7 4 7 4 3 7 3 + 10 4 13 7 11 6 5 8 4 3 + 4 3 2 1 1 7 3 10 4 12 + 7 12 5 4 10 8 4 6 3 5 + 3 3 2 1 1 7 3 10 4 13 + 7 12 6 5 10 5 4 9 5 4 + 6 5 4 3 2 1 1 7 3 10 + 4 12 7 8 5 4 3 1 1 7 + 3 10 4 13 7 12 6 5 9 5 + 4 7 4 3 8 3 6 5 2 1 + 2 1 1 7 3 10 4 16 7 12 + 9 8 3 2 1 4 2 1 1 7 + 3 10 4 13 7 11 6 5 6 4 + 3 2 1 1 7 3 10 4 13 7 + 12 6 5 10 5 4 9 5 4 6 + 5 4 3 2 1 1 7 3 10 4 + 13 7 15 6 5 10 8 7 3 2 + 1 3 2 1 1 7 3 10 4 11 + 7 7 4 3 2 1 7 3 10 4 + 10 7 6 3 2 1 7 3 10 4 + 13 7 11 6 5 6 4 3 2 1 + 1 7 3 10 4 12 7 12 5 4 + 10 8 4 6 3 5 3 3 2 1 + 1 7 3 10 4 12 7 10 5 4 + 5 3 2 1 1 10 3 14 11 6 + 5 8 5 4 7 4 3 6 3 7 + 3 10 4 10 7 6 3 2 1 7 + 3 10 4 10 7 6 3 2 1 7 + 3 10 4 16 7 12 9 8 3 2 + 1 4 2 1 1 7 3 10 4 13 + 7 15 6 5 10 8 7 3 2 1 + 3 2 1 1 10 3 14 11 6 5 + 8 5 4 7 4 3 6 3 7 3 + 10 4 11 7 7 4 3 2 1 7 + 3 10 4 12 7 8 5 4 3 1 + 1 7 3 10 4 16 7 12 9 8 + 3 2 1 4 2 1 1 7 3 10 + 4 16 7 15 9 8 3 2 1 7 + 5 4 3 2 1 1 7 3 10 4 + 11 7 7 4 3 2 1 7 3 10 + 4 12 7 8 5 4 3 1 1 7 + 3 10 4 13 7 11 6 5 8 4 + 3 4 3 2 1 1 7 3 10 4 + 13 7 11 6 5 6 4 3 2 1 + 1 7 3 10 4 16 7 15 9 8 + 3 2 1 7 5 4 3 2 1 1 + 7 3 10 4 13 7 12 6 5 10 + 5 4 9 5 4 6 5 4 3 2 + 1 1 7 3 10 4 12 7 8 5 + 4 3 1 1 7 3 10 4 13 7 + 15 6 5 10 8 7 3 2 1 3 + 2 1 1 7 3 10 4 12 7 12 + 5 4 10 8 4 6 3 5 3 3 + 2 1 1 7 3 10 4 16 7 12 + 9 8 3 2 1 4 2 1 1 7 + 3 10 4 13 7 11 6 5 6 4 + 3 2 1 1 7 3 10 4 13 7 + 15 6 5 10 8 7 3 2 1 3 + 2 1 1 7 3 7 4 7 4 3 + 7 3 10 4 13 7 12 6 5 10 + 5 4 9 5 4 6 5 4 3 2 + 1 1 7 3 10 4 16 7 12 9 + 8 3 2 1 4 2 1 1 7 3 + 10 4 12 7 12 5 4 11 7 4 + 7 3 8 7 4 6 3 4 3 2 + 1 1 7 3 10 4 12 7 8 5 + 4 3 1 1 7 3 7 4 7 4 + 3 7 3 10 4 13 7 15 6 5 + 10 8 7 3 2 1 3 2 1 1 + 7 3 10 4 12 7 8 5 4 3 + 1 1 7 3 10 4 10 7 6 3 + 2 1 7 3 10 4 16 7 15 9 + 8 3 2 1 7 5 4 3 2 1 + 1 7 3 10 4 16 7 12 9 8 + 3 2 1 4 2 1 1 7 3 10 + 4 12 7 11 5 4 8 6 5 3 + 3 2 1 1 7 3 10 4 11 7 + 7 4 3 2 1 7 3 10 4 16 + 7 15 9 8 3 2 1 7 5 4 + 3 2 1 1 7 3 10 4 10 7 + 6 3 2 1 7 3 10 4 12 7 + 12 5 4 10 8 4 6 3 5 3 + 3 2 1 1 7 3 10 4 10 7 + 6 3 2 1 10 3 14 11 6 5 + 8 5 4 7 4 3 6 3 7 3 + 10 4 13 7 12 6 5 9 5 4 + 7 4 3 8 3 6 5 2 1 2 + 1 1 7 3 10 4 12 7 8 5 + 4 3 1 1 7 3 10 4 13 7 + 11 6 5 8 4 3 4 3 2 1 + 1 7 3 10 4 13 7 15 6 5 + 10 8 7 3 2 1 3 2 1 1 + 7 3 10 4 13 7 11 6 5 6 + 4 3 2 1 1 7 3 7 4 7 + 4 3 7 3 10 4 12 7 10 5 + 4 5 3 2 1 1 7 3 10 4 + 12 7 12 5 4 10 8 4 6 3 + 5 3 3 2 1 1 7 3 10 4 + 16 7 15 9 8 3 2 1 7 5 + 4 3 2 1 1 7 3 10 4 12 + 7 8 5 4 3 1 1 7 3 10 + 4 11 7 7 4 3 2 1 7 3 + 10 4 16 7 12 9 8 3 2 1 + 4 2 1 1 7 3 10 4 14 7 + 10 7 6 3 2 1 2 1 7 3 + 10 4 13 7 12 6 5 9 5 4 + 7 4 3 8 3 6 5 2 1 2 + 1 1 7 3 10 4 13 7 11 6 + 5 6 4 3 2 1 1 7 3 7 + 4 7 4 3 7 3 10 4 12 7 + 12 5 4 10 8 4 6 3 5 3 + 3 2 1 1 7 3 10 4 11 7 + 7 4 3 2 1 7 3 10 4 16 + 7 15 9 8 3 2 1 7 5 4 + 3 2 1 1 7 3 10 4 10 7 + 6 3 2 1 7 3 10 4 12 7 + 11 5 4 8 6 5 3 3 2 1 + 1 7 3 10 4 12 7 8 5 4 + 3 1 1 7 3 10 4 16 7 15 + 9 8 3 2 1 7 5 4 3 2 + 1 1 7 3 10 4 11 7 7 4 + 3 2 1 7 3 10 4 10 7 6 + 3 2 1 7 3 10 4 12 7 12 + 5 4 10 8 4 7 3 6 4 1 + 3 2 1 1 7 3 10 4 11 7 + 7 4 3 2 1 7 3 10 4 12 + 7 12 5 4 10 8 4 6 3 5 + 3 3 2 1 1 7 3 10 4 10 + 7 6 3 2 1 7 3 10 4 10 + 7 6 3 2 1 7 3 10 4 13 + 7 15 6 5 10 8 7 3 2 1 + 3 2 1 1 7 3 10 4 10 7 + 6 3 2 1 7 3 10 4 13 7 + 12 6 5 10 5 4 9 5 4 6 + 5 4 3 2 1 1 7 3 10 4 + 13 7 11 6 5 6 4 3 2 1 + 1 7 3 7 4 7 4 3 7 3 + 10 4 13 7 12 6 5 9 5 4 + 7 4 3 8 3 6 5 2 1 2 + 1 1 7 3 10 4 11 7 7 4 + 3 2 1 7 3 10 4 13 7 10 + 6 5 8 3 2 4 3 2 1 1 + 7 3 10 4 13 7 10 6 5 8 + 3 2 4 3 2 1 1 7 3 10 + 4 13 7 12 6 5 10 5 4 9 + 5 4 6 5 4 3 2 1 1 7 + 3 10 4 12 7 10 5 4 5 3 + 2 1 1 7 3 10 4 13 7 12 + 6 5 9 5 4 7 4 3 8 3 + 6 5 2 1 2 1 1 7 3 10 + 4 12 7 10 5 4 5 3 2 1 + 1 7 3 10 4 10 7 6 3 2 + 1 7 3 10 4 11 7 7 4 3 + 2 1 7 3 10 4 13 7 10 6 + 5 8 3 2 4 3 2 1 1 7 + 3 10 4 16 7 12 9 8 3 2 + 1 4 2 1 1 7 3 10 4 10 + 7 6 3 2 1 7 3 10 4 13 + 7 15 6 5 10 8 7 3 2 1 + 3 2 1 1 7 3 10 4 14 7 + 10 7 6 3 2 1 2 1 7 3 + 10 4 12 7 12 5 4 10 8 4 + 7 3 6 4 1 3 2 1 1 7 + 3 10 4 16 7 15 9 8 3 2 + 1 7 5 4 3 2 1 1 7 3 + 7 4 7 4 3 7 3 10 4 10 + 7 6 3 2 1 7 3 10 4 13 + 7 11 6 5 6 4 3 2 1 1 + 7 3 10 4 13 7 12 6 5 10 + 5 4 9 5 4 6 5 4 3 2 + 1 1 7 3 10 4 10 7 6 3 + 2 1 7 3 10 4 13 7 10 6 + 5 8 3 2 4 3 2 1 1 10 + 3 14 11 6 5 8 5 4 7 4 + 3 6 3 7 3 10 4 11 7 7 + 4 3 2 1 7 3 10 4 12 7 + 12 5 4 10 8 4 7 3 6 4 + 1 3 2 1 1 7 3 10 4 12 + 7 10 5 4 5 3 2 1 1 7 + 3 10 4 14 7 10 7 6 3 2 + 1 2 1 7 3 10 4 13 7 10 + 6 5 8 3 2 4 3 2 1 1 + 7 3 7 4 7 4 3 7 3 10 + 4 16 7 12 9 8 3 2 1 4 + 2 1 1 7 3 10 4 10 7 6 + 3 2 1 7 3 10 4 13 7 12 + 6 5 10 5 4 9 5 4 6 5 + 4 3 2 1 1 7 3 10 4 10 + 7 6 3 2 1 7 3 10 4 11 + 7 7 4 3 2 1 7 3 10 4 + 13 7 15 6 5 10 8 7 3 2 + 1 3 2 1 1 7 3 10 4 13 + 7 11 6 5 6 4 3 2 1 1 + 7 3 10 4 10 7 6 3 2 1 + 7 3 10 4 14 7 10 7 6 3 + 2 1 2 1 7 3 10 4 16 7 + 12 9 8 3 2 1 4 2 1 1 + 7 3 10 4 13 7 12 6 5 9 + 5 4 7 4 3 8 3 6 5 2 + 1 2 1 1 7 3 10 4 12 7 + 12 5 4 10 8 4 7 3 6 4 + 1 3 2 1 1 7 3 10 4 14 + 7 10 7 6 3 2 1 2 1 7 + 3 10 4 10 7 6 3 2 1 7 + 3 10 4 13 7 15 6 5 10 8 + 7 3 2 1 3 2 1 1 7 3 + 10 4 10 7 6 3 2 1 7 3 + 10 4 13 7 15 6 5 10 8 7 + 3 2 1 3 2 1 1 7 3 7 + 4 7 4 3 7 3 10 4 13 7 + 11 6 5 6 4 3 2 1 1 7 + 3 10 4 12 7 8 5 4 3 1 + 1 7 3 7 4 7 4 3 7 3 + 10 4 16 7 15 9 8 3 2 1 + 7 5 4 3 2 1 1 7 3 10 + 4 13 7 12 6 5 10 5 4 9 + 5 4 6 5 4 3 2 1 1 7 + 3 10 4 16 7 12 9 8 3 2 + 1 4 2 1 1 7 3 10 4 12 + 7 10 5 4 5 3 2 1 1 7 + 3 10 4 10 7 6 3 2 1 7 + 3 10 4 16 7 12 9 8 3 2 + 1 4 2 1 1 7 3 10 4 11 + 7 7 4 3 2 1 7 3 10 4 + 10 7 6 3 2 1 7 3 7 4 + 7 4 3 10 3 14 11 6 5 8 + 5 4 7 4 3 6 3 7 3 10 + 4 16 7 15 9 8 3 2 1 7 + 5 4 3 2 1 1 7 3 10 4 + 13 7 12 6 5 10 5 4 9 5 + 4 6 5 4 3 2 1 1 7 3 + 10 4 14 7 10 7 6 3 2 1 + 2 1 7 3 10 4 13 7 15 6 + 5 10 8 7 3 2 1 3 2 1 + 1 7 3 10 4 10 7 6 3 2 + 1 7 3 10 4 10 7 6 3 2 + 1 7 3 10 4 11 7 7 4 3 + 2 1 7 3 7 4 7 4 3 7 + 3 10 4 16 7 15 9 8 3 2 + 1 7 5 4 3 2 1 1 7 3 + 10 4 11 7 7 4 3 2 1 7 + 3 10 4 12 7 10 5 4 5 3 + 2 1 1 7 3 10 4 12 7 12 + 5 4 10 8 4 6 3 5 3 3 + 2 1 1 7 3 10 4 13 7 12 + 6 5 10 5 4 9 5 4 6 5 + 4 3 2 1 1 7 3 10 4 13 + 7 12 6 5 10 5 4 9 5 4 + 6 5 4 3 2 1 1 7 3 10 + 4 13 7 10 6 5 8 3 2 4 + 3 2 1 1 7 3 10 4 13 7 + 15 6 5 10 8 7 3 2 1 3 + 2 1 1 7 3 10 4 12 7 8 + 5 4 3 1 1 7 3 10 4 12 + 7 12 5 4 10 8 4 7 3 6 + 4 1 3 2 1 1 7 3 10 4 + 12 7 10 5 4 5 3 2 1 1 + 7 3 10 4 10 7 6 3 2 1 + 7 3 10 4 13 7 10 6 5 8 + 3 2 4 3 2 1 1 7 3 10 + 4 16 7 12 9 8 3 2 1 4 + 2 1 1 7 3 10 4 11 7 7 + 4 3 2 1 10 3 14 11 6 5 + 8 5 4 7 4 3 6 3 7 3 + 10 4 13 7 15 6 5 10 8 7 + 3 2 1 3 2 1 1 7 3 10 + 4 13 7 12 6 5 10 5 4 9 + 5 4 6 5 4 3 2 1 1 7 + 3 10 4 13 7 12 6 5 10 5 + 4 9 5 4 6 5 4 3 2 1 + 1 7 3 10 4 12 7 10 5 4 + 5 3 2 1 1 7 3 10 4 16 + 7 12 9 8 3 2 1 4 2 1 + 1 7 3 10 4 12 7 8 5 4 + 3 1 1 7 3 10 4 16 7 15 + 9 8 3 2 1 7 5 4 3 2 + 1 1 7 3 10 4 13 7 10 6 + 5 8 3 2 4 3 2 1 1 7 + 3 10 4 13 7 11 6 5 6 4 + 3 2 1 1 7 3 10 4 16 7 + 12 9 8 3 2 1 4 2 1 1 + 7 3 7 4 7 4 3 7 3 10 + 4 12 7 10 5 4 5 3 2 1 + 1 7 3 10 4 14 7 10 7 6 + 3 2 1 2 1 7 3 10 4 16 + 7 12 9 8 3 2 1 4 2 1 + 1 7 3 10 4 10 7 6 3 2 + 1 7 3 10 4 12 7 12 5 4 + 10 8 4 6 3 5 3 3 2 1 + 1 7 3 10 4 13 7 15 6 5 + 10 8 7 3 2 1 3 2 1 1 + 7 3 10 4 11 7 7 4 3 2 + 1 7 3 10 4 11 7 7 4 3 + 2 1 7 3 10 4 12 7 8 5 + 4 3 1 1 7 3 10 4 13 7 + 10 6 5 8 3 2 4 3 2 1 + 1 7 3 10 4 10 7 6 3 2 + 1 7 3 10 4 14 7 10 7 6 + 3 2 1 2 1 7 3 7 4 7 + 4 3 7 3 10 4 16 7 15 9 + 8 3 2 1 7 5 4 3 2 1 + 1 7 3 10 4 14 7 10 7 6 + 3 2 1 2 1 7 3 7 4 7 + 4 3 7 3 10 4 13 7 11 6 + 5 6 4 3 2 1 1 7 3 10 + 4 16 7 12 9 8 3 2 1 4 + 2 1 1 7 3 10 4 16 7 12 + 9 8 3 2 1 4 2 1 1 7 + 3 10 4 12 7 11 5 4 8 6 + 5 3 3 2 1 1 7 3 10 4 + 16 7 12 9 8 3 2 1 4 2 + 1 1 7 3 10 4 12 7 8 5 + 4 3 1 1 7 3 10 4 10 7 + 6 3 2 1 7 3 7 4 7 4 + 3 7 3 10 4 12 7 12 5 4 + 10 8 4 7 3 6 4 1 3 2 + 1 1 7 3 10 4 12 7 11 5 + 4 8 6 5 3 3 2 1 1 7 + 3 10 4 11 7 7 4 3 2 1 + 7 3 10 4 16 7 12 9 8 3 + 2 1 4 2 1 1 7 3 10 4 + 11 7 7 4 3 2 1 7 3 10 + 4 13 7 10 6 5 8 3 2 4 + 3 2 1 1 7 3 7 4 7 4 + 3 7 3 10 4 12 7 10 5 4 + 5 3 2 1 1 7 3 10 4 16 + 7 12 9 8 3 2 1 4 2 1 + 1 7 3 10 4 13 7 15 6 5 + 10 8 7 3 2 1 3 2 1 1 + 7 3 10 4 13 7 15 6 5 10 + 8 7 3 2 1 3 2 1 1 7 + 3 10 4 13 7 11 6 5 6 4 + 3 2 1 1 7 3 10 4 12 7 + 11 5 4 8 6 5 3 3 2 1 + 1 7 3 10 4 12 7 11 5 4 + 8 6 5 3 3 2 1 1 7 3 + 10 4 12 7 11 5 4 8 6 5 + 3 3 2 1 1 7 3 10 4 12 + 7 11 5 4 8 6 5 3 3 2 + 1 1 7 3 10 4 12 7 11 5 + 4 8 6 5 3 3 2 1 1 7 + 3 10 4 10 7 11 5 4 8 6 + 5 3 3 2 1 1 2 1 1 12 + 5 4 9 11 14 14 13 7 11 6 + 12 10 7 7 9 8 5 6 3 2 + 3 5 7 3 2 7 10 14 14 13 + 7 11 6 12 11 11 11 8 4 3 + 6 4 5 2 1 1 2 1 2 1 + 1 1 1 1 1 2 1 1 2 1 + 2 1 1 1 1 1 1 1 1 14 + 11 9 7 6 6 9 2 9 8 7 + 7 5 4 1 2 2 1 1 1 1 + 1 1 1 +%FLAG NONBONDED_PARM_INDEX +%FORMAT(10I8) + 1 2 4 7 11 16 22 29 37 46 + 56 67 79 92 106 121 137 154 2 3 + 5 8 12 17 23 30 38 47 57 68 + 80 93 107 122 138 155 4 5 6 9 + 13 18 24 31 39 48 58 69 81 94 + 108 123 139 156 7 8 9 10 14 19 + 25 32 40 49 59 70 82 95 109 124 + 140 157 11 12 13 14 15 20 26 33 + 41 50 60 71 83 96 110 125 141 158 + 16 17 18 19 20 21 27 34 42 51 + 61 72 84 97 111 126 142 159 22 23 + 24 25 26 27 28 35 43 52 62 73 + 85 98 112 127 143 160 29 30 31 32 + 33 34 35 36 44 53 63 74 86 99 + 113 128 144 161 37 38 39 40 41 42 + 43 44 45 54 64 75 87 100 114 129 + 145 162 46 47 48 49 50 51 52 53 + 54 55 65 76 88 101 115 130 146 163 + 56 57 58 59 60 61 62 63 64 65 + 66 77 89 102 116 131 147 164 67 68 + 69 70 71 72 73 74 75 76 77 78 + 90 103 117 132 148 165 79 80 81 82 + 83 84 85 86 87 88 89 90 91 104 + 118 133 149 166 92 93 94 95 96 97 + 98 99 100 101 102 103 104 105 119 134 + 150 167 106 107 108 109 110 111 112 113 + 114 115 116 117 118 119 120 135 151 168 + 121 122 123 124 125 126 127 128 129 130 + 131 132 133 134 135 136 152 169 137 138 + 139 140 141 142 143 144 145 146 147 148 + 149 150 151 152 153 170 154 155 156 157 + 158 159 160 161 162 163 164 165 166 167 + 168 169 170 171 +%FLAG RESIDUE_LABEL +%FORMAT(20a4) +MET GLY PHE LEU ALA GLY LYS LYS ILE LEU ILE THR GLY LEU LEU SER ASN LYS SER ILE +ALA TYR GLY ILE ALA LYS ALA MET HIE ARG GLU GLY ALA GLU LEU ALA PHE THR TYR VAL +GLY GLN PHE LYS ASP ARG VAL GLU LYS LEU CYS ALA GLU PHE ASN PRO ALA ALA VAL LEU +PRO CYS ASP VAL ILE SER ASP GLN GLU ILE LYS ASP LEU PHE VAL GLU LEU GLY LYS VAL +TRP ASP GLY LEU ASP ALA ILE VAL HIE SER ILE ALA PHE ALA PRO ARG ASP GLN LEU GLU +GLY ASN PHE ILE ASP CYS VAL THR ARG GLU GLY PHE SER ILE ALA HIE ASP ILE SER ALA +TYR SER PHE ALA ALA LEU ALA LYS GLU GLY ARG SER MET MET LYS ASN ARG ASN ALA SER +MET VAL ALA LEU THR TYR ILE GLY ALA GLU LYS ALA MET PRO SER TYR ASN THR MET GLY +VAL ALA LYS ALA SER LEU GLU ALA THR VAL ARG TYR THR ALA LEU ALA LEU GLY GLU ASP +GLY ILE LYS VAL ASN ALA VAL SER ALA GLY PRO ILE LYS THR LEU ALA ALA SER GLY ILE +SER ASN PHE LYS LYS MET LEU ASP TYR ASN ALA MET VAL SER PRO LEU LYS LYS ASN VAL +ASP ILE MET GLU VAL GLY ASN THR VAL ALA PHE LEU CYS SER ASP MET ALA THR GLY ILE +THR GLY GLU VAL VAL HIE VAL ASP ALA GLY TYR HIE CYS VAL SER MET GLY ASN VAL LEU +LEU GLU HIE HIE HIE HIE HIE HIE NDP TCS +%FLAG RESIDUE_POINTER +%FORMAT(10I8) + 1 20 27 47 66 76 83 105 127 146 + 165 184 198 205 224 243 254 268 290 301 + 320 330 351 358 377 387 409 419 436 453 + 477 492 499 509 524 543 553 573 587 608 + 624 631 648 668 690 702 726 742 757 779 + 798 809 819 834 854 868 882 892 902 918 + 937 951 962 974 990 1009 1020 1032 1049 1064 + 1083 1105 1117 1136 1156 1172 1187 1206 1213 1235 + 1251 1275 1287 1294 1313 1325 1335 1354 1370 1387 + 1398 1417 1427 1447 1457 1471 1495 1507 1524 1543 + 1558 1565 1579 1599 1618 1630 1641 1657 1671 1695 + 1710 1717 1737 1748 1767 1777 1794 1806 1825 1836 + 1846 1867 1878 1898 1908 1918 1937 1947 1969 1984 + 1991 2015 2026 2043 2060 2082 2096 2120 2134 2144 + 2155 2172 2188 2198 2217 2231 2252 2271 2278 2288 + 2303 2325 2335 2352 2366 2377 2398 2412 2426 2443 + 2450 2466 2476 2498 2508 2519 2538 2553 2563 2577 + 2593 2617 2638 2652 2662 2681 2691 2710 2717 2732 + 2744 2751 2770 2792 2808 2822 2832 2848 2859 2869 + 2876 2890 2909 2931 2945 2964 2974 2984 2995 3002 + 3021 3032 3046 3066 3088 3110 3127 3146 3158 3179 + 3193 3203 3220 3236 3247 3261 3280 3302 3324 3338 + 3354 3366 3385 3402 3417 3433 3440 3454 3468 3484 + 3494 3514 3533 3544 3555 3567 3584 3594 3608 3615 + 3634 3648 3655 3670 3686 3702 3719 3735 3747 3757 + 3764 3785 3802 3813 3829 3840 3857 3864 3878 3894 + 3913 3932 3947 3964 3981 3998 4015 4032 4050 4120 +%FLAG BOND_FORCE_CONSTANT +%FORMAT(5E16.8) + 5.70000000E+02 4.90000000E+02 2.27000000E+02 3.10000000E+02 3.17000000E+02 + 3.67000000E+02 3.37000000E+02 4.69000000E+02 3.17000000E+02 3.20000000E+02 + 4.50000000E+02 4.69000000E+02 4.27000000E+02 4.77000000E+02 4.88000000E+02 + 4.10000000E+02 5.18000000E+02 3.17000000E+02 4.81000000E+02 3.37000000E+02 + 6.56000000E+02 2.37000000E+02 4.69000000E+02 4.69000000E+02 4.47000000E+02 + 4.28000000E+02 5.46000000E+02 3.88000000E+02 3.17000000E+02 4.20000000E+02 + 4.50000000E+02 3.02000000E+02 8.60000000E+02 3.02000000E+02 4.20000000E+02 + 3.37000000E+02 3.20000000E+02 2.30000000E+02 5.25000000E+02 4.61000000E+02 + 5.02000000E+02 4.83000000E+02 5.20000000E+02 4.14000000E+02 5.29000000E+02 + 4.40000000E+02 4.36000000E+02 3.37000000E+02 4.78400000E+02 3.22800000E+02 + 3.72400000E+02 3.86100000E+02 3.40000000E+02 3.40000000E+02 3.40000000E+02 + 4.34000000E+02 4.34000000E+02 3.67000000E+02 5.53000000E+02 3.67000000E+02 + 4.34000000E+02 3.67000000E+02 4.34000000E+02 2.74000000E+02 3.50000000E+02 + 3.50000000E+02 3.50000000E+02 4.34000000E+02 3.40000000E+02 3.67000000E+02 + 3.67000000E+02 3.44300000E+02 3.69600000E+02 +%FLAG BOND_EQUIL_VALUE +%FORMAT(5E16.8) + 1.22900000E+00 1.33500000E+00 1.81000000E+00 1.52600000E+00 1.52200000E+00 + 1.47100000E+00 1.44900000E+00 1.40000000E+00 1.51000000E+00 1.41000000E+00 + 1.36400000E+00 1.40900000E+00 1.38100000E+00 1.34300000E+00 1.33500000E+00 + 1.39400000E+00 1.37100000E+00 1.50400000E+00 1.34000000E+00 1.46300000E+00 + 1.25000000E+00 1.81000000E+00 1.40400000E+00 1.40000000E+00 1.41900000E+00 + 1.38000000E+00 1.35200000E+00 1.45900000E+00 1.49500000E+00 1.35000000E+00 + 1.36000000E+00 1.48000000E+00 1.23000000E+00 1.48000000E+00 1.31500000E+00 + 1.47500000E+00 1.41000000E+00 1.61000000E+00 1.48000000E+00 1.35400000E+00 + 1.32400000E+00 1.33900000E+00 1.37000000E+00 1.39100000E+00 1.30400000E+00 + 1.37100000E+00 1.37400000E+00 1.47500000E+00 1.38700000E+00 1.72900000E+00 + 1.37300000E+00 1.36200000E+00 1.09000000E+00 1.09000000E+00 1.09000000E+00 + 1.01000000E+00 1.01000000E+00 1.08000000E+00 9.60000000E-01 1.08000000E+00 + 1.01000000E+00 1.08000000E+00 1.01000000E+00 1.33600000E+00 1.09000000E+00 + 1.09000000E+00 1.09000000E+00 1.01000000E+00 1.09000000E+00 1.08000000E+00 + 1.08000000E+00 1.08700000E+00 9.74000000E-01 +%FLAG ANGLE_FORCE_CONSTANT +%FORMAT(5E16.8) + 8.00000000E+01 5.00000000E+01 6.20000000E+01 6.30000000E+01 5.00000000E+01 + 4.00000000E+01 8.00000000E+01 7.00000000E+01 8.00000000E+01 8.00000000E+01 + 6.30000000E+01 6.30000000E+01 7.00000000E+01 6.30000000E+01 8.00000000E+01 + 5.00000000E+01 7.00000000E+01 6.30000000E+01 6.30000000E+01 7.00000000E+01 + 7.00000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 + 7.00000000E+01 6.30000000E+01 7.00000000E+01 5.00000000E+01 8.00000000E+01 + 8.00000000E+01 7.00000000E+01 5.00000000E+01 5.00000000E+01 6.30000000E+01 + 6.30000000E+01 6.30000000E+01 6.30000000E+01 7.00000000E+01 7.00000000E+01 + 6.30000000E+01 7.00000000E+01 7.00000000E+01 6.30000000E+01 6.30000000E+01 + 7.00000000E+01 7.00000000E+01 6.30000000E+01 4.00000000E+01 8.50000000E+01 + 4.00000000E+01 8.50000000E+01 8.50000000E+01 5.00000000E+01 3.00000000E+01 + 1.00000000E+01 1.20000000E+02 7.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 6.00000000E+01 1.00000000E+02 1.40000000E+02 1.00000000E+02 + 4.50000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 6.30000000E+01 + 7.00000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 + 7.00000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 7.00000000E+01 + 7.00000000E+01 7.00000000E+01 7.00000000E+01 5.00000000E+01 5.00000000E+01 + 1.00000000E+02 6.29200000E+01 6.71800000E+01 6.97900000E+01 6.98500000E+01 + 6.33100000E+01 5.00000000E+01 3.50000000E+01 5.00000000E+01 5.00000000E+01 + 3.50000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 3.50000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 3.50000000E+01 5.00000000E+01 5.50000000E+01 + 3.50000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 3.50000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 4.30000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 3.50000000E+01 3.00000000E+01 8.00000000E+01 + 8.00000000E+01 3.00000000E+01 3.50000000E+01 5.00000000E+01 8.00000000E+01 + 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 5.00000000E+01 + 5.00000000E+01 5.00000000E+01 4.84600000E+01 4.88500000E+01 +%FLAG ANGLE_EQUIL_VALUE +%FORMAT(5E16.8) + 2.14501057E+00 2.12755727E+00 1.72613137E+00 1.93906163E+00 2.00189351E+00 + 1.91113635E+00 2.10137732E+00 2.03505478E+00 1.94080696E+00 1.94080696E+00 + 1.92160833E+00 2.09439600E+00 2.09439600E+00 1.98967620E+00 1.91462701E+00 + 1.91113635E+00 2.09439600E+00 2.09439600E+00 2.09439600E+00 2.09439600E+00 + 2.09439600E+00 2.09439600E+00 2.04203610E+00 2.09439600E+00 2.09439600E+00 + 2.09439600E+00 1.97396823E+00 2.09439600E+00 2.15024656E+00 1.94080696E+00 + 2.19911580E+00 2.04203610E+00 1.89542838E+00 2.05948940E+00 2.09439600E+00 + 2.14151991E+00 2.09439600E+00 2.02807346E+00 2.31779824E+00 1.82212452E+00 + 1.85703112E+00 1.94778828E+00 1.89717371E+00 1.89891904E+00 2.35445017E+00 + 2.18166250E+00 2.24449438E+00 2.01760148E+00 2.05948940E+00 2.24274905E+00 + 1.92335366E+00 1.97222290E+00 2.06821605E+00 2.05948940E+00 2.09439600E+00 + 2.30034494E+00 2.12930260E+00 2.12406661E+00 1.91113635E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 1.88897066E+00 2.09265067E+00 2.10312265E+00 + 1.79070858E+00 1.93731630E+00 2.25322103E+00 2.08217869E+00 2.04727209E+00 + 2.06996138E+00 2.22878641E+00 2.04727209E+00 2.15548255E+00 1.92684432E+00 + 2.31081692E+00 1.83957782E+00 1.81165254E+00 1.98793087E+00 1.85354046E+00 + 2.20260646E+00 2.24798504E+00 2.19562514E+00 1.91113635E+00 1.91113635E+00 + 2.10312265E+00 2.08392402E+00 2.09387240E+00 2.08043336E+00 2.09334880E+00 + 2.09352334E+00 2.09439600E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 + 1.91113635E+00 1.91113635E+00 1.91113635E+00 2.06018753E+00 1.91113635E+00 + 2.09439600E+00 1.91113635E+00 1.91113635E+00 1.91113635E+00 1.89368305E+00 + 2.09439600E+00 1.91113635E+00 1.97222290E+00 2.09439600E+00 2.09439600E+00 + 2.09439600E+00 2.09439600E+00 2.09439600E+00 2.09439600E+00 2.09439600E+00 + 1.91113635E+00 2.09439600E+00 2.09439600E+00 1.91113635E+00 2.06647072E+00 + 1.91113635E+00 1.67551680E+00 2.09439600E+00 2.09439600E+00 2.14850123E+00 + 2.09439600E+00 1.91113635E+00 2.09439600E+00 2.12930260E+00 2.11184930E+00 + 2.10312265E+00 2.07694270E+00 2.09439600E+00 1.91113635E+00 2.05076275E+00 + 1.91113635E+00 1.91113635E+00 1.91113635E+00 2.01498349E+00 2.14762857E+00 + 1.91113635E+00 2.14762857E+00 2.09457053E+00 1.91061275E+00 +%FLAG DIHEDRAL_FORCE_CONSTANT +%FORMAT(5E16.8) + 2.50000000E+00 0.00000000E+00 2.70000000E-01 4.20000000E-01 0.00000000E+00 + 1.55555556E-01 0.00000000E+00 2.00000000E-01 2.00000000E-01 4.00000000E-01 + 3.33333333E-01 2.00000000E+00 2.00000000E+00 4.50000000E-01 1.58000000E+00 + 5.50000000E-01 3.62500000E+00 2.00000000E-01 2.50000000E-01 1.80000000E-01 + 2.40000000E+00 5.37500000E+00 2.32500000E+00 5.00000000E+00 1.50000000E+00 + 0.00000000E+00 3.00000000E+00 3.50000000E+00 6.52500000E+00 1.67500000E+00 + 1.52500000E+00 1.05000000E+01 1.10000000E+00 1.00000000E+00 6.20000000E-01 + 2.38000000E+00 4.00000000E+00 6.00000000E+00 3.50000000E-01 7.00000000E+00 + 1.17500000E+00 1.44000000E-01 1.00000000E-01 3.83000000E-01 3.83333333E-01 + 2.50000000E-01 1.20000000E+00 6.80000000E+00 4.80000000E+00 5.45000000E+00 + 4.15000000E+00 1.70000000E+00 1.65000000E+00 2.55000000E+00 1.00000000E+01 + 2.50000000E+00 6.50000000E-01 9.00000000E-01 8.00000000E-01 8.00000000E-02 + 1.60000000E-01 1.50000000E-01 2.50000000E-01 1.66666667E-01 2.30000000E+00 + 2.00000000E+00 +%FLAG DIHEDRAL_PERIODICITY +%FORMAT(5E16.8) + 2.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 4.00000000E+00 + 3.00000000E+00 2.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 + 3.00000000E+00 1.00000000E+00 2.00000000E+00 1.00000000E+00 2.00000000E+00 + 3.00000000E+00 2.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 3.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 1.00000000E+00 2.00000000E+00 + 2.00000000E+00 3.00000000E+00 2.00000000E+00 3.00000000E+00 3.00000000E+00 + 3.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 1.00000000E+00 2.00000000E+00 2.00000000E+00 1.00000000E+00 3.00000000E+00 + 3.00000000E+00 3.00000000E+00 1.00000000E+00 3.00000000E+00 2.00000000E+00 + 2.00000000E+00 +%FLAG DIHEDRAL_PHASE +%FORMAT(5E16.8) + 3.14159400E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 3.14159400E+00 3.14159400E+00 + 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 0.00000000E+00 + 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 + 0.00000000E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 + 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 0.00000000E+00 + 3.14159400E+00 3.14159400E+00 3.14159400E+00 0.00000000E+00 3.14159400E+00 + 0.00000000E+00 0.00000000E+00 3.14159400E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 + 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 3.14159400E+00 + 0.00000000E+00 0.00000000E+00 3.14159400E+00 0.00000000E+00 3.14159400E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 3.14159400E+00 + 3.14159400E+00 +%FLAG SCEE_SCALE_FACTOR +%FORMAT(5E16.8) + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 1.20000000E+00 + 1.20000000E+00 +%FLAG SCNB_SCALE_FACTOR +%FORMAT(5E16.8) + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00 + 2.00000000E+00 +%FLAG SOLTY +%FORMAT(5E16.8) + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 +%FLAG LENNARD_JONES_ACOEF +%FORMAT(5E16.8) + 9.44293233E+05 2.12601181E+03 1.39982777E-01 9.95480466E+05 2.56678134E+03 + 1.04308023E+06 2.01791425E+04 9.14716911E+00 2.27401052E+04 2.01823541E+02 + 8.96776989E+04 1.07193645E+02 9.71708117E+04 1.41077189E+03 7.51607703E+03 + 6.20665997E+04 5.94667300E+01 6.78771368E+04 8.79040886E+02 4.98586848E+03 + 3.25969625E+03 2.01562190E+06 5.97860700E+03 2.09861767E+06 4.93469320E+04 + 2.02461849E+05 1.42791446E+05 4.19430400E+06 8.82619071E+05 2.27577560E+03 + 9.24822269E+05 2.01619733E+04 8.61541883E+04 6.01816484E+04 1.86068943E+06 + 8.19971662E+05 6.06829342E+05 1.02595236E+03 6.47841731E+05 1.12780457E+04 + 5.44261042E+04 3.69471530E+04 1.32911052E+06 5.74393458E+05 3.79876399E+05 + 7.91627155E+04 8.90987508E+01 8.59947003E+04 1.21014911E+03 6.55825601E+03 + 4.33325458E+03 1.79647997E+05 7.62451550E+04 4.77908184E+04 5.71629601E+03 + 7.44975864E+05 1.40467023E+03 7.91544156E+05 1.45985502E+04 6.82786631E+04 + 4.66922514E+04 1.61587928E+06 7.01803794E+05 4.71003287E+05 6.00750218E+04 + 5.81803229E+05 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 5.46147253E+04 4.90239937E+01 + 5.98885646E+04 7.50063100E+02 4.33325458E+03 2.82099197E+03 1.26338489E+05 + 5.30987710E+04 3.23283631E+04 3.76169106E+03 4.09427581E+04 0.00000000E+00 + 2.43828624E+03 6.58473870E+04 6.63368273E+01 7.18621074E+04 9.55000044E+02 + 5.34045360E+03 3.50301067E+03 1.50848032E+05 6.37148277E+04 3.93690817E+04 + 4.64559155E+03 4.96707305E+04 0.00000000E+00 3.03448006E+03 3.76169105E+03 + 2.45746558E+06 8.41065839E+03 2.54188684E+06 6.46047669E+04 2.54238516E+05 + 1.81087383E+05 5.04534981E+06 2.25370349E+06 1.64263766E+06 2.26202023E+05 + 1.98683736E+06 0.00000000E+00 1.60682053E+05 1.90880272E+05 6.02589390E+06 + 5.89818288E+05 1.03954408E+03 6.28541239E+05 1.11851919E+04 5.33379252E+04 + 3.63097246E+04 1.28707992E+06 5.57281136E+05 3.70622491E+05 4.68711055E+04 + 4.58874091E+05 0.00000000E+00 3.17965283E+04 3.86654992E+04 1.58759528E+06 + 3.61397723E+05 4.24594555E+04 3.20009193E+01 4.68930885E+04 5.37190941E+02 + 3.25969625E+03 2.09814978E+03 9.96589436E+04 4.15766412E+04 2.47595516E+04 + 2.82099197E+03 3.15360051E+04 0.00000000E+00 1.80748014E+03 2.26273716E+03 + 1.27716552E+05 2.44050578E+04 1.32801250E+03 1.76079018E+06 4.83020817E+03 + 1.83982239E+06 4.14717456E+04 1.74057868E+05 1.22102013E+05 3.69078434E+06 + 1.63123475E+06 1.15256113E+06 1.54217681E+05 1.40513595E+06 0.00000000E+00 + 1.07864592E+05 1.29147101E+05 4.45680858E+06 1.11729277E+06 8.47352634E+04 + 3.24095688E+06 +%FLAG LENNARD_JONES_BCOEF +%FORMAT(5E16.8) + 8.01323529E+02 2.09604198E+01 9.37598976E-02 7.36907417E+02 2.06278363E+01 + 6.75612247E+02 6.45756063E+01 7.57919667E-01 6.13981767E+01 3.56012899E+00 + 1.36131731E+02 2.59456373E+00 1.26919150E+02 9.41257003E+00 2.17257828E+01 + 1.13252061E+02 1.93248820E+00 1.06076943E+02 7.42992380E+00 1.76949863E+01 + 1.43076527E+01 1.28923404E+03 3.87070358E+01 1.17824605E+03 1.11203892E+02 + 2.25248294E+02 1.89165096E+02 2.04800000E+03 6.53361429E+02 1.82891803E+01 + 5.99015525E+02 5.44372327E+01 1.12529845E+02 9.40505981E+01 1.04466382E+03 + 5.31102864E+02 6.77220874E+02 1.53505284E+01 6.26720080E+02 5.08951804E+01 + 1.11805549E+02 9.21192136E+01 1.10369829E+03 5.55666449E+02 5.64885984E+02 + 1.26451907E+02 2.33864085E+00 1.18043747E+02 8.61880723E+00 2.00642027E+01 + 1.63092814E+01 2.09772716E+02 1.04660679E+02 1.03580945E+02 1.85196588E+01 + 7.50714426E+02 1.79702257E+01 6.93079947E+02 5.79323582E+01 1.25287819E+02 + 1.03606917E+02 1.21753341E+03 6.14502845E+02 6.29300711E+02 1.16187983E+02 + 6.99746810E+02 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 1.05031585E+02 1.73473071E+00 + 9.85097219E+01 6.78541827E+00 1.63092814E+01 1.31591746E+01 1.75916126E+02 + 8.73413013E+01 8.51921330E+01 1.50233639E+01 9.59185914E+01 0.00000000E+00 + 1.20953369E+01 1.15327881E+02 2.01792524E+00 1.07908863E+02 7.65648470E+00 + 1.81057616E+01 1.46638650E+01 1.92224012E+02 9.56748257E+01 9.40124296E+01 + 1.66953734E+01 1.05648788E+02 0.00000000E+00 1.34932874E+01 1.50233639E+01 + 1.34630496E+03 4.34187588E+01 1.22636552E+03 1.20335756E+02 2.38716853E+02 + 2.01468199E+02 2.12431120E+03 1.08732781E+03 1.16041466E+03 2.22617116E+02 + 1.27682121E+03 0.00000000E+00 1.87626421E+02 2.04498832E+02 2.19561270E+03 + 6.33305958E+02 1.46567808E+01 5.85549272E+02 4.80771660E+01 1.04986921E+02 + 8.66220818E+01 1.03022002E+03 5.19163331E+02 5.29252520E+02 9.73010751E+01 + 5.89183300E+02 0.00000000E+00 8.01410251E+01 8.83744760E+01 1.08210555E+03 + 4.95732238E+02 9.36708259E+01 1.41762397E+00 8.81685417E+01 5.80823477E+00 + 1.43076527E+01 1.14788417E+01 1.58033097E+02 7.81725399E+01 7.54103785E+01 + 1.31591746E+01 8.51470648E+01 0.00000000E+00 1.05333009E+01 1.17854122E+01 + 1.69194406E+02 7.10161395E+01 9.13231543E+00 1.22266505E+03 3.53019992E+01 + 1.11939598E+03 1.03440958E+02 2.11915736E+02 1.77491594E+02 1.94933195E+03 + 9.92485818E+02 1.04286543E+03 1.97211104E+02 1.15202544E+03 0.00000000E+00 + 1.64931547E+02 1.80470661E+02 2.02586711E+03 9.73951183E+02 1.47859240E+02 + 1.85348706E+03 +%FLAG BONDS_INC_HYDROGEN +%FORMAT(10I8) + 39 42 53 39 45 53 39 48 53 27 + 30 53 27 33 53 18 21 54 18 24 + 54 12 15 55 0 3 56 0 6 56 + 0 9 56 63 66 53 63 69 53 57 + 60 57 126 129 58 120 123 58 114 117 + 58 108 111 58 102 105 58 90 93 54 + 90 96 54 84 87 53 78 81 57 177 + 180 54 177 183 54 177 186 54 165 168 + 54 165 171 54 165 174 54 159 162 54 + 150 153 54 150 156 54 144 147 53 138 + 141 57 207 210 54 207 213 54 207 216 + 54 201 204 53 195 198 57 231 234 53 + 231 237 53 225 228 57 294 297 56 294 + 300 56 294 303 56 285 288 55 285 291 + 55 276 279 54 276 282 54 267 270 54 + 267 273 54 258 261 54 258 264 54 252 + 255 53 246 249 57 360 363 56 360 366 + 56 360 369 56 351 354 55 351 357 55 + 342 345 54 342 348 54 333 336 54 333 + 339 54 324 327 54 324 330 54 318 321 + 53 312 315 57 417 420 54 417 423 54 + 417 426 54 408 411 54 408 414 54 396 + 399 54 396 402 54 396 405 54 390 393 + 54 384 387 53 378 381 57 474 477 54 + 474 480 54 474 483 54 462 465 54 462 + 468 54 462 471 54 456 459 54 447 450 + 54 447 453 54 441 444 53 435 438 57 + 531 534 54 531 537 54 531 540 54 522 + 525 54 522 528 54 510 513 54 510 516 + 54 510 519 54 504 507 54 498 501 53 + 492 495 57 579 582 59 567 570 54 567 + 573 54 567 576 54 561 564 53 555 558 + 53 549 552 57 597 600 53 597 603 53 + 591 594 57 651 654 54 651 657 54 651 + 660 54 639 642 54 639 645 54 639 648 + 54 633 636 54 624 627 54 624 630 54 + 618 621 53 612 615 57 708 711 54 708 + 714 54 708 717 54 696 699 54 696 702 + 54 696 705 54 690 693 54 681 684 54 + 681 687 54 675 678 53 669 672 57 747 + 750 59 738 741 53 738 744 53 732 735 + 53 726 729 57 786 789 57 786 792 57 + 771 774 54 771 777 54 765 768 53 759 + 762 57 849 852 56 849 855 56 849 858 + 56 840 843 55 840 846 55 831 834 54 + 831 837 54 822 825 54 822 828 54 813 + 816 54 813 819 54 807 810 53 801 804 + 57 888 891 59 879 882 53 879 885 53 + 873 876 53 867 870 57 939 942 54 939 + 945 54 939 948 54 930 933 54 930 936 + 54 918 921 54 918 924 54 918 927 54 + 912 915 54 906 909 53 900 903 57 969 + 972 54 969 975 54 969 978 54 963 966 + 53 957 960 57 1038 1041 58 1032 1035 58 + 1026 1029 59 1017 1020 58 1011 1014 58 999 + 1002 54 999 1005 54 993 996 53 987 990 + 57 1056 1059 53 1056 1062 53 1050 1053 57 + 1110 1113 54 1110 1116 54 1110 1119 54 1101 + 1104 54 1101 1107 54 1089 1092 54 1089 1095 + 54 1089 1098 54 1083 1086 54 1077 1080 53 + 1071 1074 57 1140 1143 54 1140 1146 54 1140 + 1149 54 1134 1137 53 1128 1131 57 1206 1209 + 56 1206 1212 56 1206 1215 56 1197 1200 55 + 1197 1203 55 1188 1191 54 1188 1194 54 1179 + 1182 54 1179 1185 54 1170 1173 54 1170 1176 + 54 1164 1167 53 1158 1161 57 1236 1239 54 + 1236 1242 54 1236 1245 54 1230 1233 53 1224 + 1227 57 1287 1290 53 1287 1293 53 1287 1296 + 53 1275 1278 53 1275 1281 53 1266 1269 54 + 1266 1272 54 1260 1263 53 1254 1257 57 1344 + 1347 60 1338 1341 61 1332 1335 62 1317 1320 + 54 1317 1323 54 1311 1314 53 1305 1308 57 + 1413 1416 63 1413 1419 63 1404 1407 63 1404 + 1410 63 1395 1398 63 1386 1389 53 1386 1392 + 53 1377 1380 54 1377 1383 54 1368 1371 54 + 1368 1374 54 1362 1365 53 1356 1359 57 1449 + 1452 54 1449 1455 54 1440 1443 54 1440 1446 + 54 1434 1437 53 1428 1431 57 1479 1482 53 + 1479 1485 53 1473 1476 57 1506 1509 54 1506 + 1512 54 1506 1515 54 1500 1503 53 1494 1497 + 57 1545 1548 54 1545 1551 54 1536 1539 54 + 1536 1542 54 1530 1533 53 1524 1527 57 1608 + 1611 54 1608 1614 54 1608 1617 54 1596 1599 + 54 1596 1602 54 1596 1605 54 1590 1593 54 + 1581 1584 54 1581 1587 54 1575 1578 53 1569 + 1572 57 1638 1641 54 1638 1644 54 1638 1647 + 54 1632 1635 53 1626 1629 57 1704 1707 58 + 1698 1701 58 1692 1695 58 1686 1689 58 1680 + 1683 58 1668 1671 54 1668 1674 54 1662 1665 + 53 1656 1659 57 1746 1749 59 1734 1737 54 + 1734 1740 54 1734 1743 54 1728 1731 53 1722 + 1725 53 1716 1719 57 1809 1812 58 1803 1806 + 58 1797 1800 59 1788 1791 58 1782 1785 58 + 1770 1773 54 1770 1776 54 1764 1767 53 1758 + 1761 57 1851 1854 54 1851 1857 54 1851 1860 + 54 1839 1842 54 1839 1845 54 1839 1848 54 + 1833 1836 54 1827 1830 53 1821 1824 57 1875 + 1878 53 1875 1881 53 1869 1872 57 1926 1929 + 57 1926 1932 57 1911 1914 54 1911 1917 54 + 1902 1905 54 1902 1908 54 1896 1899 53 1890 + 1893 57 1989 1992 58 1983 1986 58 1977 1980 + 58 1971 1974 58 1965 1968 58 1953 1956 54 + 1953 1959 54 1947 1950 53 1941 1944 57 2049 + 2052 56 2049 2055 56 2049 2058 56 2040 2043 + 55 2040 2046 55 2031 2034 54 2031 2037 54 + 2022 2025 54 2022 2028 54 2013 2016 54 2013 + 2019 54 2007 2010 53 2001 2004 57 2079 2082 + 54 2079 2085 54 2073 2076 53 2067 2070 57 + 2160 2163 63 2160 2166 63 2151 2154 63 2151 + 2157 63 2142 2145 63 2133 2136 53 2133 2139 + 53 2124 2127 54 2124 2130 54 2115 2118 54 + 2115 2121 54 2109 2112 53 2103 2106 57 2205 + 2208 54 2205 2211 54 2205 2214 54 2193 2196 + 54 2193 2199 54 2193 2202 54 2187 2190 54 + 2181 2184 53 2175 2178 57 2244 2247 54 2244 + 2250 54 2235 2238 54 2235 2241 54 2229 2232 + 53 2223 2226 57 2316 2319 56 2316 2322 56 + 2316 2325 56 2307 2310 55 2307 2313 55 2298 + 2301 54 2298 2304 54 2289 2292 54 2289 2295 + 54 2280 2283 54 2280 2286 54 2274 2277 53 + 2268 2271 57 2373 2376 54 2373 2379 54 2373 + 2382 54 2361 2364 54 2361 2367 54 2361 2370 + 54 2355 2358 54 2346 2349 54 2346 2352 54 + 2340 2343 53 2334 2337 57 2412 2415 64 2403 + 2406 53 2403 2409 53 2397 2400 53 2391 2394 + 57 2436 2439 54 2436 2442 54 2436 2445 54 + 2430 2433 53 2424 2427 57 2475 2478 54 2475 + 2481 54 2466 2469 54 2466 2472 54 2460 2463 + 53 2454 2457 57 2547 2550 58 2541 2544 58 + 2535 2538 58 2529 2532 58 2523 2526 58 2511 + 2514 54 2511 2517 54 2505 2508 53 2499 2502 + 57 2586 2589 57 2586 2592 57 2571 2574 54 + 2571 2577 54 2565 2568 53 2559 2562 57 2631 + 2634 53 2622 2625 54 2622 2628 54 2613 2616 + 54 2613 2619 54 2604 2607 53 2604 2610 53 + 2655 2658 54 2655 2661 54 2655 2664 54 2649 + 2652 53 2643 2646 57 2685 2688 54 2685 2691 + 54 2685 2694 54 2679 2682 53 2673 2676 57 + 2733 2736 54 2733 2739 54 2733 2742 54 2721 + 2724 54 2721 2727 54 2721 2730 54 2715 2718 + 54 2709 2712 53 2703 2706 57 2790 2793 54 + 2790 2796 54 2790 2799 54 2778 2781 54 2778 + 2784 54 2778 2787 54 2772 2775 54 2763 2766 + 54 2763 2769 54 2757 2760 53 2751 2754 57 + 2838 2841 53 2829 2832 54 2829 2835 54 2820 + 2823 54 2820 2826 54 2811 2814 53 2811 2817 + 53 2871 2874 64 2862 2865 53 2862 2868 53 + 2856 2859 53 2850 2853 57 2895 2898 54 2895 + 2901 54 2889 2892 53 2883 2886 57 2949 2952 + 54 2949 2955 54 2949 2958 54 2937 2940 54 + 2937 2943 54 2937 2946 54 2931 2934 54 2925 + 2928 53 2919 2922 57 3006 3009 54 3006 3012 + 54 3006 3015 54 2997 3000 54 2997 3003 54 + 2985 2988 54 2985 2991 54 2985 2994 54 2979 + 2982 54 2973 2976 53 2967 2970 57 3045 3048 + 59 3036 3039 53 3036 3042 53 3030 3033 53 + 3024 3027 57 3069 3072 54 3069 3075 54 3063 + 3066 53 3057 3060 57 3129 3132 57 3129 3135 + 57 3114 3117 54 3114 3120 54 3105 3108 54 + 3105 3111 54 3099 3102 53 3093 3096 57 3165 + 3168 54 3165 3171 54 3156 3159 54 3156 3162 + 54 3150 3153 53 3144 3147 57 3228 3231 54 + 3228 3234 54 3228 3237 54 3219 3222 54 3219 + 3225 54 3207 3210 54 3207 3213 54 3207 3216 + 54 3201 3204 54 3195 3198 53 3189 3192 57 + 3294 3297 56 3294 3300 56 3294 3303 56 3285 + 3288 55 3285 3291 55 3276 3279 54 3276 3282 + 54 3267 3270 54 3267 3273 54 3258 3261 54 + 3258 3264 54 3252 3255 53 3246 3249 57 3324 + 3327 54 3324 3330 54 3318 3321 53 3312 3315 + 57 3387 3390 54 3387 3393 54 3387 3396 54 + 3375 3378 54 3375 3381 54 3375 3384 54 3369 + 3372 54 3360 3363 54 3360 3366 54 3354 3357 + 53 3348 3351 57 3453 3456 58 3447 3450 58 + 3441 3444 58 3435 3438 58 3429 3432 58 3417 + 3420 54 3417 3423 54 3411 3414 53 3405 3408 + 57 3495 3498 54 3495 3501 54 3495 3504 54 + 3483 3486 54 3483 3489 54 3483 3492 54 3477 + 3480 54 3471 3474 53 3465 3468 57 3534 3537 + 54 3534 3540 54 3525 3528 54 3525 3531 54 + 3519 3522 53 3513 3516 57 3597 3600 54 3597 + 3603 54 3597 3606 54 3585 3588 54 3585 3591 + 54 3585 3594 54 3579 3582 54 3570 3573 54 + 3570 3576 54 3564 3567 53 3558 3561 57 3621 + 3624 53 3621 3627 53 3615 3618 57 3684 3687 + 56 3684 3690 56 3684 3693 56 3675 3678 55 + 3675 3681 55 3666 3669 54 3666 3672 54 3657 + 3660 54 3657 3663 54 3648 3651 54 3648 3654 + 54 3642 3645 53 3636 3639 57 3732 3735 54 + 3732 3738 54 3732 3741 54 3720 3723 54 3720 + 3726 54 3720 3729 54 3714 3717 54 3708 3711 + 53 3702 3705 57 3807 3810 58 3801 3804 58 + 3795 3798 58 3789 3792 58 3780 3783 61 3774 + 3777 60 3762 3765 54 3762 3768 54 3756 3759 + 53 3750 3753 57 3834 3837 54 3834 3840 54 + 3828 3831 53 3822 3825 57 3864 3867 53 3864 + 3870 53 3858 3861 57 3918 3921 54 3918 3924 + 54 3918 3927 54 3906 3909 54 3906 3912 54 + 3906 3915 54 3900 3903 54 3891 3894 54 3891 + 3897 54 3885 3888 53 3879 3882 57 3948 3951 + 54 3948 3954 54 3942 3945 53 3936 3939 57 + 3984 3987 54 3984 3990 54 3984 3993 54 3978 + 3981 53 3972 3975 57 4041 4044 54 4041 4047 + 54 4041 4050 54 4032 4035 54 4032 4038 54 + 4020 4023 54 4020 4026 54 4020 4029 54 4014 + 4017 54 4008 4011 53 4002 4005 57 4089 4092 + 54 4089 4095 54 4089 4098 54 4077 4080 54 + 4077 4083 54 4077 4086 54 4071 4074 54 4065 + 4068 53 4059 4062 57 4146 4149 60 4140 4143 + 61 4134 4137 62 4119 4122 54 4119 4125 54 + 4113 4116 53 4107 4110 57 4179 4182 59 4170 + 4173 53 4170 4176 53 4164 4167 53 4158 4161 + 57 4230 4233 54 4230 4236 54 4230 4239 54 + 4221 4224 54 4221 4227 54 4209 4212 54 4209 + 4215 54 4209 4218 54 4203 4206 54 4197 4200 + 53 4191 4194 57 4260 4263 54 4260 4266 54 + 4260 4269 54 4254 4257 53 4248 4251 57 4326 + 4329 58 4320 4323 58 4314 4317 58 4308 4311 + 58 4302 4305 58 4290 4293 54 4290 4296 54 + 4284 4287 53 4278 4281 57 4350 4353 54 4350 + 4356 54 4350 4359 54 4344 4347 53 4338 4341 + 57 4398 4401 53 4389 4392 54 4389 4395 54 + 4380 4383 54 4380 4386 54 4371 4374 53 4371 + 4377 53 4467 4470 63 4467 4473 63 4458 4461 + 63 4458 4464 63 4449 4452 63 4440 4443 53 + 4440 4446 53 4431 4434 54 4431 4437 54 4422 + 4425 54 4422 4428 54 4416 4419 53 4410 4413 + 57 4494 4497 54 4494 4500 54 4488 4491 53 + 4482 4485 57 4554 4557 57 4554 4560 57 4539 + 4542 54 4539 4545 54 4530 4533 54 4530 4536 + 54 4524 4527 53 4518 4521 57 4608 4611 54 + 4608 4614 54 4608 4617 54 4596 4599 54 4596 + 4602 54 4596 4605 54 4590 4593 54 4581 4584 + 54 4581 4587 54 4575 4578 53 4569 4572 57 + 4647 4650 54 4647 4653 54 4638 4641 54 4638 + 4644 54 4632 4635 53 4626 4629 57 4677 4680 + 53 4677 4683 53 4671 4674 57 4719 4722 57 + 4719 4725 57 4704 4707 54 4704 4710 54 4698 + 4701 53 4692 4695 57 4782 4785 58 4776 4779 + 58 4770 4773 58 4764 4767 58 4758 4761 58 + 4746 4749 54 4746 4752 54 4740 4743 53 4734 + 4737 57 4833 4836 54 4833 4839 54 4833 4842 + 54 4824 4827 54 4824 4830 54 4812 4815 54 + 4812 4818 54 4812 4821 54 4806 4809 54 4800 + 4803 53 4794 4797 57 4863 4866 54 4863 4869 + 54 4857 4860 53 4851 4854 57 4908 4911 64 + 4899 4902 53 4899 4905 53 4893 4896 53 4887 + 4890 57 4950 4953 54 4950 4956 54 4950 4959 + 54 4938 4941 54 4938 4944 54 4938 4947 54 + 4932 4935 54 4926 4929 53 4920 4923 57 4998 + 5001 59 4986 4989 54 4986 4992 54 4986 4995 + 54 4980 4983 53 4974 4977 53 4968 4971 57 + 5067 5070 63 5067 5073 63 5058 5061 63 5058 + 5064 63 5049 5052 63 5040 5043 53 5040 5046 + 53 5031 5034 54 5031 5037 54 5022 5025 54 + 5022 5028 54 5016 5019 53 5010 5013 57 5103 + 5106 54 5103 5109 54 5094 5097 54 5094 5100 + 54 5088 5091 53 5082 5085 57 5133 5136 53 + 5133 5139 53 5127 5130 57 5196 5199 58 5190 + 5193 58 5184 5187 58 5178 5181 58 5172 5175 + 58 5160 5163 54 5160 5166 54 5154 5157 53 + 5148 5151 57 5229 5232 59 5220 5223 53 5220 + 5226 53 5214 5217 53 5208 5211 57 5280 5283 + 54 5280 5286 54 5280 5289 54 5271 5274 54 + 5271 5277 54 5259 5262 54 5259 5265 54 5259 + 5268 54 5253 5256 54 5247 5250 53 5241 5244 + 57 5310 5313 54 5310 5316 54 5310 5319 54 + 5304 5307 53 5298 5301 57 5367 5370 60 5361 + 5364 61 5355 5358 62 5340 5343 54 5340 5346 + 54 5334 5337 53 5328 5331 57 5391 5394 54 + 5391 5397 54 5385 5388 53 5379 5382 57 5454 + 5457 54 5454 5460 54 5454 5463 54 5445 5448 + 54 5445 5451 54 5433 5436 54 5433 5439 54 + 5433 5442 54 5427 5430 54 5421 5424 53 5415 + 5418 57 5493 5496 59 5484 5487 53 5484 5490 + 53 5478 5481 53 5472 5475 57 5517 5520 54 + 5517 5523 54 5517 5526 54 5511 5514 53 5505 + 5508 57 5586 5589 58 5580 5583 58 5574 5577 + 59 5565 5568 58 5559 5562 58 5547 5550 54 + 5547 5553 54 5541 5544 53 5535 5538 57 5619 + 5622 59 5610 5613 53 5610 5616 53 5604 5607 + 53 5598 5601 57 5679 5682 58 5673 5676 58 + 5667 5670 58 5661 5664 58 5655 5658 58 5643 + 5646 54 5643 5649 54 5637 5640 53 5631 5634 + 57 5703 5706 54 5703 5709 54 5703 5712 54 + 5697 5700 53 5691 5694 57 5733 5736 54 5733 + 5739 54 5733 5742 54 5727 5730 53 5721 5724 + 57 5790 5793 54 5790 5796 54 5790 5799 54 + 5778 5781 54 5778 5784 54 5778 5787 54 5772 + 5775 54 5763 5766 54 5763 5769 54 5757 5760 + 53 5751 5754 57 5820 5823 54 5820 5826 54 + 5820 5829 54 5814 5817 53 5808 5811 57 5886 + 5889 56 5886 5892 56 5886 5895 56 5877 5880 + 55 5877 5883 55 5868 5871 54 5868 5874 54 + 5859 5862 54 5859 5865 54 5850 5853 54 5850 + 5856 54 5844 5847 53 5838 5841 57 5925 5928 + 54 5925 5931 54 5916 5919 54 5916 5922 54 + 5910 5913 53 5904 5907 57 5955 5958 53 5955 + 5961 53 5949 5952 57 6027 6030 63 6027 6033 + 63 6018 6021 63 6018 6024 63 6009 6012 63 + 6000 6003 53 6000 6006 53 5991 5994 54 5991 + 5997 54 5982 5985 54 5982 5988 54 5976 5979 + 53 5970 5973 57 6063 6066 59 6054 6057 53 + 6054 6060 53 6048 6051 53 6042 6045 57 6108 + 6111 53 6108 6114 53 6108 6117 53 6096 6099 + 53 6096 6102 53 6087 6090 54 6087 6093 54 + 6081 6084 53 6075 6078 57 6159 6162 53 6159 + 6165 53 6159 6168 53 6147 6150 53 6147 6153 + 53 6138 6141 54 6138 6144 54 6132 6135 53 + 6126 6129 57 6225 6228 56 6225 6231 56 6225 + 6234 56 6216 6219 55 6216 6222 55 6207 6210 + 54 6207 6213 54 6198 6201 54 6198 6204 54 + 6189 6192 54 6189 6195 54 6183 6186 53 6177 + 6180 57 6270 6273 57 6270 6276 57 6255 6258 + 54 6255 6261 54 6249 6252 53 6243 6246 57 + 6342 6345 63 6342 6348 63 6333 6336 63 6333 + 6339 63 6324 6327 63 6315 6318 53 6315 6321 + 53 6306 6309 54 6306 6312 54 6297 6300 54 + 6297 6303 54 6291 6294 53 6285 6288 57 6384 + 6387 57 6384 6390 57 6369 6372 54 6369 6375 + 54 6363 6366 53 6357 6360 57 6411 6414 54 + 6411 6417 54 6411 6420 54 6405 6408 53 6399 + 6402 57 6450 6453 59 6441 6444 53 6441 6447 + 53 6435 6438 53 6429 6432 57 6495 6498 53 + 6495 6501 53 6495 6504 53 6483 6486 53 6483 + 6489 53 6474 6477 54 6474 6480 54 6468 6471 + 53 6462 6465 57 6543 6546 54 6543 6549 54 + 6543 6552 54 6531 6534 54 6531 6537 54 6531 + 6540 54 6525 6528 54 6519 6522 53 6513 6516 + 57 6573 6576 54 6573 6579 54 6573 6582 54 + 6567 6570 53 6561 6564 57 6630 6633 54 6630 + 6636 54 6630 6639 54 6618 6621 54 6618 6624 + 54 6618 6627 54 6612 6615 54 6603 6606 54 + 6603 6609 54 6597 6600 53 6591 6594 57 6678 + 6681 59 6666 6669 54 6666 6672 54 6666 6675 + 54 6660 6663 53 6654 6657 53 6648 6651 57 + 6741 6744 58 6735 6738 58 6729 6732 59 6720 + 6723 58 6714 6717 58 6702 6705 54 6702 6708 + 54 6696 6699 53 6690 6693 57 6792 6795 54 + 6792 6798 54 6792 6801 54 6783 6786 54 6783 + 6789 54 6771 6774 54 6771 6777 54 6771 6780 + 54 6765 6768 54 6759 6762 53 6753 6756 57 + 6816 6819 53 6816 6822 53 6810 6813 57 6843 + 6846 54 6843 6849 54 6843 6852 54 6837 6840 + 53 6831 6834 57 6882 6885 54 6882 6888 54 + 6873 6876 54 6873 6879 54 6867 6870 53 6861 + 6864 57 6954 6957 56 6954 6960 56 6954 6963 + 56 6945 6948 55 6945 6951 55 6936 6939 54 + 6936 6942 54 6927 6930 54 6927 6933 54 6918 + 6921 54 6918 6924 54 6912 6915 53 6906 6909 + 57 6984 6987 54 6984 6990 54 6984 6993 54 + 6978 6981 53 6972 6975 57 7035 7038 53 7035 + 7041 53 7035 7044 53 7023 7026 53 7023 7029 + 53 7014 7017 54 7014 7020 54 7008 7011 53 + 7002 7005 57 7083 7086 53 7074 7077 54 7074 + 7080 54 7065 7068 54 7065 7071 54 7056 7059 + 53 7056 7062 53 7116 7119 59 7107 7110 53 + 7107 7113 53 7101 7104 53 7095 7098 57 7179 + 7182 58 7173 7176 58 7167 7170 59 7158 7161 + 58 7152 7155 58 7140 7143 54 7140 7146 54 + 7134 7137 53 7128 7131 57 7218 7221 57 7218 + 7224 57 7203 7206 54 7203 7209 54 7197 7200 + 53 7191 7194 57 7263 7266 59 7251 7254 54 + 7251 7257 54 7251 7260 54 7245 7248 53 7239 + 7242 53 7233 7236 57 7308 7311 53 7308 7314 + 53 7308 7317 53 7296 7299 53 7296 7302 53 + 7287 7290 54 7287 7293 54 7281 7284 53 7275 + 7278 57 7332 7335 53 7332 7338 53 7326 7329 + 57 7377 7380 54 7377 7383 54 7377 7386 54 + 7365 7368 54 7365 7371 54 7365 7374 54 7359 + 7362 54 7353 7356 53 7347 7350 57 7407 7410 + 54 7407 7413 54 7407 7416 54 7401 7404 53 + 7395 7398 57 7473 7476 56 7473 7479 56 7473 + 7482 56 7464 7467 55 7464 7470 55 7455 7458 + 54 7455 7461 54 7446 7449 54 7446 7452 54 + 7437 7440 54 7437 7443 54 7431 7434 53 7425 + 7428 57 7503 7506 54 7503 7509 54 7503 7512 + 54 7497 7500 53 7491 7494 57 7542 7545 59 + 7533 7536 53 7533 7539 53 7527 7530 53 7521 + 7524 57 7593 7596 54 7593 7599 54 7593 7602 + 54 7581 7584 54 7581 7587 54 7581 7590 54 + 7575 7578 54 7566 7569 54 7566 7572 54 7560 + 7563 53 7554 7557 57 7632 7635 54 7632 7638 + 54 7623 7626 54 7623 7629 54 7617 7620 53 + 7611 7614 57 7668 7671 54 7668 7674 54 7668 + 7677 54 7662 7665 53 7656 7659 57 7716 7719 + 59 7704 7707 54 7704 7710 54 7704 7713 54 + 7698 7701 53 7692 7695 53 7686 7689 57 7758 + 7761 54 7758 7764 54 7758 7767 54 7746 7749 + 54 7746 7752 54 7746 7755 54 7740 7743 54 + 7734 7737 53 7728 7731 57 7833 7836 63 7833 + 7839 63 7824 7827 63 7824 7830 63 7815 7818 + 63 7806 7809 53 7806 7812 53 7797 7800 54 + 7797 7803 54 7788 7791 54 7788 7794 54 7782 + 7785 53 7776 7779 57 7899 7902 58 7893 7896 + 58 7887 7890 59 7878 7881 58 7872 7875 58 + 7860 7863 54 7860 7866 54 7854 7857 53 7848 + 7851 57 7941 7944 59 7929 7932 54 7929 7935 + 54 7929 7938 54 7923 7926 53 7917 7920 53 + 7911 7914 57 7965 7968 54 7965 7971 54 7965 + 7974 54 7959 7962 53 7953 7956 57 8022 8025 + 54 8022 8028 54 8022 8031 54 8010 8013 54 + 8010 8016 54 8010 8019 54 8004 8007 54 7995 + 7998 54 7995 8001 54 7989 7992 53 7983 7986 + 57 8052 8055 54 8052 8058 54 8052 8061 54 + 8046 8049 53 8040 8043 57 8109 8112 54 8109 + 8115 54 8109 8118 54 8097 8100 54 8097 8103 + 54 8097 8106 54 8091 8094 54 8082 8085 54 + 8082 8088 54 8076 8079 53 8070 8073 57 8133 + 8136 53 8133 8139 53 8127 8130 57 8169 8172 + 54 8169 8175 54 8160 8163 54 8160 8166 54 + 8154 8157 53 8148 8151 57 8205 8208 54 8205 + 8211 54 8199 8202 53 8193 8196 57 8235 8238 + 53 8235 8241 53 8229 8232 57 8289 8292 54 + 8289 8295 54 8289 8298 54 8280 8283 54 8280 + 8286 54 8268 8271 54 8268 8274 54 8268 8277 + 54 8262 8265 54 8256 8259 53 8250 8253 57 + 8355 8358 56 8355 8361 56 8355 8364 56 8346 + 8349 55 8346 8352 55 8337 8340 54 8337 8343 + 54 8328 8331 54 8328 8334 54 8319 8322 54 + 8319 8325 54 8313 8316 53 8307 8310 57 8403 + 8406 54 8403 8409 54 8403 8412 54 8391 8394 + 54 8391 8397 54 8391 8400 54 8385 8388 54 + 8379 8382 53 8373 8376 57 8448 8451 57 8448 + 8454 57 8433 8436 54 8433 8439 54 8427 8430 + 53 8421 8424 57 8475 8478 54 8475 8481 54 + 8475 8484 54 8469 8472 53 8463 8466 57 8523 + 8526 54 8523 8529 54 8523 8532 54 8511 8514 + 54 8511 8517 54 8511 8520 54 8505 8508 54 + 8499 8502 53 8493 8496 57 8562 8565 59 8553 + 8556 53 8553 8559 53 8547 8550 53 8541 8544 + 57 8586 8589 54 8586 8592 54 8586 8595 54 + 8580 8583 53 8574 8577 57 8610 8613 53 8610 + 8616 53 8604 8607 57 8655 8658 53 8646 8649 + 54 8646 8652 54 8637 8640 54 8637 8643 54 + 8628 8631 53 8628 8634 53 8706 8709 54 8706 + 8712 54 8706 8715 54 8697 8700 54 8697 8703 + 54 8685 8688 54 8685 8691 54 8685 8694 54 + 8679 8682 54 8673 8676 53 8667 8670 57 8772 + 8775 56 8772 8778 56 8772 8781 56 8763 8766 + 55 8763 8769 55 8754 8757 54 8754 8760 54 + 8745 8748 54 8745 8751 54 8736 8739 54 8736 + 8742 54 8730 8733 53 8724 8727 57 8820 8823 + 59 8808 8811 54 8808 8814 54 8808 8817 54 + 8802 8805 53 8796 8799 53 8790 8793 57 8871 + 8874 54 8871 8877 54 8871 8880 54 8859 8862 + 54 8859 8865 54 8859 8868 54 8853 8856 54 + 8844 8847 54 8844 8850 54 8838 8841 53 8832 + 8835 57 8901 8904 54 8901 8907 54 8901 8910 + 54 8895 8898 53 8889 8892 57 8931 8934 54 + 8931 8937 54 8931 8940 54 8925 8928 53 8919 + 8922 57 8970 8973 59 8961 8964 53 8961 8967 + 53 8955 8958 53 8949 8952 57 8988 8991 53 + 8988 8994 53 8982 8985 57 9042 9045 54 9042 + 9048 54 9042 9051 54 9033 9036 54 9033 9039 + 54 9021 9024 54 9021 9027 54 9021 9030 54 + 9015 9018 54 9009 9012 53 9003 9006 57 9081 + 9084 59 9072 9075 53 9072 9078 53 9066 9069 + 53 9060 9063 57 9120 9123 57 9120 9126 57 + 9105 9108 54 9105 9111 54 9099 9102 53 9093 + 9096 57 9183 9186 58 9177 9180 58 9171 9174 + 58 9165 9168 58 9159 9162 58 9147 9150 54 + 9147 9153 54 9141 9144 53 9135 9138 57 9243 + 9246 56 9243 9249 56 9243 9252 56 9234 9237 + 55 9234 9240 55 9225 9228 54 9225 9231 54 + 9216 9219 54 9216 9222 54 9207 9210 54 9207 + 9213 54 9201 9204 53 9195 9198 57 9309 9312 + 56 9309 9315 56 9309 9318 56 9300 9303 55 + 9300 9306 55 9291 9294 54 9291 9297 54 9282 + 9285 54 9282 9288 54 9273 9276 54 9273 9279 + 54 9267 9270 53 9261 9264 57 9360 9363 53 + 9360 9366 53 9360 9369 53 9348 9351 53 9348 + 9354 53 9339 9342 54 9339 9345 54 9333 9336 + 53 9327 9330 57 9417 9420 54 9417 9423 54 + 9417 9426 54 9405 9408 54 9405 9411 54 9405 + 9414 54 9399 9402 54 9390 9393 54 9390 9396 + 54 9384 9387 53 9378 9381 57 9447 9450 54 + 9447 9453 54 9441 9444 53 9435 9438 57 9522 + 9525 58 9516 9519 58 9510 9513 59 9501 9504 + 58 9495 9498 58 9483 9486 54 9483 9489 54 + 9477 9480 53 9471 9474 57 9561 9564 57 9561 + 9567 57 9546 9549 54 9546 9552 54 9540 9543 + 53 9534 9537 57 9588 9591 54 9588 9594 54 + 9588 9597 54 9582 9585 53 9576 9579 57 9639 + 9642 53 9639 9645 53 9639 9648 53 9627 9630 + 53 9627 9633 53 9618 9621 54 9618 9624 54 + 9612 9615 53 9606 9609 57 9687 9690 54 9687 + 9693 54 9687 9696 54 9675 9678 54 9675 9681 + 54 9675 9684 54 9669 9672 54 9663 9666 53 + 9657 9660 57 9726 9729 59 9717 9720 53 9717 + 9723 53 9711 9714 53 9705 9708 57 9768 9771 + 53 9759 9762 54 9759 9765 54 9750 9753 54 + 9750 9756 54 9741 9744 53 9741 9747 53 9819 + 9822 54 9819 9825 54 9819 9828 54 9807 9810 + 54 9807 9813 54 9807 9816 54 9801 9804 54 + 9792 9795 54 9792 9798 54 9786 9789 53 9780 + 9783 57 9885 9888 56 9885 9891 56 9885 9894 + 56 9876 9879 55 9876 9882 55 9867 9870 54 + 9867 9873 54 9858 9861 54 9858 9864 54 9849 + 9852 54 9849 9855 54 9843 9846 53 9837 9840 + 57 9951 9954 56 9951 9957 56 9951 9960 56 + 9942 9945 55 9942 9948 55 9933 9936 54 9933 + 9939 54 9924 9927 54 9924 9930 54 9915 9918 + 54 9915 9921 54 9909 9912 53 9903 9906 57 + 9996 9999 57 9996 10002 57 9981 9984 54 9981 + 9987 54 9975 9978 53 9969 9972 57 10041 10044 + 54 10041 10047 54 10041 10050 54 10029 10032 54 + 10029 10035 54 10029 10038 54 10023 10026 54 10017 + 10020 53 10011 10014 57 10071 10074 54 10071 10077 + 54 10065 10068 53 10059 10062 57 10134 10137 54 + 10134 10140 54 10134 10143 54 10125 10128 54 10125 + 10131 54 10113 10116 54 10113 10119 54 10113 10122 + 54 10107 10110 54 10101 10104 53 10095 10098 57 + 10185 10188 53 10185 10191 53 10185 10194 53 10173 + 10176 53 10173 10179 53 10164 10167 54 10164 10170 + 54 10158 10161 53 10152 10155 57 10224 10227 54 + 10224 10230 54 10215 10218 54 10215 10221 54 10209 + 10212 53 10203 10206 57 10278 10281 54 10278 10284 + 54 10278 10287 54 10266 10269 54 10266 10272 54 + 10266 10275 54 10260 10263 54 10254 10257 53 10248 + 10251 57 10302 10305 53 10302 10308 53 10296 10299 + 57 10344 10347 57 10344 10350 57 10329 10332 54 + 10329 10335 54 10323 10326 53 10317 10320 57 10389 + 10392 59 10377 10380 54 10377 10383 54 10377 10386 + 54 10371 10374 53 10365 10368 53 10359 10362 57 + 10431 10434 54 10431 10437 54 10431 10440 54 10419 + 10422 54 10419 10425 54 10419 10428 54 10413 10416 + 54 10407 10410 53 10401 10404 57 10461 10464 54 + 10461 10467 54 10461 10470 54 10455 10458 53 10449 + 10452 57 10527 10530 58 10521 10524 58 10515 10518 + 58 10509 10512 58 10503 10506 58 10491 10494 54 + 10491 10497 54 10485 10488 53 10479 10482 57 10578 + 10581 54 10578 10584 54 10578 10587 54 10566 10569 + 54 10566 10572 54 10566 10575 54 10560 10563 54 + 10551 10554 54 10551 10557 54 10545 10548 53 10539 + 10542 57 10617 10620 64 10608 10611 53 10608 10614 + 53 10602 10605 53 10596 10599 57 10650 10653 59 + 10641 10644 53 10641 10647 53 10635 10638 53 10629 + 10632 57 10674 10677 54 10674 10680 54 10668 10671 + 53 10662 10665 57 10731 10734 53 10731 10737 53 + 10731 10740 53 10719 10722 53 10719 10725 53 10710 + 10713 54 10710 10716 54 10704 10707 53 10698 10701 + 57 10761 10764 54 10761 10767 54 10761 10770 54 + 10755 10758 53 10749 10752 57 10809 10812 59 10797 + 10800 54 10797 10803 54 10797 10806 54 10791 10794 + 53 10785 10788 53 10779 10782 57 10827 10830 53 + 10827 10833 53 10821 10824 57 10881 10884 54 10881 + 10887 54 10881 10890 54 10872 10875 54 10872 10878 + 54 10860 10863 54 10860 10866 54 10860 10869 54 + 10854 10857 54 10848 10851 53 10842 10845 57 10929 + 10932 59 10917 10920 54 10917 10923 54 10917 10926 + 54 10911 10914 53 10905 10908 53 10899 10902 57 + 10947 10950 53 10947 10953 53 10941 10944 57 10983 + 10986 54 10983 10989 54 10974 10977 54 10974 10980 + 54 10968 10971 53 10962 10965 57 11037 11040 54 + 11037 11043 54 11037 11046 54 11025 11028 54 11025 + 11031 54 11025 11034 54 11019 11022 54 11013 11016 + 53 11007 11010 57 11085 11088 54 11085 11091 54 + 11085 11094 54 11073 11076 54 11073 11079 54 11073 + 11082 54 11067 11070 54 11061 11064 53 11055 11058 + 57 11142 11145 60 11136 11139 61 11130 11133 62 + 11115 11118 54 11115 11121 54 11109 11112 53 11103 + 11106 57 11184 11187 54 11184 11190 54 11184 11193 + 54 11172 11175 54 11172 11178 54 11172 11181 54 + 11166 11169 54 11160 11163 53 11154 11157 57 11214 + 11217 54 11214 11220 54 11208 11211 53 11202 11205 + 57 11250 11253 54 11250 11256 54 11250 11259 54 + 11244 11247 53 11238 11241 57 11274 11277 53 11274 + 11280 53 11268 11271 57 11340 11343 58 11334 11337 + 58 11328 11331 59 11319 11322 58 11313 11316 58 + 11301 11304 54 11301 11307 54 11295 11298 53 11289 + 11292 57 11391 11394 60 11385 11388 61 11379 11382 + 62 11364 11367 54 11364 11370 54 11358 11361 53 + 11352 11355 57 11424 11427 64 11415 11418 53 11415 + 11421 53 11409 11412 53 11403 11406 57 11466 11469 + 54 11466 11472 54 11466 11475 54 11454 11457 54 + 11454 11460 54 11454 11463 54 11448 11451 54 11442 + 11445 53 11436 11439 57 11505 11508 59 11496 11499 + 53 11496 11502 53 11490 11493 53 11484 11487 57 + 11550 11553 53 11550 11556 53 11550 11559 53 11538 + 11541 53 11538 11544 53 11529 11532 54 11529 11535 + 54 11523 11526 53 11517 11520 57 11574 11577 53 + 11574 11580 53 11568 11571 57 11616 11619 57 11616 + 11622 57 11601 11604 54 11601 11607 54 11595 11598 + 53 11589 11592 57 11661 11664 54 11661 11667 54 + 11661 11670 54 11649 11652 54 11649 11655 54 11649 + 11658 54 11643 11646 54 11637 11640 53 11631 11634 + 57 11718 11721 54 11718 11724 54 11718 11727 54 + 11706 11709 54 11706 11712 54 11706 11715 54 11700 + 11703 54 11691 11694 54 11691 11697 54 11685 11688 + 53 11679 11682 57 11775 11778 54 11775 11781 54 + 11775 11784 54 11763 11766 54 11763 11769 54 11763 + 11772 54 11757 11760 54 11748 11751 54 11748 11754 + 54 11742 11745 53 11736 11739 57 11814 11817 54 + 11814 11820 54 11805 11808 54 11805 11811 54 11799 + 11802 53 11793 11796 57 11877 11880 60 11871 11874 + 61 11865 11868 62 11850 11853 54 11850 11856 54 + 11844 11847 53 11838 11841 57 11928 11931 60 11922 + 11925 61 11916 11919 62 11901 11904 54 11901 11907 + 54 11895 11898 53 11889 11892 57 11979 11982 60 + 11973 11976 61 11967 11970 62 11952 11955 54 11952 + 11958 54 11946 11949 53 11940 11943 57 12030 12033 + 60 12024 12027 61 12018 12021 62 12003 12006 54 + 12003 12009 54 11997 12000 53 11991 11994 57 12081 + 12084 60 12075 12078 61 12069 12072 62 12054 12057 + 54 12054 12060 54 12048 12051 53 12042 12045 57 + 12132 12135 60 12126 12129 61 12120 12123 62 12105 + 12108 54 12105 12111 54 12099 12102 53 12093 12096 + 57 12276 12354 65 12273 12351 66 12270 12348 67 + 12267 12342 68 12267 12345 68 12255 12339 65 12249 + 12336 69 12246 12333 59 12243 12330 53 12240 12327 + 59 12237 12324 53 12231 12321 53 12228 12318 53 + 12228 12315 53 12204 12312 70 12198 12306 63 12198 + 12309 63 12186 12303 71 12180 12300 69 12177 12297 + 59 12174 12294 53 12171 12291 59 12168 12288 53 + 12162 12285 53 12159 12279 53 12159 12282 53 12396 + 12426 72 12393 12423 72 12387 12420 72 12378 12417 + 73 12372 12414 72 12369 12411 72 12363 12408 72 +%FLAG BONDS_WITHOUT_HYDROGEN +%FORMAT(10I8) + 51 54 1 51 57 2 36 39 3 27 + 36 3 18 27 4 12 18 4 12 51 + 5 0 12 6 72 75 1 72 78 2 + 63 72 5 57 63 7 132 135 1 132 + 138 2 120 126 8 114 120 8 108 114 + 8 102 108 8 99 102 8 99 126 8 + 90 99 9 84 90 4 84 132 5 78 + 84 7 189 192 1 189 195 2 159 165 + 4 159 177 4 150 159 4 144 150 4 + 144 189 5 138 144 7 219 222 1 219 + 225 2 201 207 4 201 219 5 195 201 + 7 240 243 1 240 246 2 231 240 5 + 225 231 7 306 309 1 306 312 2 285 + 294 6 276 285 4 267 276 4 258 267 + 4 252 258 4 252 306 5 246 252 7 + 372 375 1 372 378 2 351 360 6 342 + 351 4 333 342 4 324 333 4 318 324 + 4 318 372 5 312 318 7 429 432 1 + 429 435 2 408 417 4 390 396 4 390 + 408 4 384 390 4 384 429 5 378 384 + 7 486 489 1 486 492 2 456 462 4 + 456 474 4 447 456 4 441 447 4 441 + 486 5 435 441 7 543 546 1 543 549 + 2 522 531 4 504 510 4 504 522 4 + 498 504 4 498 543 5 492 498 7 585 + 588 1 585 591 2 561 567 4 561 579 + 10 555 561 4 555 585 5 549 555 7 + 606 609 1 606 612 2 597 606 5 591 + 597 7 663 666 1 663 669 2 633 639 + 4 633 651 4 624 633 4 618 624 4 + 618 663 5 612 618 7 720 723 1 720 + 726 2 690 696 4 690 708 4 681 690 + 4 675 681 4 675 720 5 669 675 7 + 753 756 1 753 759 2 738 747 10 732 + 738 4 732 753 5 726 732 7 795 798 + 1 795 801 2 780 783 1 780 786 2 + 771 780 5 765 771 4 765 795 5 759 + 765 7 861 864 1 861 867 2 840 849 + 6 831 840 4 822 831 4 813 822 4 + 807 813 4 807 861 5 801 807 7 894 + 897 1 894 900 2 879 888 10 873 879 + 4 873 894 5 867 873 7 951 954 1 + 951 957 2 930 939 4 912 918 4 912 + 930 4 906 912 4 906 951 5 900 906 + 7 981 984 1 981 987 2 963 969 4 + 963 981 5 957 963 7 1044 1047 1 1044 + 1050 2 1032 1038 8 1023 1026 11 1023 1032 + 12 1017 1023 12 1011 1017 8 1008 1011 8 + 1008 1038 8 999 1008 9 993 999 4 993 + 1044 5 987 993 7 1065 1068 1 1065 1071 + 2 1056 1065 5 1050 1056 7 1122 1125 1 + 1122 1128 2 1101 1110 4 1083 1089 4 1083 + 1101 4 1077 1083 4 1077 1122 5 1071 1077 + 7 1152 1155 1 1152 1158 2 1134 1140 4 + 1134 1152 5 1128 1134 7 1218 1221 1 1218 + 1224 2 1197 1206 6 1188 1197 4 1179 1188 + 4 1170 1179 4 1164 1170 4 1164 1218 5 + 1158 1164 7 1248 1251 1 1248 1254 2 1230 + 1236 4 1230 1248 5 1224 1230 7 1299 1302 + 1 1299 1305 2 1284 1287 3 1275 1284 3 + 1266 1275 4 1260 1266 4 1260 1299 5 1254 + 1260 7 1350 1353 1 1350 1356 2 1338 1344 + 13 1332 1338 14 1329 1332 15 1326 1329 16 + 1326 1344 17 1317 1326 18 1311 1317 4 1311 + 1350 5 1305 1311 7 1422 1425 1 1422 1428 + 2 1401 1404 19 1401 1413 19 1395 1401 19 + 1386 1395 20 1377 1386 4 1368 1377 4 1362 + 1368 4 1362 1422 5 1356 1362 7 1467 1470 + 1 1467 1473 2 1458 1461 21 1458 1464 21 + 1449 1458 5 1440 1449 4 1434 1440 4 1434 + 1467 5 1428 1434 7 1488 1491 1 1488 1494 + 2 1479 1488 5 1473 1479 7 1518 1521 1 + 1518 1524 2 1500 1506 4 1500 1518 5 1494 + 1500 7 1563 1566 1 1563 1569 2 1554 1557 + 21 1554 1560 21 1545 1554 5 1536 1545 4 + 1530 1536 4 1530 1563 5 1524 1530 7 1620 + 1623 1 1620 1626 2 1590 1596 4 1590 1608 + 4 1581 1590 4 1575 1581 4 1575 1620 5 + 1569 1575 7 1650 1653 1 1650 1656 2 1632 + 1638 4 1632 1650 5 1626 1632 7 1710 1713 + 1 1710 1716 2 1698 1704 8 1692 1698 8 + 1686 1692 8 1680 1686 8 1677 1680 8 1677 + 1704 8 1668 1677 9 1662 1668 4 1662 1710 + 5 1656 1662 7 1752 1755 1 1752 1758 2 + 1728 1734 4 1728 1746 10 1722 1728 4 1722 + 1752 5 1716 1722 7 1815 1818 1 1815 1821 + 2 1803 1809 8 1794 1797 11 1794 1803 12 + 1788 1794 12 1782 1788 8 1779 1782 8 1779 + 1809 8 1770 1779 9 1764 1770 4 1764 1815 + 5 1758 1764 7 1863 1866 1 1863 1869 2 + 1833 1839 4 1833 1851 4 1827 1833 4 1827 + 1863 5 1821 1827 7 1884 1887 1 1884 1890 + 2 1875 1884 5 1869 1875 7 1935 1938 1 + 1935 1941 2 1920 1923 1 1920 1926 2 1911 + 1920 5 1902 1911 4 1896 1902 4 1896 1935 + 5 1890 1896 7 1995 1998 1 1995 2001 2 + 1983 1989 8 1977 1983 8 1971 1977 8 1965 + 1971 8 1962 1965 8 1962 1989 8 1953 1962 + 9 1947 1953 4 1947 1995 5 1941 1947 7 + 2061 2064 1 2061 2067 2 2040 2049 6 2031 + 2040 4 2022 2031 4 2013 2022 4 2007 2013 + 4 2007 2061 5 2001 2007 7 2097 2100 1 + 2097 2103 2 2088 2091 21 2088 2094 21 2079 + 2088 5 2073 2079 4 2073 2097 5 2067 2073 + 7 2169 2172 1 2169 2175 2 2148 2151 19 + 2148 2160 19 2142 2148 19 2133 2142 20 2124 + 2133 4 2115 2124 4 2109 2115 4 2109 2169 + 5 2103 2109 7 2217 2220 1 2217 2223 2 + 2187 2193 4 2187 2205 4 2181 2187 4 2181 + 2217 5 2175 2181 7 2262 2265 1 2262 2268 + 2 2253 2256 21 2253 2259 21 2244 2253 5 + 2235 2244 4 2229 2235 4 2229 2262 5 2223 + 2229 7 2328 2331 1 2328 2334 2 2307 2316 + 6 2298 2307 4 2289 2298 4 2280 2289 4 + 2274 2280 4 2274 2328 5 2268 2274 7 2385 + 2388 1 2385 2391 2 2355 2361 4 2355 2373 + 4 2346 2355 4 2340 2346 4 2340 2385 5 + 2334 2340 7 2418 2421 1 2418 2424 2 2403 + 2412 22 2397 2403 4 2397 2418 5 2391 2397 + 7 2448 2451 1 2448 2454 2 2430 2436 4 + 2430 2448 5 2424 2430 7 2493 2496 1 2493 + 2499 2 2484 2487 21 2484 2490 21 2475 2484 + 5 2466 2475 4 2460 2466 4 2460 2493 5 + 2454 2460 7 2553 2556 1 2553 2559 2 2541 + 2547 8 2535 2541 8 2529 2535 8 2523 2529 + 8 2520 2523 8 2520 2547 8 2511 2520 9 + 2505 2511 4 2505 2553 5 2499 2505 7 2595 + 2598 1 2595 2601 2 2580 2583 1 2580 2586 + 2 2571 2580 5 2565 2571 4 2565 2595 5 + 2559 2565 7 2637 2640 1 2637 2643 2 2631 + 2637 5 2622 2631 4 2613 2622 4 2604 2613 + 4 2601 2604 7 2601 2631 7 2667 2670 1 + 2667 2673 2 2649 2655 4 2649 2667 5 2643 + 2649 7 2697 2700 1 2697 2703 2 2679 2685 + 4 2679 2697 5 2673 2679 7 2745 2748 1 + 2745 2751 2 2715 2721 4 2715 2733 4 2709 + 2715 4 2709 2745 5 2703 2709 7 2802 2805 + 1 2802 2808 2 2772 2778 4 2772 2790 4 + 2763 2772 4 2757 2763 4 2757 2802 5 2751 + 2757 7 2844 2847 1 2844 2850 2 2838 2844 + 5 2829 2838 4 2820 2829 4 2811 2820 4 + 2808 2811 7 2808 2838 7 2877 2880 1 2877 + 2883 2 2862 2871 22 2856 2862 4 2856 2877 + 5 2850 2856 7 2913 2916 1 2913 2919 2 + 2904 2907 21 2904 2910 21 2895 2904 5 2889 + 2895 4 2889 2913 5 2883 2889 7 2961 2964 + 1 2961 2967 2 2931 2937 4 2931 2949 4 + 2925 2931 4 2925 2961 5 2919 2925 7 3018 + 3021 1 3018 3024 2 2997 3006 4 2979 2985 + 4 2979 2997 4 2973 2979 4 2973 3018 5 + 2967 2973 7 3051 3054 1 3051 3057 2 3036 + 3045 10 3030 3036 4 3030 3051 5 3024 3030 + 7 3087 3090 1 3087 3093 2 3078 3081 21 + 3078 3084 21 3069 3078 5 3063 3069 4 3063 + 3087 5 3057 3063 7 3138 3141 1 3138 3144 + 2 3123 3126 1 3123 3129 2 3114 3123 5 + 3105 3114 4 3099 3105 4 3099 3138 5 3093 + 3099 7 3183 3186 1 3183 3189 2 3174 3177 + 21 3174 3180 21 3165 3174 5 3156 3165 4 + 3150 3156 4 3150 3183 5 3144 3150 7 3240 + 3243 1 3240 3246 2 3219 3228 4 3201 3207 + 4 3201 3219 4 3195 3201 4 3195 3240 5 + 3189 3195 7 3306 3309 1 3306 3312 2 3285 + 3294 6 3276 3285 4 3267 3276 4 3258 3267 + 4 3252 3258 4 3252 3306 5 3246 3252 7 + 3342 3345 1 3342 3348 2 3333 3336 21 3333 + 3339 21 3324 3333 5 3318 3324 4 3318 3342 + 5 3312 3318 7 3399 3402 1 3399 3405 2 + 3369 3375 4 3369 3387 4 3360 3369 4 3354 + 3360 4 3354 3399 5 3348 3354 7 3459 3462 + 1 3459 3465 2 3447 3453 8 3441 3447 8 + 3435 3441 8 3429 3435 8 3426 3429 8 3426 + 3453 8 3417 3426 9 3411 3417 4 3411 3459 + 5 3405 3411 7 3507 3510 1 3507 3513 2 + 3477 3483 4 3477 3495 4 3471 3477 4 3471 + 3507 5 3465 3471 7 3552 3555 1 3552 3558 + 2 3543 3546 21 3543 3549 21 3534 3543 5 + 3525 3534 4 3519 3525 4 3519 3552 5 3513 + 3519 7 3609 3612 1 3609 3615 2 3579 3585 + 4 3579 3597 4 3570 3579 4 3564 3570 4 + 3564 3609 5 3558 3564 7 3630 3633 1 3630 + 3636 2 3621 3630 5 3615 3621 7 3696 3699 + 1 3696 3702 2 3675 3684 6 3666 3675 4 + 3657 3666 4 3648 3657 4 3642 3648 4 3642 + 3696 5 3636 3642 7 3744 3747 1 3744 3750 + 2 3714 3720 4 3714 3732 4 3708 3714 4 + 3708 3744 5 3702 3708 7 3816 3819 1 3816 + 3822 2 3807 3813 23 3801 3807 8 3795 3801 + 8 3789 3795 8 3786 3789 24 3786 3813 25 + 3780 3786 26 3774 3780 13 3771 3774 27 3771 + 3813 28 3762 3771 29 3756 3762 4 3756 3816 + 5 3750 3756 7 3852 3855 1 3852 3858 2 + 3843 3846 21 3843 3849 21 3834 3843 5 3828 + 3834 4 3828 3852 5 3822 3828 7 3873 3876 + 1 3873 3879 2 3864 3873 5 3858 3864 7 + 3930 3933 1 3930 3936 2 3900 3906 4 3900 + 3918 4 3891 3900 4 3885 3891 4 3885 3930 + 5 3879 3885 7 3966 3969 1 3966 3972 2 + 3957 3960 21 3957 3963 21 3948 3957 5 3942 + 3948 4 3942 3966 5 3936 3942 7 3996 3999 + 1 3996 4002 2 3978 3984 4 3978 3996 5 + 3972 3978 7 4053 4056 1 4053 4059 2 4032 + 4041 4 4014 4020 4 4014 4032 4 4008 4014 + 4 4008 4053 5 4002 4008 7 4101 4104 1 + 4101 4107 2 4071 4077 4 4071 4089 4 4065 + 4071 4 4065 4101 5 4059 4065 7 4152 4155 + 1 4152 4158 2 4140 4146 13 4134 4140 14 + 4131 4134 15 4128 4131 16 4128 4146 17 4119 + 4128 18 4113 4119 4 4113 4152 5 4107 4113 + 7 4185 4188 1 4185 4191 2 4170 4179 10 + 4164 4170 4 4164 4185 5 4158 4164 7 4242 + 4245 1 4242 4248 2 4221 4230 4 4203 4209 + 4 4203 4221 4 4197 4203 4 4197 4242 5 + 4191 4197 7 4272 4275 1 4272 4278 2 4254 + 4260 4 4254 4272 5 4248 4254 7 4332 4335 + 1 4332 4338 2 4320 4326 8 4314 4320 8 + 4308 4314 8 4302 4308 8 4299 4302 8 4299 + 4326 8 4290 4299 9 4284 4290 4 4284 4332 + 5 4278 4284 7 4362 4365 1 4362 4368 2 + 4344 4350 4 4344 4362 5 4338 4344 7 4404 + 4407 1 4404 4410 2 4398 4404 5 4389 4398 + 4 4380 4389 4 4371 4380 4 4368 4371 7 + 4368 4398 7 4476 4479 1 4476 4482 2 4455 + 4458 19 4455 4467 19 4449 4455 19 4440 4449 + 20 4431 4440 4 4422 4431 4 4416 4422 4 + 4416 4476 5 4410 4416 7 4512 4515 1 4512 + 4518 2 4503 4506 21 4503 4509 21 4494 4503 + 5 4488 4494 4 4488 4512 5 4482 4488 7 + 4563 4566 1 4563 4569 2 4548 4551 1 4548 + 4554 2 4539 4548 5 4530 4539 4 4524 4530 + 4 4524 4563 5 4518 4524 7 4620 4623 1 + 4620 4626 2 4590 4596 4 4590 4608 4 4581 + 4590 4 4575 4581 4 4575 4620 5 4569 4575 + 7 4665 4668 1 4665 4671 2 4656 4659 21 + 4656 4662 21 4647 4656 5 4638 4647 4 4632 + 4638 4 4632 4665 5 4626 4632 7 4686 4689 + 1 4686 4692 2 4677 4686 5 4671 4677 7 + 4728 4731 1 4728 4734 2 4713 4716 1 4713 + 4719 2 4704 4713 5 4698 4704 4 4698 4728 + 5 4692 4698 7 4788 4791 1 4788 4794 2 + 4776 4782 8 4770 4776 8 4764 4770 8 4758 + 4764 8 4755 4758 8 4755 4782 8 4746 4755 + 9 4740 4746 4 4740 4788 5 4734 4740 7 + 4845 4848 1 4845 4851 2 4824 4833 4 4806 + 4812 4 4806 4824 4 4800 4806 4 4800 4845 + 5 4794 4800 7 4881 4884 1 4881 4887 2 + 4872 4875 21 4872 4878 21 4863 4872 5 4857 + 4863 4 4857 4881 5 4851 4857 7 4914 4917 + 1 4914 4920 2 4899 4908 22 4893 4899 4 + 4893 4914 5 4887 4893 7 4962 4965 1 4962 + 4968 2 4932 4938 4 4932 4950 4 4926 4932 + 4 4926 4962 5 4920 4926 7 5004 5007 1 + 5004 5010 2 4980 4986 4 4980 4998 10 4974 + 4980 4 4974 5004 5 4968 4974 7 5076 5079 + 1 5076 5082 2 5055 5058 19 5055 5067 19 + 5049 5055 19 5040 5049 20 5031 5040 4 5022 + 5031 4 5016 5022 4 5016 5076 5 5010 5016 + 7 5121 5124 1 5121 5127 2 5112 5115 21 + 5112 5118 21 5103 5112 5 5094 5103 4 5088 + 5094 4 5088 5121 5 5082 5088 7 5142 5145 + 1 5142 5148 2 5133 5142 5 5127 5133 7 + 5202 5205 1 5202 5208 2 5190 5196 8 5184 + 5190 8 5178 5184 8 5172 5178 8 5169 5172 + 8 5169 5196 8 5160 5169 9 5154 5160 4 + 5154 5202 5 5148 5154 7 5235 5238 1 5235 + 5241 2 5220 5229 10 5214 5220 4 5214 5235 + 5 5208 5214 7 5292 5295 1 5292 5298 2 + 5271 5280 4 5253 5259 4 5253 5271 4 5247 + 5253 4 5247 5292 5 5241 5247 7 5322 5325 + 1 5322 5328 2 5304 5310 4 5304 5322 5 + 5298 5304 7 5373 5376 1 5373 5379 2 5361 + 5367 13 5355 5361 14 5352 5355 15 5349 5352 + 16 5349 5367 17 5340 5349 18 5334 5340 4 + 5334 5373 5 5328 5334 7 5409 5412 1 5409 + 5415 2 5400 5403 21 5400 5406 21 5391 5400 + 5 5385 5391 4 5385 5409 5 5379 5385 7 + 5466 5469 1 5466 5472 2 5445 5454 4 5427 + 5433 4 5427 5445 4 5421 5427 4 5421 5466 + 5 5415 5421 7 5499 5502 1 5499 5505 2 + 5484 5493 10 5478 5484 4 5478 5499 5 5472 + 5478 7 5529 5532 1 5529 5535 2 5511 5517 + 4 5511 5529 5 5505 5511 7 5592 5595 1 + 5592 5598 2 5580 5586 8 5571 5574 11 5571 + 5580 12 5565 5571 12 5559 5565 8 5556 5559 + 8 5556 5586 8 5547 5556 9 5541 5547 4 + 5541 5592 5 5535 5541 7 5625 5628 1 5625 + 5631 2 5610 5619 10 5604 5610 4 5604 5625 + 5 5598 5604 7 5685 5688 1 5685 5691 2 + 5673 5679 8 5667 5673 8 5661 5667 8 5655 + 5661 8 5652 5655 8 5652 5679 8 5643 5652 + 9 5637 5643 4 5637 5685 5 5631 5637 7 + 5715 5718 1 5715 5721 2 5697 5703 4 5697 + 5715 5 5691 5697 7 5745 5748 1 5745 5751 + 2 5727 5733 4 5727 5745 5 5721 5727 7 + 5802 5805 1 5802 5808 2 5772 5778 4 5772 + 5790 4 5763 5772 4 5757 5763 4 5757 5802 + 5 5751 5757 7 5832 5835 1 5832 5838 2 + 5814 5820 4 5814 5832 5 5808 5814 7 5898 + 5901 1 5898 5904 2 5877 5886 6 5868 5877 + 4 5859 5868 4 5850 5859 4 5844 5850 4 + 5844 5898 5 5838 5844 7 5943 5946 1 5943 + 5949 2 5934 5937 21 5934 5940 21 5925 5934 + 5 5916 5925 4 5910 5916 4 5910 5943 5 + 5904 5910 7 5964 5967 1 5964 5970 2 5955 + 5964 5 5949 5955 7 6036 6039 1 6036 6042 + 2 6015 6018 19 6015 6027 19 6009 6015 19 + 6000 6009 20 5991 6000 4 5982 5991 4 5976 + 5982 4 5976 6036 5 5970 5976 7 6069 6072 + 1 6069 6075 2 6054 6063 10 6048 6054 4 + 6048 6069 5 6042 6048 7 6120 6123 1 6120 + 6126 2 6105 6108 3 6096 6105 3 6087 6096 + 4 6081 6087 4 6081 6120 5 6075 6081 7 + 6171 6174 1 6171 6177 2 6156 6159 3 6147 + 6156 3 6138 6147 4 6132 6138 4 6132 6171 + 5 6126 6132 7 6237 6240 1 6237 6243 2 + 6216 6225 6 6207 6216 4 6198 6207 4 6189 + 6198 4 6183 6189 4 6183 6237 5 6177 6183 + 7 6279 6282 1 6279 6285 2 6264 6267 1 + 6264 6270 2 6255 6264 5 6249 6255 4 6249 + 6279 5 6243 6249 7 6351 6354 1 6351 6357 + 2 6330 6333 19 6330 6342 19 6324 6330 19 + 6315 6324 20 6306 6315 4 6297 6306 4 6291 + 6297 4 6291 6351 5 6285 6291 7 6393 6396 + 1 6393 6399 2 6378 6381 1 6378 6384 2 + 6369 6378 5 6363 6369 4 6363 6393 5 6357 + 6363 7 6423 6426 1 6423 6429 2 6405 6411 + 4 6405 6423 5 6399 6405 7 6456 6459 1 + 6456 6462 2 6441 6450 10 6435 6441 4 6435 + 6456 5 6429 6435 7 6507 6510 1 6507 6513 + 2 6492 6495 3 6483 6492 3 6474 6483 4 + 6468 6474 4 6468 6507 5 6462 6468 7 6555 + 6558 1 6555 6561 2 6525 6531 4 6525 6543 + 4 6519 6525 4 6519 6555 5 6513 6519 7 + 6585 6588 1 6585 6591 2 6567 6573 4 6567 + 6585 5 6561 6567 7 6642 6645 1 6642 6648 + 2 6612 6618 4 6612 6630 4 6603 6612 4 + 6597 6603 4 6597 6642 5 6591 6597 7 6684 + 6687 1 6684 6690 2 6660 6666 4 6660 6678 + 10 6654 6660 4 6654 6684 5 6648 6654 7 + 6747 6750 1 6747 6753 2 6735 6741 8 6726 + 6729 11 6726 6735 12 6720 6726 12 6714 6720 + 8 6711 6714 8 6711 6741 8 6702 6711 9 + 6696 6702 4 6696 6747 5 6690 6696 7 6804 + 6807 1 6804 6810 2 6783 6792 4 6765 6771 + 4 6765 6783 4 6759 6765 4 6759 6804 5 + 6753 6759 7 6825 6828 1 6825 6831 2 6816 + 6825 5 6810 6816 7 6855 6858 1 6855 6861 + 2 6837 6843 4 6837 6855 5 6831 6837 7 + 6900 6903 1 6900 6906 2 6891 6894 21 6891 + 6897 21 6882 6891 5 6873 6882 4 6867 6873 + 4 6867 6900 5 6861 6867 7 6966 6969 1 + 6966 6972 2 6945 6954 6 6936 6945 4 6927 + 6936 4 6918 6927 4 6912 6918 4 6912 6966 + 5 6906 6912 7 6996 6999 1 6996 7002 2 + 6978 6984 4 6978 6996 5 6972 6978 7 7047 + 7050 1 7047 7053 2 7032 7035 3 7023 7032 + 3 7014 7023 4 7008 7014 4 7008 7047 5 + 7002 7008 7 7089 7092 1 7089 7095 2 7083 + 7089 5 7074 7083 4 7065 7074 4 7056 7065 + 4 7053 7056 7 7053 7083 7 7122 7125 1 + 7122 7128 2 7107 7116 10 7101 7107 4 7101 + 7122 5 7095 7101 7 7185 7188 1 7185 7191 + 2 7173 7179 8 7164 7167 11 7164 7173 12 + 7158 7164 12 7152 7158 8 7149 7152 8 7149 + 7179 8 7140 7149 9 7134 7140 4 7134 7185 + 5 7128 7134 7 7227 7230 1 7227 7233 2 + 7212 7215 1 7212 7218 2 7203 7212 5 7197 + 7203 4 7197 7227 5 7191 7197 7 7269 7272 + 1 7269 7275 2 7245 7251 4 7245 7263 10 + 7239 7245 4 7239 7269 5 7233 7239 7 7320 + 7323 1 7320 7326 2 7305 7308 3 7296 7305 + 3 7287 7296 4 7281 7287 4 7281 7320 5 + 7275 7281 7 7341 7344 1 7341 7347 2 7332 + 7341 5 7326 7332 7 7389 7392 1 7389 7395 + 2 7359 7365 4 7359 7377 4 7353 7359 4 + 7353 7389 5 7347 7353 7 7419 7422 1 7419 + 7425 2 7401 7407 4 7401 7419 5 7395 7401 + 7 7485 7488 1 7485 7491 2 7464 7473 6 + 7455 7464 4 7446 7455 4 7437 7446 4 7431 + 7437 4 7431 7485 5 7425 7431 7 7515 7518 + 1 7515 7521 2 7497 7503 4 7497 7515 5 + 7491 7497 7 7548 7551 1 7548 7554 2 7533 + 7542 10 7527 7533 4 7527 7548 5 7521 7527 + 7 7605 7608 1 7605 7611 2 7575 7581 4 + 7575 7593 4 7566 7575 4 7560 7566 4 7560 + 7605 5 7554 7560 7 7650 7653 1 7650 7656 + 2 7641 7644 21 7641 7647 21 7632 7641 5 + 7623 7632 4 7617 7623 4 7617 7650 5 7611 + 7617 7 7680 7683 1 7680 7686 2 7662 7668 + 4 7662 7680 5 7656 7662 7 7722 7725 1 + 7722 7728 2 7698 7704 4 7698 7716 10 7692 + 7698 4 7692 7722 5 7686 7692 7 7770 7773 + 1 7770 7776 2 7740 7746 4 7740 7758 4 + 7734 7740 4 7734 7770 5 7728 7734 7 7842 + 7845 1 7842 7848 2 7821 7824 19 7821 7833 + 19 7815 7821 19 7806 7815 20 7797 7806 4 + 7788 7797 4 7782 7788 4 7782 7842 5 7776 + 7782 7 7905 7908 1 7905 7911 2 7893 7899 + 8 7884 7887 11 7884 7893 12 7878 7884 12 + 7872 7878 8 7869 7872 8 7869 7899 8 7860 + 7869 9 7854 7860 4 7854 7905 5 7848 7854 + 7 7947 7950 1 7947 7953 2 7923 7929 4 + 7923 7941 10 7917 7923 4 7917 7947 5 7911 + 7917 7 7977 7980 1 7977 7983 2 7959 7965 + 4 7959 7977 5 7953 7959 7 8034 8037 1 + 8034 8040 2 8004 8010 4 8004 8022 4 7995 + 8004 4 7989 7995 4 7989 8034 5 7983 7989 + 7 8064 8067 1 8064 8070 2 8046 8052 4 + 8046 8064 5 8040 8046 7 8121 8124 1 8121 + 8127 2 8091 8097 4 8091 8109 4 8082 8091 + 4 8076 8082 4 8076 8121 5 8070 8076 7 + 8142 8145 1 8142 8148 2 8133 8142 5 8127 + 8133 7 8187 8190 1 8187 8193 2 8178 8181 + 21 8178 8184 21 8169 8178 5 8160 8169 4 + 8154 8160 4 8154 8187 5 8148 8154 7 8223 + 8226 1 8223 8229 2 8214 8217 21 8214 8220 + 21 8205 8214 5 8199 8205 4 8199 8223 5 + 8193 8199 7 8244 8247 1 8244 8250 2 8235 + 8244 5 8229 8235 7 8301 8304 1 8301 8307 + 2 8280 8289 4 8262 8268 4 8262 8280 4 + 8256 8262 4 8256 8301 5 8250 8256 7 8367 + 8370 1 8367 8373 2 8346 8355 6 8337 8346 + 4 8328 8337 4 8319 8328 4 8313 8319 4 + 8313 8367 5 8307 8313 7 8415 8418 1 8415 + 8421 2 8385 8391 4 8385 8403 4 8379 8385 + 4 8379 8415 5 8373 8379 7 8457 8460 1 + 8457 8463 2 8442 8445 1 8442 8448 2 8433 + 8442 5 8427 8433 4 8427 8457 5 8421 8427 + 7 8487 8490 1 8487 8493 2 8469 8475 4 + 8469 8487 5 8463 8469 7 8535 8538 1 8535 + 8541 2 8505 8511 4 8505 8523 4 8499 8505 + 4 8499 8535 5 8493 8499 7 8568 8571 1 + 8568 8574 2 8553 8562 10 8547 8553 4 8547 + 8568 5 8541 8547 7 8598 8601 1 8598 8604 + 2 8580 8586 4 8580 8598 5 8574 8580 7 + 8619 8622 1 8619 8625 2 8610 8619 5 8604 + 8610 7 8661 8664 1 8661 8667 2 8655 8661 + 5 8646 8655 4 8637 8646 4 8628 8637 4 + 8625 8628 7 8625 8655 7 8718 8721 1 8718 + 8724 2 8697 8706 4 8679 8685 4 8679 8697 + 4 8673 8679 4 8673 8718 5 8667 8673 7 + 8784 8787 1 8784 8790 2 8763 8772 6 8754 + 8763 4 8745 8754 4 8736 8745 4 8730 8736 + 4 8730 8784 5 8724 8730 7 8826 8829 1 + 8826 8832 2 8802 8808 4 8802 8820 10 8796 + 8802 4 8796 8826 5 8790 8796 7 8883 8886 + 1 8883 8889 2 8853 8859 4 8853 8871 4 + 8844 8853 4 8838 8844 4 8838 8883 5 8832 + 8838 7 8913 8916 1 8913 8919 2 8895 8901 + 4 8895 8913 5 8889 8895 7 8943 8946 1 + 8943 8949 2 8925 8931 4 8925 8943 5 8919 + 8925 7 8976 8979 1 8976 8982 2 8961 8970 + 10 8955 8961 4 8955 8976 5 8949 8955 7 + 8997 9000 1 8997 9003 2 8988 8997 5 8982 + 8988 7 9054 9057 1 9054 9060 2 9033 9042 + 4 9015 9021 4 9015 9033 4 9009 9015 4 + 9009 9054 5 9003 9009 7 9087 9090 1 9087 + 9093 2 9072 9081 10 9066 9072 4 9066 9087 + 5 9060 9066 7 9129 9132 1 9129 9135 2 + 9114 9117 1 9114 9120 2 9105 9114 5 9099 + 9105 4 9099 9129 5 9093 9099 7 9189 9192 + 1 9189 9195 2 9177 9183 8 9171 9177 8 + 9165 9171 8 9159 9165 8 9156 9159 8 9156 + 9183 8 9147 9156 9 9141 9147 4 9141 9189 + 5 9135 9141 7 9255 9258 1 9255 9261 2 + 9234 9243 6 9225 9234 4 9216 9225 4 9207 + 9216 4 9201 9207 4 9201 9255 5 9195 9201 + 7 9321 9324 1 9321 9327 2 9300 9309 6 + 9291 9300 4 9282 9291 4 9273 9282 4 9267 + 9273 4 9267 9321 5 9261 9267 7 9372 9375 + 1 9372 9378 2 9357 9360 3 9348 9357 3 + 9339 9348 4 9333 9339 4 9333 9372 5 9327 + 9333 7 9429 9432 1 9429 9435 2 9399 9405 + 4 9399 9417 4 9390 9399 4 9384 9390 4 + 9384 9429 5 9378 9384 7 9465 9468 1 9465 + 9471 2 9456 9459 21 9456 9462 21 9447 9456 + 5 9441 9447 4 9441 9465 5 9435 9441 7 + 9528 9531 1 9528 9534 2 9516 9522 8 9507 + 9510 11 9507 9516 12 9501 9507 12 9495 9501 + 8 9492 9495 8 9492 9522 8 9483 9492 9 + 9477 9483 4 9477 9528 5 9471 9477 7 9570 + 9573 1 9570 9576 2 9555 9558 1 9555 9561 + 2 9546 9555 5 9540 9546 4 9540 9570 5 + 9534 9540 7 9600 9603 1 9600 9606 2 9582 + 9588 4 9582 9600 5 9576 9582 7 9651 9654 + 1 9651 9657 2 9636 9639 3 9627 9636 3 + 9618 9627 4 9612 9618 4 9612 9651 5 9606 + 9612 7 9699 9702 1 9699 9705 2 9669 9675 + 4 9669 9687 4 9663 9669 4 9663 9699 5 + 9657 9663 7 9732 9735 1 9732 9738 2 9717 + 9726 10 9711 9717 4 9711 9732 5 9705 9711 + 7 9774 9777 1 9774 9780 2 9768 9774 5 + 9759 9768 4 9750 9759 4 9741 9750 4 9738 + 9741 7 9738 9768 7 9831 9834 1 9831 9837 + 2 9801 9807 4 9801 9819 4 9792 9801 4 + 9786 9792 4 9786 9831 5 9780 9786 7 9897 + 9900 1 9897 9903 2 9876 9885 6 9867 9876 + 4 9858 9867 4 9849 9858 4 9843 9849 4 + 9843 9897 5 9837 9843 7 9963 9966 1 9963 + 9969 2 9942 9951 6 9933 9942 4 9924 9933 + 4 9915 9924 4 9909 9915 4 9909 9963 5 + 9903 9909 7 10005 10008 1 10005 10011 2 9990 + 9993 1 9990 9996 2 9981 9990 5 9975 9981 + 4 9975 10005 5 9969 9975 7 10053 10056 1 + 10053 10059 2 10023 10029 4 10023 10041 4 10017 + 10023 4 10017 10053 5 10011 10017 7 10089 10092 + 1 10089 10095 2 10080 10083 21 10080 10086 21 + 10071 10080 5 10065 10071 4 10065 10089 5 10059 + 10065 7 10146 10149 1 10146 10152 2 10125 10134 + 4 10107 10113 4 10107 10125 4 10101 10107 4 + 10101 10146 5 10095 10101 7 10197 10200 1 10197 + 10203 2 10182 10185 3 10173 10182 3 10164 10173 + 4 10158 10164 4 10158 10197 5 10152 10158 7 + 10242 10245 1 10242 10248 2 10233 10236 21 10233 + 10239 21 10224 10233 5 10215 10224 4 10209 10215 + 4 10209 10242 5 10203 10209 7 10290 10293 1 + 10290 10296 2 10260 10266 4 10260 10278 4 10254 + 10260 4 10254 10290 5 10248 10254 7 10311 10314 + 1 10311 10317 2 10302 10311 5 10296 10302 7 + 10353 10356 1 10353 10359 2 10338 10341 1 10338 + 10344 2 10329 10338 5 10323 10329 4 10323 10353 + 5 10317 10323 7 10395 10398 1 10395 10401 2 + 10371 10377 4 10371 10389 10 10365 10371 4 10365 + 10395 5 10359 10365 7 10443 10446 1 10443 10449 + 2 10413 10419 4 10413 10431 4 10407 10413 4 + 10407 10443 5 10401 10407 7 10473 10476 1 10473 + 10479 2 10455 10461 4 10455 10473 5 10449 10455 + 7 10533 10536 1 10533 10539 2 10521 10527 8 + 10515 10521 8 10509 10515 8 10503 10509 8 10500 + 10503 8 10500 10527 8 10491 10500 9 10485 10491 + 4 10485 10533 5 10479 10485 7 10590 10593 1 + 10590 10596 2 10560 10566 4 10560 10578 4 10551 + 10560 4 10545 10551 4 10545 10590 5 10539 10545 + 7 10623 10626 1 10623 10629 2 10608 10617 22 + 10602 10608 4 10602 10623 5 10596 10602 7 10656 + 10659 1 10656 10662 2 10641 10650 10 10635 10641 + 4 10635 10656 5 10629 10635 7 10692 10695 1 + 10692 10698 2 10683 10686 21 10683 10689 21 10674 + 10683 5 10668 10674 4 10668 10692 5 10662 10668 + 7 10743 10746 1 10743 10749 2 10728 10731 3 + 10719 10728 3 10710 10719 4 10704 10710 4 10704 + 10743 5 10698 10704 7 10773 10776 1 10773 10779 + 2 10755 10761 4 10755 10773 5 10749 10755 7 + 10815 10818 1 10815 10821 2 10791 10797 4 10791 + 10809 10 10785 10791 4 10785 10815 5 10779 10785 + 7 10836 10839 1 10836 10842 2 10827 10836 5 + 10821 10827 7 10893 10896 1 10893 10899 2 10872 + 10881 4 10854 10860 4 10854 10872 4 10848 10854 + 4 10848 10893 5 10842 10848 7 10935 10938 1 + 10935 10941 2 10911 10917 4 10911 10929 10 10905 + 10911 4 10905 10935 5 10899 10905 7 10956 10959 + 1 10956 10962 2 10947 10956 5 10941 10947 7 + 11001 11004 1 11001 11007 2 10992 10995 21 10992 + 10998 21 10983 10992 5 10974 10983 4 10968 10974 + 4 10968 11001 5 10962 10968 7 11049 11052 1 + 11049 11055 2 11019 11025 4 11019 11037 4 11013 + 11019 4 11013 11049 5 11007 11013 7 11097 11100 + 1 11097 11103 2 11067 11073 4 11067 11085 4 + 11061 11067 4 11061 11097 5 11055 11061 7 11148 + 11151 1 11148 11154 2 11136 11142 13 11130 11136 + 14 11127 11130 15 11124 11127 16 11124 11142 17 + 11115 11124 18 11109 11115 4 11109 11148 5 11103 + 11109 7 11196 11199 1 11196 11202 2 11166 11172 + 4 11166 11184 4 11160 11166 4 11160 11196 5 + 11154 11160 7 11232 11235 1 11232 11238 2 11223 + 11226 21 11223 11229 21 11214 11223 5 11208 11214 + 4 11208 11232 5 11202 11208 7 11262 11265 1 + 11262 11268 2 11244 11250 4 11244 11262 5 11238 + 11244 7 11283 11286 1 11283 11289 2 11274 11283 + 5 11268 11274 7 11346 11349 1 11346 11352 2 + 11334 11340 8 11325 11328 11 11325 11334 12 11319 + 11325 12 11313 11319 8 11310 11313 8 11310 11340 + 8 11301 11310 9 11295 11301 4 11295 11346 5 + 11289 11295 7 11397 11400 1 11397 11403 2 11385 + 11391 13 11379 11385 14 11376 11379 15 11373 11376 + 16 11373 11391 17 11364 11373 18 11358 11364 4 + 11358 11397 5 11352 11358 7 11430 11433 1 11430 + 11436 2 11415 11424 22 11409 11415 4 11409 11430 + 5 11403 11409 7 11478 11481 1 11478 11484 2 + 11448 11454 4 11448 11466 4 11442 11448 4 11442 + 11478 5 11436 11442 7 11511 11514 1 11511 11517 + 2 11496 11505 10 11490 11496 4 11490 11511 5 + 11484 11490 7 11562 11565 1 11562 11568 2 11547 + 11550 3 11538 11547 3 11529 11538 4 11523 11529 + 4 11523 11562 5 11517 11523 7 11583 11586 1 + 11583 11589 2 11574 11583 5 11568 11574 7 11625 + 11628 1 11625 11631 2 11610 11613 1 11610 11616 + 2 11601 11610 5 11595 11601 4 11595 11625 5 + 11589 11595 7 11673 11676 1 11673 11679 2 11643 + 11649 4 11643 11661 4 11637 11643 4 11637 11673 + 5 11631 11637 7 11730 11733 1 11730 11736 2 + 11700 11706 4 11700 11718 4 11691 11700 4 11685 + 11691 4 11685 11730 5 11679 11685 7 11787 11790 + 1 11787 11793 2 11757 11763 4 11757 11775 4 + 11748 11757 4 11742 11748 4 11742 11787 5 11736 + 11742 7 11832 11835 1 11832 11838 2 11823 11826 + 21 11823 11829 21 11814 11823 5 11805 11814 4 + 11799 11805 4 11799 11832 5 11793 11799 7 11883 + 11886 1 11883 11889 2 11871 11877 13 11865 11871 + 14 11862 11865 15 11859 11862 16 11859 11877 17 + 11850 11859 18 11844 11850 4 11844 11883 5 11838 + 11844 7 11934 11937 1 11934 11940 2 11922 11928 + 13 11916 11922 14 11913 11916 15 11910 11913 16 + 11910 11928 17 11901 11910 18 11895 11901 4 11895 + 11934 5 11889 11895 7 11985 11988 1 11985 11991 + 2 11973 11979 13 11967 11973 14 11964 11967 15 + 11961 11964 16 11961 11979 17 11952 11961 18 11946 + 11952 4 11946 11985 5 11940 11946 7 12036 12039 + 1 12036 12042 2 12024 12030 13 12018 12024 14 + 12015 12018 15 12012 12015 16 12012 12030 17 12003 + 12012 18 11997 12003 4 11997 12036 5 11991 11997 + 7 12087 12090 1 12087 12093 2 12075 12081 13 + 12069 12075 14 12066 12069 15 12063 12066 16 12063 + 12081 17 12054 12063 18 12048 12054 4 12048 12087 + 5 12042 12048 7 12138 12141 21 12138 12144 21 + 12126 12132 13 12120 12126 14 12117 12120 15 12114 + 12117 16 12114 12132 17 12105 12114 18 12099 12105 + 4 12099 12138 5 12093 12099 7 12273 12276 30 + 12270 12273 31 12261 12267 32 12261 12264 33 12258 + 12261 34 12258 12270 31 12255 12258 30 12252 12276 + 35 12252 12255 35 12249 12252 36 12243 12249 4 + 12243 12246 10 12237 12243 4 12237 12240 10 12234 + 12249 37 12231 12234 37 12231 12237 4 12228 12231 + 4 12225 12228 37 12216 12225 38 12216 12219 39 + 12216 12222 39 12213 12216 38 12207 12210 40 12204 + 12207 41 12201 12204 41 12195 12201 42 12195 12198 + 19 12192 12210 43 12192 12195 23 12189 12192 44 + 12186 12189 45 12183 12186 46 12183 12210 47 12180 + 12183 48 12174 12180 4 12174 12177 10 12168 12174 + 4 12168 12171 10 12165 12180 37 12162 12168 4 + 12162 12165 37 12159 12162 4 12156 12159 37 12147 + 12213 38 12147 12150 39 12147 12153 39 12147 12156 + 38 12393 12396 49 12390 12393 49 12390 12402 50 + 12387 12390 49 12384 12387 49 12384 12399 50 12381 + 12384 49 12381 12396 49 12375 12381 51 12369 12372 + 49 12366 12369 49 12366 12405 50 12363 12366 49 + 12360 12363 49 12360 12378 52 12357 12360 49 12357 + 12372 49 12357 12375 51 +%FLAG ANGLES_INC_HYDROGEN +%FORMAT(10I8) + 51 57 60 92 45 39 48 93 42 39 + 45 93 42 39 48 93 36 39 42 94 + 36 39 45 94 36 39 48 94 33 27 + 36 94 30 27 33 93 30 27 36 94 + 24 18 27 95 21 18 24 96 21 18 + 27 95 18 27 30 97 18 27 33 97 + 15 12 18 98 15 12 51 99 12 18 + 21 95 12 18 24 95 9 0 12 100 + 6 0 9 101 6 0 12 100 3 0 + 6 101 3 0 9 101 3 0 12 100 + 0 12 15 102 72 78 81 92 69 63 + 72 103 66 63 69 93 66 63 72 103 + 60 57 63 104 57 63 66 105 57 63 + 69 105 132 138 141 92 123 120 126 106 + 120 126 129 106 117 114 120 106 114 120 + 123 106 111 108 114 106 108 114 117 106 + 105 102 108 106 102 108 111 106 99 102 + 105 106 99 126 129 106 96 90 99 107 + 93 90 96 96 93 90 99 107 87 84 + 90 97 87 84 132 103 84 90 93 95 + 84 90 96 95 81 78 84 104 78 84 + 87 105 189 195 198 92 183 177 186 96 + 180 177 183 96 180 177 186 96 171 165 + 174 96 168 165 171 96 168 165 174 96 + 162 159 165 95 162 159 177 95 159 165 + 168 95 159 165 171 95 159 165 174 95 + 159 177 180 95 159 177 183 95 159 177 + 186 95 156 150 159 95 153 150 156 96 + 153 150 159 95 150 159 162 95 147 144 + 150 97 147 144 189 103 144 150 153 95 + 144 150 156 95 141 138 144 104 138 144 + 147 105 219 225 228 92 213 207 216 96 + 210 207 213 96 210 207 216 96 204 201 + 207 97 204 201 219 103 201 207 210 95 + 201 207 213 95 201 207 216 95 198 195 + 201 104 195 201 204 105 240 246 249 92 + 237 231 240 103 234 231 237 93 234 231 + 240 103 228 225 231 104 225 231 234 105 + 225 231 237 105 306 312 315 92 300 294 + 303 101 297 294 300 101 297 294 303 101 + 291 285 294 102 288 285 291 108 288 285 + 294 102 285 294 297 100 285 294 300 100 + 285 294 303 100 282 276 285 95 279 276 + 282 96 279 276 285 95 276 285 288 98 + 276 285 291 98 273 267 276 95 270 267 + 273 96 270 267 276 95 267 276 279 95 + 267 276 282 95 264 258 267 95 261 258 + 264 96 261 258 267 95 258 267 270 95 + 258 267 273 95 255 252 258 97 255 252 + 306 103 252 258 261 95 252 258 264 95 + 249 246 252 104 246 252 255 105 372 378 + 381 92 366 360 369 101 363 360 366 101 + 363 360 369 101 357 351 360 102 354 351 + 357 108 354 351 360 102 351 360 363 100 + 351 360 366 100 351 360 369 100 348 342 + 351 95 345 342 348 96 345 342 351 95 + 342 351 354 98 342 351 357 98 339 333 + 342 95 336 333 339 96 336 333 342 95 + 333 342 345 95 333 342 348 95 330 324 + 333 95 327 324 330 96 327 324 333 95 + 324 333 336 95 324 333 339 95 321 318 + 324 97 321 318 372 103 318 324 327 95 + 318 324 330 95 315 312 318 104 312 318 + 321 105 429 435 438 92 423 417 426 96 + 420 417 423 96 420 417 426 96 414 408 + 417 95 411 408 414 96 411 408 417 95 + 408 417 420 95 408 417 423 95 408 417 + 426 95 402 396 405 96 399 396 402 96 + 399 396 405 96 393 390 396 95 393 390 + 408 95 390 396 399 95 390 396 402 95 + 390 396 405 95 390 408 411 95 390 408 + 414 95 387 384 390 97 387 384 429 103 + 384 390 393 95 381 378 384 104 378 384 + 387 105 486 492 495 92 480 474 483 96 + 477 474 480 96 477 474 483 96 468 462 + 471 96 465 462 468 96 465 462 471 96 + 459 456 462 95 459 456 474 95 456 462 + 465 95 456 462 468 95 456 462 471 95 + 456 474 477 95 456 474 480 95 456 474 + 483 95 453 447 456 95 450 447 453 96 + 450 447 456 95 447 456 459 95 444 441 + 447 97 444 441 486 103 441 447 450 95 + 441 447 453 95 438 435 441 104 435 441 + 444 105 543 549 552 92 537 531 540 96 + 534 531 537 96 534 531 540 96 528 522 + 531 95 525 522 528 96 525 522 531 95 + 522 531 534 95 522 531 537 95 522 531 + 540 95 516 510 519 96 513 510 516 96 + 513 510 519 96 507 504 510 95 507 504 + 522 95 504 510 513 95 504 510 516 95 + 504 510 519 95 504 522 525 95 504 522 + 528 95 501 498 504 97 501 498 543 103 + 498 504 507 95 495 492 498 104 492 498 + 501 105 585 591 594 92 573 567 576 96 + 570 567 573 96 570 567 576 96 564 561 + 567 97 564 561 579 109 561 567 570 95 + 561 567 573 95 561 567 576 95 561 579 + 582 110 558 555 561 97 558 555 585 103 + 555 561 564 97 552 549 555 104 549 555 + 558 105 606 612 615 92 603 597 606 103 + 600 597 603 93 600 597 606 103 594 591 + 597 104 591 597 600 105 591 597 603 105 + 663 669 672 92 657 651 660 96 654 651 + 657 96 654 651 660 96 645 639 648 96 + 642 639 645 96 642 639 648 96 636 633 + 639 95 636 633 651 95 633 639 642 95 + 633 639 645 95 633 639 648 95 633 651 + 654 95 633 651 657 95 633 651 660 95 + 630 624 633 95 627 624 630 96 627 624 + 633 95 624 633 636 95 621 618 624 97 + 621 618 663 103 618 624 627 95 618 624 + 630 95 615 612 618 104 612 618 621 105 + 720 726 729 92 714 708 717 96 711 708 + 714 96 711 708 717 96 702 696 705 96 + 699 696 702 96 699 696 705 96 693 690 + 696 95 693 690 708 95 690 696 699 95 + 690 696 702 95 690 696 705 95 690 708 + 711 95 690 708 714 95 690 708 717 95 + 687 681 690 95 684 681 687 96 684 681 + 690 95 681 690 693 95 678 675 681 97 + 678 675 720 103 675 681 684 95 675 681 + 687 95 672 669 675 104 669 675 678 105 + 753 759 762 92 744 738 747 109 741 738 + 744 93 741 738 747 109 738 747 750 110 + 735 732 738 97 735 732 753 103 732 738 + 741 97 732 738 744 97 729 726 732 104 + 726 732 735 105 795 801 804 92 789 786 + 792 111 780 786 789 92 780 786 792 92 + 777 771 780 112 774 771 777 96 774 771 + 780 112 768 765 771 97 768 765 795 103 + 765 771 774 95 765 771 777 95 762 759 + 765 104 759 765 768 105 861 867 870 92 + 855 849 858 101 852 849 855 101 852 849 + 858 101 846 840 849 102 843 840 846 108 + 843 840 849 102 840 849 852 100 840 849 + 855 100 840 849 858 100 837 831 840 95 + 834 831 837 96 834 831 840 95 831 840 + 843 98 831 840 846 98 828 822 831 95 + 825 822 828 96 825 822 831 95 822 831 + 834 95 822 831 837 95 819 813 822 95 + 816 813 819 96 816 813 822 95 813 822 + 825 95 813 822 828 95 810 807 813 97 + 810 807 861 103 807 813 816 95 807 813 + 819 95 804 801 807 104 801 807 810 105 + 894 900 903 92 885 879 888 109 882 879 + 885 93 882 879 888 109 879 888 891 110 + 876 873 879 97 876 873 894 103 873 879 + 882 97 873 879 885 97 870 867 873 104 + 867 873 876 105 951 957 960 92 945 939 + 948 96 942 939 945 96 942 939 948 96 + 936 930 939 95 933 930 936 96 933 930 + 939 95 930 939 942 95 930 939 945 95 + 930 939 948 95 924 918 927 96 921 918 + 924 96 921 918 927 96 915 912 918 95 + 915 912 930 95 912 918 921 95 912 918 + 924 95 912 918 927 95 912 930 933 95 + 912 930 936 95 909 906 912 97 909 906 + 951 103 906 912 915 95 903 900 906 104 + 900 906 909 105 981 987 990 92 975 969 + 978 96 972 969 975 96 972 969 978 96 + 966 963 969 97 966 963 981 103 963 969 + 972 95 963 969 975 95 963 969 978 95 + 960 957 963 104 957 963 966 105 1044 1050 + 1053 92 1035 1032 1038 106 1032 1038 1041 106 + 1023 1026 1029 113 1023 1032 1035 114 1020 1017 + 1023 114 1014 1011 1017 106 1011 1017 1020 106 + 1008 1011 1014 106 1008 1038 1041 106 1005 999 + 1008 107 1002 999 1005 96 1002 999 1008 107 + 996 993 999 97 996 993 1044 103 993 999 + 1002 95 993 999 1005 95 990 987 993 104 + 987 993 996 105 1065 1071 1074 92 1062 1056 + 1065 103 1059 1056 1062 93 1059 1056 1065 103 + 1053 1050 1056 104 1050 1056 1059 105 1050 1056 + 1062 105 1122 1128 1131 92 1116 1110 1119 96 + 1113 1110 1116 96 1113 1110 1119 96 1107 1101 + 1110 95 1104 1101 1107 96 1104 1101 1110 95 + 1101 1110 1113 95 1101 1110 1116 95 1101 1110 + 1119 95 1095 1089 1098 96 1092 1089 1095 96 + 1092 1089 1098 96 1086 1083 1089 95 1086 1083 + 1101 95 1083 1089 1092 95 1083 1089 1095 95 + 1083 1089 1098 95 1083 1101 1104 95 1083 1101 + 1107 95 1080 1077 1083 97 1080 1077 1122 103 + 1077 1083 1086 95 1074 1071 1077 104 1071 1077 + 1080 105 1152 1158 1161 92 1146 1140 1149 96 + 1143 1140 1146 96 1143 1140 1149 96 1137 1134 + 1140 97 1137 1134 1152 103 1134 1140 1143 95 + 1134 1140 1146 95 1134 1140 1149 95 1131 1128 + 1134 104 1128 1134 1137 105 1218 1224 1227 92 + 1212 1206 1215 101 1209 1206 1212 101 1209 1206 + 1215 101 1203 1197 1206 102 1200 1197 1203 108 + 1200 1197 1206 102 1197 1206 1209 100 1197 1206 + 1212 100 1197 1206 1215 100 1194 1188 1197 95 + 1191 1188 1194 96 1191 1188 1197 95 1188 1197 + 1200 98 1188 1197 1203 98 1185 1179 1188 95 + 1182 1179 1185 96 1182 1179 1188 95 1179 1188 + 1191 95 1179 1188 1194 95 1176 1170 1179 95 + 1173 1170 1176 96 1173 1170 1179 95 1170 1179 + 1182 95 1170 1179 1185 95 1167 1164 1170 97 + 1167 1164 1218 103 1164 1170 1173 95 1164 1170 + 1176 95 1161 1158 1164 104 1158 1164 1167 105 + 1248 1254 1257 92 1242 1236 1245 96 1239 1236 + 1242 96 1239 1236 1245 96 1233 1230 1236 97 + 1233 1230 1248 103 1230 1236 1239 95 1230 1236 + 1242 95 1230 1236 1245 95 1227 1224 1230 104 + 1224 1230 1233 105 1299 1305 1308 92 1293 1287 + 1296 93 1290 1287 1293 93 1290 1287 1296 93 + 1284 1287 1290 94 1284 1287 1293 94 1284 1287 + 1296 94 1281 1275 1284 94 1278 1275 1281 93 + 1278 1275 1284 94 1272 1266 1275 95 1269 1266 + 1272 96 1269 1266 1275 95 1266 1275 1278 97 + 1266 1275 1281 97 1263 1260 1266 97 1263 1260 + 1299 103 1260 1266 1269 95 1260 1266 1272 95 + 1257 1254 1260 104 1254 1260 1263 105 1350 1356 + 1359 92 1341 1338 1344 115 1338 1344 1347 116 + 1335 1332 1338 117 1332 1338 1341 118 1329 1332 + 1335 119 1326 1344 1347 120 1323 1317 1326 121 + 1320 1317 1323 96 1320 1317 1326 121 1314 1311 + 1317 97 1314 1311 1350 103 1311 1317 1320 95 + 1311 1317 1323 95 1308 1305 1311 104 1305 1311 + 1314 105 1422 1428 1431 92 1416 1413 1419 122 + 1407 1404 1410 122 1401 1404 1407 123 1401 1404 + 1410 123 1401 1413 1416 123 1401 1413 1419 123 + 1398 1395 1401 123 1392 1386 1395 124 1389 1386 + 1392 93 1389 1386 1395 124 1386 1395 1398 125 + 1383 1377 1386 95 1380 1377 1383 96 1380 1377 + 1386 95 1377 1386 1389 97 1377 1386 1392 97 + 1374 1368 1377 95 1371 1368 1374 96 1371 1368 + 1377 95 1368 1377 1380 95 1368 1377 1383 95 + 1365 1362 1368 97 1365 1362 1422 103 1362 1368 + 1371 95 1362 1368 1374 95 1359 1356 1362 104 + 1356 1362 1365 105 1467 1473 1476 92 1455 1449 + 1458 112 1452 1449 1455 96 1452 1449 1458 112 + 1446 1440 1449 95 1443 1440 1446 96 1443 1440 + 1449 95 1440 1449 1452 95 1440 1449 1455 95 + 1437 1434 1440 97 1437 1434 1467 103 1434 1440 + 1443 95 1434 1440 1446 95 1431 1428 1434 104 + 1428 1434 1437 105 1488 1494 1497 92 1485 1479 + 1488 103 1482 1479 1485 93 1482 1479 1488 103 + 1476 1473 1479 104 1473 1479 1482 105 1473 1479 + 1485 105 1518 1524 1527 92 1512 1506 1515 96 + 1509 1506 1512 96 1509 1506 1515 96 1503 1500 + 1506 97 1503 1500 1518 103 1500 1506 1509 95 + 1500 1506 1512 95 1500 1506 1515 95 1497 1494 + 1500 104 1494 1500 1503 105 1563 1569 1572 92 + 1551 1545 1554 112 1548 1545 1551 96 1548 1545 + 1554 112 1542 1536 1545 95 1539 1536 1542 96 + 1539 1536 1545 95 1536 1545 1548 95 1536 1545 + 1551 95 1533 1530 1536 97 1533 1530 1563 103 + 1530 1536 1539 95 1530 1536 1542 95 1527 1524 + 1530 104 1524 1530 1533 105 1620 1626 1629 92 + 1614 1608 1617 96 1611 1608 1614 96 1611 1608 + 1617 96 1602 1596 1605 96 1599 1596 1602 96 + 1599 1596 1605 96 1593 1590 1596 95 1593 1590 + 1608 95 1590 1596 1599 95 1590 1596 1602 95 + 1590 1596 1605 95 1590 1608 1611 95 1590 1608 + 1614 95 1590 1608 1617 95 1587 1581 1590 95 + 1584 1581 1587 96 1584 1581 1590 95 1581 1590 + 1593 95 1578 1575 1581 97 1578 1575 1620 103 + 1575 1581 1584 95 1575 1581 1587 95 1572 1569 + 1575 104 1569 1575 1578 105 1650 1656 1659 92 + 1644 1638 1647 96 1641 1638 1644 96 1641 1638 + 1647 96 1635 1632 1638 97 1635 1632 1650 103 + 1632 1638 1641 95 1632 1638 1644 95 1632 1638 + 1647 95 1629 1626 1632 104 1626 1632 1635 105 + 1710 1716 1719 92 1701 1698 1704 106 1698 1704 + 1707 106 1695 1692 1698 106 1692 1698 1701 106 + 1689 1686 1692 106 1686 1692 1695 106 1683 1680 + 1686 106 1680 1686 1689 106 1677 1680 1683 106 + 1677 1704 1707 106 1674 1668 1677 107 1671 1668 + 1674 96 1671 1668 1677 107 1665 1662 1668 97 + 1665 1662 1710 103 1662 1668 1671 95 1662 1668 + 1674 95 1659 1656 1662 104 1656 1662 1665 105 + 1752 1758 1761 92 1740 1734 1743 96 1737 1734 + 1740 96 1737 1734 1743 96 1731 1728 1734 97 + 1731 1728 1746 109 1728 1734 1737 95 1728 1734 + 1740 95 1728 1734 1743 95 1728 1746 1749 110 + 1725 1722 1728 97 1725 1722 1752 103 1722 1728 + 1731 97 1719 1716 1722 104 1716 1722 1725 105 + 1815 1821 1824 92 1806 1803 1809 106 1803 1809 + 1812 106 1794 1797 1800 113 1794 1803 1806 114 + 1791 1788 1794 114 1785 1782 1788 106 1782 1788 + 1791 106 1779 1782 1785 106 1779 1809 1812 106 + 1776 1770 1779 107 1773 1770 1776 96 1773 1770 + 1779 107 1767 1764 1770 97 1767 1764 1815 103 + 1764 1770 1773 95 1764 1770 1776 95 1761 1758 + 1764 104 1758 1764 1767 105 1863 1869 1872 92 + 1857 1851 1860 96 1854 1851 1857 96 1854 1851 + 1860 96 1845 1839 1848 96 1842 1839 1845 96 + 1842 1839 1848 96 1836 1833 1839 95 1836 1833 + 1851 95 1833 1839 1842 95 1833 1839 1845 95 + 1833 1839 1848 95 1833 1851 1854 95 1833 1851 + 1857 95 1833 1851 1860 95 1830 1827 1833 97 + 1830 1827 1863 103 1827 1833 1836 95 1824 1821 + 1827 104 1821 1827 1830 105 1884 1890 1893 92 + 1881 1875 1884 103 1878 1875 1881 93 1878 1875 + 1884 103 1872 1869 1875 104 1869 1875 1878 105 + 1869 1875 1881 105 1935 1941 1944 92 1929 1926 + 1932 111 1920 1926 1929 92 1920 1926 1932 92 + 1917 1911 1920 112 1914 1911 1917 96 1914 1911 + 1920 112 1908 1902 1911 95 1905 1902 1908 96 + 1905 1902 1911 95 1902 1911 1914 95 1902 1911 + 1917 95 1899 1896 1902 97 1899 1896 1935 103 + 1896 1902 1905 95 1896 1902 1908 95 1893 1890 + 1896 104 1890 1896 1899 105 1995 2001 2004 92 + 1986 1983 1989 106 1983 1989 1992 106 1980 1977 + 1983 106 1977 1983 1986 106 1974 1971 1977 106 + 1971 1977 1980 106 1968 1965 1971 106 1965 1971 + 1974 106 1962 1965 1968 106 1962 1989 1992 106 + 1959 1953 1962 107 1956 1953 1959 96 1956 1953 + 1962 107 1950 1947 1953 97 1950 1947 1995 103 + 1947 1953 1956 95 1947 1953 1959 95 1944 1941 + 1947 104 1941 1947 1950 105 2061 2067 2070 92 + 2055 2049 2058 101 2052 2049 2055 101 2052 2049 + 2058 101 2046 2040 2049 102 2043 2040 2046 108 + 2043 2040 2049 102 2040 2049 2052 100 2040 2049 + 2055 100 2040 2049 2058 100 2037 2031 2040 95 + 2034 2031 2037 96 2034 2031 2040 95 2031 2040 + 2043 98 2031 2040 2046 98 2028 2022 2031 95 + 2025 2022 2028 96 2025 2022 2031 95 2022 2031 + 2034 95 2022 2031 2037 95 2019 2013 2022 95 + 2016 2013 2019 96 2016 2013 2022 95 2013 2022 + 2025 95 2013 2022 2028 95 2010 2007 2013 97 + 2010 2007 2061 103 2007 2013 2016 95 2007 2013 + 2019 95 2004 2001 2007 104 2001 2007 2010 105 + 2097 2103 2106 92 2085 2079 2088 112 2082 2079 + 2085 96 2082 2079 2088 112 2076 2073 2079 97 + 2076 2073 2097 103 2073 2079 2082 95 2073 2079 + 2085 95 2070 2067 2073 104 2067 2073 2076 105 + 2169 2175 2178 92 2163 2160 2166 122 2154 2151 + 2157 122 2148 2151 2154 123 2148 2151 2157 123 + 2148 2160 2163 123 2148 2160 2166 123 2145 2142 + 2148 123 2139 2133 2142 124 2136 2133 2139 93 + 2136 2133 2142 124 2133 2142 2145 125 2130 2124 + 2133 95 2127 2124 2130 96 2127 2124 2133 95 + 2124 2133 2136 97 2124 2133 2139 97 2121 2115 + 2124 95 2118 2115 2121 96 2118 2115 2124 95 + 2115 2124 2127 95 2115 2124 2130 95 2112 2109 + 2115 97 2112 2109 2169 103 2109 2115 2118 95 + 2109 2115 2121 95 2106 2103 2109 104 2103 2109 + 2112 105 2217 2223 2226 92 2211 2205 2214 96 + 2208 2205 2211 96 2208 2205 2214 96 2199 2193 + 2202 96 2196 2193 2199 96 2196 2193 2202 96 + 2190 2187 2193 95 2190 2187 2205 95 2187 2193 + 2196 95 2187 2193 2199 95 2187 2193 2202 95 + 2187 2205 2208 95 2187 2205 2211 95 2187 2205 + 2214 95 2184 2181 2187 97 2184 2181 2217 103 + 2181 2187 2190 95 2178 2175 2181 104 2175 2181 + 2184 105 2262 2268 2271 92 2250 2244 2253 112 + 2247 2244 2250 96 2247 2244 2253 112 2241 2235 + 2244 95 2238 2235 2241 96 2238 2235 2244 95 + 2235 2244 2247 95 2235 2244 2250 95 2232 2229 + 2235 97 2232 2229 2262 103 2229 2235 2238 95 + 2229 2235 2241 95 2226 2223 2229 104 2223 2229 + 2232 105 2328 2334 2337 92 2322 2316 2325 101 + 2319 2316 2322 101 2319 2316 2325 101 2313 2307 + 2316 102 2310 2307 2313 108 2310 2307 2316 102 + 2307 2316 2319 100 2307 2316 2322 100 2307 2316 + 2325 100 2304 2298 2307 95 2301 2298 2304 96 + 2301 2298 2307 95 2298 2307 2310 98 2298 2307 + 2313 98 2295 2289 2298 95 2292 2289 2295 96 + 2292 2289 2298 95 2289 2298 2301 95 2289 2298 + 2304 95 2286 2280 2289 95 2283 2280 2286 96 + 2283 2280 2289 95 2280 2289 2292 95 2280 2289 + 2295 95 2277 2274 2280 97 2277 2274 2328 103 + 2274 2280 2283 95 2274 2280 2286 95 2271 2268 + 2274 104 2268 2274 2277 105 2385 2391 2394 92 + 2379 2373 2382 96 2376 2373 2379 96 2376 2373 + 2382 96 2367 2361 2370 96 2364 2361 2367 96 + 2364 2361 2370 96 2358 2355 2361 95 2358 2355 + 2373 95 2355 2361 2364 95 2355 2361 2367 95 + 2355 2361 2370 95 2355 2373 2376 95 2355 2373 + 2379 95 2355 2373 2382 95 2352 2346 2355 95 + 2349 2346 2352 96 2349 2346 2355 95 2346 2355 + 2358 95 2343 2340 2346 97 2343 2340 2385 103 + 2340 2346 2349 95 2340 2346 2352 95 2337 2334 + 2340 104 2334 2340 2343 105 2418 2424 2427 92 + 2409 2403 2412 126 2406 2403 2409 93 2406 2403 + 2412 126 2403 2412 2415 127 2400 2397 2403 97 + 2400 2397 2418 103 2397 2403 2406 97 2397 2403 + 2409 97 2394 2391 2397 104 2391 2397 2400 105 + 2448 2454 2457 92 2442 2436 2445 96 2439 2436 + 2442 96 2439 2436 2445 96 2433 2430 2436 97 + 2433 2430 2448 103 2430 2436 2439 95 2430 2436 + 2442 95 2430 2436 2445 95 2427 2424 2430 104 + 2424 2430 2433 105 2493 2499 2502 92 2481 2475 + 2484 112 2478 2475 2481 96 2478 2475 2484 112 + 2472 2466 2475 95 2469 2466 2472 96 2469 2466 + 2475 95 2466 2475 2478 95 2466 2475 2481 95 + 2463 2460 2466 97 2463 2460 2493 103 2460 2466 + 2469 95 2460 2466 2472 95 2457 2454 2460 104 + 2454 2460 2463 105 2553 2559 2562 92 2544 2541 + 2547 106 2541 2547 2550 106 2538 2535 2541 106 + 2535 2541 2544 106 2532 2529 2535 106 2529 2535 + 2538 106 2526 2523 2529 106 2523 2529 2532 106 + 2520 2523 2526 106 2520 2547 2550 106 2517 2511 + 2520 107 2514 2511 2517 96 2514 2511 2520 107 + 2508 2505 2511 97 2508 2505 2553 103 2505 2511 + 2514 95 2505 2511 2517 95 2502 2499 2505 104 + 2499 2505 2508 105 2589 2586 2592 111 2580 2586 + 2589 92 2580 2586 2592 92 2577 2571 2580 112 + 2574 2571 2577 96 2574 2571 2580 112 2568 2565 + 2571 97 2568 2565 2595 103 2565 2571 2574 95 + 2565 2571 2577 95 2562 2559 2565 104 2559 2565 + 2568 105 2637 2643 2646 92 2634 2631 2637 103 + 2628 2622 2631 95 2625 2622 2628 96 2625 2622 + 2631 95 2622 2631 2634 97 2619 2613 2622 95 + 2616 2613 2619 96 2616 2613 2622 95 2613 2622 + 2625 95 2613 2622 2628 95 2610 2604 2613 97 + 2607 2604 2610 93 2607 2604 2613 97 2604 2613 + 2616 95 2604 2613 2619 95 2601 2604 2607 105 + 2601 2604 2610 105 2601 2631 2634 105 2667 2673 + 2676 92 2661 2655 2664 96 2658 2655 2661 96 + 2658 2655 2664 96 2652 2649 2655 97 2652 2649 + 2667 103 2649 2655 2658 95 2649 2655 2661 95 + 2649 2655 2664 95 2646 2643 2649 104 2643 2649 + 2652 105 2697 2703 2706 92 2691 2685 2694 96 + 2688 2685 2691 96 2688 2685 2694 96 2682 2679 + 2685 97 2682 2679 2697 103 2679 2685 2688 95 + 2679 2685 2691 95 2679 2685 2694 95 2676 2673 + 2679 104 2673 2679 2682 105 2745 2751 2754 92 + 2739 2733 2742 96 2736 2733 2739 96 2736 2733 + 2742 96 2727 2721 2730 96 2724 2721 2727 96 + 2724 2721 2730 96 2718 2715 2721 95 2718 2715 + 2733 95 2715 2721 2724 95 2715 2721 2727 95 + 2715 2721 2730 95 2715 2733 2736 95 2715 2733 + 2739 95 2715 2733 2742 95 2712 2709 2715 97 + 2712 2709 2745 103 2709 2715 2718 95 2706 2703 + 2709 104 2703 2709 2712 105 2796 2790 2799 96 + 2793 2790 2796 96 2793 2790 2799 96 2784 2778 + 2787 96 2781 2778 2784 96 2781 2778 2787 96 + 2775 2772 2778 95 2775 2772 2790 95 2772 2778 + 2781 95 2772 2778 2784 95 2772 2778 2787 95 + 2772 2790 2793 95 2772 2790 2796 95 2772 2790 + 2799 95 2769 2763 2772 95 2766 2763 2769 96 + 2766 2763 2772 95 2763 2772 2775 95 2760 2757 + 2763 97 2760 2757 2802 103 2757 2763 2766 95 + 2757 2763 2769 95 2754 2751 2757 104 2751 2757 + 2760 105 2844 2850 2853 92 2841 2838 2844 103 + 2835 2829 2838 95 2832 2829 2835 96 2832 2829 + 2838 95 2829 2838 2841 97 2826 2820 2829 95 + 2823 2820 2826 96 2823 2820 2829 95 2820 2829 + 2832 95 2820 2829 2835 95 2817 2811 2820 97 + 2814 2811 2817 93 2814 2811 2820 97 2811 2820 + 2823 95 2811 2820 2826 95 2808 2811 2814 105 + 2808 2811 2817 105 2808 2838 2841 105 2877 2883 + 2886 92 2868 2862 2871 126 2865 2862 2868 93 + 2865 2862 2871 126 2862 2871 2874 127 2859 2856 + 2862 97 2859 2856 2877 103 2856 2862 2865 97 + 2856 2862 2868 97 2853 2850 2856 104 2850 2856 + 2859 105 2913 2919 2922 92 2901 2895 2904 112 + 2898 2895 2901 96 2898 2895 2904 112 2892 2889 + 2895 97 2892 2889 2913 103 2889 2895 2898 95 + 2889 2895 2901 95 2886 2883 2889 104 2883 2889 + 2892 105 2961 2967 2970 92 2955 2949 2958 96 + 2952 2949 2955 96 2952 2949 2958 96 2943 2937 + 2946 96 2940 2937 2943 96 2940 2937 2946 96 + 2934 2931 2937 95 2934 2931 2949 95 2931 2937 + 2940 95 2931 2937 2943 95 2931 2937 2946 95 + 2931 2949 2952 95 2931 2949 2955 95 2931 2949 + 2958 95 2928 2925 2931 97 2928 2925 2961 103 + 2925 2931 2934 95 2922 2919 2925 104 2919 2925 + 2928 105 3018 3024 3027 92 3012 3006 3015 96 + 3009 3006 3012 96 3009 3006 3015 96 3003 2997 + 3006 95 3000 2997 3003 96 3000 2997 3006 95 + 2997 3006 3009 95 2997 3006 3012 95 2997 3006 + 3015 95 2991 2985 2994 96 2988 2985 2991 96 + 2988 2985 2994 96 2982 2979 2985 95 2982 2979 + 2997 95 2979 2985 2988 95 2979 2985 2991 95 + 2979 2985 2994 95 2979 2997 3000 95 2979 2997 + 3003 95 2976 2973 2979 97 2976 2973 3018 103 + 2973 2979 2982 95 2970 2967 2973 104 2967 2973 + 2976 105 3051 3057 3060 92 3042 3036 3045 109 + 3039 3036 3042 93 3039 3036 3045 109 3036 3045 + 3048 110 3033 3030 3036 97 3033 3030 3051 103 + 3030 3036 3039 97 3030 3036 3042 97 3027 3024 + 3030 104 3024 3030 3033 105 3087 3093 3096 92 + 3075 3069 3078 112 3072 3069 3075 96 3072 3069 + 3078 112 3066 3063 3069 97 3066 3063 3087 103 + 3063 3069 3072 95 3063 3069 3075 95 3060 3057 + 3063 104 3057 3063 3066 105 3138 3144 3147 92 + 3132 3129 3135 111 3123 3129 3132 92 3123 3129 + 3135 92 3120 3114 3123 112 3117 3114 3120 96 + 3117 3114 3123 112 3111 3105 3114 95 3108 3105 + 3111 96 3108 3105 3114 95 3105 3114 3117 95 + 3105 3114 3120 95 3102 3099 3105 97 3102 3099 + 3138 103 3099 3105 3108 95 3099 3105 3111 95 + 3096 3093 3099 104 3093 3099 3102 105 3183 3189 + 3192 92 3171 3165 3174 112 3168 3165 3171 96 + 3168 3165 3174 112 3162 3156 3165 95 3159 3156 + 3162 96 3159 3156 3165 95 3156 3165 3168 95 + 3156 3165 3171 95 3153 3150 3156 97 3153 3150 + 3183 103 3150 3156 3159 95 3150 3156 3162 95 + 3147 3144 3150 104 3144 3150 3153 105 3240 3246 + 3249 92 3234 3228 3237 96 3231 3228 3234 96 + 3231 3228 3237 96 3225 3219 3228 95 3222 3219 + 3225 96 3222 3219 3228 95 3219 3228 3231 95 + 3219 3228 3234 95 3219 3228 3237 95 3213 3207 + 3216 96 3210 3207 3213 96 3210 3207 3216 96 + 3204 3201 3207 95 3204 3201 3219 95 3201 3207 + 3210 95 3201 3207 3213 95 3201 3207 3216 95 + 3201 3219 3222 95 3201 3219 3225 95 3198 3195 + 3201 97 3198 3195 3240 103 3195 3201 3204 95 + 3192 3189 3195 104 3189 3195 3198 105 3306 3312 + 3315 92 3300 3294 3303 101 3297 3294 3300 101 + 3297 3294 3303 101 3291 3285 3294 102 3288 3285 + 3291 108 3288 3285 3294 102 3285 3294 3297 100 + 3285 3294 3300 100 3285 3294 3303 100 3282 3276 + 3285 95 3279 3276 3282 96 3279 3276 3285 95 + 3276 3285 3288 98 3276 3285 3291 98 3273 3267 + 3276 95 3270 3267 3273 96 3270 3267 3276 95 + 3267 3276 3279 95 3267 3276 3282 95 3264 3258 + 3267 95 3261 3258 3264 96 3261 3258 3267 95 + 3258 3267 3270 95 3258 3267 3273 95 3255 3252 + 3258 97 3255 3252 3306 103 3252 3258 3261 95 + 3252 3258 3264 95 3249 3246 3252 104 3246 3252 + 3255 105 3342 3348 3351 92 3330 3324 3333 112 + 3327 3324 3330 96 3327 3324 3333 112 3321 3318 + 3324 97 3321 3318 3342 103 3318 3324 3327 95 + 3318 3324 3330 95 3315 3312 3318 104 3312 3318 + 3321 105 3399 3405 3408 92 3393 3387 3396 96 + 3390 3387 3393 96 3390 3387 3396 96 3381 3375 + 3384 96 3378 3375 3381 96 3378 3375 3384 96 + 3372 3369 3375 95 3372 3369 3387 95 3369 3375 + 3378 95 3369 3375 3381 95 3369 3375 3384 95 + 3369 3387 3390 95 3369 3387 3393 95 3369 3387 + 3396 95 3366 3360 3369 95 3363 3360 3366 96 + 3363 3360 3369 95 3360 3369 3372 95 3357 3354 + 3360 97 3357 3354 3399 103 3354 3360 3363 95 + 3354 3360 3366 95 3351 3348 3354 104 3348 3354 + 3357 105 3459 3465 3468 92 3450 3447 3453 106 + 3447 3453 3456 106 3444 3441 3447 106 3441 3447 + 3450 106 3438 3435 3441 106 3435 3441 3444 106 + 3432 3429 3435 106 3429 3435 3438 106 3426 3429 + 3432 106 3426 3453 3456 106 3423 3417 3426 107 + 3420 3417 3423 96 3420 3417 3426 107 3414 3411 + 3417 97 3414 3411 3459 103 3411 3417 3420 95 + 3411 3417 3423 95 3408 3405 3411 104 3405 3411 + 3414 105 3507 3513 3516 92 3501 3495 3504 96 + 3498 3495 3501 96 3498 3495 3504 96 3489 3483 + 3492 96 3486 3483 3489 96 3486 3483 3492 96 + 3480 3477 3483 95 3480 3477 3495 95 3477 3483 + 3486 95 3477 3483 3489 95 3477 3483 3492 95 + 3477 3495 3498 95 3477 3495 3501 95 3477 3495 + 3504 95 3474 3471 3477 97 3474 3471 3507 103 + 3471 3477 3480 95 3468 3465 3471 104 3465 3471 + 3474 105 3552 3558 3561 92 3540 3534 3543 112 + 3537 3534 3540 96 3537 3534 3543 112 3531 3525 + 3534 95 3528 3525 3531 96 3528 3525 3534 95 + 3525 3534 3537 95 3525 3534 3540 95 3522 3519 + 3525 97 3522 3519 3552 103 3519 3525 3528 95 + 3519 3525 3531 95 3516 3513 3519 104 3513 3519 + 3522 105 3609 3615 3618 92 3603 3597 3606 96 + 3600 3597 3603 96 3600 3597 3606 96 3591 3585 + 3594 96 3588 3585 3591 96 3588 3585 3594 96 + 3582 3579 3585 95 3582 3579 3597 95 3579 3585 + 3588 95 3579 3585 3591 95 3579 3585 3594 95 + 3579 3597 3600 95 3579 3597 3603 95 3579 3597 + 3606 95 3576 3570 3579 95 3573 3570 3576 96 + 3573 3570 3579 95 3570 3579 3582 95 3567 3564 + 3570 97 3567 3564 3609 103 3564 3570 3573 95 + 3564 3570 3576 95 3561 3558 3564 104 3558 3564 + 3567 105 3630 3636 3639 92 3627 3621 3630 103 + 3624 3621 3627 93 3624 3621 3630 103 3618 3615 + 3621 104 3615 3621 3624 105 3615 3621 3627 105 + 3696 3702 3705 92 3690 3684 3693 101 3687 3684 + 3690 101 3687 3684 3693 101 3681 3675 3684 102 + 3678 3675 3681 108 3678 3675 3684 102 3675 3684 + 3687 100 3675 3684 3690 100 3675 3684 3693 100 + 3672 3666 3675 95 3669 3666 3672 96 3669 3666 + 3675 95 3666 3675 3678 98 3666 3675 3681 98 + 3663 3657 3666 95 3660 3657 3663 96 3660 3657 + 3666 95 3657 3666 3669 95 3657 3666 3672 95 + 3654 3648 3657 95 3651 3648 3654 96 3651 3648 + 3657 95 3648 3657 3660 95 3648 3657 3663 95 + 3645 3642 3648 97 3645 3642 3696 103 3642 3648 + 3651 95 3642 3648 3654 95 3639 3636 3642 104 + 3636 3642 3645 105 3744 3750 3753 92 3738 3732 + 3741 96 3735 3732 3738 96 3735 3732 3741 96 + 3726 3720 3729 96 3723 3720 3726 96 3723 3720 + 3729 96 3717 3714 3720 95 3717 3714 3732 95 + 3714 3720 3723 95 3714 3720 3726 95 3714 3720 + 3729 95 3714 3732 3735 95 3714 3732 3738 95 + 3714 3732 3741 95 3711 3708 3714 97 3711 3708 + 3744 103 3708 3714 3717 95 3705 3702 3708 104 + 3702 3708 3711 105 3816 3822 3825 92 3810 3807 + 3813 128 3804 3801 3807 106 3801 3807 3810 106 + 3798 3795 3801 106 3795 3801 3804 106 3792 3789 + 3795 106 3789 3795 3798 106 3786 3789 3792 129 + 3783 3780 3786 130 3777 3774 3780 116 3774 3780 + 3783 115 3771 3774 3777 131 3768 3762 3771 132 + 3765 3762 3768 96 3765 3762 3771 132 3759 3756 + 3762 97 3759 3756 3816 103 3756 3762 3765 95 + 3756 3762 3768 95 3753 3750 3756 104 3750 3756 + 3759 105 3852 3858 3861 92 3840 3834 3843 112 + 3837 3834 3840 96 3837 3834 3843 112 3831 3828 + 3834 97 3831 3828 3852 103 3828 3834 3837 95 + 3828 3834 3840 95 3825 3822 3828 104 3822 3828 + 3831 105 3873 3879 3882 92 3870 3864 3873 103 + 3867 3864 3870 93 3867 3864 3873 103 3861 3858 + 3864 104 3858 3864 3867 105 3858 3864 3870 105 + 3930 3936 3939 92 3924 3918 3927 96 3921 3918 + 3924 96 3921 3918 3927 96 3912 3906 3915 96 + 3909 3906 3912 96 3909 3906 3915 96 3903 3900 + 3906 95 3903 3900 3918 95 3900 3906 3909 95 + 3900 3906 3912 95 3900 3906 3915 95 3900 3918 + 3921 95 3900 3918 3924 95 3900 3918 3927 95 + 3897 3891 3900 95 3894 3891 3897 96 3894 3891 + 3900 95 3891 3900 3903 95 3888 3885 3891 97 + 3888 3885 3930 103 3885 3891 3894 95 3885 3891 + 3897 95 3882 3879 3885 104 3879 3885 3888 105 + 3966 3972 3975 92 3954 3948 3957 112 3951 3948 + 3954 96 3951 3948 3957 112 3945 3942 3948 97 + 3945 3942 3966 103 3942 3948 3951 95 3942 3948 + 3954 95 3939 3936 3942 104 3936 3942 3945 105 + 3996 4002 4005 92 3990 3984 3993 96 3987 3984 + 3990 96 3987 3984 3993 96 3981 3978 3984 97 + 3981 3978 3996 103 3978 3984 3987 95 3978 3984 + 3990 95 3978 3984 3993 95 3975 3972 3978 104 + 3972 3978 3981 105 4053 4059 4062 92 4047 4041 + 4050 96 4044 4041 4047 96 4044 4041 4050 96 + 4038 4032 4041 95 4035 4032 4038 96 4035 4032 + 4041 95 4032 4041 4044 95 4032 4041 4047 95 + 4032 4041 4050 95 4026 4020 4029 96 4023 4020 + 4026 96 4023 4020 4029 96 4017 4014 4020 95 + 4017 4014 4032 95 4014 4020 4023 95 4014 4020 + 4026 95 4014 4020 4029 95 4014 4032 4035 95 + 4014 4032 4038 95 4011 4008 4014 97 4011 4008 + 4053 103 4008 4014 4017 95 4005 4002 4008 104 + 4002 4008 4011 105 4101 4107 4110 92 4095 4089 + 4098 96 4092 4089 4095 96 4092 4089 4098 96 + 4083 4077 4086 96 4080 4077 4083 96 4080 4077 + 4086 96 4074 4071 4077 95 4074 4071 4089 95 + 4071 4077 4080 95 4071 4077 4083 95 4071 4077 + 4086 95 4071 4089 4092 95 4071 4089 4095 95 + 4071 4089 4098 95 4068 4065 4071 97 4068 4065 + 4101 103 4065 4071 4074 95 4062 4059 4065 104 + 4059 4065 4068 105 4152 4158 4161 92 4143 4140 + 4146 115 4140 4146 4149 116 4137 4134 4140 117 + 4134 4140 4143 118 4131 4134 4137 119 4128 4146 + 4149 120 4125 4119 4128 121 4122 4119 4125 96 + 4122 4119 4128 121 4116 4113 4119 97 4116 4113 + 4152 103 4113 4119 4122 95 4113 4119 4125 95 + 4110 4107 4113 104 4107 4113 4116 105 4185 4191 + 4194 92 4176 4170 4179 109 4173 4170 4176 93 + 4173 4170 4179 109 4170 4179 4182 110 4167 4164 + 4170 97 4167 4164 4185 103 4164 4170 4173 97 + 4164 4170 4176 97 4161 4158 4164 104 4158 4164 + 4167 105 4242 4248 4251 92 4236 4230 4239 96 + 4233 4230 4236 96 4233 4230 4239 96 4227 4221 + 4230 95 4224 4221 4227 96 4224 4221 4230 95 + 4221 4230 4233 95 4221 4230 4236 95 4221 4230 + 4239 95 4215 4209 4218 96 4212 4209 4215 96 + 4212 4209 4218 96 4206 4203 4209 95 4206 4203 + 4221 95 4203 4209 4212 95 4203 4209 4215 95 + 4203 4209 4218 95 4203 4221 4224 95 4203 4221 + 4227 95 4200 4197 4203 97 4200 4197 4242 103 + 4197 4203 4206 95 4194 4191 4197 104 4191 4197 + 4200 105 4272 4278 4281 92 4266 4260 4269 96 + 4263 4260 4266 96 4263 4260 4269 96 4257 4254 + 4260 97 4257 4254 4272 103 4254 4260 4263 95 + 4254 4260 4266 95 4254 4260 4269 95 4251 4248 + 4254 104 4248 4254 4257 105 4332 4338 4341 92 + 4323 4320 4326 106 4320 4326 4329 106 4317 4314 + 4320 106 4314 4320 4323 106 4311 4308 4314 106 + 4308 4314 4317 106 4305 4302 4308 106 4302 4308 + 4311 106 4299 4302 4305 106 4299 4326 4329 106 + 4296 4290 4299 107 4293 4290 4296 96 4293 4290 + 4299 107 4287 4284 4290 97 4287 4284 4332 103 + 4284 4290 4293 95 4284 4290 4296 95 4281 4278 + 4284 104 4278 4284 4287 105 4356 4350 4359 96 + 4353 4350 4356 96 4353 4350 4359 96 4347 4344 + 4350 97 4347 4344 4362 103 4344 4350 4353 95 + 4344 4350 4356 95 4344 4350 4359 95 4341 4338 + 4344 104 4338 4344 4347 105 4404 4410 4413 92 + 4401 4398 4404 103 4395 4389 4398 95 4392 4389 + 4395 96 4392 4389 4398 95 4389 4398 4401 97 + 4386 4380 4389 95 4383 4380 4386 96 4383 4380 + 4389 95 4380 4389 4392 95 4380 4389 4395 95 + 4377 4371 4380 97 4374 4371 4377 93 4374 4371 + 4380 97 4371 4380 4383 95 4371 4380 4386 95 + 4368 4371 4374 105 4368 4371 4377 105 4368 4398 + 4401 105 4476 4482 4485 92 4470 4467 4473 122 + 4461 4458 4464 122 4455 4458 4461 123 4455 4458 + 4464 123 4455 4467 4470 123 4455 4467 4473 123 + 4452 4449 4455 123 4446 4440 4449 124 4443 4440 + 4446 93 4443 4440 4449 124 4440 4449 4452 125 + 4437 4431 4440 95 4434 4431 4437 96 4434 4431 + 4440 95 4431 4440 4443 97 4431 4440 4446 97 + 4428 4422 4431 95 4425 4422 4428 96 4425 4422 + 4431 95 4422 4431 4434 95 4422 4431 4437 95 + 4419 4416 4422 97 4419 4416 4476 103 4416 4422 + 4425 95 4416 4422 4428 95 4413 4410 4416 104 + 4410 4416 4419 105 4512 4518 4521 92 4500 4494 + 4503 112 4497 4494 4500 96 4497 4494 4503 112 + 4491 4488 4494 97 4491 4488 4512 103 4488 4494 + 4497 95 4488 4494 4500 95 4485 4482 4488 104 + 4482 4488 4491 105 4563 4569 4572 92 4557 4554 + 4560 111 4548 4554 4557 92 4548 4554 4560 92 + 4545 4539 4548 112 4542 4539 4545 96 4542 4539 + 4548 112 4536 4530 4539 95 4533 4530 4536 96 + 4533 4530 4539 95 4530 4539 4542 95 4530 4539 + 4545 95 4527 4524 4530 97 4527 4524 4563 103 + 4524 4530 4533 95 4524 4530 4536 95 4521 4518 + 4524 104 4518 4524 4527 105 4620 4626 4629 92 + 4614 4608 4617 96 4611 4608 4614 96 4611 4608 + 4617 96 4602 4596 4605 96 4599 4596 4602 96 + 4599 4596 4605 96 4593 4590 4596 95 4593 4590 + 4608 95 4590 4596 4599 95 4590 4596 4602 95 + 4590 4596 4605 95 4590 4608 4611 95 4590 4608 + 4614 95 4590 4608 4617 95 4587 4581 4590 95 + 4584 4581 4587 96 4584 4581 4590 95 4581 4590 + 4593 95 4578 4575 4581 97 4578 4575 4620 103 + 4575 4581 4584 95 4575 4581 4587 95 4572 4569 + 4575 104 4569 4575 4578 105 4665 4671 4674 92 + 4653 4647 4656 112 4650 4647 4653 96 4650 4647 + 4656 112 4644 4638 4647 95 4641 4638 4644 96 + 4641 4638 4647 95 4638 4647 4650 95 4638 4647 + 4653 95 4635 4632 4638 97 4635 4632 4665 103 + 4632 4638 4641 95 4632 4638 4644 95 4629 4626 + 4632 104 4626 4632 4635 105 4686 4692 4695 92 + 4683 4677 4686 103 4680 4677 4683 93 4680 4677 + 4686 103 4674 4671 4677 104 4671 4677 4680 105 + 4671 4677 4683 105 4728 4734 4737 92 4722 4719 + 4725 111 4713 4719 4722 92 4713 4719 4725 92 + 4710 4704 4713 112 4707 4704 4710 96 4707 4704 + 4713 112 4701 4698 4704 97 4701 4698 4728 103 + 4698 4704 4707 95 4698 4704 4710 95 4695 4692 + 4698 104 4692 4698 4701 105 4788 4794 4797 92 + 4779 4776 4782 106 4776 4782 4785 106 4773 4770 + 4776 106 4770 4776 4779 106 4767 4764 4770 106 + 4764 4770 4773 106 4761 4758 4764 106 4758 4764 + 4767 106 4755 4758 4761 106 4755 4782 4785 106 + 4752 4746 4755 107 4749 4746 4752 96 4749 4746 + 4755 107 4743 4740 4746 97 4743 4740 4788 103 + 4740 4746 4749 95 4740 4746 4752 95 4737 4734 + 4740 104 4734 4740 4743 105 4845 4851 4854 92 + 4839 4833 4842 96 4836 4833 4839 96 4836 4833 + 4842 96 4830 4824 4833 95 4827 4824 4830 96 + 4827 4824 4833 95 4824 4833 4836 95 4824 4833 + 4839 95 4824 4833 4842 95 4818 4812 4821 96 + 4815 4812 4818 96 4815 4812 4821 96 4809 4806 + 4812 95 4809 4806 4824 95 4806 4812 4815 95 + 4806 4812 4818 95 4806 4812 4821 95 4806 4824 + 4827 95 4806 4824 4830 95 4803 4800 4806 97 + 4803 4800 4845 103 4800 4806 4809 95 4797 4794 + 4800 104 4794 4800 4803 105 4881 4887 4890 92 + 4869 4863 4872 112 4866 4863 4869 96 4866 4863 + 4872 112 4860 4857 4863 97 4860 4857 4881 103 + 4857 4863 4866 95 4857 4863 4869 95 4854 4851 + 4857 104 4851 4857 4860 105 4914 4920 4923 92 + 4905 4899 4908 126 4902 4899 4905 93 4902 4899 + 4908 126 4899 4908 4911 127 4896 4893 4899 97 + 4896 4893 4914 103 4893 4899 4902 97 4893 4899 + 4905 97 4890 4887 4893 104 4887 4893 4896 105 + 4962 4968 4971 92 4956 4950 4959 96 4953 4950 + 4956 96 4953 4950 4959 96 4944 4938 4947 96 + 4941 4938 4944 96 4941 4938 4947 96 4935 4932 + 4938 95 4935 4932 4950 95 4932 4938 4941 95 + 4932 4938 4944 95 4932 4938 4947 95 4932 4950 + 4953 95 4932 4950 4956 95 4932 4950 4959 95 + 4929 4926 4932 97 4929 4926 4962 103 4926 4932 + 4935 95 4923 4920 4926 104 4920 4926 4929 105 + 5004 5010 5013 92 4992 4986 4995 96 4989 4986 + 4992 96 4989 4986 4995 96 4983 4980 4986 97 + 4983 4980 4998 109 4980 4986 4989 95 4980 4986 + 4992 95 4980 4986 4995 95 4980 4998 5001 110 + 4977 4974 4980 97 4977 4974 5004 103 4974 4980 + 4983 97 4971 4968 4974 104 4968 4974 4977 105 + 5076 5082 5085 92 5070 5067 5073 122 5061 5058 + 5064 122 5055 5058 5061 123 5055 5058 5064 123 + 5055 5067 5070 123 5055 5067 5073 123 5052 5049 + 5055 123 5046 5040 5049 124 5043 5040 5046 93 + 5043 5040 5049 124 5040 5049 5052 125 5037 5031 + 5040 95 5034 5031 5037 96 5034 5031 5040 95 + 5031 5040 5043 97 5031 5040 5046 97 5028 5022 + 5031 95 5025 5022 5028 96 5025 5022 5031 95 + 5022 5031 5034 95 5022 5031 5037 95 5019 5016 + 5022 97 5019 5016 5076 103 5016 5022 5025 95 + 5016 5022 5028 95 5013 5010 5016 104 5010 5016 + 5019 105 5121 5127 5130 92 5109 5103 5112 112 + 5106 5103 5109 96 5106 5103 5112 112 5100 5094 + 5103 95 5097 5094 5100 96 5097 5094 5103 95 + 5094 5103 5106 95 5094 5103 5109 95 5091 5088 + 5094 97 5091 5088 5121 103 5088 5094 5097 95 + 5088 5094 5100 95 5085 5082 5088 104 5082 5088 + 5091 105 5142 5148 5151 92 5139 5133 5142 103 + 5136 5133 5139 93 5136 5133 5142 103 5130 5127 + 5133 104 5127 5133 5136 105 5127 5133 5139 105 + 5202 5208 5211 92 5193 5190 5196 106 5190 5196 + 5199 106 5187 5184 5190 106 5184 5190 5193 106 + 5181 5178 5184 106 5178 5184 5187 106 5175 5172 + 5178 106 5172 5178 5181 106 5169 5172 5175 106 + 5169 5196 5199 106 5166 5160 5169 107 5163 5160 + 5166 96 5163 5160 5169 107 5157 5154 5160 97 + 5157 5154 5202 103 5154 5160 5163 95 5154 5160 + 5166 95 5151 5148 5154 104 5148 5154 5157 105 + 5235 5241 5244 92 5226 5220 5229 109 5223 5220 + 5226 93 5223 5220 5229 109 5220 5229 5232 110 + 5217 5214 5220 97 5217 5214 5235 103 5214 5220 + 5223 97 5214 5220 5226 97 5211 5208 5214 104 + 5208 5214 5217 105 5292 5298 5301 92 5286 5280 + 5289 96 5283 5280 5286 96 5283 5280 5289 96 + 5277 5271 5280 95 5274 5271 5277 96 5274 5271 + 5280 95 5271 5280 5283 95 5271 5280 5286 95 + 5271 5280 5289 95 5265 5259 5268 96 5262 5259 + 5265 96 5262 5259 5268 96 5256 5253 5259 95 + 5256 5253 5271 95 5253 5259 5262 95 5253 5259 + 5265 95 5253 5259 5268 95 5253 5271 5274 95 + 5253 5271 5277 95 5250 5247 5253 97 5250 5247 + 5292 103 5247 5253 5256 95 5244 5241 5247 104 + 5241 5247 5250 105 5322 5328 5331 92 5316 5310 + 5319 96 5313 5310 5316 96 5313 5310 5319 96 + 5307 5304 5310 97 5307 5304 5322 103 5304 5310 + 5313 95 5304 5310 5316 95 5304 5310 5319 95 + 5301 5298 5304 104 5298 5304 5307 105 5373 5379 + 5382 92 5364 5361 5367 115 5361 5367 5370 116 + 5358 5355 5361 117 5355 5361 5364 118 5352 5355 + 5358 119 5349 5367 5370 120 5346 5340 5349 121 + 5343 5340 5346 96 5343 5340 5349 121 5337 5334 + 5340 97 5337 5334 5373 103 5334 5340 5343 95 + 5334 5340 5346 95 5331 5328 5334 104 5328 5334 + 5337 105 5409 5415 5418 92 5397 5391 5400 112 + 5394 5391 5397 96 5394 5391 5400 112 5388 5385 + 5391 97 5388 5385 5409 103 5385 5391 5394 95 + 5385 5391 5397 95 5382 5379 5385 104 5379 5385 + 5388 105 5466 5472 5475 92 5460 5454 5463 96 + 5457 5454 5460 96 5457 5454 5463 96 5451 5445 + 5454 95 5448 5445 5451 96 5448 5445 5454 95 + 5445 5454 5457 95 5445 5454 5460 95 5445 5454 + 5463 95 5439 5433 5442 96 5436 5433 5439 96 + 5436 5433 5442 96 5430 5427 5433 95 5430 5427 + 5445 95 5427 5433 5436 95 5427 5433 5439 95 + 5427 5433 5442 95 5427 5445 5448 95 5427 5445 + 5451 95 5424 5421 5427 97 5424 5421 5466 103 + 5421 5427 5430 95 5418 5415 5421 104 5415 5421 + 5424 105 5499 5505 5508 92 5490 5484 5493 109 + 5487 5484 5490 93 5487 5484 5493 109 5484 5493 + 5496 110 5481 5478 5484 97 5481 5478 5499 103 + 5478 5484 5487 97 5478 5484 5490 97 5475 5472 + 5478 104 5472 5478 5481 105 5529 5535 5538 92 + 5523 5517 5526 96 5520 5517 5523 96 5520 5517 + 5526 96 5514 5511 5517 97 5514 5511 5529 103 + 5511 5517 5520 95 5511 5517 5523 95 5511 5517 + 5526 95 5508 5505 5511 104 5505 5511 5514 105 + 5592 5598 5601 92 5583 5580 5586 106 5580 5586 + 5589 106 5571 5574 5577 113 5571 5580 5583 114 + 5568 5565 5571 114 5562 5559 5565 106 5559 5565 + 5568 106 5556 5559 5562 106 5556 5586 5589 106 + 5553 5547 5556 107 5550 5547 5553 96 5550 5547 + 5556 107 5544 5541 5547 97 5544 5541 5592 103 + 5541 5547 5550 95 5541 5547 5553 95 5538 5535 + 5541 104 5535 5541 5544 105 5625 5631 5634 92 + 5616 5610 5619 109 5613 5610 5616 93 5613 5610 + 5619 109 5610 5619 5622 110 5607 5604 5610 97 + 5607 5604 5625 103 5604 5610 5613 97 5604 5610 + 5616 97 5601 5598 5604 104 5598 5604 5607 105 + 5685 5691 5694 92 5676 5673 5679 106 5673 5679 + 5682 106 5670 5667 5673 106 5667 5673 5676 106 + 5664 5661 5667 106 5661 5667 5670 106 5658 5655 + 5661 106 5655 5661 5664 106 5652 5655 5658 106 + 5652 5679 5682 106 5649 5643 5652 107 5646 5643 + 5649 96 5646 5643 5652 107 5640 5637 5643 97 + 5640 5637 5685 103 5637 5643 5646 95 5637 5643 + 5649 95 5634 5631 5637 104 5631 5637 5640 105 + 5715 5721 5724 92 5709 5703 5712 96 5706 5703 + 5709 96 5706 5703 5712 96 5700 5697 5703 97 + 5700 5697 5715 103 5697 5703 5706 95 5697 5703 + 5709 95 5697 5703 5712 95 5694 5691 5697 104 + 5691 5697 5700 105 5745 5751 5754 92 5739 5733 + 5742 96 5736 5733 5739 96 5736 5733 5742 96 + 5730 5727 5733 97 5730 5727 5745 103 5727 5733 + 5736 95 5727 5733 5739 95 5727 5733 5742 95 + 5724 5721 5727 104 5721 5727 5730 105 5802 5808 + 5811 92 5796 5790 5799 96 5793 5790 5796 96 + 5793 5790 5799 96 5784 5778 5787 96 5781 5778 + 5784 96 5781 5778 5787 96 5775 5772 5778 95 + 5775 5772 5790 95 5772 5778 5781 95 5772 5778 + 5784 95 5772 5778 5787 95 5772 5790 5793 95 + 5772 5790 5796 95 5772 5790 5799 95 5769 5763 + 5772 95 5766 5763 5769 96 5766 5763 5772 95 + 5763 5772 5775 95 5760 5757 5763 97 5760 5757 + 5802 103 5757 5763 5766 95 5757 5763 5769 95 + 5754 5751 5757 104 5751 5757 5760 105 5832 5838 + 5841 92 5826 5820 5829 96 5823 5820 5826 96 + 5823 5820 5829 96 5817 5814 5820 97 5817 5814 + 5832 103 5814 5820 5823 95 5814 5820 5826 95 + 5814 5820 5829 95 5811 5808 5814 104 5808 5814 + 5817 105 5898 5904 5907 92 5892 5886 5895 101 + 5889 5886 5892 101 5889 5886 5895 101 5883 5877 + 5886 102 5880 5877 5883 108 5880 5877 5886 102 + 5877 5886 5889 100 5877 5886 5892 100 5877 5886 + 5895 100 5874 5868 5877 95 5871 5868 5874 96 + 5871 5868 5877 95 5868 5877 5880 98 5868 5877 + 5883 98 5865 5859 5868 95 5862 5859 5865 96 + 5862 5859 5868 95 5859 5868 5871 95 5859 5868 + 5874 95 5856 5850 5859 95 5853 5850 5856 96 + 5853 5850 5859 95 5850 5859 5862 95 5850 5859 + 5865 95 5847 5844 5850 97 5847 5844 5898 103 + 5844 5850 5853 95 5844 5850 5856 95 5841 5838 + 5844 104 5838 5844 5847 105 5943 5949 5952 92 + 5931 5925 5934 112 5928 5925 5931 96 5928 5925 + 5934 112 5922 5916 5925 95 5919 5916 5922 96 + 5919 5916 5925 95 5916 5925 5928 95 5916 5925 + 5931 95 5913 5910 5916 97 5913 5910 5943 103 + 5910 5916 5919 95 5910 5916 5922 95 5907 5904 + 5910 104 5904 5910 5913 105 5964 5970 5973 92 + 5961 5955 5964 103 5958 5955 5961 93 5958 5955 + 5964 103 5952 5949 5955 104 5949 5955 5958 105 + 5949 5955 5961 105 6036 6042 6045 92 6030 6027 + 6033 122 6021 6018 6024 122 6015 6018 6021 123 + 6015 6018 6024 123 6015 6027 6030 123 6015 6027 + 6033 123 6012 6009 6015 123 6006 6000 6009 124 + 6003 6000 6006 93 6003 6000 6009 124 6000 6009 + 6012 125 5997 5991 6000 95 5994 5991 5997 96 + 5994 5991 6000 95 5991 6000 6003 97 5991 6000 + 6006 97 5988 5982 5991 95 5985 5982 5988 96 + 5985 5982 5991 95 5982 5991 5994 95 5982 5991 + 5997 95 5979 5976 5982 97 5979 5976 6036 103 + 5976 5982 5985 95 5976 5982 5988 95 5973 5970 + 5976 104 5970 5976 5979 105 6069 6075 6078 92 + 6060 6054 6063 109 6057 6054 6060 93 6057 6054 + 6063 109 6054 6063 6066 110 6051 6048 6054 97 + 6051 6048 6069 103 6048 6054 6057 97 6048 6054 + 6060 97 6045 6042 6048 104 6042 6048 6051 105 + 6120 6126 6129 92 6114 6108 6117 93 6111 6108 + 6114 93 6111 6108 6117 93 6105 6108 6111 94 + 6105 6108 6114 94 6105 6108 6117 94 6102 6096 + 6105 94 6099 6096 6102 93 6099 6096 6105 94 + 6093 6087 6096 95 6090 6087 6093 96 6090 6087 + 6096 95 6087 6096 6099 97 6087 6096 6102 97 + 6084 6081 6087 97 6084 6081 6120 103 6081 6087 + 6090 95 6081 6087 6093 95 6078 6075 6081 104 + 6075 6081 6084 105 6171 6177 6180 92 6165 6159 + 6168 93 6162 6159 6165 93 6162 6159 6168 93 + 6156 6159 6162 94 6156 6159 6165 94 6156 6159 + 6168 94 6153 6147 6156 94 6150 6147 6153 93 + 6150 6147 6156 94 6144 6138 6147 95 6141 6138 + 6144 96 6141 6138 6147 95 6138 6147 6150 97 + 6138 6147 6153 97 6135 6132 6138 97 6135 6132 + 6171 103 6132 6138 6141 95 6132 6138 6144 95 + 6129 6126 6132 104 6126 6132 6135 105 6237 6243 + 6246 92 6231 6225 6234 101 6228 6225 6231 101 + 6228 6225 6234 101 6222 6216 6225 102 6219 6216 + 6222 108 6219 6216 6225 102 6216 6225 6228 100 + 6216 6225 6231 100 6216 6225 6234 100 6213 6207 + 6216 95 6210 6207 6213 96 6210 6207 6216 95 + 6207 6216 6219 98 6207 6216 6222 98 6204 6198 + 6207 95 6201 6198 6204 96 6201 6198 6207 95 + 6198 6207 6210 95 6198 6207 6213 95 6195 6189 + 6198 95 6192 6189 6195 96 6192 6189 6198 95 + 6189 6198 6201 95 6189 6198 6204 95 6186 6183 + 6189 97 6186 6183 6237 103 6183 6189 6192 95 + 6183 6189 6195 95 6180 6177 6183 104 6177 6183 + 6186 105 6279 6285 6288 92 6273 6270 6276 111 + 6264 6270 6273 92 6264 6270 6276 92 6261 6255 + 6264 112 6258 6255 6261 96 6258 6255 6264 112 + 6252 6249 6255 97 6252 6249 6279 103 6249 6255 + 6258 95 6249 6255 6261 95 6246 6243 6249 104 + 6243 6249 6252 105 6351 6357 6360 92 6345 6342 + 6348 122 6336 6333 6339 122 6330 6333 6336 123 + 6330 6333 6339 123 6330 6342 6345 123 6330 6342 + 6348 123 6327 6324 6330 123 6321 6315 6324 124 + 6318 6315 6321 93 6318 6315 6324 124 6315 6324 + 6327 125 6312 6306 6315 95 6309 6306 6312 96 + 6309 6306 6315 95 6306 6315 6318 97 6306 6315 + 6321 97 6303 6297 6306 95 6300 6297 6303 96 + 6300 6297 6306 95 6297 6306 6309 95 6297 6306 + 6312 95 6294 6291 6297 97 6294 6291 6351 103 + 6291 6297 6300 95 6291 6297 6303 95 6288 6285 + 6291 104 6285 6291 6294 105 6393 6399 6402 92 + 6387 6384 6390 111 6378 6384 6387 92 6378 6384 + 6390 92 6375 6369 6378 112 6372 6369 6375 96 + 6372 6369 6378 112 6366 6363 6369 97 6366 6363 + 6393 103 6363 6369 6372 95 6363 6369 6375 95 + 6360 6357 6363 104 6357 6363 6366 105 6423 6429 + 6432 92 6417 6411 6420 96 6414 6411 6417 96 + 6414 6411 6420 96 6408 6405 6411 97 6408 6405 + 6423 103 6405 6411 6414 95 6405 6411 6417 95 + 6405 6411 6420 95 6402 6399 6405 104 6399 6405 + 6408 105 6456 6462 6465 92 6447 6441 6450 109 + 6444 6441 6447 93 6444 6441 6450 109 6441 6450 + 6453 110 6438 6435 6441 97 6438 6435 6456 103 + 6435 6441 6444 97 6435 6441 6447 97 6432 6429 + 6435 104 6429 6435 6438 105 6507 6513 6516 92 + 6501 6495 6504 93 6498 6495 6501 93 6498 6495 + 6504 93 6492 6495 6498 94 6492 6495 6501 94 + 6492 6495 6504 94 6489 6483 6492 94 6486 6483 + 6489 93 6486 6483 6492 94 6480 6474 6483 95 + 6477 6474 6480 96 6477 6474 6483 95 6474 6483 + 6486 97 6474 6483 6489 97 6471 6468 6474 97 + 6471 6468 6507 103 6468 6474 6477 95 6468 6474 + 6480 95 6465 6462 6468 104 6462 6468 6471 105 + 6555 6561 6564 92 6549 6543 6552 96 6546 6543 + 6549 96 6546 6543 6552 96 6537 6531 6540 96 + 6534 6531 6537 96 6534 6531 6540 96 6528 6525 + 6531 95 6528 6525 6543 95 6525 6531 6534 95 + 6525 6531 6537 95 6525 6531 6540 95 6525 6543 + 6546 95 6525 6543 6549 95 6525 6543 6552 95 + 6522 6519 6525 97 6522 6519 6555 103 6519 6525 + 6528 95 6516 6513 6519 104 6513 6519 6522 105 + 6585 6591 6594 92 6579 6573 6582 96 6576 6573 + 6579 96 6576 6573 6582 96 6570 6567 6573 97 + 6570 6567 6585 103 6567 6573 6576 95 6567 6573 + 6579 95 6567 6573 6582 95 6564 6561 6567 104 + 6561 6567 6570 105 6642 6648 6651 92 6636 6630 + 6639 96 6633 6630 6636 96 6633 6630 6639 96 + 6624 6618 6627 96 6621 6618 6624 96 6621 6618 + 6627 96 6615 6612 6618 95 6615 6612 6630 95 + 6612 6618 6621 95 6612 6618 6624 95 6612 6618 + 6627 95 6612 6630 6633 95 6612 6630 6636 95 + 6612 6630 6639 95 6609 6603 6612 95 6606 6603 + 6609 96 6606 6603 6612 95 6603 6612 6615 95 + 6600 6597 6603 97 6600 6597 6642 103 6597 6603 + 6606 95 6597 6603 6609 95 6594 6591 6597 104 + 6591 6597 6600 105 6684 6690 6693 92 6672 6666 + 6675 96 6669 6666 6672 96 6669 6666 6675 96 + 6663 6660 6666 97 6663 6660 6678 109 6660 6666 + 6669 95 6660 6666 6672 95 6660 6666 6675 95 + 6660 6678 6681 110 6657 6654 6660 97 6657 6654 + 6684 103 6654 6660 6663 97 6651 6648 6654 104 + 6648 6654 6657 105 6747 6753 6756 92 6738 6735 + 6741 106 6735 6741 6744 106 6726 6729 6732 113 + 6726 6735 6738 114 6723 6720 6726 114 6717 6714 + 6720 106 6714 6720 6723 106 6711 6714 6717 106 + 6711 6741 6744 106 6708 6702 6711 107 6705 6702 + 6708 96 6705 6702 6711 107 6699 6696 6702 97 + 6699 6696 6747 103 6696 6702 6705 95 6696 6702 + 6708 95 6693 6690 6696 104 6690 6696 6699 105 + 6804 6810 6813 92 6798 6792 6801 96 6795 6792 + 6798 96 6795 6792 6801 96 6789 6783 6792 95 + 6786 6783 6789 96 6786 6783 6792 95 6783 6792 + 6795 95 6783 6792 6798 95 6783 6792 6801 95 + 6777 6771 6780 96 6774 6771 6777 96 6774 6771 + 6780 96 6768 6765 6771 95 6768 6765 6783 95 + 6765 6771 6774 95 6765 6771 6777 95 6765 6771 + 6780 95 6765 6783 6786 95 6765 6783 6789 95 + 6762 6759 6765 97 6762 6759 6804 103 6759 6765 + 6768 95 6756 6753 6759 104 6753 6759 6762 105 + 6825 6831 6834 92 6822 6816 6825 103 6819 6816 + 6822 93 6819 6816 6825 103 6813 6810 6816 104 + 6810 6816 6819 105 6810 6816 6822 105 6855 6861 + 6864 92 6849 6843 6852 96 6846 6843 6849 96 + 6846 6843 6852 96 6840 6837 6843 97 6840 6837 + 6855 103 6837 6843 6846 95 6837 6843 6849 95 + 6837 6843 6852 95 6834 6831 6837 104 6831 6837 + 6840 105 6900 6906 6909 92 6888 6882 6891 112 + 6885 6882 6888 96 6885 6882 6891 112 6879 6873 + 6882 95 6876 6873 6879 96 6876 6873 6882 95 + 6873 6882 6885 95 6873 6882 6888 95 6870 6867 + 6873 97 6870 6867 6900 103 6867 6873 6876 95 + 6867 6873 6879 95 6864 6861 6867 104 6861 6867 + 6870 105 6966 6972 6975 92 6960 6954 6963 101 + 6957 6954 6960 101 6957 6954 6963 101 6951 6945 + 6954 102 6948 6945 6951 108 6948 6945 6954 102 + 6945 6954 6957 100 6945 6954 6960 100 6945 6954 + 6963 100 6942 6936 6945 95 6939 6936 6942 96 + 6939 6936 6945 95 6936 6945 6948 98 6936 6945 + 6951 98 6933 6927 6936 95 6930 6927 6933 96 + 6930 6927 6936 95 6927 6936 6939 95 6927 6936 + 6942 95 6924 6918 6927 95 6921 6918 6924 96 + 6921 6918 6927 95 6918 6927 6930 95 6918 6927 + 6933 95 6915 6912 6918 97 6915 6912 6966 103 + 6912 6918 6921 95 6912 6918 6924 95 6909 6906 + 6912 104 6906 6912 6915 105 6996 7002 7005 92 + 6990 6984 6993 96 6987 6984 6990 96 6987 6984 + 6993 96 6981 6978 6984 97 6981 6978 6996 103 + 6978 6984 6987 95 6978 6984 6990 95 6978 6984 + 6993 95 6975 6972 6978 104 6972 6978 6981 105 + 7041 7035 7044 93 7038 7035 7041 93 7038 7035 + 7044 93 7032 7035 7038 94 7032 7035 7041 94 + 7032 7035 7044 94 7029 7023 7032 94 7026 7023 + 7029 93 7026 7023 7032 94 7020 7014 7023 95 + 7017 7014 7020 96 7017 7014 7023 95 7014 7023 + 7026 97 7014 7023 7029 97 7011 7008 7014 97 + 7011 7008 7047 103 7008 7014 7017 95 7008 7014 + 7020 95 7005 7002 7008 104 7002 7008 7011 105 + 7089 7095 7098 92 7086 7083 7089 103 7080 7074 + 7083 95 7077 7074 7080 96 7077 7074 7083 95 + 7074 7083 7086 97 7071 7065 7074 95 7068 7065 + 7071 96 7068 7065 7074 95 7065 7074 7077 95 + 7065 7074 7080 95 7062 7056 7065 97 7059 7056 + 7062 93 7059 7056 7065 97 7056 7065 7068 95 + 7056 7065 7071 95 7053 7056 7059 105 7053 7056 + 7062 105 7053 7083 7086 105 7122 7128 7131 92 + 7113 7107 7116 109 7110 7107 7113 93 7110 7107 + 7116 109 7107 7116 7119 110 7104 7101 7107 97 + 7104 7101 7122 103 7101 7107 7110 97 7101 7107 + 7113 97 7098 7095 7101 104 7095 7101 7104 105 + 7185 7191 7194 92 7176 7173 7179 106 7173 7179 + 7182 106 7164 7167 7170 113 7164 7173 7176 114 + 7161 7158 7164 114 7155 7152 7158 106 7152 7158 + 7161 106 7149 7152 7155 106 7149 7179 7182 106 + 7146 7140 7149 107 7143 7140 7146 96 7143 7140 + 7149 107 7137 7134 7140 97 7137 7134 7185 103 + 7134 7140 7143 95 7134 7140 7146 95 7131 7128 + 7134 104 7128 7134 7137 105 7227 7233 7236 92 + 7221 7218 7224 111 7212 7218 7221 92 7212 7218 + 7224 92 7209 7203 7212 112 7206 7203 7209 96 + 7206 7203 7212 112 7200 7197 7203 97 7200 7197 + 7227 103 7197 7203 7206 95 7197 7203 7209 95 + 7194 7191 7197 104 7191 7197 7200 105 7269 7275 + 7278 92 7257 7251 7260 96 7254 7251 7257 96 + 7254 7251 7260 96 7248 7245 7251 97 7248 7245 + 7263 109 7245 7251 7254 95 7245 7251 7257 95 + 7245 7251 7260 95 7245 7263 7266 110 7242 7239 + 7245 97 7242 7239 7269 103 7239 7245 7248 97 + 7236 7233 7239 104 7233 7239 7242 105 7320 7326 + 7329 92 7314 7308 7317 93 7311 7308 7314 93 + 7311 7308 7317 93 7305 7308 7311 94 7305 7308 + 7314 94 7305 7308 7317 94 7302 7296 7305 94 + 7299 7296 7302 93 7299 7296 7305 94 7293 7287 + 7296 95 7290 7287 7293 96 7290 7287 7296 95 + 7287 7296 7299 97 7287 7296 7302 97 7284 7281 + 7287 97 7284 7281 7320 103 7281 7287 7290 95 + 7281 7287 7293 95 7278 7275 7281 104 7275 7281 + 7284 105 7341 7347 7350 92 7338 7332 7341 103 + 7335 7332 7338 93 7335 7332 7341 103 7329 7326 + 7332 104 7326 7332 7335 105 7326 7332 7338 105 + 7389 7395 7398 92 7383 7377 7386 96 7380 7377 + 7383 96 7380 7377 7386 96 7371 7365 7374 96 + 7368 7365 7371 96 7368 7365 7374 96 7362 7359 + 7365 95 7362 7359 7377 95 7359 7365 7368 95 + 7359 7365 7371 95 7359 7365 7374 95 7359 7377 + 7380 95 7359 7377 7383 95 7359 7377 7386 95 + 7356 7353 7359 97 7356 7353 7389 103 7353 7359 + 7362 95 7350 7347 7353 104 7347 7353 7356 105 + 7419 7425 7428 92 7413 7407 7416 96 7410 7407 + 7413 96 7410 7407 7416 96 7404 7401 7407 97 + 7404 7401 7419 103 7401 7407 7410 95 7401 7407 + 7413 95 7401 7407 7416 95 7398 7395 7401 104 + 7395 7401 7404 105 7485 7491 7494 92 7479 7473 + 7482 101 7476 7473 7479 101 7476 7473 7482 101 + 7470 7464 7473 102 7467 7464 7470 108 7467 7464 + 7473 102 7464 7473 7476 100 7464 7473 7479 100 + 7464 7473 7482 100 7461 7455 7464 95 7458 7455 + 7461 96 7458 7455 7464 95 7455 7464 7467 98 + 7455 7464 7470 98 7452 7446 7455 95 7449 7446 + 7452 96 7449 7446 7455 95 7446 7455 7458 95 + 7446 7455 7461 95 7443 7437 7446 95 7440 7437 + 7443 96 7440 7437 7446 95 7437 7446 7449 95 + 7437 7446 7452 95 7434 7431 7437 97 7434 7431 + 7485 103 7431 7437 7440 95 7431 7437 7443 95 + 7428 7425 7431 104 7425 7431 7434 105 7515 7521 + 7524 92 7509 7503 7512 96 7506 7503 7509 96 + 7506 7503 7512 96 7500 7497 7503 97 7500 7497 + 7515 103 7497 7503 7506 95 7497 7503 7509 95 + 7497 7503 7512 95 7494 7491 7497 104 7491 7497 + 7500 105 7548 7554 7557 92 7539 7533 7542 109 + 7536 7533 7539 93 7536 7533 7542 109 7533 7542 + 7545 110 7530 7527 7533 97 7530 7527 7548 103 + 7527 7533 7536 97 7527 7533 7539 97 7524 7521 + 7527 104 7521 7527 7530 105 7605 7611 7614 92 + 7599 7593 7602 96 7596 7593 7599 96 7596 7593 + 7602 96 7587 7581 7590 96 7584 7581 7587 96 + 7584 7581 7590 96 7578 7575 7581 95 7578 7575 + 7593 95 7575 7581 7584 95 7575 7581 7587 95 + 7575 7581 7590 95 7575 7593 7596 95 7575 7593 + 7599 95 7575 7593 7602 95 7572 7566 7575 95 + 7569 7566 7572 96 7569 7566 7575 95 7566 7575 + 7578 95 7563 7560 7566 97 7563 7560 7605 103 + 7560 7566 7569 95 7560 7566 7572 95 7557 7554 + 7560 104 7554 7560 7563 105 7650 7656 7659 92 + 7638 7632 7641 112 7635 7632 7638 96 7635 7632 + 7641 112 7629 7623 7632 95 7626 7623 7629 96 + 7626 7623 7632 95 7623 7632 7635 95 7623 7632 + 7638 95 7620 7617 7623 97 7620 7617 7650 103 + 7617 7623 7626 95 7617 7623 7629 95 7614 7611 + 7617 104 7611 7617 7620 105 7680 7686 7689 92 + 7674 7668 7677 96 7671 7668 7674 96 7671 7668 + 7677 96 7665 7662 7668 97 7665 7662 7680 103 + 7662 7668 7671 95 7662 7668 7674 95 7662 7668 + 7677 95 7659 7656 7662 104 7656 7662 7665 105 + 7722 7728 7731 92 7710 7704 7713 96 7707 7704 + 7710 96 7707 7704 7713 96 7701 7698 7704 97 + 7701 7698 7716 109 7698 7704 7707 95 7698 7704 + 7710 95 7698 7704 7713 95 7698 7716 7719 110 + 7695 7692 7698 97 7695 7692 7722 103 7692 7698 + 7701 97 7689 7686 7692 104 7686 7692 7695 105 + 7770 7776 7779 92 7764 7758 7767 96 7761 7758 + 7764 96 7761 7758 7767 96 7752 7746 7755 96 + 7749 7746 7752 96 7749 7746 7755 96 7743 7740 + 7746 95 7743 7740 7758 95 7740 7746 7749 95 + 7740 7746 7752 95 7740 7746 7755 95 7740 7758 + 7761 95 7740 7758 7764 95 7740 7758 7767 95 + 7737 7734 7740 97 7737 7734 7770 103 7734 7740 + 7743 95 7731 7728 7734 104 7728 7734 7737 105 + 7842 7848 7851 92 7836 7833 7839 122 7827 7824 + 7830 122 7821 7824 7827 123 7821 7824 7830 123 + 7821 7833 7836 123 7821 7833 7839 123 7818 7815 + 7821 123 7812 7806 7815 124 7809 7806 7812 93 + 7809 7806 7815 124 7806 7815 7818 125 7803 7797 + 7806 95 7800 7797 7803 96 7800 7797 7806 95 + 7797 7806 7809 97 7797 7806 7812 97 7794 7788 + 7797 95 7791 7788 7794 96 7791 7788 7797 95 + 7788 7797 7800 95 7788 7797 7803 95 7785 7782 + 7788 97 7785 7782 7842 103 7782 7788 7791 95 + 7782 7788 7794 95 7779 7776 7782 104 7776 7782 + 7785 105 7905 7911 7914 92 7896 7893 7899 106 + 7893 7899 7902 106 7884 7887 7890 113 7884 7893 + 7896 114 7881 7878 7884 114 7875 7872 7878 106 + 7872 7878 7881 106 7869 7872 7875 106 7869 7899 + 7902 106 7866 7860 7869 107 7863 7860 7866 96 + 7863 7860 7869 107 7857 7854 7860 97 7857 7854 + 7905 103 7854 7860 7863 95 7854 7860 7866 95 + 7851 7848 7854 104 7848 7854 7857 105 7947 7953 + 7956 92 7935 7929 7938 96 7932 7929 7935 96 + 7932 7929 7938 96 7926 7923 7929 97 7926 7923 + 7941 109 7923 7929 7932 95 7923 7929 7935 95 + 7923 7929 7938 95 7923 7941 7944 110 7920 7917 + 7923 97 7920 7917 7947 103 7917 7923 7926 97 + 7914 7911 7917 104 7911 7917 7920 105 7977 7983 + 7986 92 7971 7965 7974 96 7968 7965 7971 96 + 7968 7965 7974 96 7962 7959 7965 97 7962 7959 + 7977 103 7959 7965 7968 95 7959 7965 7971 95 + 7959 7965 7974 95 7956 7953 7959 104 7953 7959 + 7962 105 8034 8040 8043 92 8028 8022 8031 96 + 8025 8022 8028 96 8025 8022 8031 96 8016 8010 + 8019 96 8013 8010 8016 96 8013 8010 8019 96 + 8007 8004 8010 95 8007 8004 8022 95 8004 8010 + 8013 95 8004 8010 8016 95 8004 8010 8019 95 + 8004 8022 8025 95 8004 8022 8028 95 8004 8022 + 8031 95 8001 7995 8004 95 7998 7995 8001 96 + 7998 7995 8004 95 7995 8004 8007 95 7992 7989 + 7995 97 7992 7989 8034 103 7989 7995 7998 95 + 7989 7995 8001 95 7986 7983 7989 104 7983 7989 + 7992 105 8064 8070 8073 92 8058 8052 8061 96 + 8055 8052 8058 96 8055 8052 8061 96 8049 8046 + 8052 97 8049 8046 8064 103 8046 8052 8055 95 + 8046 8052 8058 95 8046 8052 8061 95 8043 8040 + 8046 104 8040 8046 8049 105 8121 8127 8130 92 + 8115 8109 8118 96 8112 8109 8115 96 8112 8109 + 8118 96 8103 8097 8106 96 8100 8097 8103 96 + 8100 8097 8106 96 8094 8091 8097 95 8094 8091 + 8109 95 8091 8097 8100 95 8091 8097 8103 95 + 8091 8097 8106 95 8091 8109 8112 95 8091 8109 + 8115 95 8091 8109 8118 95 8088 8082 8091 95 + 8085 8082 8088 96 8085 8082 8091 95 8082 8091 + 8094 95 8079 8076 8082 97 8079 8076 8121 103 + 8076 8082 8085 95 8076 8082 8088 95 8073 8070 + 8076 104 8070 8076 8079 105 8142 8148 8151 92 + 8139 8133 8142 103 8136 8133 8139 93 8136 8133 + 8142 103 8130 8127 8133 104 8127 8133 8136 105 + 8127 8133 8139 105 8187 8193 8196 92 8175 8169 + 8178 112 8172 8169 8175 96 8172 8169 8178 112 + 8166 8160 8169 95 8163 8160 8166 96 8163 8160 + 8169 95 8160 8169 8172 95 8160 8169 8175 95 + 8157 8154 8160 97 8157 8154 8187 103 8154 8160 + 8163 95 8154 8160 8166 95 8151 8148 8154 104 + 8148 8154 8157 105 8223 8229 8232 92 8211 8205 + 8214 112 8208 8205 8211 96 8208 8205 8214 112 + 8202 8199 8205 97 8202 8199 8223 103 8199 8205 + 8208 95 8199 8205 8211 95 8196 8193 8199 104 + 8193 8199 8202 105 8244 8250 8253 92 8241 8235 + 8244 103 8238 8235 8241 93 8238 8235 8244 103 + 8232 8229 8235 104 8229 8235 8238 105 8229 8235 + 8241 105 8301 8307 8310 92 8295 8289 8298 96 + 8292 8289 8295 96 8292 8289 8298 96 8286 8280 + 8289 95 8283 8280 8286 96 8283 8280 8289 95 + 8280 8289 8292 95 8280 8289 8295 95 8280 8289 + 8298 95 8274 8268 8277 96 8271 8268 8274 96 + 8271 8268 8277 96 8265 8262 8268 95 8265 8262 + 8280 95 8262 8268 8271 95 8262 8268 8274 95 + 8262 8268 8277 95 8262 8280 8283 95 8262 8280 + 8286 95 8259 8256 8262 97 8259 8256 8301 103 + 8256 8262 8265 95 8253 8250 8256 104 8250 8256 + 8259 105 8367 8373 8376 92 8361 8355 8364 101 + 8358 8355 8361 101 8358 8355 8364 101 8352 8346 + 8355 102 8349 8346 8352 108 8349 8346 8355 102 + 8346 8355 8358 100 8346 8355 8361 100 8346 8355 + 8364 100 8343 8337 8346 95 8340 8337 8343 96 + 8340 8337 8346 95 8337 8346 8349 98 8337 8346 + 8352 98 8334 8328 8337 95 8331 8328 8334 96 + 8331 8328 8337 95 8328 8337 8340 95 8328 8337 + 8343 95 8325 8319 8328 95 8322 8319 8325 96 + 8322 8319 8328 95 8319 8328 8331 95 8319 8328 + 8334 95 8316 8313 8319 97 8316 8313 8367 103 + 8313 8319 8322 95 8313 8319 8325 95 8310 8307 + 8313 104 8307 8313 8316 105 8415 8421 8424 92 + 8409 8403 8412 96 8406 8403 8409 96 8406 8403 + 8412 96 8397 8391 8400 96 8394 8391 8397 96 + 8394 8391 8400 96 8388 8385 8391 95 8388 8385 + 8403 95 8385 8391 8394 95 8385 8391 8397 95 + 8385 8391 8400 95 8385 8403 8406 95 8385 8403 + 8409 95 8385 8403 8412 95 8382 8379 8385 97 + 8382 8379 8415 103 8379 8385 8388 95 8376 8373 + 8379 104 8373 8379 8382 105 8457 8463 8466 92 + 8451 8448 8454 111 8442 8448 8451 92 8442 8448 + 8454 92 8439 8433 8442 112 8436 8433 8439 96 + 8436 8433 8442 112 8430 8427 8433 97 8430 8427 + 8457 103 8427 8433 8436 95 8427 8433 8439 95 + 8424 8421 8427 104 8421 8427 8430 105 8487 8493 + 8496 92 8481 8475 8484 96 8478 8475 8481 96 + 8478 8475 8484 96 8472 8469 8475 97 8472 8469 + 8487 103 8469 8475 8478 95 8469 8475 8481 95 + 8469 8475 8484 95 8466 8463 8469 104 8463 8469 + 8472 105 8535 8541 8544 92 8529 8523 8532 96 + 8526 8523 8529 96 8526 8523 8532 96 8517 8511 + 8520 96 8514 8511 8517 96 8514 8511 8520 96 + 8508 8505 8511 95 8508 8505 8523 95 8505 8511 + 8514 95 8505 8511 8517 95 8505 8511 8520 95 + 8505 8523 8526 95 8505 8523 8529 95 8505 8523 + 8532 95 8502 8499 8505 97 8502 8499 8535 103 + 8499 8505 8508 95 8496 8493 8499 104 8493 8499 + 8502 105 8568 8574 8577 92 8559 8553 8562 109 + 8556 8553 8559 93 8556 8553 8562 109 8553 8562 + 8565 110 8550 8547 8553 97 8550 8547 8568 103 + 8547 8553 8556 97 8547 8553 8559 97 8544 8541 + 8547 104 8541 8547 8550 105 8598 8604 8607 92 + 8592 8586 8595 96 8589 8586 8592 96 8589 8586 + 8595 96 8583 8580 8586 97 8583 8580 8598 103 + 8580 8586 8589 95 8580 8586 8592 95 8580 8586 + 8595 95 8577 8574 8580 104 8574 8580 8583 105 + 8616 8610 8619 103 8613 8610 8616 93 8613 8610 + 8619 103 8607 8604 8610 104 8604 8610 8613 105 + 8604 8610 8616 105 8661 8667 8670 92 8658 8655 + 8661 103 8652 8646 8655 95 8649 8646 8652 96 + 8649 8646 8655 95 8646 8655 8658 97 8643 8637 + 8646 95 8640 8637 8643 96 8640 8637 8646 95 + 8637 8646 8649 95 8637 8646 8652 95 8634 8628 + 8637 97 8631 8628 8634 93 8631 8628 8637 97 + 8628 8637 8640 95 8628 8637 8643 95 8625 8628 + 8631 105 8625 8628 8634 105 8625 8655 8658 105 + 8718 8724 8727 92 8712 8706 8715 96 8709 8706 + 8712 96 8709 8706 8715 96 8703 8697 8706 95 + 8700 8697 8703 96 8700 8697 8706 95 8697 8706 + 8709 95 8697 8706 8712 95 8697 8706 8715 95 + 8691 8685 8694 96 8688 8685 8691 96 8688 8685 + 8694 96 8682 8679 8685 95 8682 8679 8697 95 + 8679 8685 8688 95 8679 8685 8691 95 8679 8685 + 8694 95 8679 8697 8700 95 8679 8697 8703 95 + 8676 8673 8679 97 8676 8673 8718 103 8673 8679 + 8682 95 8670 8667 8673 104 8667 8673 8676 105 + 8784 8790 8793 92 8778 8772 8781 101 8775 8772 + 8778 101 8775 8772 8781 101 8769 8763 8772 102 + 8766 8763 8769 108 8766 8763 8772 102 8763 8772 + 8775 100 8763 8772 8778 100 8763 8772 8781 100 + 8760 8754 8763 95 8757 8754 8760 96 8757 8754 + 8763 95 8754 8763 8766 98 8754 8763 8769 98 + 8751 8745 8754 95 8748 8745 8751 96 8748 8745 + 8754 95 8745 8754 8757 95 8745 8754 8760 95 + 8742 8736 8745 95 8739 8736 8742 96 8739 8736 + 8745 95 8736 8745 8748 95 8736 8745 8751 95 + 8733 8730 8736 97 8733 8730 8784 103 8730 8736 + 8739 95 8730 8736 8742 95 8727 8724 8730 104 + 8724 8730 8733 105 8826 8832 8835 92 8814 8808 + 8817 96 8811 8808 8814 96 8811 8808 8817 96 + 8805 8802 8808 97 8805 8802 8820 109 8802 8808 + 8811 95 8802 8808 8814 95 8802 8808 8817 95 + 8802 8820 8823 110 8799 8796 8802 97 8799 8796 + 8826 103 8796 8802 8805 97 8793 8790 8796 104 + 8790 8796 8799 105 8883 8889 8892 92 8877 8871 + 8880 96 8874 8871 8877 96 8874 8871 8880 96 + 8865 8859 8868 96 8862 8859 8865 96 8862 8859 + 8868 96 8856 8853 8859 95 8856 8853 8871 95 + 8853 8859 8862 95 8853 8859 8865 95 8853 8859 + 8868 95 8853 8871 8874 95 8853 8871 8877 95 + 8853 8871 8880 95 8850 8844 8853 95 8847 8844 + 8850 96 8847 8844 8853 95 8844 8853 8856 95 + 8841 8838 8844 97 8841 8838 8883 103 8838 8844 + 8847 95 8838 8844 8850 95 8835 8832 8838 104 + 8832 8838 8841 105 8913 8919 8922 92 8907 8901 + 8910 96 8904 8901 8907 96 8904 8901 8910 96 + 8898 8895 8901 97 8898 8895 8913 103 8895 8901 + 8904 95 8895 8901 8907 95 8895 8901 8910 95 + 8892 8889 8895 104 8889 8895 8898 105 8943 8949 + 8952 92 8937 8931 8940 96 8934 8931 8937 96 + 8934 8931 8940 96 8928 8925 8931 97 8928 8925 + 8943 103 8925 8931 8934 95 8925 8931 8937 95 + 8925 8931 8940 95 8922 8919 8925 104 8919 8925 + 8928 105 8976 8982 8985 92 8967 8961 8970 109 + 8964 8961 8967 93 8964 8961 8970 109 8961 8970 + 8973 110 8958 8955 8961 97 8958 8955 8976 103 + 8955 8961 8964 97 8955 8961 8967 97 8952 8949 + 8955 104 8949 8955 8958 105 8997 9003 9006 92 + 8994 8988 8997 103 8991 8988 8994 93 8991 8988 + 8997 103 8985 8982 8988 104 8982 8988 8991 105 + 8982 8988 8994 105 9054 9060 9063 92 9048 9042 + 9051 96 9045 9042 9048 96 9045 9042 9051 96 + 9039 9033 9042 95 9036 9033 9039 96 9036 9033 + 9042 95 9033 9042 9045 95 9033 9042 9048 95 + 9033 9042 9051 95 9027 9021 9030 96 9024 9021 + 9027 96 9024 9021 9030 96 9018 9015 9021 95 + 9018 9015 9033 95 9015 9021 9024 95 9015 9021 + 9027 95 9015 9021 9030 95 9015 9033 9036 95 + 9015 9033 9039 95 9012 9009 9015 97 9012 9009 + 9054 103 9009 9015 9018 95 9006 9003 9009 104 + 9003 9009 9012 105 9087 9093 9096 92 9078 9072 + 9081 109 9075 9072 9078 93 9075 9072 9081 109 + 9072 9081 9084 110 9069 9066 9072 97 9069 9066 + 9087 103 9066 9072 9075 97 9066 9072 9078 97 + 9063 9060 9066 104 9060 9066 9069 105 9129 9135 + 9138 92 9123 9120 9126 111 9114 9120 9123 92 + 9114 9120 9126 92 9111 9105 9114 112 9108 9105 + 9111 96 9108 9105 9114 112 9102 9099 9105 97 + 9102 9099 9129 103 9099 9105 9108 95 9099 9105 + 9111 95 9096 9093 9099 104 9093 9099 9102 105 + 9189 9195 9198 92 9180 9177 9183 106 9177 9183 + 9186 106 9174 9171 9177 106 9171 9177 9180 106 + 9168 9165 9171 106 9165 9171 9174 106 9162 9159 + 9165 106 9159 9165 9168 106 9156 9159 9162 106 + 9156 9183 9186 106 9153 9147 9156 107 9150 9147 + 9153 96 9150 9147 9156 107 9144 9141 9147 97 + 9144 9141 9189 103 9141 9147 9150 95 9141 9147 + 9153 95 9138 9135 9141 104 9135 9141 9144 105 + 9255 9261 9264 92 9249 9243 9252 101 9246 9243 + 9249 101 9246 9243 9252 101 9240 9234 9243 102 + 9237 9234 9240 108 9237 9234 9243 102 9234 9243 + 9246 100 9234 9243 9249 100 9234 9243 9252 100 + 9231 9225 9234 95 9228 9225 9231 96 9228 9225 + 9234 95 9225 9234 9237 98 9225 9234 9240 98 + 9222 9216 9225 95 9219 9216 9222 96 9219 9216 + 9225 95 9216 9225 9228 95 9216 9225 9231 95 + 9213 9207 9216 95 9210 9207 9213 96 9210 9207 + 9216 95 9207 9216 9219 95 9207 9216 9222 95 + 9204 9201 9207 97 9204 9201 9255 103 9201 9207 + 9210 95 9201 9207 9213 95 9198 9195 9201 104 + 9195 9201 9204 105 9321 9327 9330 92 9315 9309 + 9318 101 9312 9309 9315 101 9312 9309 9318 101 + 9306 9300 9309 102 9303 9300 9306 108 9303 9300 + 9309 102 9300 9309 9312 100 9300 9309 9315 100 + 9300 9309 9318 100 9297 9291 9300 95 9294 9291 + 9297 96 9294 9291 9300 95 9291 9300 9303 98 + 9291 9300 9306 98 9288 9282 9291 95 9285 9282 + 9288 96 9285 9282 9291 95 9282 9291 9294 95 + 9282 9291 9297 95 9279 9273 9282 95 9276 9273 + 9279 96 9276 9273 9282 95 9273 9282 9285 95 + 9273 9282 9288 95 9270 9267 9273 97 9270 9267 + 9321 103 9267 9273 9276 95 9267 9273 9279 95 + 9264 9261 9267 104 9261 9267 9270 105 9372 9378 + 9381 92 9366 9360 9369 93 9363 9360 9366 93 + 9363 9360 9369 93 9357 9360 9363 94 9357 9360 + 9366 94 9357 9360 9369 94 9354 9348 9357 94 + 9351 9348 9354 93 9351 9348 9357 94 9345 9339 + 9348 95 9342 9339 9345 96 9342 9339 9348 95 + 9339 9348 9351 97 9339 9348 9354 97 9336 9333 + 9339 97 9336 9333 9372 103 9333 9339 9342 95 + 9333 9339 9345 95 9330 9327 9333 104 9327 9333 + 9336 105 9429 9435 9438 92 9423 9417 9426 96 + 9420 9417 9423 96 9420 9417 9426 96 9411 9405 + 9414 96 9408 9405 9411 96 9408 9405 9414 96 + 9402 9399 9405 95 9402 9399 9417 95 9399 9405 + 9408 95 9399 9405 9411 95 9399 9405 9414 95 + 9399 9417 9420 95 9399 9417 9423 95 9399 9417 + 9426 95 9396 9390 9399 95 9393 9390 9396 96 + 9393 9390 9399 95 9390 9399 9402 95 9387 9384 + 9390 97 9387 9384 9429 103 9384 9390 9393 95 + 9384 9390 9396 95 9381 9378 9384 104 9378 9384 + 9387 105 9465 9471 9474 92 9453 9447 9456 112 + 9450 9447 9453 96 9450 9447 9456 112 9444 9441 + 9447 97 9444 9441 9465 103 9441 9447 9450 95 + 9441 9447 9453 95 9438 9435 9441 104 9435 9441 + 9444 105 9528 9534 9537 92 9519 9516 9522 106 + 9516 9522 9525 106 9507 9510 9513 113 9507 9516 + 9519 114 9504 9501 9507 114 9498 9495 9501 106 + 9495 9501 9504 106 9492 9495 9498 106 9492 9522 + 9525 106 9489 9483 9492 107 9486 9483 9489 96 + 9486 9483 9492 107 9480 9477 9483 97 9480 9477 + 9528 103 9477 9483 9486 95 9477 9483 9489 95 + 9474 9471 9477 104 9471 9477 9480 105 9570 9576 + 9579 92 9564 9561 9567 111 9555 9561 9564 92 + 9555 9561 9567 92 9552 9546 9555 112 9549 9546 + 9552 96 9549 9546 9555 112 9543 9540 9546 97 + 9543 9540 9570 103 9540 9546 9549 95 9540 9546 + 9552 95 9537 9534 9540 104 9534 9540 9543 105 + 9600 9606 9609 92 9594 9588 9597 96 9591 9588 + 9594 96 9591 9588 9597 96 9585 9582 9588 97 + 9585 9582 9600 103 9582 9588 9591 95 9582 9588 + 9594 95 9582 9588 9597 95 9579 9576 9582 104 + 9576 9582 9585 105 9651 9657 9660 92 9645 9639 + 9648 93 9642 9639 9645 93 9642 9639 9648 93 + 9636 9639 9642 94 9636 9639 9645 94 9636 9639 + 9648 94 9633 9627 9636 94 9630 9627 9633 93 + 9630 9627 9636 94 9624 9618 9627 95 9621 9618 + 9624 96 9621 9618 9627 95 9618 9627 9630 97 + 9618 9627 9633 97 9615 9612 9618 97 9615 9612 + 9651 103 9612 9618 9621 95 9612 9618 9624 95 + 9609 9606 9612 104 9606 9612 9615 105 9699 9705 + 9708 92 9693 9687 9696 96 9690 9687 9693 96 + 9690 9687 9696 96 9681 9675 9684 96 9678 9675 + 9681 96 9678 9675 9684 96 9672 9669 9675 95 + 9672 9669 9687 95 9669 9675 9678 95 9669 9675 + 9681 95 9669 9675 9684 95 9669 9687 9690 95 + 9669 9687 9693 95 9669 9687 9696 95 9666 9663 + 9669 97 9666 9663 9699 103 9663 9669 9672 95 + 9660 9657 9663 104 9657 9663 9666 105 9723 9717 + 9726 109 9720 9717 9723 93 9720 9717 9726 109 + 9717 9726 9729 110 9714 9711 9717 97 9714 9711 + 9732 103 9711 9717 9720 97 9711 9717 9723 97 + 9708 9705 9711 104 9705 9711 9714 105 9774 9780 + 9783 92 9771 9768 9774 103 9765 9759 9768 95 + 9762 9759 9765 96 9762 9759 9768 95 9759 9768 + 9771 97 9756 9750 9759 95 9753 9750 9756 96 + 9753 9750 9759 95 9750 9759 9762 95 9750 9759 + 9765 95 9747 9741 9750 97 9744 9741 9747 93 + 9744 9741 9750 97 9741 9750 9753 95 9741 9750 + 9756 95 9738 9741 9744 105 9738 9741 9747 105 + 9738 9768 9771 105 9831 9837 9840 92 9825 9819 + 9828 96 9822 9819 9825 96 9822 9819 9828 96 + 9813 9807 9816 96 9810 9807 9813 96 9810 9807 + 9816 96 9804 9801 9807 95 9804 9801 9819 95 + 9801 9807 9810 95 9801 9807 9813 95 9801 9807 + 9816 95 9801 9819 9822 95 9801 9819 9825 95 + 9801 9819 9828 95 9798 9792 9801 95 9795 9792 + 9798 96 9795 9792 9801 95 9792 9801 9804 95 + 9789 9786 9792 97 9789 9786 9831 103 9786 9792 + 9795 95 9786 9792 9798 95 9783 9780 9786 104 + 9780 9786 9789 105 9897 9903 9906 92 9891 9885 + 9894 101 9888 9885 9891 101 9888 9885 9894 101 + 9882 9876 9885 102 9879 9876 9882 108 9879 9876 + 9885 102 9876 9885 9888 100 9876 9885 9891 100 + 9876 9885 9894 100 9873 9867 9876 95 9870 9867 + 9873 96 9870 9867 9876 95 9867 9876 9879 98 + 9867 9876 9882 98 9864 9858 9867 95 9861 9858 + 9864 96 9861 9858 9867 95 9858 9867 9870 95 + 9858 9867 9873 95 9855 9849 9858 95 9852 9849 + 9855 96 9852 9849 9858 95 9849 9858 9861 95 + 9849 9858 9864 95 9846 9843 9849 97 9846 9843 + 9897 103 9843 9849 9852 95 9843 9849 9855 95 + 9840 9837 9843 104 9837 9843 9846 105 9963 9969 + 9972 92 9957 9951 9960 101 9954 9951 9957 101 + 9954 9951 9960 101 9948 9942 9951 102 9945 9942 + 9948 108 9945 9942 9951 102 9942 9951 9954 100 + 9942 9951 9957 100 9942 9951 9960 100 9939 9933 + 9942 95 9936 9933 9939 96 9936 9933 9942 95 + 9933 9942 9945 98 9933 9942 9948 98 9930 9924 + 9933 95 9927 9924 9930 96 9927 9924 9933 95 + 9924 9933 9936 95 9924 9933 9939 95 9921 9915 + 9924 95 9918 9915 9921 96 9918 9915 9924 95 + 9915 9924 9927 95 9915 9924 9930 95 9912 9909 + 9915 97 9912 9909 9963 103 9909 9915 9918 95 + 9909 9915 9921 95 9906 9903 9909 104 9903 9909 + 9912 105 10005 10011 10014 92 9999 9996 10002 111 + 9990 9996 9999 92 9990 9996 10002 92 9987 9981 + 9990 112 9984 9981 9987 96 9984 9981 9990 112 + 9978 9975 9981 97 9978 9975 10005 103 9975 9981 + 9984 95 9975 9981 9987 95 9972 9969 9975 104 + 9969 9975 9978 105 10053 10059 10062 92 10047 10041 + 10050 96 10044 10041 10047 96 10044 10041 10050 96 + 10035 10029 10038 96 10032 10029 10035 96 10032 10029 + 10038 96 10026 10023 10029 95 10026 10023 10041 95 + 10023 10029 10032 95 10023 10029 10035 95 10023 10029 + 10038 95 10023 10041 10044 95 10023 10041 10047 95 + 10023 10041 10050 95 10020 10017 10023 97 10020 10017 + 10053 103 10017 10023 10026 95 10014 10011 10017 104 + 10011 10017 10020 105 10089 10095 10098 92 10077 10071 + 10080 112 10074 10071 10077 96 10074 10071 10080 112 + 10068 10065 10071 97 10068 10065 10089 103 10065 10071 + 10074 95 10065 10071 10077 95 10062 10059 10065 104 + 10059 10065 10068 105 10146 10152 10155 92 10140 10134 + 10143 96 10137 10134 10140 96 10137 10134 10143 96 + 10131 10125 10134 95 10128 10125 10131 96 10128 10125 + 10134 95 10125 10134 10137 95 10125 10134 10140 95 + 10125 10134 10143 95 10119 10113 10122 96 10116 10113 + 10119 96 10116 10113 10122 96 10110 10107 10113 95 + 10110 10107 10125 95 10107 10113 10116 95 10107 10113 + 10119 95 10107 10113 10122 95 10107 10125 10128 95 + 10107 10125 10131 95 10104 10101 10107 97 10104 10101 + 10146 103 10101 10107 10110 95 10098 10095 10101 104 + 10095 10101 10104 105 10197 10203 10206 92 10191 10185 + 10194 93 10188 10185 10191 93 10188 10185 10194 93 + 10182 10185 10188 94 10182 10185 10191 94 10182 10185 + 10194 94 10179 10173 10182 94 10176 10173 10179 93 + 10176 10173 10182 94 10170 10164 10173 95 10167 10164 + 10170 96 10167 10164 10173 95 10164 10173 10176 97 + 10164 10173 10179 97 10161 10158 10164 97 10161 10158 + 10197 103 10158 10164 10167 95 10158 10164 10170 95 + 10155 10152 10158 104 10152 10158 10161 105 10242 10248 + 10251 92 10230 10224 10233 112 10227 10224 10230 96 + 10227 10224 10233 112 10221 10215 10224 95 10218 10215 + 10221 96 10218 10215 10224 95 10215 10224 10227 95 + 10215 10224 10230 95 10212 10209 10215 97 10212 10209 + 10242 103 10209 10215 10218 95 10209 10215 10221 95 + 10206 10203 10209 104 10203 10209 10212 105 10290 10296 + 10299 92 10284 10278 10287 96 10281 10278 10284 96 + 10281 10278 10287 96 10272 10266 10275 96 10269 10266 + 10272 96 10269 10266 10275 96 10263 10260 10266 95 + 10263 10260 10278 95 10260 10266 10269 95 10260 10266 + 10272 95 10260 10266 10275 95 10260 10278 10281 95 + 10260 10278 10284 95 10260 10278 10287 95 10257 10254 + 10260 97 10257 10254 10290 103 10254 10260 10263 95 + 10251 10248 10254 104 10248 10254 10257 105 10311 10317 + 10320 92 10308 10302 10311 103 10305 10302 10308 93 + 10305 10302 10311 103 10299 10296 10302 104 10296 10302 + 10305 105 10296 10302 10308 105 10353 10359 10362 92 + 10347 10344 10350 111 10338 10344 10347 92 10338 10344 + 10350 92 10335 10329 10338 112 10332 10329 10335 96 + 10332 10329 10338 112 10326 10323 10329 97 10326 10323 + 10353 103 10323 10329 10332 95 10323 10329 10335 95 + 10320 10317 10323 104 10317 10323 10326 105 10395 10401 + 10404 92 10383 10377 10386 96 10380 10377 10383 96 + 10380 10377 10386 96 10374 10371 10377 97 10374 10371 + 10389 109 10371 10377 10380 95 10371 10377 10383 95 + 10371 10377 10386 95 10371 10389 10392 110 10368 10365 + 10371 97 10368 10365 10395 103 10365 10371 10374 97 + 10362 10359 10365 104 10359 10365 10368 105 10443 10449 + 10452 92 10437 10431 10440 96 10434 10431 10437 96 + 10434 10431 10440 96 10425 10419 10428 96 10422 10419 + 10425 96 10422 10419 10428 96 10416 10413 10419 95 + 10416 10413 10431 95 10413 10419 10422 95 10413 10419 + 10425 95 10413 10419 10428 95 10413 10431 10434 95 + 10413 10431 10437 95 10413 10431 10440 95 10410 10407 + 10413 97 10410 10407 10443 103 10407 10413 10416 95 + 10404 10401 10407 104 10401 10407 10410 105 10473 10479 + 10482 92 10467 10461 10470 96 10464 10461 10467 96 + 10464 10461 10470 96 10458 10455 10461 97 10458 10455 + 10473 103 10455 10461 10464 95 10455 10461 10467 95 + 10455 10461 10470 95 10452 10449 10455 104 10449 10455 + 10458 105 10533 10539 10542 92 10524 10521 10527 106 + 10521 10527 10530 106 10518 10515 10521 106 10515 10521 + 10524 106 10512 10509 10515 106 10509 10515 10518 106 + 10506 10503 10509 106 10503 10509 10512 106 10500 10503 + 10506 106 10500 10527 10530 106 10497 10491 10500 107 + 10494 10491 10497 96 10494 10491 10500 107 10488 10485 + 10491 97 10488 10485 10533 103 10485 10491 10494 95 + 10485 10491 10497 95 10482 10479 10485 104 10479 10485 + 10488 105 10590 10596 10599 92 10584 10578 10587 96 + 10581 10578 10584 96 10581 10578 10587 96 10572 10566 + 10575 96 10569 10566 10572 96 10569 10566 10575 96 + 10563 10560 10566 95 10563 10560 10578 95 10560 10566 + 10569 95 10560 10566 10572 95 10560 10566 10575 95 + 10560 10578 10581 95 10560 10578 10584 95 10560 10578 + 10587 95 10557 10551 10560 95 10554 10551 10557 96 + 10554 10551 10560 95 10551 10560 10563 95 10548 10545 + 10551 97 10548 10545 10590 103 10545 10551 10554 95 + 10545 10551 10557 95 10542 10539 10545 104 10539 10545 + 10548 105 10623 10629 10632 92 10614 10608 10617 126 + 10611 10608 10614 93 10611 10608 10617 126 10608 10617 + 10620 127 10605 10602 10608 97 10605 10602 10623 103 + 10602 10608 10611 97 10602 10608 10614 97 10599 10596 + 10602 104 10596 10602 10605 105 10656 10662 10665 92 + 10647 10641 10650 109 10644 10641 10647 93 10644 10641 + 10650 109 10641 10650 10653 110 10638 10635 10641 97 + 10638 10635 10656 103 10635 10641 10644 97 10635 10641 + 10647 97 10632 10629 10635 104 10629 10635 10638 105 + 10692 10698 10701 92 10680 10674 10683 112 10677 10674 + 10680 96 10677 10674 10683 112 10671 10668 10674 97 + 10671 10668 10692 103 10668 10674 10677 95 10668 10674 + 10680 95 10665 10662 10668 104 10662 10668 10671 105 + 10743 10749 10752 92 10737 10731 10740 93 10734 10731 + 10737 93 10734 10731 10740 93 10728 10731 10734 94 + 10728 10731 10737 94 10728 10731 10740 94 10725 10719 + 10728 94 10722 10719 10725 93 10722 10719 10728 94 + 10716 10710 10719 95 10713 10710 10716 96 10713 10710 + 10719 95 10710 10719 10722 97 10710 10719 10725 97 + 10707 10704 10710 97 10707 10704 10743 103 10704 10710 + 10713 95 10704 10710 10716 95 10701 10698 10704 104 + 10698 10704 10707 105 10773 10779 10782 92 10767 10761 + 10770 96 10764 10761 10767 96 10764 10761 10770 96 + 10758 10755 10761 97 10758 10755 10773 103 10755 10761 + 10764 95 10755 10761 10767 95 10755 10761 10770 95 + 10752 10749 10755 104 10749 10755 10758 105 10815 10821 + 10824 92 10803 10797 10806 96 10800 10797 10803 96 + 10800 10797 10806 96 10794 10791 10797 97 10794 10791 + 10809 109 10791 10797 10800 95 10791 10797 10803 95 + 10791 10797 10806 95 10791 10809 10812 110 10788 10785 + 10791 97 10788 10785 10815 103 10785 10791 10794 97 + 10782 10779 10785 104 10779 10785 10788 105 10836 10842 + 10845 92 10833 10827 10836 103 10830 10827 10833 93 + 10830 10827 10836 103 10824 10821 10827 104 10821 10827 + 10830 105 10821 10827 10833 105 10893 10899 10902 92 + 10887 10881 10890 96 10884 10881 10887 96 10884 10881 + 10890 96 10878 10872 10881 95 10875 10872 10878 96 + 10875 10872 10881 95 10872 10881 10884 95 10872 10881 + 10887 95 10872 10881 10890 95 10866 10860 10869 96 + 10863 10860 10866 96 10863 10860 10869 96 10857 10854 + 10860 95 10857 10854 10872 95 10854 10860 10863 95 + 10854 10860 10866 95 10854 10860 10869 95 10854 10872 + 10875 95 10854 10872 10878 95 10851 10848 10854 97 + 10851 10848 10893 103 10848 10854 10857 95 10845 10842 + 10848 104 10842 10848 10851 105 10935 10941 10944 92 + 10923 10917 10926 96 10920 10917 10923 96 10920 10917 + 10926 96 10914 10911 10917 97 10914 10911 10929 109 + 10911 10917 10920 95 10911 10917 10923 95 10911 10917 + 10926 95 10911 10929 10932 110 10908 10905 10911 97 + 10908 10905 10935 103 10905 10911 10914 97 10902 10899 + 10905 104 10899 10905 10908 105 10956 10962 10965 92 + 10953 10947 10956 103 10950 10947 10953 93 10950 10947 + 10956 103 10944 10941 10947 104 10941 10947 10950 105 + 10941 10947 10953 105 11001 11007 11010 92 10989 10983 + 10992 112 10986 10983 10989 96 10986 10983 10992 112 + 10980 10974 10983 95 10977 10974 10980 96 10977 10974 + 10983 95 10974 10983 10986 95 10974 10983 10989 95 + 10971 10968 10974 97 10971 10968 11001 103 10968 10974 + 10977 95 10968 10974 10980 95 10965 10962 10968 104 + 10962 10968 10971 105 11049 11055 11058 92 11043 11037 + 11046 96 11040 11037 11043 96 11040 11037 11046 96 + 11031 11025 11034 96 11028 11025 11031 96 11028 11025 + 11034 96 11022 11019 11025 95 11022 11019 11037 95 + 11019 11025 11028 95 11019 11025 11031 95 11019 11025 + 11034 95 11019 11037 11040 95 11019 11037 11043 95 + 11019 11037 11046 95 11016 11013 11019 97 11016 11013 + 11049 103 11013 11019 11022 95 11010 11007 11013 104 + 11007 11013 11016 105 11097 11103 11106 92 11091 11085 + 11094 96 11088 11085 11091 96 11088 11085 11094 96 + 11079 11073 11082 96 11076 11073 11079 96 11076 11073 + 11082 96 11070 11067 11073 95 11070 11067 11085 95 + 11067 11073 11076 95 11067 11073 11079 95 11067 11073 + 11082 95 11067 11085 11088 95 11067 11085 11091 95 + 11067 11085 11094 95 11064 11061 11067 97 11064 11061 + 11097 103 11061 11067 11070 95 11058 11055 11061 104 + 11055 11061 11064 105 11148 11154 11157 92 11139 11136 + 11142 115 11136 11142 11145 116 11133 11130 11136 117 + 11130 11136 11139 118 11127 11130 11133 119 11124 11142 + 11145 120 11121 11115 11124 121 11118 11115 11121 96 + 11118 11115 11124 121 11112 11109 11115 97 11112 11109 + 11148 103 11109 11115 11118 95 11109 11115 11121 95 + 11106 11103 11109 104 11103 11109 11112 105 11196 11202 + 11205 92 11190 11184 11193 96 11187 11184 11190 96 + 11187 11184 11193 96 11178 11172 11181 96 11175 11172 + 11178 96 11175 11172 11181 96 11169 11166 11172 95 + 11169 11166 11184 95 11166 11172 11175 95 11166 11172 + 11178 95 11166 11172 11181 95 11166 11184 11187 95 + 11166 11184 11190 95 11166 11184 11193 95 11163 11160 + 11166 97 11163 11160 11196 103 11160 11166 11169 95 + 11157 11154 11160 104 11154 11160 11163 105 11232 11238 + 11241 92 11220 11214 11223 112 11217 11214 11220 96 + 11217 11214 11223 112 11211 11208 11214 97 11211 11208 + 11232 103 11208 11214 11217 95 11208 11214 11220 95 + 11205 11202 11208 104 11202 11208 11211 105 11262 11268 + 11271 92 11256 11250 11259 96 11253 11250 11256 96 + 11253 11250 11259 96 11247 11244 11250 97 11247 11244 + 11262 103 11244 11250 11253 95 11244 11250 11256 95 + 11244 11250 11259 95 11241 11238 11244 104 11238 11244 + 11247 105 11283 11289 11292 92 11280 11274 11283 103 + 11277 11274 11280 93 11277 11274 11283 103 11271 11268 + 11274 104 11268 11274 11277 105 11268 11274 11280 105 + 11346 11352 11355 92 11337 11334 11340 106 11334 11340 + 11343 106 11325 11328 11331 113 11325 11334 11337 114 + 11322 11319 11325 114 11316 11313 11319 106 11313 11319 + 11322 106 11310 11313 11316 106 11310 11340 11343 106 + 11307 11301 11310 107 11304 11301 11307 96 11304 11301 + 11310 107 11298 11295 11301 97 11298 11295 11346 103 + 11295 11301 11304 95 11295 11301 11307 95 11292 11289 + 11295 104 11289 11295 11298 105 11397 11403 11406 92 + 11388 11385 11391 115 11385 11391 11394 116 11382 11379 + 11385 117 11379 11385 11388 118 11376 11379 11382 119 + 11373 11391 11394 120 11370 11364 11373 121 11367 11364 + 11370 96 11367 11364 11373 121 11361 11358 11364 97 + 11361 11358 11397 103 11358 11364 11367 95 11358 11364 + 11370 95 11355 11352 11358 104 11352 11358 11361 105 + 11430 11436 11439 92 11421 11415 11424 126 11418 11415 + 11421 93 11418 11415 11424 126 11415 11424 11427 127 + 11412 11409 11415 97 11412 11409 11430 103 11409 11415 + 11418 97 11409 11415 11421 97 11406 11403 11409 104 + 11403 11409 11412 105 11478 11484 11487 92 11472 11466 + 11475 96 11469 11466 11472 96 11469 11466 11475 96 + 11460 11454 11463 96 11457 11454 11460 96 11457 11454 + 11463 96 11451 11448 11454 95 11451 11448 11466 95 + 11448 11454 11457 95 11448 11454 11460 95 11448 11454 + 11463 95 11448 11466 11469 95 11448 11466 11472 95 + 11448 11466 11475 95 11445 11442 11448 97 11445 11442 + 11478 103 11442 11448 11451 95 11439 11436 11442 104 + 11436 11442 11445 105 11511 11517 11520 92 11502 11496 + 11505 109 11499 11496 11502 93 11499 11496 11505 109 + 11496 11505 11508 110 11493 11490 11496 97 11493 11490 + 11511 103 11490 11496 11499 97 11490 11496 11502 97 + 11487 11484 11490 104 11484 11490 11493 105 11562 11568 + 11571 92 11556 11550 11559 93 11553 11550 11556 93 + 11553 11550 11559 93 11547 11550 11553 94 11547 11550 + 11556 94 11547 11550 11559 94 11544 11538 11547 94 + 11541 11538 11544 93 11541 11538 11547 94 11535 11529 + 11538 95 11532 11529 11535 96 11532 11529 11538 95 + 11529 11538 11541 97 11529 11538 11544 97 11526 11523 + 11529 97 11526 11523 11562 103 11523 11529 11532 95 + 11523 11529 11535 95 11520 11517 11523 104 11517 11523 + 11526 105 11583 11589 11592 92 11580 11574 11583 103 + 11577 11574 11580 93 11577 11574 11583 103 11571 11568 + 11574 104 11568 11574 11577 105 11568 11574 11580 105 + 11625 11631 11634 92 11619 11616 11622 111 11610 11616 + 11619 92 11610 11616 11622 92 11607 11601 11610 112 + 11604 11601 11607 96 11604 11601 11610 112 11598 11595 + 11601 97 11598 11595 11625 103 11595 11601 11604 95 + 11595 11601 11607 95 11592 11589 11595 104 11589 11595 + 11598 105 11673 11679 11682 92 11667 11661 11670 96 + 11664 11661 11667 96 11664 11661 11670 96 11655 11649 + 11658 96 11652 11649 11655 96 11652 11649 11658 96 + 11646 11643 11649 95 11646 11643 11661 95 11643 11649 + 11652 95 11643 11649 11655 95 11643 11649 11658 95 + 11643 11661 11664 95 11643 11661 11667 95 11643 11661 + 11670 95 11640 11637 11643 97 11640 11637 11673 103 + 11637 11643 11646 95 11634 11631 11637 104 11631 11637 + 11640 105 11730 11736 11739 92 11724 11718 11727 96 + 11721 11718 11724 96 11721 11718 11727 96 11712 11706 + 11715 96 11709 11706 11712 96 11709 11706 11715 96 + 11703 11700 11706 95 11703 11700 11718 95 11700 11706 + 11709 95 11700 11706 11712 95 11700 11706 11715 95 + 11700 11718 11721 95 11700 11718 11724 95 11700 11718 + 11727 95 11697 11691 11700 95 11694 11691 11697 96 + 11694 11691 11700 95 11691 11700 11703 95 11688 11685 + 11691 97 11688 11685 11730 103 11685 11691 11694 95 + 11685 11691 11697 95 11682 11679 11685 104 11679 11685 + 11688 105 11787 11793 11796 92 11781 11775 11784 96 + 11778 11775 11781 96 11778 11775 11784 96 11769 11763 + 11772 96 11766 11763 11769 96 11766 11763 11772 96 + 11760 11757 11763 95 11760 11757 11775 95 11757 11763 + 11766 95 11757 11763 11769 95 11757 11763 11772 95 + 11757 11775 11778 95 11757 11775 11781 95 11757 11775 + 11784 95 11754 11748 11757 95 11751 11748 11754 96 + 11751 11748 11757 95 11748 11757 11760 95 11745 11742 + 11748 97 11745 11742 11787 103 11742 11748 11751 95 + 11742 11748 11754 95 11739 11736 11742 104 11736 11742 + 11745 105 11832 11838 11841 92 11820 11814 11823 112 + 11817 11814 11820 96 11817 11814 11823 112 11811 11805 + 11814 95 11808 11805 11811 96 11808 11805 11814 95 + 11805 11814 11817 95 11805 11814 11820 95 11802 11799 + 11805 97 11802 11799 11832 103 11799 11805 11808 95 + 11799 11805 11811 95 11796 11793 11799 104 11793 11799 + 11802 105 11883 11889 11892 92 11874 11871 11877 115 + 11871 11877 11880 116 11868 11865 11871 117 11865 11871 + 11874 118 11862 11865 11868 119 11859 11877 11880 120 + 11856 11850 11859 121 11853 11850 11856 96 11853 11850 + 11859 121 11847 11844 11850 97 11847 11844 11883 103 + 11844 11850 11853 95 11844 11850 11856 95 11841 11838 + 11844 104 11838 11844 11847 105 11934 11940 11943 92 + 11925 11922 11928 115 11922 11928 11931 116 11919 11916 + 11922 117 11916 11922 11925 118 11913 11916 11919 119 + 11910 11928 11931 120 11907 11901 11910 121 11904 11901 + 11907 96 11904 11901 11910 121 11898 11895 11901 97 + 11898 11895 11934 103 11895 11901 11904 95 11895 11901 + 11907 95 11892 11889 11895 104 11889 11895 11898 105 + 11985 11991 11994 92 11976 11973 11979 115 11973 11979 + 11982 116 11970 11967 11973 117 11967 11973 11976 118 + 11964 11967 11970 119 11961 11979 11982 120 11958 11952 + 11961 121 11955 11952 11958 96 11955 11952 11961 121 + 11949 11946 11952 97 11949 11946 11985 103 11946 11952 + 11955 95 11946 11952 11958 95 11943 11940 11946 104 + 11940 11946 11949 105 12036 12042 12045 92 12027 12024 + 12030 115 12024 12030 12033 116 12021 12018 12024 117 + 12018 12024 12027 118 12015 12018 12021 119 12012 12030 + 12033 120 12009 12003 12012 121 12006 12003 12009 96 + 12006 12003 12012 121 12000 11997 12003 97 12000 11997 + 12036 103 11997 12003 12006 95 11997 12003 12009 95 + 11994 11991 11997 104 11991 11997 12000 105 12087 12093 + 12096 92 12078 12075 12081 115 12075 12081 12084 116 + 12072 12069 12075 117 12069 12075 12078 118 12066 12069 + 12072 119 12063 12081 12084 120 12060 12054 12063 121 + 12057 12054 12060 96 12057 12054 12063 121 12051 12048 + 12054 97 12051 12048 12087 103 12048 12054 12057 95 + 12048 12054 12060 95 12045 12042 12048 104 12042 12048 + 12051 105 12129 12126 12132 115 12126 12132 12135 116 + 12123 12120 12126 117 12120 12126 12129 118 12117 12120 + 12123 119 12114 12132 12135 120 12111 12105 12114 121 + 12108 12105 12111 96 12108 12105 12114 121 12102 12099 + 12105 97 12102 12099 12138 103 12099 12105 12108 95 + 12099 12105 12111 95 12096 12093 12099 104 12093 12099 + 12102 105 12342 12267 12345 133 12315 12228 12318 93 + 12306 12198 12309 122 12279 12159 12282 93 12276 12273 + 12351 134 12273 12270 12348 135 12273 12276 12354 136 + 12270 12273 12351 137 12261 12267 12342 138 12261 12267 + 12345 138 12258 12255 12339 136 12258 12270 12348 135 + 12252 12249 12336 139 12252 12276 12354 140 12252 12255 + 12339 140 12249 12243 12330 97 12246 12243 12330 109 + 12243 12237 12324 97 12243 12249 12336 141 12243 12246 + 12333 110 12240 12237 12324 109 12237 12231 12321 97 + 12237 12243 12330 97 12237 12240 12327 110 12234 12231 + 12321 142 12234 12249 12336 143 12231 12228 12318 97 + 12231 12228 12315 97 12231 12237 12324 97 12228 12231 + 12321 97 12225 12228 12318 142 12225 12228 12315 142 + 12207 12204 12312 144 12201 12204 12312 144 12195 12198 + 12306 123 12195 12198 12309 123 12189 12186 12303 145 + 12183 12180 12300 146 12183 12186 12303 147 12180 12174 + 12294 97 12177 12174 12294 109 12174 12168 12288 97 + 12174 12180 12300 141 12174 12177 12297 110 12171 12168 + 12288 109 12168 12162 12285 97 12168 12174 12294 97 + 12168 12171 12291 110 12165 12162 12285 142 12165 12180 + 12300 143 12162 12159 12279 97 12162 12159 12282 97 + 12162 12168 12288 97 12159 12162 12285 97 12156 12159 + 12279 142 12156 12159 12282 142 12396 12393 12423 148 + 12393 12396 12426 148 12390 12387 12420 148 12390 12393 + 12423 148 12384 12387 12420 148 12381 12396 12426 148 + 12372 12369 12411 148 12369 12372 12414 148 12366 12363 + 12408 148 12366 12369 12411 148 12360 12363 12408 148 + 12360 12378 12417 149 12357 12372 12414 148 +%FLAG ANGLES_WITHOUT_HYDROGEN +%FORMAT(10I8) + 54 51 57 1 51 57 63 2 27 36 + 39 3 18 12 51 4 18 27 36 5 + 12 18 27 6 12 51 54 7 12 51 + 57 8 0 12 18 9 0 12 51 10 + 75 72 78 1 72 78 84 2 63 72 + 75 7 63 72 78 8 57 63 72 11 + 135 132 138 1 132 138 144 2 114 120 + 126 12 108 114 120 12 102 99 126 12 + 102 108 114 12 99 102 108 12 99 126 + 120 12 90 84 132 4 90 99 102 13 + 90 99 126 13 84 90 99 14 84 132 + 135 7 84 132 138 8 78 84 90 15 + 78 84 132 11 192 189 195 1 189 195 + 201 2 165 159 177 6 150 144 189 4 + 150 159 165 6 150 159 177 6 144 150 + 159 6 144 189 192 7 144 189 195 8 + 138 144 150 15 138 144 189 11 222 219 + 225 1 219 225 231 2 207 201 219 4 + 201 219 222 7 201 219 225 8 195 201 + 207 15 195 201 219 11 243 240 246 1 + 240 246 252 2 231 240 243 7 231 240 + 246 8 225 231 240 11 309 306 312 1 + 306 312 318 2 276 285 294 9 267 276 + 285 6 258 252 306 4 258 267 276 6 + 252 258 267 6 252 306 309 7 252 306 + 312 8 246 252 258 15 246 252 306 11 + 375 372 378 1 372 378 384 2 342 351 + 360 9 333 342 351 6 324 318 372 4 + 324 333 342 6 318 324 333 6 318 372 + 375 7 318 372 378 8 312 318 324 15 + 312 318 372 11 432 429 435 1 429 435 + 441 2 396 390 408 6 390 384 429 4 + 390 408 417 6 384 390 396 6 384 390 + 408 6 384 429 432 7 384 429 435 8 + 378 384 390 15 378 384 429 11 489 486 + 492 1 486 492 498 2 462 456 474 6 + 447 441 486 4 447 456 462 6 447 456 + 474 6 441 447 456 6 441 486 489 7 + 441 486 492 8 435 441 447 15 435 441 + 486 11 546 543 549 1 543 549 555 2 + 510 504 522 6 504 498 543 4 504 522 + 531 6 498 504 510 6 498 504 522 6 + 498 543 546 7 498 543 549 8 492 498 + 504 15 492 498 543 11 588 585 591 1 + 585 591 597 2 567 561 579 16 561 555 + 585 4 555 561 567 6 555 561 579 16 + 555 585 588 7 555 585 591 8 549 555 + 561 15 549 555 585 11 609 606 612 1 + 606 612 618 2 597 606 609 7 597 606 + 612 8 591 597 606 11 666 663 669 1 + 663 669 675 2 639 633 651 6 624 618 + 663 4 624 633 639 6 624 633 651 6 + 618 624 633 6 618 663 666 7 618 663 + 669 8 612 618 624 15 612 618 663 11 + 723 720 726 1 720 726 732 2 696 690 + 708 6 681 675 720 4 681 690 696 6 + 681 690 708 6 675 681 690 6 675 720 + 723 7 675 720 726 8 669 675 681 15 + 669 675 720 11 756 753 759 1 753 759 + 765 2 738 732 753 4 732 738 747 16 + 732 753 756 7 732 753 759 8 726 732 + 738 15 726 732 753 11 798 795 801 1 + 795 801 807 2 783 780 786 1 771 765 + 795 4 771 780 783 7 771 780 786 8 + 765 771 780 4 765 795 798 7 765 795 + 801 8 759 765 771 15 759 765 795 11 + 864 861 867 1 861 867 873 2 831 840 + 849 9 822 831 840 6 813 807 861 4 + 813 822 831 6 807 813 822 6 807 861 + 864 7 807 861 867 8 801 807 813 15 + 801 807 861 11 897 894 900 1 894 900 + 906 2 879 873 894 4 873 879 888 16 + 873 894 897 7 873 894 900 8 867 873 + 879 15 867 873 894 11 954 951 957 1 + 951 957 963 2 918 912 930 6 912 906 + 951 4 912 930 939 6 906 912 918 6 + 906 912 930 6 906 951 954 7 906 951 + 957 8 900 906 912 15 900 906 951 11 + 984 981 987 1 981 987 993 2 969 963 + 981 4 963 981 984 7 963 981 987 8 + 957 963 969 15 957 963 981 11 1047 1044 + 1050 1 1044 1050 1056 2 1026 1023 1032 17 + 1023 1032 1038 18 1017 1023 1026 17 1017 1023 + 1032 19 1011 1008 1038 12 1011 1017 1023 18 + 1008 1011 1017 12 1008 1038 1032 12 999 993 + 1044 4 999 1008 1011 13 999 1008 1038 13 + 993 999 1008 14 993 1044 1047 7 993 1044 + 1050 8 987 993 999 15 987 993 1044 11 + 1068 1065 1071 1 1065 1071 1077 2 1056 1065 + 1068 7 1056 1065 1071 8 1050 1056 1065 11 + 1125 1122 1128 1 1122 1128 1134 2 1089 1083 + 1101 6 1083 1077 1122 4 1083 1101 1110 6 + 1077 1083 1089 6 1077 1083 1101 6 1077 1122 + 1125 7 1077 1122 1128 8 1071 1077 1083 15 + 1071 1077 1122 11 1155 1152 1158 1 1152 1158 + 1164 2 1140 1134 1152 4 1134 1152 1155 7 + 1134 1152 1158 8 1128 1134 1140 15 1128 1134 + 1152 11 1221 1218 1224 1 1218 1224 1230 2 + 1188 1197 1206 9 1179 1188 1197 6 1170 1164 + 1218 4 1170 1179 1188 6 1164 1170 1179 6 + 1164 1218 1221 7 1164 1218 1224 8 1158 1164 + 1170 15 1158 1164 1218 11 1251 1248 1254 1 + 1248 1254 1260 2 1236 1230 1248 4 1230 1248 + 1251 7 1230 1248 1254 8 1224 1230 1236 15 + 1224 1230 1248 11 1302 1299 1305 1 1299 1305 + 1311 2 1275 1284 1287 3 1266 1260 1299 4 + 1266 1275 1284 5 1260 1266 1275 6 1260 1299 + 1302 7 1260 1299 1305 8 1254 1260 1266 15 + 1254 1260 1299 11 1353 1350 1356 1 1350 1356 + 1362 2 1332 1338 1344 20 1329 1326 1344 21 + 1329 1332 1338 22 1326 1329 1332 23 1326 1344 + 1338 24 1317 1311 1350 4 1317 1326 1329 25 + 1317 1326 1344 26 1311 1317 1326 27 1311 1350 + 1353 7 1311 1350 1356 8 1305 1311 1317 15 + 1305 1311 1350 11 1425 1422 1428 1 1422 1428 + 1434 2 1404 1401 1413 28 1395 1401 1404 28 + 1395 1401 1413 28 1386 1395 1401 29 1377 1386 + 1395 30 1368 1362 1422 4 1368 1377 1386 6 + 1362 1368 1377 6 1362 1422 1425 7 1362 1422 + 1428 8 1356 1362 1368 15 1356 1362 1422 11 + 1470 1467 1473 1 1467 1473 1479 2 1461 1458 + 1464 31 1449 1458 1461 32 1449 1458 1464 32 + 1440 1434 1467 4 1440 1449 1458 4 1434 1440 + 1449 6 1434 1467 1470 7 1434 1467 1473 8 + 1428 1434 1440 15 1428 1434 1467 11 1491 1488 + 1494 1 1488 1494 1500 2 1479 1488 1491 7 + 1479 1488 1494 8 1473 1479 1488 11 1521 1518 + 1524 1 1518 1524 1530 2 1506 1500 1518 4 + 1500 1518 1521 7 1500 1518 1524 8 1494 1500 + 1506 15 1494 1500 1518 11 1566 1563 1569 1 + 1563 1569 1575 2 1557 1554 1560 31 1545 1554 + 1557 32 1545 1554 1560 32 1536 1530 1563 4 + 1536 1545 1554 4 1530 1536 1545 6 1530 1563 + 1566 7 1530 1563 1569 8 1524 1530 1536 15 + 1524 1530 1563 11 1623 1620 1626 1 1620 1626 + 1632 2 1596 1590 1608 6 1581 1575 1620 4 + 1581 1590 1596 6 1581 1590 1608 6 1575 1581 + 1590 6 1575 1620 1623 7 1575 1620 1626 8 + 1569 1575 1581 15 1569 1575 1620 11 1653 1650 + 1656 1 1650 1656 1662 2 1638 1632 1650 4 + 1632 1650 1653 7 1632 1650 1656 8 1626 1632 + 1638 15 1626 1632 1650 11 1713 1710 1716 1 + 1710 1716 1722 2 1692 1698 1704 12 1686 1692 + 1698 12 1680 1677 1704 12 1680 1686 1692 12 + 1677 1680 1686 12 1677 1704 1698 12 1668 1662 + 1710 4 1668 1677 1680 13 1668 1677 1704 13 + 1662 1668 1677 14 1662 1710 1713 7 1662 1710 + 1716 8 1656 1662 1668 15 1656 1662 1710 11 + 1755 1752 1758 1 1752 1758 1764 2 1734 1728 + 1746 16 1728 1722 1752 4 1722 1728 1734 6 + 1722 1728 1746 16 1722 1752 1755 7 1722 1752 + 1758 8 1716 1722 1728 15 1716 1722 1752 11 + 1818 1815 1821 1 1815 1821 1827 2 1797 1794 + 1803 17 1794 1803 1809 18 1788 1794 1797 17 + 1788 1794 1803 19 1782 1779 1809 12 1782 1788 + 1794 18 1779 1782 1788 12 1779 1809 1803 12 + 1770 1764 1815 4 1770 1779 1782 13 1770 1779 + 1809 13 1764 1770 1779 14 1764 1815 1818 7 + 1764 1815 1821 8 1758 1764 1770 15 1758 1764 + 1815 11 1866 1863 1869 1 1863 1869 1875 2 + 1839 1833 1851 6 1833 1827 1863 4 1827 1833 + 1839 6 1827 1833 1851 6 1827 1863 1866 7 + 1827 1863 1869 8 1821 1827 1833 15 1821 1827 + 1863 11 1887 1884 1890 1 1884 1890 1896 2 + 1875 1884 1887 7 1875 1884 1890 8 1869 1875 + 1884 11 1938 1935 1941 1 1935 1941 1947 2 + 1923 1920 1926 1 1911 1920 1923 7 1911 1920 + 1926 8 1902 1896 1935 4 1902 1911 1920 4 + 1896 1902 1911 6 1896 1935 1938 7 1896 1935 + 1941 8 1890 1896 1902 15 1890 1896 1935 11 + 1998 1995 2001 1 1995 2001 2007 2 1977 1983 + 1989 12 1971 1977 1983 12 1965 1962 1989 12 + 1965 1971 1977 12 1962 1965 1971 12 1962 1989 + 1983 12 1953 1947 1995 4 1953 1962 1965 13 + 1953 1962 1989 13 1947 1953 1962 14 1947 1995 + 1998 7 1947 1995 2001 8 1941 1947 1953 15 + 1941 1947 1995 11 2064 2061 2067 1 2061 2067 + 2073 2 2031 2040 2049 9 2022 2031 2040 6 + 2013 2007 2061 4 2013 2022 2031 6 2007 2013 + 2022 6 2007 2061 2064 7 2007 2061 2067 8 + 2001 2007 2013 15 2001 2007 2061 11 2100 2097 + 2103 1 2097 2103 2109 2 2091 2088 2094 31 + 2079 2073 2097 4 2079 2088 2091 32 2079 2088 + 2094 32 2073 2079 2088 4 2073 2097 2100 7 + 2073 2097 2103 8 2067 2073 2079 15 2067 2073 + 2097 11 2172 2169 2175 1 2169 2175 2181 2 + 2151 2148 2160 28 2142 2148 2151 28 2142 2148 + 2160 28 2133 2142 2148 29 2124 2133 2142 30 + 2115 2109 2169 4 2115 2124 2133 6 2109 2115 + 2124 6 2109 2169 2172 7 2109 2169 2175 8 + 2103 2109 2115 15 2103 2109 2169 11 2220 2217 + 2223 1 2217 2223 2229 2 2193 2187 2205 6 + 2187 2181 2217 4 2181 2187 2193 6 2181 2187 + 2205 6 2181 2217 2220 7 2181 2217 2223 8 + 2175 2181 2187 15 2175 2181 2217 11 2265 2262 + 2268 1 2262 2268 2274 2 2256 2253 2259 31 + 2244 2253 2256 32 2244 2253 2259 32 2235 2229 + 2262 4 2235 2244 2253 4 2229 2235 2244 6 + 2229 2262 2265 7 2229 2262 2268 8 2223 2229 + 2235 15 2223 2229 2262 11 2331 2328 2334 1 + 2328 2334 2340 2 2298 2307 2316 9 2289 2298 + 2307 6 2280 2274 2328 4 2280 2289 2298 6 + 2274 2280 2289 6 2274 2328 2331 7 2274 2328 + 2334 8 2268 2274 2280 15 2268 2274 2328 11 + 2388 2385 2391 1 2385 2391 2397 2 2361 2355 + 2373 6 2346 2340 2385 4 2346 2355 2361 6 + 2346 2355 2373 6 2340 2346 2355 6 2340 2385 + 2388 7 2340 2385 2391 8 2334 2340 2346 15 + 2334 2340 2385 11 2421 2418 2424 1 2418 2424 + 2430 2 2403 2397 2418 4 2397 2403 2412 33 + 2397 2418 2421 7 2397 2418 2424 8 2391 2397 + 2403 15 2391 2397 2418 11 2451 2448 2454 1 + 2448 2454 2460 2 2436 2430 2448 4 2430 2448 + 2451 7 2430 2448 2454 8 2424 2430 2436 15 + 2424 2430 2448 11 2496 2493 2499 1 2493 2499 + 2505 2 2487 2484 2490 31 2475 2484 2487 32 + 2475 2484 2490 32 2466 2460 2493 4 2466 2475 + 2484 4 2460 2466 2475 6 2460 2493 2496 7 + 2460 2493 2499 8 2454 2460 2466 15 2454 2460 + 2493 11 2556 2553 2559 1 2553 2559 2565 2 + 2535 2541 2547 12 2529 2535 2541 12 2523 2520 + 2547 12 2523 2529 2535 12 2520 2523 2529 12 + 2520 2547 2541 12 2511 2505 2553 4 2511 2520 + 2523 13 2511 2520 2547 13 2505 2511 2520 14 + 2505 2553 2556 7 2505 2553 2559 8 2499 2505 + 2511 15 2499 2505 2553 11 2598 2595 2601 1 + 2595 2601 2604 2 2595 2601 2631 2 2583 2580 + 2586 1 2571 2565 2595 4 2571 2580 2583 7 + 2571 2580 2586 8 2565 2571 2580 4 2565 2595 + 2598 7 2565 2595 2601 8 2559 2565 2571 15 + 2559 2565 2595 11 2640 2637 2643 1 2637 2643 + 2649 2 2631 2637 2640 7 2631 2637 2643 8 + 2622 2631 2637 4 2613 2622 2631 6 2604 2601 + 2631 34 2604 2613 2622 6 2601 2604 2613 15 + 2601 2631 2622 15 2601 2631 2637 11 2670 2667 + 2673 1 2667 2673 2679 2 2655 2649 2667 4 + 2649 2667 2670 7 2649 2667 2673 8 2643 2649 + 2655 15 2643 2649 2667 11 2700 2697 2703 1 + 2697 2703 2709 2 2685 2679 2697 4 2679 2697 + 2700 7 2679 2697 2703 8 2673 2679 2685 15 + 2673 2679 2697 11 2748 2745 2751 1 2745 2751 + 2757 2 2721 2715 2733 6 2715 2709 2745 4 + 2709 2715 2721 6 2709 2715 2733 6 2709 2745 + 2748 7 2709 2745 2751 8 2703 2709 2715 15 + 2703 2709 2745 11 2805 2802 2808 1 2802 2808 + 2811 2 2802 2808 2838 2 2778 2772 2790 6 + 2763 2757 2802 4 2763 2772 2778 6 2763 2772 + 2790 6 2757 2763 2772 6 2757 2802 2805 7 + 2757 2802 2808 8 2751 2757 2763 15 2751 2757 + 2802 11 2847 2844 2850 1 2844 2850 2856 2 + 2838 2844 2847 7 2838 2844 2850 8 2829 2838 + 2844 4 2820 2829 2838 6 2811 2808 2838 34 + 2811 2820 2829 6 2808 2811 2820 15 2808 2838 + 2829 15 2808 2838 2844 11 2880 2877 2883 1 + 2877 2883 2889 2 2862 2856 2877 4 2856 2862 + 2871 33 2856 2877 2880 7 2856 2877 2883 8 + 2850 2856 2862 15 2850 2856 2877 11 2916 2913 + 2919 1 2913 2919 2925 2 2907 2904 2910 31 + 2895 2889 2913 4 2895 2904 2907 32 2895 2904 + 2910 32 2889 2895 2904 4 2889 2913 2916 7 + 2889 2913 2919 8 2883 2889 2895 15 2883 2889 + 2913 11 2964 2961 2967 1 2961 2967 2973 2 + 2937 2931 2949 6 2931 2925 2961 4 2925 2931 + 2937 6 2925 2931 2949 6 2925 2961 2964 7 + 2925 2961 2967 8 2919 2925 2931 15 2919 2925 + 2961 11 3021 3018 3024 1 3018 3024 3030 2 + 2985 2979 2997 6 2979 2973 3018 4 2979 2997 + 3006 6 2973 2979 2985 6 2973 2979 2997 6 + 2973 3018 3021 7 2973 3018 3024 8 2967 2973 + 2979 15 2967 2973 3018 11 3054 3051 3057 1 + 3051 3057 3063 2 3036 3030 3051 4 3030 3036 + 3045 16 3030 3051 3054 7 3030 3051 3057 8 + 3024 3030 3036 15 3024 3030 3051 11 3090 3087 + 3093 1 3087 3093 3099 2 3081 3078 3084 31 + 3069 3063 3087 4 3069 3078 3081 32 3069 3078 + 3084 32 3063 3069 3078 4 3063 3087 3090 7 + 3063 3087 3093 8 3057 3063 3069 15 3057 3063 + 3087 11 3141 3138 3144 1 3138 3144 3150 2 + 3126 3123 3129 1 3114 3123 3126 7 3114 3123 + 3129 8 3105 3099 3138 4 3105 3114 3123 4 + 3099 3105 3114 6 3099 3138 3141 7 3099 3138 + 3144 8 3093 3099 3105 15 3093 3099 3138 11 + 3186 3183 3189 1 3183 3189 3195 2 3177 3174 + 3180 31 3165 3174 3177 32 3165 3174 3180 32 + 3156 3150 3183 4 3156 3165 3174 4 3150 3156 + 3165 6 3150 3183 3186 7 3150 3183 3189 8 + 3144 3150 3156 15 3144 3150 3183 11 3243 3240 + 3246 1 3240 3246 3252 2 3207 3201 3219 6 + 3201 3195 3240 4 3201 3219 3228 6 3195 3201 + 3207 6 3195 3201 3219 6 3195 3240 3243 7 + 3195 3240 3246 8 3189 3195 3201 15 3189 3195 + 3240 11 3309 3306 3312 1 3306 3312 3318 2 + 3276 3285 3294 9 3267 3276 3285 6 3258 3252 + 3306 4 3258 3267 3276 6 3252 3258 3267 6 + 3252 3306 3309 7 3252 3306 3312 8 3246 3252 + 3258 15 3246 3252 3306 11 3345 3342 3348 1 + 3342 3348 3354 2 3336 3333 3339 31 3324 3318 + 3342 4 3324 3333 3336 32 3324 3333 3339 32 + 3318 3324 3333 4 3318 3342 3345 7 3318 3342 + 3348 8 3312 3318 3324 15 3312 3318 3342 11 + 3402 3399 3405 1 3399 3405 3411 2 3375 3369 + 3387 6 3360 3354 3399 4 3360 3369 3375 6 + 3360 3369 3387 6 3354 3360 3369 6 3354 3399 + 3402 7 3354 3399 3405 8 3348 3354 3360 15 + 3348 3354 3399 11 3462 3459 3465 1 3459 3465 + 3471 2 3441 3447 3453 12 3435 3441 3447 12 + 3429 3426 3453 12 3429 3435 3441 12 3426 3429 + 3435 12 3426 3453 3447 12 3417 3411 3459 4 + 3417 3426 3429 13 3417 3426 3453 13 3411 3417 + 3426 14 3411 3459 3462 7 3411 3459 3465 8 + 3405 3411 3417 15 3405 3411 3459 11 3510 3507 + 3513 1 3507 3513 3519 2 3483 3477 3495 6 + 3477 3471 3507 4 3471 3477 3483 6 3471 3477 + 3495 6 3471 3507 3510 7 3471 3507 3513 8 + 3465 3471 3477 15 3465 3471 3507 11 3555 3552 + 3558 1 3552 3558 3564 2 3546 3543 3549 31 + 3534 3543 3546 32 3534 3543 3549 32 3525 3519 + 3552 4 3525 3534 3543 4 3519 3525 3534 6 + 3519 3552 3555 7 3519 3552 3558 8 3513 3519 + 3525 15 3513 3519 3552 11 3612 3609 3615 1 + 3609 3615 3621 2 3585 3579 3597 6 3570 3564 + 3609 4 3570 3579 3585 6 3570 3579 3597 6 + 3564 3570 3579 6 3564 3609 3612 7 3564 3609 + 3615 8 3558 3564 3570 15 3558 3564 3609 11 + 3633 3630 3636 1 3630 3636 3642 2 3621 3630 + 3633 7 3621 3630 3636 8 3615 3621 3630 11 + 3699 3696 3702 1 3696 3702 3708 2 3666 3675 + 3684 9 3657 3666 3675 6 3648 3642 3696 4 + 3648 3657 3666 6 3642 3648 3657 6 3642 3696 + 3699 7 3642 3696 3702 8 3636 3642 3648 15 + 3636 3642 3696 11 3747 3744 3750 1 3744 3750 + 3756 2 3720 3714 3732 6 3714 3708 3744 4 + 3708 3714 3720 6 3708 3714 3732 6 3708 3744 + 3747 7 3708 3744 3750 8 3702 3708 3714 15 + 3702 3708 3744 11 3819 3816 3822 1 3816 3822 + 3828 2 3801 3807 3813 35 3795 3801 3807 12 + 3789 3786 3813 36 3789 3795 3801 12 3786 3789 + 3795 37 3786 3813 3807 38 3780 3786 3789 39 + 3780 3786 3813 40 3774 3771 3813 41 3774 3780 + 3786 42 3771 3774 3780 43 3771 3813 3786 44 + 3771 3813 3807 45 3762 3756 3816 4 3762 3771 + 3774 46 3762 3771 3813 47 3756 3762 3771 48 + 3756 3816 3819 7 3756 3816 3822 8 3750 3756 + 3762 15 3750 3756 3816 11 3855 3852 3858 1 + 3852 3858 3864 2 3846 3843 3849 31 3834 3828 + 3852 4 3834 3843 3846 32 3834 3843 3849 32 + 3828 3834 3843 4 3828 3852 3855 7 3828 3852 + 3858 8 3822 3828 3834 15 3822 3828 3852 11 + 3876 3873 3879 1 3873 3879 3885 2 3864 3873 + 3876 7 3864 3873 3879 8 3858 3864 3873 11 + 3933 3930 3936 1 3930 3936 3942 2 3906 3900 + 3918 6 3891 3885 3930 4 3891 3900 3906 6 + 3891 3900 3918 6 3885 3891 3900 6 3885 3930 + 3933 7 3885 3930 3936 8 3879 3885 3891 15 + 3879 3885 3930 11 3969 3966 3972 1 3966 3972 + 3978 2 3960 3957 3963 31 3948 3942 3966 4 + 3948 3957 3960 32 3948 3957 3963 32 3942 3948 + 3957 4 3942 3966 3969 7 3942 3966 3972 8 + 3936 3942 3948 15 3936 3942 3966 11 3999 3996 + 4002 1 3996 4002 4008 2 3984 3978 3996 4 + 3978 3996 3999 7 3978 3996 4002 8 3972 3978 + 3984 15 3972 3978 3996 11 4056 4053 4059 1 + 4053 4059 4065 2 4020 4014 4032 6 4014 4008 + 4053 4 4014 4032 4041 6 4008 4014 4020 6 + 4008 4014 4032 6 4008 4053 4056 7 4008 4053 + 4059 8 4002 4008 4014 15 4002 4008 4053 11 + 4104 4101 4107 1 4101 4107 4113 2 4077 4071 + 4089 6 4071 4065 4101 4 4065 4071 4077 6 + 4065 4071 4089 6 4065 4101 4104 7 4065 4101 + 4107 8 4059 4065 4071 15 4059 4065 4101 11 + 4155 4152 4158 1 4152 4158 4164 2 4134 4140 + 4146 20 4131 4128 4146 21 4131 4134 4140 22 + 4128 4131 4134 23 4128 4146 4140 24 4119 4113 + 4152 4 4119 4128 4131 25 4119 4128 4146 26 + 4113 4119 4128 27 4113 4152 4155 7 4113 4152 + 4158 8 4107 4113 4119 15 4107 4113 4152 11 + 4188 4185 4191 1 4185 4191 4197 2 4170 4164 + 4185 4 4164 4170 4179 16 4164 4185 4188 7 + 4164 4185 4191 8 4158 4164 4170 15 4158 4164 + 4185 11 4245 4242 4248 1 4242 4248 4254 2 + 4209 4203 4221 6 4203 4197 4242 4 4203 4221 + 4230 6 4197 4203 4209 6 4197 4203 4221 6 + 4197 4242 4245 7 4197 4242 4248 8 4191 4197 + 4203 15 4191 4197 4242 11 4275 4272 4278 1 + 4272 4278 4284 2 4260 4254 4272 4 4254 4272 + 4275 7 4254 4272 4278 8 4248 4254 4260 15 + 4248 4254 4272 11 4335 4332 4338 1 4332 4338 + 4344 2 4314 4320 4326 12 4308 4314 4320 12 + 4302 4299 4326 12 4302 4308 4314 12 4299 4302 + 4308 12 4299 4326 4320 12 4290 4284 4332 4 + 4290 4299 4302 13 4290 4299 4326 13 4284 4290 + 4299 14 4284 4332 4335 7 4284 4332 4338 8 + 4278 4284 4290 15 4278 4284 4332 11 4365 4362 + 4368 1 4362 4368 4371 2 4362 4368 4398 2 + 4350 4344 4362 4 4344 4362 4365 7 4344 4362 + 4368 8 4338 4344 4350 15 4338 4344 4362 11 + 4407 4404 4410 1 4404 4410 4416 2 4398 4404 + 4407 7 4398 4404 4410 8 4389 4398 4404 4 + 4380 4389 4398 6 4371 4368 4398 34 4371 4380 + 4389 6 4368 4371 4380 15 4368 4398 4389 15 + 4368 4398 4404 11 4479 4476 4482 1 4476 4482 + 4488 2 4458 4455 4467 28 4449 4455 4458 28 + 4449 4455 4467 28 4440 4449 4455 29 4431 4440 + 4449 30 4422 4416 4476 4 4422 4431 4440 6 + 4416 4422 4431 6 4416 4476 4479 7 4416 4476 + 4482 8 4410 4416 4422 15 4410 4416 4476 11 + 4515 4512 4518 1 4512 4518 4524 2 4506 4503 + 4509 31 4494 4488 4512 4 4494 4503 4506 32 + 4494 4503 4509 32 4488 4494 4503 4 4488 4512 + 4515 7 4488 4512 4518 8 4482 4488 4494 15 + 4482 4488 4512 11 4566 4563 4569 1 4563 4569 + 4575 2 4551 4548 4554 1 4539 4548 4551 7 + 4539 4548 4554 8 4530 4524 4563 4 4530 4539 + 4548 4 4524 4530 4539 6 4524 4563 4566 7 + 4524 4563 4569 8 4518 4524 4530 15 4518 4524 + 4563 11 4623 4620 4626 1 4620 4626 4632 2 + 4596 4590 4608 6 4581 4575 4620 4 4581 4590 + 4596 6 4581 4590 4608 6 4575 4581 4590 6 + 4575 4620 4623 7 4575 4620 4626 8 4569 4575 + 4581 15 4569 4575 4620 11 4668 4665 4671 1 + 4665 4671 4677 2 4659 4656 4662 31 4647 4656 + 4659 32 4647 4656 4662 32 4638 4632 4665 4 + 4638 4647 4656 4 4632 4638 4647 6 4632 4665 + 4668 7 4632 4665 4671 8 4626 4632 4638 15 + 4626 4632 4665 11 4689 4686 4692 1 4686 4692 + 4698 2 4677 4686 4689 7 4677 4686 4692 8 + 4671 4677 4686 11 4731 4728 4734 1 4728 4734 + 4740 2 4716 4713 4719 1 4704 4698 4728 4 + 4704 4713 4716 7 4704 4713 4719 8 4698 4704 + 4713 4 4698 4728 4731 7 4698 4728 4734 8 + 4692 4698 4704 15 4692 4698 4728 11 4791 4788 + 4794 1 4788 4794 4800 2 4770 4776 4782 12 + 4764 4770 4776 12 4758 4755 4782 12 4758 4764 + 4770 12 4755 4758 4764 12 4755 4782 4776 12 + 4746 4740 4788 4 4746 4755 4758 13 4746 4755 + 4782 13 4740 4746 4755 14 4740 4788 4791 7 + 4740 4788 4794 8 4734 4740 4746 15 4734 4740 + 4788 11 4848 4845 4851 1 4845 4851 4857 2 + 4812 4806 4824 6 4806 4800 4845 4 4806 4824 + 4833 6 4800 4806 4812 6 4800 4806 4824 6 + 4800 4845 4848 7 4800 4845 4851 8 4794 4800 + 4806 15 4794 4800 4845 11 4884 4881 4887 1 + 4881 4887 4893 2 4875 4872 4878 31 4863 4857 + 4881 4 4863 4872 4875 32 4863 4872 4878 32 + 4857 4863 4872 4 4857 4881 4884 7 4857 4881 + 4887 8 4851 4857 4863 15 4851 4857 4881 11 + 4917 4914 4920 1 4914 4920 4926 2 4899 4893 + 4914 4 4893 4899 4908 33 4893 4914 4917 7 + 4893 4914 4920 8 4887 4893 4899 15 4887 4893 + 4914 11 4965 4962 4968 1 4962 4968 4974 2 + 4938 4932 4950 6 4932 4926 4962 4 4926 4932 + 4938 6 4926 4932 4950 6 4926 4962 4965 7 + 4926 4962 4968 8 4920 4926 4932 15 4920 4926 + 4962 11 5007 5004 5010 1 5004 5010 5016 2 + 4986 4980 4998 16 4980 4974 5004 4 4974 4980 + 4986 6 4974 4980 4998 16 4974 5004 5007 7 + 4974 5004 5010 8 4968 4974 4980 15 4968 4974 + 5004 11 5079 5076 5082 1 5076 5082 5088 2 + 5058 5055 5067 28 5049 5055 5058 28 5049 5055 + 5067 28 5040 5049 5055 29 5031 5040 5049 30 + 5022 5016 5076 4 5022 5031 5040 6 5016 5022 + 5031 6 5016 5076 5079 7 5016 5076 5082 8 + 5010 5016 5022 15 5010 5016 5076 11 5124 5121 + 5127 1 5121 5127 5133 2 5115 5112 5118 31 + 5103 5112 5115 32 5103 5112 5118 32 5094 5088 + 5121 4 5094 5103 5112 4 5088 5094 5103 6 + 5088 5121 5124 7 5088 5121 5127 8 5082 5088 + 5094 15 5082 5088 5121 11 5145 5142 5148 1 + 5142 5148 5154 2 5133 5142 5145 7 5133 5142 + 5148 8 5127 5133 5142 11 5205 5202 5208 1 + 5202 5208 5214 2 5184 5190 5196 12 5178 5184 + 5190 12 5172 5169 5196 12 5172 5178 5184 12 + 5169 5172 5178 12 5169 5196 5190 12 5160 5154 + 5202 4 5160 5169 5172 13 5160 5169 5196 13 + 5154 5160 5169 14 5154 5202 5205 7 5154 5202 + 5208 8 5148 5154 5160 15 5148 5154 5202 11 + 5238 5235 5241 1 5235 5241 5247 2 5220 5214 + 5235 4 5214 5220 5229 16 5214 5235 5238 7 + 5214 5235 5241 8 5208 5214 5220 15 5208 5214 + 5235 11 5295 5292 5298 1 5292 5298 5304 2 + 5259 5253 5271 6 5253 5247 5292 4 5253 5271 + 5280 6 5247 5253 5259 6 5247 5253 5271 6 + 5247 5292 5295 7 5247 5292 5298 8 5241 5247 + 5253 15 5241 5247 5292 11 5325 5322 5328 1 + 5322 5328 5334 2 5310 5304 5322 4 5304 5322 + 5325 7 5304 5322 5328 8 5298 5304 5310 15 + 5298 5304 5322 11 5376 5373 5379 1 5373 5379 + 5385 2 5355 5361 5367 20 5352 5349 5367 21 + 5352 5355 5361 22 5349 5352 5355 23 5349 5367 + 5361 24 5340 5334 5373 4 5340 5349 5352 25 + 5340 5349 5367 26 5334 5340 5349 27 5334 5373 + 5376 7 5334 5373 5379 8 5328 5334 5340 15 + 5328 5334 5373 11 5412 5409 5415 1 5409 5415 + 5421 2 5403 5400 5406 31 5391 5385 5409 4 + 5391 5400 5403 32 5391 5400 5406 32 5385 5391 + 5400 4 5385 5409 5412 7 5385 5409 5415 8 + 5379 5385 5391 15 5379 5385 5409 11 5469 5466 + 5472 1 5466 5472 5478 2 5433 5427 5445 6 + 5427 5421 5466 4 5427 5445 5454 6 5421 5427 + 5433 6 5421 5427 5445 6 5421 5466 5469 7 + 5421 5466 5472 8 5415 5421 5427 15 5415 5421 + 5466 11 5502 5499 5505 1 5499 5505 5511 2 + 5484 5478 5499 4 5478 5484 5493 16 5478 5499 + 5502 7 5478 5499 5505 8 5472 5478 5484 15 + 5472 5478 5499 11 5532 5529 5535 1 5529 5535 + 5541 2 5517 5511 5529 4 5511 5529 5532 7 + 5511 5529 5535 8 5505 5511 5517 15 5505 5511 + 5529 11 5595 5592 5598 1 5592 5598 5604 2 + 5574 5571 5580 17 5571 5580 5586 18 5565 5571 + 5574 17 5565 5571 5580 19 5559 5556 5586 12 + 5559 5565 5571 18 5556 5559 5565 12 5556 5586 + 5580 12 5547 5541 5592 4 5547 5556 5559 13 + 5547 5556 5586 13 5541 5547 5556 14 5541 5592 + 5595 7 5541 5592 5598 8 5535 5541 5547 15 + 5535 5541 5592 11 5628 5625 5631 1 5625 5631 + 5637 2 5610 5604 5625 4 5604 5610 5619 16 + 5604 5625 5628 7 5604 5625 5631 8 5598 5604 + 5610 15 5598 5604 5625 11 5688 5685 5691 1 + 5685 5691 5697 2 5667 5673 5679 12 5661 5667 + 5673 12 5655 5652 5679 12 5655 5661 5667 12 + 5652 5655 5661 12 5652 5679 5673 12 5643 5637 + 5685 4 5643 5652 5655 13 5643 5652 5679 13 + 5637 5643 5652 14 5637 5685 5688 7 5637 5685 + 5691 8 5631 5637 5643 15 5631 5637 5685 11 + 5718 5715 5721 1 5715 5721 5727 2 5703 5697 + 5715 4 5697 5715 5718 7 5697 5715 5721 8 + 5691 5697 5703 15 5691 5697 5715 11 5748 5745 + 5751 1 5745 5751 5757 2 5733 5727 5745 4 + 5727 5745 5748 7 5727 5745 5751 8 5721 5727 + 5733 15 5721 5727 5745 11 5805 5802 5808 1 + 5802 5808 5814 2 5778 5772 5790 6 5763 5757 + 5802 4 5763 5772 5778 6 5763 5772 5790 6 + 5757 5763 5772 6 5757 5802 5805 7 5757 5802 + 5808 8 5751 5757 5763 15 5751 5757 5802 11 + 5835 5832 5838 1 5832 5838 5844 2 5820 5814 + 5832 4 5814 5832 5835 7 5814 5832 5838 8 + 5808 5814 5820 15 5808 5814 5832 11 5901 5898 + 5904 1 5898 5904 5910 2 5868 5877 5886 9 + 5859 5868 5877 6 5850 5844 5898 4 5850 5859 + 5868 6 5844 5850 5859 6 5844 5898 5901 7 + 5844 5898 5904 8 5838 5844 5850 15 5838 5844 + 5898 11 5946 5943 5949 1 5943 5949 5955 2 + 5937 5934 5940 31 5925 5934 5937 32 5925 5934 + 5940 32 5916 5910 5943 4 5916 5925 5934 4 + 5910 5916 5925 6 5910 5943 5946 7 5910 5943 + 5949 8 5904 5910 5916 15 5904 5910 5943 11 + 5967 5964 5970 1 5964 5970 5976 2 5955 5964 + 5967 7 5955 5964 5970 8 5949 5955 5964 11 + 6039 6036 6042 1 6036 6042 6048 2 6018 6015 + 6027 28 6009 6015 6018 28 6009 6015 6027 28 + 6000 6009 6015 29 5991 6000 6009 30 5982 5976 + 6036 4 5982 5991 6000 6 5976 5982 5991 6 + 5976 6036 6039 7 5976 6036 6042 8 5970 5976 + 5982 15 5970 5976 6036 11 6072 6069 6075 1 + 6069 6075 6081 2 6054 6048 6069 4 6048 6054 + 6063 16 6048 6069 6072 7 6048 6069 6075 8 + 6042 6048 6054 15 6042 6048 6069 11 6123 6120 + 6126 1 6120 6126 6132 2 6096 6105 6108 3 + 6087 6081 6120 4 6087 6096 6105 5 6081 6087 + 6096 6 6081 6120 6123 7 6081 6120 6126 8 + 6075 6081 6087 15 6075 6081 6120 11 6174 6171 + 6177 1 6171 6177 6183 2 6147 6156 6159 3 + 6138 6132 6171 4 6138 6147 6156 5 6132 6138 + 6147 6 6132 6171 6174 7 6132 6171 6177 8 + 6126 6132 6138 15 6126 6132 6171 11 6240 6237 + 6243 1 6237 6243 6249 2 6207 6216 6225 9 + 6198 6207 6216 6 6189 6183 6237 4 6189 6198 + 6207 6 6183 6189 6198 6 6183 6237 6240 7 + 6183 6237 6243 8 6177 6183 6189 15 6177 6183 + 6237 11 6282 6279 6285 1 6279 6285 6291 2 + 6267 6264 6270 1 6255 6249 6279 4 6255 6264 + 6267 7 6255 6264 6270 8 6249 6255 6264 4 + 6249 6279 6282 7 6249 6279 6285 8 6243 6249 + 6255 15 6243 6249 6279 11 6354 6351 6357 1 + 6351 6357 6363 2 6333 6330 6342 28 6324 6330 + 6333 28 6324 6330 6342 28 6315 6324 6330 29 + 6306 6315 6324 30 6297 6291 6351 4 6297 6306 + 6315 6 6291 6297 6306 6 6291 6351 6354 7 + 6291 6351 6357 8 6285 6291 6297 15 6285 6291 + 6351 11 6396 6393 6399 1 6393 6399 6405 2 + 6381 6378 6384 1 6369 6363 6393 4 6369 6378 + 6381 7 6369 6378 6384 8 6363 6369 6378 4 + 6363 6393 6396 7 6363 6393 6399 8 6357 6363 + 6369 15 6357 6363 6393 11 6426 6423 6429 1 + 6423 6429 6435 2 6411 6405 6423 4 6405 6423 + 6426 7 6405 6423 6429 8 6399 6405 6411 15 + 6399 6405 6423 11 6459 6456 6462 1 6456 6462 + 6468 2 6441 6435 6456 4 6435 6441 6450 16 + 6435 6456 6459 7 6435 6456 6462 8 6429 6435 + 6441 15 6429 6435 6456 11 6510 6507 6513 1 + 6507 6513 6519 2 6483 6492 6495 3 6474 6468 + 6507 4 6474 6483 6492 5 6468 6474 6483 6 + 6468 6507 6510 7 6468 6507 6513 8 6462 6468 + 6474 15 6462 6468 6507 11 6558 6555 6561 1 + 6555 6561 6567 2 6531 6525 6543 6 6525 6519 + 6555 4 6519 6525 6531 6 6519 6525 6543 6 + 6519 6555 6558 7 6519 6555 6561 8 6513 6519 + 6525 15 6513 6519 6555 11 6588 6585 6591 1 + 6585 6591 6597 2 6573 6567 6585 4 6567 6585 + 6588 7 6567 6585 6591 8 6561 6567 6573 15 + 6561 6567 6585 11 6645 6642 6648 1 6642 6648 + 6654 2 6618 6612 6630 6 6603 6597 6642 4 + 6603 6612 6618 6 6603 6612 6630 6 6597 6603 + 6612 6 6597 6642 6645 7 6597 6642 6648 8 + 6591 6597 6603 15 6591 6597 6642 11 6687 6684 + 6690 1 6684 6690 6696 2 6666 6660 6678 16 + 6660 6654 6684 4 6654 6660 6666 6 6654 6660 + 6678 16 6654 6684 6687 7 6654 6684 6690 8 + 6648 6654 6660 15 6648 6654 6684 11 6750 6747 + 6753 1 6747 6753 6759 2 6729 6726 6735 17 + 6726 6735 6741 18 6720 6726 6729 17 6720 6726 + 6735 19 6714 6711 6741 12 6714 6720 6726 18 + 6711 6714 6720 12 6711 6741 6735 12 6702 6696 + 6747 4 6702 6711 6714 13 6702 6711 6741 13 + 6696 6702 6711 14 6696 6747 6750 7 6696 6747 + 6753 8 6690 6696 6702 15 6690 6696 6747 11 + 6807 6804 6810 1 6804 6810 6816 2 6771 6765 + 6783 6 6765 6759 6804 4 6765 6783 6792 6 + 6759 6765 6771 6 6759 6765 6783 6 6759 6804 + 6807 7 6759 6804 6810 8 6753 6759 6765 15 + 6753 6759 6804 11 6828 6825 6831 1 6825 6831 + 6837 2 6816 6825 6828 7 6816 6825 6831 8 + 6810 6816 6825 11 6858 6855 6861 1 6855 6861 + 6867 2 6843 6837 6855 4 6837 6855 6858 7 + 6837 6855 6861 8 6831 6837 6843 15 6831 6837 + 6855 11 6903 6900 6906 1 6900 6906 6912 2 + 6894 6891 6897 31 6882 6891 6894 32 6882 6891 + 6897 32 6873 6867 6900 4 6873 6882 6891 4 + 6867 6873 6882 6 6867 6900 6903 7 6867 6900 + 6906 8 6861 6867 6873 15 6861 6867 6900 11 + 6969 6966 6972 1 6966 6972 6978 2 6936 6945 + 6954 9 6927 6936 6945 6 6918 6912 6966 4 + 6918 6927 6936 6 6912 6918 6927 6 6912 6966 + 6969 7 6912 6966 6972 8 6906 6912 6918 15 + 6906 6912 6966 11 6999 6996 7002 1 6996 7002 + 7008 2 6984 6978 6996 4 6978 6996 6999 7 + 6978 6996 7002 8 6972 6978 6984 15 6972 6978 + 6996 11 7050 7047 7053 1 7047 7053 7056 2 + 7047 7053 7083 2 7023 7032 7035 3 7014 7008 + 7047 4 7014 7023 7032 5 7008 7014 7023 6 + 7008 7047 7050 7 7008 7047 7053 8 7002 7008 + 7014 15 7002 7008 7047 11 7092 7089 7095 1 + 7089 7095 7101 2 7083 7089 7092 7 7083 7089 + 7095 8 7074 7083 7089 4 7065 7074 7083 6 + 7056 7053 7083 34 7056 7065 7074 6 7053 7056 + 7065 15 7053 7083 7074 15 7053 7083 7089 11 + 7125 7122 7128 1 7122 7128 7134 2 7107 7101 + 7122 4 7101 7107 7116 16 7101 7122 7125 7 + 7101 7122 7128 8 7095 7101 7107 15 7095 7101 + 7122 11 7188 7185 7191 1 7185 7191 7197 2 + 7167 7164 7173 17 7164 7173 7179 18 7158 7164 + 7167 17 7158 7164 7173 19 7152 7149 7179 12 + 7152 7158 7164 18 7149 7152 7158 12 7149 7179 + 7173 12 7140 7134 7185 4 7140 7149 7152 13 + 7140 7149 7179 13 7134 7140 7149 14 7134 7185 + 7188 7 7134 7185 7191 8 7128 7134 7140 15 + 7128 7134 7185 11 7230 7227 7233 1 7227 7233 + 7239 2 7215 7212 7218 1 7203 7197 7227 4 + 7203 7212 7215 7 7203 7212 7218 8 7197 7203 + 7212 4 7197 7227 7230 7 7197 7227 7233 8 + 7191 7197 7203 15 7191 7197 7227 11 7272 7269 + 7275 1 7269 7275 7281 2 7251 7245 7263 16 + 7245 7239 7269 4 7239 7245 7251 6 7239 7245 + 7263 16 7239 7269 7272 7 7239 7269 7275 8 + 7233 7239 7245 15 7233 7239 7269 11 7323 7320 + 7326 1 7320 7326 7332 2 7296 7305 7308 3 + 7287 7281 7320 4 7287 7296 7305 5 7281 7287 + 7296 6 7281 7320 7323 7 7281 7320 7326 8 + 7275 7281 7287 15 7275 7281 7320 11 7344 7341 + 7347 1 7341 7347 7353 2 7332 7341 7344 7 + 7332 7341 7347 8 7326 7332 7341 11 7392 7389 + 7395 1 7389 7395 7401 2 7365 7359 7377 6 + 7359 7353 7389 4 7353 7359 7365 6 7353 7359 + 7377 6 7353 7389 7392 7 7353 7389 7395 8 + 7347 7353 7359 15 7347 7353 7389 11 7422 7419 + 7425 1 7419 7425 7431 2 7407 7401 7419 4 + 7401 7419 7422 7 7401 7419 7425 8 7395 7401 + 7407 15 7395 7401 7419 11 7488 7485 7491 1 + 7485 7491 7497 2 7455 7464 7473 9 7446 7455 + 7464 6 7437 7431 7485 4 7437 7446 7455 6 + 7431 7437 7446 6 7431 7485 7488 7 7431 7485 + 7491 8 7425 7431 7437 15 7425 7431 7485 11 + 7518 7515 7521 1 7515 7521 7527 2 7503 7497 + 7515 4 7497 7515 7518 7 7497 7515 7521 8 + 7491 7497 7503 15 7491 7497 7515 11 7551 7548 + 7554 1 7548 7554 7560 2 7533 7527 7548 4 + 7527 7533 7542 16 7527 7548 7551 7 7527 7548 + 7554 8 7521 7527 7533 15 7521 7527 7548 11 + 7608 7605 7611 1 7605 7611 7617 2 7581 7575 + 7593 6 7566 7560 7605 4 7566 7575 7581 6 + 7566 7575 7593 6 7560 7566 7575 6 7560 7605 + 7608 7 7560 7605 7611 8 7554 7560 7566 15 + 7554 7560 7605 11 7653 7650 7656 1 7650 7656 + 7662 2 7644 7641 7647 31 7632 7641 7644 32 + 7632 7641 7647 32 7623 7617 7650 4 7623 7632 + 7641 4 7617 7623 7632 6 7617 7650 7653 7 + 7617 7650 7656 8 7611 7617 7623 15 7611 7617 + 7650 11 7683 7680 7686 1 7680 7686 7692 2 + 7668 7662 7680 4 7662 7680 7683 7 7662 7680 + 7686 8 7656 7662 7668 15 7656 7662 7680 11 + 7725 7722 7728 1 7722 7728 7734 2 7704 7698 + 7716 16 7698 7692 7722 4 7692 7698 7704 6 + 7692 7698 7716 16 7692 7722 7725 7 7692 7722 + 7728 8 7686 7692 7698 15 7686 7692 7722 11 + 7773 7770 7776 1 7770 7776 7782 2 7746 7740 + 7758 6 7740 7734 7770 4 7734 7740 7746 6 + 7734 7740 7758 6 7734 7770 7773 7 7734 7770 + 7776 8 7728 7734 7740 15 7728 7734 7770 11 + 7845 7842 7848 1 7842 7848 7854 2 7824 7821 + 7833 28 7815 7821 7824 28 7815 7821 7833 28 + 7806 7815 7821 29 7797 7806 7815 30 7788 7782 + 7842 4 7788 7797 7806 6 7782 7788 7797 6 + 7782 7842 7845 7 7782 7842 7848 8 7776 7782 + 7788 15 7776 7782 7842 11 7908 7905 7911 1 + 7905 7911 7917 2 7887 7884 7893 17 7884 7893 + 7899 18 7878 7884 7887 17 7878 7884 7893 19 + 7872 7869 7899 12 7872 7878 7884 18 7869 7872 + 7878 12 7869 7899 7893 12 7860 7854 7905 4 + 7860 7869 7872 13 7860 7869 7899 13 7854 7860 + 7869 14 7854 7905 7908 7 7854 7905 7911 8 + 7848 7854 7860 15 7848 7854 7905 11 7950 7947 + 7953 1 7947 7953 7959 2 7929 7923 7941 16 + 7923 7917 7947 4 7917 7923 7929 6 7917 7923 + 7941 16 7917 7947 7950 7 7917 7947 7953 8 + 7911 7917 7923 15 7911 7917 7947 11 7980 7977 + 7983 1 7977 7983 7989 2 7965 7959 7977 4 + 7959 7977 7980 7 7959 7977 7983 8 7953 7959 + 7965 15 7953 7959 7977 11 8037 8034 8040 1 + 8034 8040 8046 2 8010 8004 8022 6 7995 7989 + 8034 4 7995 8004 8010 6 7995 8004 8022 6 + 7989 7995 8004 6 7989 8034 8037 7 7989 8034 + 8040 8 7983 7989 7995 15 7983 7989 8034 11 + 8067 8064 8070 1 8064 8070 8076 2 8052 8046 + 8064 4 8046 8064 8067 7 8046 8064 8070 8 + 8040 8046 8052 15 8040 8046 8064 11 8124 8121 + 8127 1 8121 8127 8133 2 8097 8091 8109 6 + 8082 8076 8121 4 8082 8091 8097 6 8082 8091 + 8109 6 8076 8082 8091 6 8076 8121 8124 7 + 8076 8121 8127 8 8070 8076 8082 15 8070 8076 + 8121 11 8145 8142 8148 1 8142 8148 8154 2 + 8133 8142 8145 7 8133 8142 8148 8 8127 8133 + 8142 11 8190 8187 8193 1 8187 8193 8199 2 + 8181 8178 8184 31 8169 8178 8181 32 8169 8178 + 8184 32 8160 8154 8187 4 8160 8169 8178 4 + 8154 8160 8169 6 8154 8187 8190 7 8154 8187 + 8193 8 8148 8154 8160 15 8148 8154 8187 11 + 8226 8223 8229 1 8223 8229 8235 2 8217 8214 + 8220 31 8205 8199 8223 4 8205 8214 8217 32 + 8205 8214 8220 32 8199 8205 8214 4 8199 8223 + 8226 7 8199 8223 8229 8 8193 8199 8205 15 + 8193 8199 8223 11 8247 8244 8250 1 8244 8250 + 8256 2 8235 8244 8247 7 8235 8244 8250 8 + 8229 8235 8244 11 8304 8301 8307 1 8301 8307 + 8313 2 8268 8262 8280 6 8262 8256 8301 4 + 8262 8280 8289 6 8256 8262 8268 6 8256 8262 + 8280 6 8256 8301 8304 7 8256 8301 8307 8 + 8250 8256 8262 15 8250 8256 8301 11 8370 8367 + 8373 1 8367 8373 8379 2 8337 8346 8355 9 + 8328 8337 8346 6 8319 8313 8367 4 8319 8328 + 8337 6 8313 8319 8328 6 8313 8367 8370 7 + 8313 8367 8373 8 8307 8313 8319 15 8307 8313 + 8367 11 8418 8415 8421 1 8415 8421 8427 2 + 8391 8385 8403 6 8385 8379 8415 4 8379 8385 + 8391 6 8379 8385 8403 6 8379 8415 8418 7 + 8379 8415 8421 8 8373 8379 8385 15 8373 8379 + 8415 11 8460 8457 8463 1 8457 8463 8469 2 + 8445 8442 8448 1 8433 8427 8457 4 8433 8442 + 8445 7 8433 8442 8448 8 8427 8433 8442 4 + 8427 8457 8460 7 8427 8457 8463 8 8421 8427 + 8433 15 8421 8427 8457 11 8490 8487 8493 1 + 8487 8493 8499 2 8475 8469 8487 4 8469 8487 + 8490 7 8469 8487 8493 8 8463 8469 8475 15 + 8463 8469 8487 11 8538 8535 8541 1 8535 8541 + 8547 2 8511 8505 8523 6 8505 8499 8535 4 + 8499 8505 8511 6 8499 8505 8523 6 8499 8535 + 8538 7 8499 8535 8541 8 8493 8499 8505 15 + 8493 8499 8535 11 8571 8568 8574 1 8568 8574 + 8580 2 8553 8547 8568 4 8547 8553 8562 16 + 8547 8568 8571 7 8547 8568 8574 8 8541 8547 + 8553 15 8541 8547 8568 11 8601 8598 8604 1 + 8598 8604 8610 2 8586 8580 8598 4 8580 8598 + 8601 7 8580 8598 8604 8 8574 8580 8586 15 + 8574 8580 8598 11 8622 8619 8625 1 8619 8625 + 8628 2 8619 8625 8655 2 8610 8619 8622 7 + 8610 8619 8625 8 8604 8610 8619 11 8664 8661 + 8667 1 8661 8667 8673 2 8655 8661 8664 7 + 8655 8661 8667 8 8646 8655 8661 4 8637 8646 + 8655 6 8628 8625 8655 34 8628 8637 8646 6 + 8625 8628 8637 15 8625 8655 8646 15 8625 8655 + 8661 11 8721 8718 8724 1 8718 8724 8730 2 + 8685 8679 8697 6 8679 8673 8718 4 8679 8697 + 8706 6 8673 8679 8685 6 8673 8679 8697 6 + 8673 8718 8721 7 8673 8718 8724 8 8667 8673 + 8679 15 8667 8673 8718 11 8787 8784 8790 1 + 8784 8790 8796 2 8754 8763 8772 9 8745 8754 + 8763 6 8736 8730 8784 4 8736 8745 8754 6 + 8730 8736 8745 6 8730 8784 8787 7 8730 8784 + 8790 8 8724 8730 8736 15 8724 8730 8784 11 + 8829 8826 8832 1 8826 8832 8838 2 8808 8802 + 8820 16 8802 8796 8826 4 8796 8802 8808 6 + 8796 8802 8820 16 8796 8826 8829 7 8796 8826 + 8832 8 8790 8796 8802 15 8790 8796 8826 11 + 8886 8883 8889 1 8883 8889 8895 2 8859 8853 + 8871 6 8844 8838 8883 4 8844 8853 8859 6 + 8844 8853 8871 6 8838 8844 8853 6 8838 8883 + 8886 7 8838 8883 8889 8 8832 8838 8844 15 + 8832 8838 8883 11 8916 8913 8919 1 8913 8919 + 8925 2 8901 8895 8913 4 8895 8913 8916 7 + 8895 8913 8919 8 8889 8895 8901 15 8889 8895 + 8913 11 8946 8943 8949 1 8943 8949 8955 2 + 8931 8925 8943 4 8925 8943 8946 7 8925 8943 + 8949 8 8919 8925 8931 15 8919 8925 8943 11 + 8979 8976 8982 1 8976 8982 8988 2 8961 8955 + 8976 4 8955 8961 8970 16 8955 8976 8979 7 + 8955 8976 8982 8 8949 8955 8961 15 8949 8955 + 8976 11 9000 8997 9003 1 8997 9003 9009 2 + 8988 8997 9000 7 8988 8997 9003 8 8982 8988 + 8997 11 9057 9054 9060 1 9054 9060 9066 2 + 9021 9015 9033 6 9015 9009 9054 4 9015 9033 + 9042 6 9009 9015 9021 6 9009 9015 9033 6 + 9009 9054 9057 7 9009 9054 9060 8 9003 9009 + 9015 15 9003 9009 9054 11 9090 9087 9093 1 + 9087 9093 9099 2 9072 9066 9087 4 9066 9072 + 9081 16 9066 9087 9090 7 9066 9087 9093 8 + 9060 9066 9072 15 9060 9066 9087 11 9132 9129 + 9135 1 9129 9135 9141 2 9117 9114 9120 1 + 9105 9099 9129 4 9105 9114 9117 7 9105 9114 + 9120 8 9099 9105 9114 4 9099 9129 9132 7 + 9099 9129 9135 8 9093 9099 9105 15 9093 9099 + 9129 11 9192 9189 9195 1 9189 9195 9201 2 + 9171 9177 9183 12 9165 9171 9177 12 9159 9156 + 9183 12 9159 9165 9171 12 9156 9159 9165 12 + 9156 9183 9177 12 9147 9141 9189 4 9147 9156 + 9159 13 9147 9156 9183 13 9141 9147 9156 14 + 9141 9189 9192 7 9141 9189 9195 8 9135 9141 + 9147 15 9135 9141 9189 11 9258 9255 9261 1 + 9255 9261 9267 2 9225 9234 9243 9 9216 9225 + 9234 6 9207 9201 9255 4 9207 9216 9225 6 + 9201 9207 9216 6 9201 9255 9258 7 9201 9255 + 9261 8 9195 9201 9207 15 9195 9201 9255 11 + 9324 9321 9327 1 9321 9327 9333 2 9291 9300 + 9309 9 9282 9291 9300 6 9273 9267 9321 4 + 9273 9282 9291 6 9267 9273 9282 6 9267 9321 + 9324 7 9267 9321 9327 8 9261 9267 9273 15 + 9261 9267 9321 11 9375 9372 9378 1 9372 9378 + 9384 2 9348 9357 9360 3 9339 9333 9372 4 + 9339 9348 9357 5 9333 9339 9348 6 9333 9372 + 9375 7 9333 9372 9378 8 9327 9333 9339 15 + 9327 9333 9372 11 9432 9429 9435 1 9429 9435 + 9441 2 9405 9399 9417 6 9390 9384 9429 4 + 9390 9399 9405 6 9390 9399 9417 6 9384 9390 + 9399 6 9384 9429 9432 7 9384 9429 9435 8 + 9378 9384 9390 15 9378 9384 9429 11 9468 9465 + 9471 1 9465 9471 9477 2 9459 9456 9462 31 + 9447 9441 9465 4 9447 9456 9459 32 9447 9456 + 9462 32 9441 9447 9456 4 9441 9465 9468 7 + 9441 9465 9471 8 9435 9441 9447 15 9435 9441 + 9465 11 9531 9528 9534 1 9528 9534 9540 2 + 9510 9507 9516 17 9507 9516 9522 18 9501 9507 + 9510 17 9501 9507 9516 19 9495 9492 9522 12 + 9495 9501 9507 18 9492 9495 9501 12 9492 9522 + 9516 12 9483 9477 9528 4 9483 9492 9495 13 + 9483 9492 9522 13 9477 9483 9492 14 9477 9528 + 9531 7 9477 9528 9534 8 9471 9477 9483 15 + 9471 9477 9528 11 9573 9570 9576 1 9570 9576 + 9582 2 9558 9555 9561 1 9546 9540 9570 4 + 9546 9555 9558 7 9546 9555 9561 8 9540 9546 + 9555 4 9540 9570 9573 7 9540 9570 9576 8 + 9534 9540 9546 15 9534 9540 9570 11 9603 9600 + 9606 1 9600 9606 9612 2 9588 9582 9600 4 + 9582 9600 9603 7 9582 9600 9606 8 9576 9582 + 9588 15 9576 9582 9600 11 9654 9651 9657 1 + 9651 9657 9663 2 9627 9636 9639 3 9618 9612 + 9651 4 9618 9627 9636 5 9612 9618 9627 6 + 9612 9651 9654 7 9612 9651 9657 8 9606 9612 + 9618 15 9606 9612 9651 11 9702 9699 9705 1 + 9699 9705 9711 2 9675 9669 9687 6 9669 9663 + 9699 4 9663 9669 9675 6 9663 9669 9687 6 + 9663 9699 9702 7 9663 9699 9705 8 9657 9663 + 9669 15 9657 9663 9699 11 9735 9732 9738 1 + 9732 9738 9741 2 9732 9738 9768 2 9717 9711 + 9732 4 9711 9717 9726 16 9711 9732 9735 7 + 9711 9732 9738 8 9705 9711 9717 15 9705 9711 + 9732 11 9777 9774 9780 1 9774 9780 9786 2 + 9768 9774 9777 7 9768 9774 9780 8 9759 9768 + 9774 4 9750 9759 9768 6 9741 9738 9768 34 + 9741 9750 9759 6 9738 9741 9750 15 9738 9768 + 9759 15 9738 9768 9774 11 9834 9831 9837 1 + 9831 9837 9843 2 9807 9801 9819 6 9792 9786 + 9831 4 9792 9801 9807 6 9792 9801 9819 6 + 9786 9792 9801 6 9786 9831 9834 7 9786 9831 + 9837 8 9780 9786 9792 15 9780 9786 9831 11 + 9900 9897 9903 1 9897 9903 9909 2 9867 9876 + 9885 9 9858 9867 9876 6 9849 9843 9897 4 + 9849 9858 9867 6 9843 9849 9858 6 9843 9897 + 9900 7 9843 9897 9903 8 9837 9843 9849 15 + 9837 9843 9897 11 9966 9963 9969 1 9963 9969 + 9975 2 9933 9942 9951 9 9924 9933 9942 6 + 9915 9909 9963 4 9915 9924 9933 6 9909 9915 + 9924 6 9909 9963 9966 7 9909 9963 9969 8 + 9903 9909 9915 15 9903 9909 9963 11 10008 10005 + 10011 1 10005 10011 10017 2 9993 9990 9996 1 + 9981 9975 10005 4 9981 9990 9993 7 9981 9990 + 9996 8 9975 9981 9990 4 9975 10005 10008 7 + 9975 10005 10011 8 9969 9975 9981 15 9969 9975 + 10005 11 10056 10053 10059 1 10053 10059 10065 2 + 10029 10023 10041 6 10023 10017 10053 4 10017 10023 + 10029 6 10017 10023 10041 6 10017 10053 10056 7 + 10017 10053 10059 8 10011 10017 10023 15 10011 10017 + 10053 11 10092 10089 10095 1 10089 10095 10101 2 + 10083 10080 10086 31 10071 10065 10089 4 10071 10080 + 10083 32 10071 10080 10086 32 10065 10071 10080 4 + 10065 10089 10092 7 10065 10089 10095 8 10059 10065 + 10071 15 10059 10065 10089 11 10149 10146 10152 1 + 10146 10152 10158 2 10113 10107 10125 6 10107 10101 + 10146 4 10107 10125 10134 6 10101 10107 10113 6 + 10101 10107 10125 6 10101 10146 10149 7 10101 10146 + 10152 8 10095 10101 10107 15 10095 10101 10146 11 + 10200 10197 10203 1 10197 10203 10209 2 10173 10182 + 10185 3 10164 10158 10197 4 10164 10173 10182 5 + 10158 10164 10173 6 10158 10197 10200 7 10158 10197 + 10203 8 10152 10158 10164 15 10152 10158 10197 11 + 10245 10242 10248 1 10242 10248 10254 2 10236 10233 + 10239 31 10224 10233 10236 32 10224 10233 10239 32 + 10215 10209 10242 4 10215 10224 10233 4 10209 10215 + 10224 6 10209 10242 10245 7 10209 10242 10248 8 + 10203 10209 10215 15 10203 10209 10242 11 10293 10290 + 10296 1 10290 10296 10302 2 10266 10260 10278 6 + 10260 10254 10290 4 10254 10260 10266 6 10254 10260 + 10278 6 10254 10290 10293 7 10254 10290 10296 8 + 10248 10254 10260 15 10248 10254 10290 11 10314 10311 + 10317 1 10311 10317 10323 2 10302 10311 10314 7 + 10302 10311 10317 8 10296 10302 10311 11 10356 10353 + 10359 1 10353 10359 10365 2 10341 10338 10344 1 + 10329 10323 10353 4 10329 10338 10341 7 10329 10338 + 10344 8 10323 10329 10338 4 10323 10353 10356 7 + 10323 10353 10359 8 10317 10323 10329 15 10317 10323 + 10353 11 10398 10395 10401 1 10395 10401 10407 2 + 10377 10371 10389 16 10371 10365 10395 4 10365 10371 + 10377 6 10365 10371 10389 16 10365 10395 10398 7 + 10365 10395 10401 8 10359 10365 10371 15 10359 10365 + 10395 11 10446 10443 10449 1 10443 10449 10455 2 + 10419 10413 10431 6 10413 10407 10443 4 10407 10413 + 10419 6 10407 10413 10431 6 10407 10443 10446 7 + 10407 10443 10449 8 10401 10407 10413 15 10401 10407 + 10443 11 10476 10473 10479 1 10473 10479 10485 2 + 10461 10455 10473 4 10455 10473 10476 7 10455 10473 + 10479 8 10449 10455 10461 15 10449 10455 10473 11 + 10536 10533 10539 1 10533 10539 10545 2 10515 10521 + 10527 12 10509 10515 10521 12 10503 10500 10527 12 + 10503 10509 10515 12 10500 10503 10509 12 10500 10527 + 10521 12 10491 10485 10533 4 10491 10500 10503 13 + 10491 10500 10527 13 10485 10491 10500 14 10485 10533 + 10536 7 10485 10533 10539 8 10479 10485 10491 15 + 10479 10485 10533 11 10593 10590 10596 1 10590 10596 + 10602 2 10566 10560 10578 6 10551 10545 10590 4 + 10551 10560 10566 6 10551 10560 10578 6 10545 10551 + 10560 6 10545 10590 10593 7 10545 10590 10596 8 + 10539 10545 10551 15 10539 10545 10590 11 10626 10623 + 10629 1 10623 10629 10635 2 10608 10602 10623 4 + 10602 10608 10617 33 10602 10623 10626 7 10602 10623 + 10629 8 10596 10602 10608 15 10596 10602 10623 11 + 10659 10656 10662 1 10656 10662 10668 2 10641 10635 + 10656 4 10635 10641 10650 16 10635 10656 10659 7 + 10635 10656 10662 8 10629 10635 10641 15 10629 10635 + 10656 11 10695 10692 10698 1 10692 10698 10704 2 + 10686 10683 10689 31 10674 10668 10692 4 10674 10683 + 10686 32 10674 10683 10689 32 10668 10674 10683 4 + 10668 10692 10695 7 10668 10692 10698 8 10662 10668 + 10674 15 10662 10668 10692 11 10746 10743 10749 1 + 10743 10749 10755 2 10719 10728 10731 3 10710 10704 + 10743 4 10710 10719 10728 5 10704 10710 10719 6 + 10704 10743 10746 7 10704 10743 10749 8 10698 10704 + 10710 15 10698 10704 10743 11 10776 10773 10779 1 + 10773 10779 10785 2 10761 10755 10773 4 10755 10773 + 10776 7 10755 10773 10779 8 10749 10755 10761 15 + 10749 10755 10773 11 10818 10815 10821 1 10815 10821 + 10827 2 10797 10791 10809 16 10791 10785 10815 4 + 10785 10791 10797 6 10785 10791 10809 16 10785 10815 + 10818 7 10785 10815 10821 8 10779 10785 10791 15 + 10779 10785 10815 11 10839 10836 10842 1 10836 10842 + 10848 2 10827 10836 10839 7 10827 10836 10842 8 + 10821 10827 10836 11 10896 10893 10899 1 10893 10899 + 10905 2 10860 10854 10872 6 10854 10848 10893 4 + 10854 10872 10881 6 10848 10854 10860 6 10848 10854 + 10872 6 10848 10893 10896 7 10848 10893 10899 8 + 10842 10848 10854 15 10842 10848 10893 11 10938 10935 + 10941 1 10935 10941 10947 2 10917 10911 10929 16 + 10911 10905 10935 4 10905 10911 10917 6 10905 10911 + 10929 16 10905 10935 10938 7 10905 10935 10941 8 + 10899 10905 10911 15 10899 10905 10935 11 10959 10956 + 10962 1 10956 10962 10968 2 10947 10956 10959 7 + 10947 10956 10962 8 10941 10947 10956 11 11004 11001 + 11007 1 11001 11007 11013 2 10995 10992 10998 31 + 10983 10992 10995 32 10983 10992 10998 32 10974 10968 + 11001 4 10974 10983 10992 4 10968 10974 10983 6 + 10968 11001 11004 7 10968 11001 11007 8 10962 10968 + 10974 15 10962 10968 11001 11 11052 11049 11055 1 + 11049 11055 11061 2 11025 11019 11037 6 11019 11013 + 11049 4 11013 11019 11025 6 11013 11019 11037 6 + 11013 11049 11052 7 11013 11049 11055 8 11007 11013 + 11019 15 11007 11013 11049 11 11100 11097 11103 1 + 11097 11103 11109 2 11073 11067 11085 6 11067 11061 + 11097 4 11061 11067 11073 6 11061 11067 11085 6 + 11061 11097 11100 7 11061 11097 11103 8 11055 11061 + 11067 15 11055 11061 11097 11 11151 11148 11154 1 + 11148 11154 11160 2 11130 11136 11142 20 11127 11124 + 11142 21 11127 11130 11136 22 11124 11127 11130 23 + 11124 11142 11136 24 11115 11109 11148 4 11115 11124 + 11127 25 11115 11124 11142 26 11109 11115 11124 27 + 11109 11148 11151 7 11109 11148 11154 8 11103 11109 + 11115 15 11103 11109 11148 11 11199 11196 11202 1 + 11196 11202 11208 2 11172 11166 11184 6 11166 11160 + 11196 4 11160 11166 11172 6 11160 11166 11184 6 + 11160 11196 11199 7 11160 11196 11202 8 11154 11160 + 11166 15 11154 11160 11196 11 11235 11232 11238 1 + 11232 11238 11244 2 11226 11223 11229 31 11214 11208 + 11232 4 11214 11223 11226 32 11214 11223 11229 32 + 11208 11214 11223 4 11208 11232 11235 7 11208 11232 + 11238 8 11202 11208 11214 15 11202 11208 11232 11 + 11265 11262 11268 1 11262 11268 11274 2 11250 11244 + 11262 4 11244 11262 11265 7 11244 11262 11268 8 + 11238 11244 11250 15 11238 11244 11262 11 11286 11283 + 11289 1 11283 11289 11295 2 11274 11283 11286 7 + 11274 11283 11289 8 11268 11274 11283 11 11349 11346 + 11352 1 11346 11352 11358 2 11328 11325 11334 17 + 11325 11334 11340 18 11319 11325 11328 17 11319 11325 + 11334 19 11313 11310 11340 12 11313 11319 11325 18 + 11310 11313 11319 12 11310 11340 11334 12 11301 11295 + 11346 4 11301 11310 11313 13 11301 11310 11340 13 + 11295 11301 11310 14 11295 11346 11349 7 11295 11346 + 11352 8 11289 11295 11301 15 11289 11295 11346 11 + 11400 11397 11403 1 11397 11403 11409 2 11379 11385 + 11391 20 11376 11373 11391 21 11376 11379 11385 22 + 11373 11376 11379 23 11373 11391 11385 24 11364 11358 + 11397 4 11364 11373 11376 25 11364 11373 11391 26 + 11358 11364 11373 27 11358 11397 11400 7 11358 11397 + 11403 8 11352 11358 11364 15 11352 11358 11397 11 + 11433 11430 11436 1 11430 11436 11442 2 11415 11409 + 11430 4 11409 11415 11424 33 11409 11430 11433 7 + 11409 11430 11436 8 11403 11409 11415 15 11403 11409 + 11430 11 11481 11478 11484 1 11478 11484 11490 2 + 11454 11448 11466 6 11448 11442 11478 4 11442 11448 + 11454 6 11442 11448 11466 6 11442 11478 11481 7 + 11442 11478 11484 8 11436 11442 11448 15 11436 11442 + 11478 11 11514 11511 11517 1 11511 11517 11523 2 + 11496 11490 11511 4 11490 11496 11505 16 11490 11511 + 11514 7 11490 11511 11517 8 11484 11490 11496 15 + 11484 11490 11511 11 11565 11562 11568 1 11562 11568 + 11574 2 11538 11547 11550 3 11529 11523 11562 4 + 11529 11538 11547 5 11523 11529 11538 6 11523 11562 + 11565 7 11523 11562 11568 8 11517 11523 11529 15 + 11517 11523 11562 11 11586 11583 11589 1 11583 11589 + 11595 2 11574 11583 11586 7 11574 11583 11589 8 + 11568 11574 11583 11 11628 11625 11631 1 11625 11631 + 11637 2 11613 11610 11616 1 11601 11595 11625 4 + 11601 11610 11613 7 11601 11610 11616 8 11595 11601 + 11610 4 11595 11625 11628 7 11595 11625 11631 8 + 11589 11595 11601 15 11589 11595 11625 11 11676 11673 + 11679 1 11673 11679 11685 2 11649 11643 11661 6 + 11643 11637 11673 4 11637 11643 11649 6 11637 11643 + 11661 6 11637 11673 11676 7 11637 11673 11679 8 + 11631 11637 11643 15 11631 11637 11673 11 11733 11730 + 11736 1 11730 11736 11742 2 11706 11700 11718 6 + 11691 11685 11730 4 11691 11700 11706 6 11691 11700 + 11718 6 11685 11691 11700 6 11685 11730 11733 7 + 11685 11730 11736 8 11679 11685 11691 15 11679 11685 + 11730 11 11790 11787 11793 1 11787 11793 11799 2 + 11763 11757 11775 6 11748 11742 11787 4 11748 11757 + 11763 6 11748 11757 11775 6 11742 11748 11757 6 + 11742 11787 11790 7 11742 11787 11793 8 11736 11742 + 11748 15 11736 11742 11787 11 11835 11832 11838 1 + 11832 11838 11844 2 11826 11823 11829 31 11814 11823 + 11826 32 11814 11823 11829 32 11805 11799 11832 4 + 11805 11814 11823 4 11799 11805 11814 6 11799 11832 + 11835 7 11799 11832 11838 8 11793 11799 11805 15 + 11793 11799 11832 11 11886 11883 11889 1 11883 11889 + 11895 2 11865 11871 11877 20 11862 11859 11877 21 + 11862 11865 11871 22 11859 11862 11865 23 11859 11877 + 11871 24 11850 11844 11883 4 11850 11859 11862 25 + 11850 11859 11877 26 11844 11850 11859 27 11844 11883 + 11886 7 11844 11883 11889 8 11838 11844 11850 15 + 11838 11844 11883 11 11937 11934 11940 1 11934 11940 + 11946 2 11916 11922 11928 20 11913 11910 11928 21 + 11913 11916 11922 22 11910 11913 11916 23 11910 11928 + 11922 24 11901 11895 11934 4 11901 11910 11913 25 + 11901 11910 11928 26 11895 11901 11910 27 11895 11934 + 11937 7 11895 11934 11940 8 11889 11895 11901 15 + 11889 11895 11934 11 11988 11985 11991 1 11985 11991 + 11997 2 11967 11973 11979 20 11964 11961 11979 21 + 11964 11967 11973 22 11961 11964 11967 23 11961 11979 + 11973 24 11952 11946 11985 4 11952 11961 11964 25 + 11952 11961 11979 26 11946 11952 11961 27 11946 11985 + 11988 7 11946 11985 11991 8 11940 11946 11952 15 + 11940 11946 11985 11 12039 12036 12042 1 12036 12042 + 12048 2 12018 12024 12030 20 12015 12012 12030 21 + 12015 12018 12024 22 12012 12015 12018 23 12012 12030 + 12024 24 12003 11997 12036 4 12003 12012 12015 25 + 12003 12012 12030 26 11997 12003 12012 27 11997 12036 + 12039 7 11997 12036 12042 8 11991 11997 12003 15 + 11991 11997 12036 11 12090 12087 12093 1 12087 12093 + 12099 2 12069 12075 12081 20 12066 12063 12081 21 + 12066 12069 12075 22 12063 12066 12069 23 12063 12081 + 12075 24 12054 12048 12087 4 12054 12063 12066 25 + 12054 12063 12081 26 12048 12054 12063 27 12048 12087 + 12090 7 12048 12087 12093 8 12042 12048 12054 15 + 12042 12048 12087 11 12141 12138 12144 31 12120 12126 + 12132 20 12117 12114 12132 21 12117 12120 12126 22 + 12114 12117 12120 23 12114 12132 12126 24 12105 12099 + 12138 4 12105 12114 12117 25 12105 12114 12132 26 + 12099 12105 12114 27 12099 12138 12141 32 12099 12138 + 12144 32 12093 12099 12105 15 12093 12099 12138 11 + 12270 12273 12276 49 12264 12261 12267 50 12261 12258 + 12270 51 12258 12261 12267 52 12258 12261 12264 53 + 12258 12270 12273 54 12255 12252 12276 55 12255 12258 + 12261 56 12255 12258 12270 49 12252 12276 12273 57 + 12252 12255 12258 57 12249 12252 12276 58 12249 12252 + 12255 58 12246 12243 12249 16 12243 12249 12252 59 + 12240 12237 12243 16 12237 12243 12249 6 12237 12243 + 12246 16 12234 12231 12237 60 12234 12249 12243 60 + 12234 12249 12252 61 12231 12234 12249 62 12231 12237 + 12243 6 12231 12237 12240 16 12228 12231 12234 60 + 12228 12231 12237 6 12225 12228 12231 60 12222 12216 + 12225 63 12219 12216 12225 63 12219 12216 12222 64 + 12216 12225 12228 65 12213 12216 12225 66 12213 12216 + 12219 63 12213 12216 12222 63 12204 12207 12210 67 + 12201 12204 12207 68 12198 12195 12201 69 12195 12192 + 12210 70 12195 12201 12204 71 12192 12210 12207 72 + 12192 12195 12201 73 12192 12195 12198 74 12189 12192 + 12210 75 12189 12192 12195 76 12186 12183 12210 77 + 12186 12189 12192 78 12183 12186 12189 79 12183 12210 + 12192 80 12183 12210 12207 81 12180 12183 12186 82 + 12180 12183 12210 83 12177 12174 12180 16 12174 12180 + 12183 84 12171 12168 12174 16 12168 12174 12180 6 + 12168 12174 12177 16 12165 12162 12168 60 12165 12180 + 12174 60 12165 12180 12183 85 12162 12168 12174 6 + 12162 12168 12171 16 12162 12165 12180 62 12159 12162 + 12168 6 12159 12162 12165 60 12156 12147 12213 66 + 12156 12159 12162 60 12153 12147 12213 63 12153 12147 + 12156 63 12150 12147 12213 63 12150 12147 12153 64 + 12150 12147 12156 63 12147 12213 12216 86 12147 12156 + 12159 65 12393 12390 12402 87 12390 12393 12396 88 + 12387 12384 12399 87 12387 12390 12393 88 12387 12390 + 12402 87 12384 12381 12396 88 12384 12387 12390 88 + 12381 12384 12387 88 12381 12384 12399 87 12381 12396 + 12393 88 12375 12381 12384 89 12375 12381 12396 89 + 12372 12357 12375 89 12369 12366 12405 87 12366 12369 + 12372 88 12363 12360 12378 90 12363 12366 12369 88 + 12363 12366 12405 87 12360 12357 12372 88 12360 12357 + 12375 89 12360 12363 12366 88 12357 12360 12363 88 + 12357 12360 12378 90 12357 12372 12369 88 12357 12375 + 12381 91 +%FLAG DIHEDRALS_INC_HYDROGEN +%FORMAT(10I8) + 54 51 57 60 12 54 51 -57 60 1 + 51 57 63 66 7 51 57 63 69 7 + 33 27 36 39 11 30 27 36 39 11 + 27 36 39 42 11 27 36 39 45 11 + 27 36 39 48 11 24 18 12 51 6 + 24 18 27 30 6 24 18 27 33 6 + 24 18 27 36 6 21 18 12 51 6 + 21 18 27 30 6 21 18 27 33 6 + 21 18 27 36 6 15 12 18 21 6 + 15 12 18 24 6 15 12 18 27 6 + 15 12 51 54 7 15 12 51 57 7 + 12 18 27 30 6 12 18 27 33 6 + 12 51 57 60 1 9 0 12 15 6 + 9 0 12 18 6 9 0 12 51 6 + 6 0 12 15 6 6 0 12 18 6 + 6 0 12 51 6 3 0 12 15 6 + 3 0 12 18 6 3 0 12 51 6 + 0 12 18 21 6 0 12 18 24 6 + 75 72 78 81 12 75 72 -78 81 1 + 72 78 84 87 7 69 63 72 75 59 + 69 63 -72 75 60 69 63 72 78 7 + 66 63 72 75 59 66 63 -72 75 60 + 66 63 72 78 7 63 72 78 81 1 + 60 57 63 66 7 60 57 63 69 7 + 60 57 63 72 7 135 132 138 141 12 + 135 132 -138 141 1 132 138 144 147 7 + 123 120 126 129 17 117 114 120 123 17 + 117 114 120 126 17 114 120 126 129 17 + 111 108 114 117 17 111 108 114 120 17 + 108 114 120 123 17 105 102 99 126 17 + 105 102 108 111 17 105 102 108 114 17 + 102 99 126 129 17 102 108 114 117 17 + 99 102 108 111 17 99 126 120 123 17 + 96 90 84 132 6 96 90 99 102 7 + 96 90 99 126 7 93 90 84 132 6 + 93 90 99 102 7 93 90 99 126 7 + 90 99 102 105 17 90 99 126 129 17 + 87 84 90 93 6 87 84 90 96 6 + 87 84 90 99 6 87 84 132 135 59 + 87 84 -132 135 60 87 84 132 138 7 + 84 132 138 141 1 81 78 84 87 7 + 81 78 84 90 7 81 78 84 132 7 + 78 84 90 93 6 78 84 90 96 6 + 192 189 195 198 12 192 189 -195 198 1 + 189 195 201 204 7 174 165 159 177 61 + 171 165 159 177 61 168 165 159 177 61 + 165 159 177 180 61 165 159 177 183 61 + 165 159 177 186 61 162 159 165 168 62 + 162 159 165 171 62 162 159 165 174 62 + 162 159 177 180 62 162 159 177 183 62 + 162 159 177 186 62 156 150 144 189 6 + 156 150 159 162 62 156 150 159 165 61 + 156 150 159 177 61 153 150 144 189 6 + 153 150 159 162 62 153 150 159 165 61 + 153 150 159 177 61 150 159 165 168 61 + 150 159 165 171 61 150 159 165 174 61 + 150 159 177 180 61 150 159 177 183 61 + 150 159 177 186 61 147 144 150 153 6 + 147 144 150 156 6 147 144 150 159 6 + 147 144 189 192 59 147 144 -189 192 60 + 147 144 189 195 7 144 150 159 162 61 + 144 189 195 198 1 141 138 144 147 7 + 141 138 144 150 7 141 138 144 189 7 + 138 144 150 153 6 138 144 150 156 6 + 222 219 225 228 12 222 219 -225 228 1 + 219 225 231 234 7 219 225 231 237 7 + 216 207 201 219 6 213 207 201 219 6 + 210 207 201 219 6 204 201 207 210 6 + 204 201 207 213 6 204 201 207 216 6 + 204 201 219 222 59 204 201 -219 222 60 + 204 201 219 225 7 201 219 225 228 1 + 198 195 201 204 7 198 195 201 207 7 + 198 195 201 219 7 195 201 207 210 6 + 195 201 207 213 6 195 201 207 216 6 + 243 240 246 249 12 243 240 -246 249 1 + 240 246 252 255 7 237 231 240 243 59 + 237 231 -240 243 60 237 231 240 246 7 + 234 231 240 243 59 234 231 -240 243 60 + 234 231 240 246 7 231 240 246 249 1 + 228 225 231 234 7 228 225 231 237 7 + 228 225 231 240 7 309 306 312 315 12 + 309 306 -312 315 1 306 312 318 321 7 + 291 285 294 297 6 291 285 294 300 6 + 291 285 294 303 6 288 285 294 297 6 + 288 285 294 300 6 288 285 294 303 6 + 282 276 285 288 6 282 276 285 291 6 + 282 276 285 294 6 279 276 285 288 6 + 279 276 285 291 6 279 276 285 294 6 + 276 285 294 297 6 276 285 294 300 6 + 276 285 294 303 6 273 267 276 279 62 + 273 267 276 282 62 273 267 276 285 61 + 270 267 276 279 62 270 267 276 282 62 + 270 267 276 285 61 267 276 285 288 6 + 267 276 285 291 6 264 258 252 306 6 + 264 258 267 270 62 264 258 267 273 62 + 264 258 267 276 61 261 258 252 306 6 + 261 258 267 270 62 261 258 267 273 62 + 261 258 267 276 61 258 267 276 279 61 + 258 267 276 282 61 255 252 258 261 6 + 255 252 258 264 6 255 252 258 267 6 + 255 252 306 309 59 255 252 -306 309 60 + 255 252 306 312 7 252 258 267 270 61 + 252 258 267 273 61 252 306 312 315 1 + 249 246 252 255 7 249 246 252 258 7 + 249 246 252 306 7 246 252 258 261 6 + 246 252 258 264 6 375 372 378 381 12 + 375 372 -378 381 1 372 378 384 387 7 + 357 351 360 363 6 357 351 360 366 6 + 357 351 360 369 6 354 351 360 363 6 + 354 351 360 366 6 354 351 360 369 6 + 348 342 351 354 6 348 342 351 357 6 + 348 342 351 360 6 345 342 351 354 6 + 345 342 351 357 6 345 342 351 360 6 + 342 351 360 363 6 342 351 360 366 6 + 342 351 360 369 6 339 333 342 345 62 + 339 333 342 348 62 339 333 342 351 61 + 336 333 342 345 62 336 333 342 348 62 + 336 333 342 351 61 333 342 351 354 6 + 333 342 351 357 6 330 324 318 372 6 + 330 324 333 336 62 330 324 333 339 62 + 330 324 333 342 61 327 324 318 372 6 + 327 324 333 336 62 327 324 333 339 62 + 327 324 333 342 61 324 333 342 345 61 + 324 333 342 348 61 321 318 324 327 6 + 321 318 324 330 6 321 318 324 333 6 + 321 318 372 375 59 321 318 -372 375 60 + 321 318 372 378 7 318 324 333 336 61 + 318 324 333 339 61 318 372 378 381 1 + 315 312 318 321 7 315 312 318 324 7 + 315 312 318 372 7 312 318 324 327 6 + 312 318 324 330 6 432 429 435 438 12 + 432 429 -435 438 1 429 435 441 444 7 + 414 408 417 420 62 414 408 417 423 62 + 414 408 417 426 62 411 408 417 420 62 + 411 408 417 423 62 411 408 417 426 62 + 405 396 390 408 61 402 396 390 408 61 + 399 396 390 408 61 396 390 408 411 61 + 396 390 408 414 61 393 390 384 429 6 + 393 390 396 399 62 393 390 396 402 62 + 393 390 396 405 62 393 390 408 411 62 + 393 390 408 414 62 393 390 408 417 61 + 390 408 417 420 61 390 408 417 423 61 + 390 408 417 426 61 387 384 390 393 6 + 387 384 390 396 6 387 384 390 408 6 + 387 384 429 432 59 387 384 -429 432 60 + 387 384 429 435 7 384 390 396 399 61 + 384 390 396 402 61 384 390 396 405 61 + 384 390 408 411 61 384 390 408 414 61 + 384 429 435 438 1 381 378 384 387 7 + 381 378 384 390 7 381 378 384 429 7 + 378 384 390 393 6 489 486 492 495 12 + 489 486 -492 495 1 486 492 498 501 7 + 471 462 456 474 61 468 462 456 474 61 + 465 462 456 474 61 462 456 474 477 61 + 462 456 474 480 61 462 456 474 483 61 + 459 456 462 465 62 459 456 462 468 62 + 459 456 462 471 62 459 456 474 477 62 + 459 456 474 480 62 459 456 474 483 62 + 453 447 441 486 6 453 447 456 459 62 + 453 447 456 462 61 453 447 456 474 61 + 450 447 441 486 6 450 447 456 459 62 + 450 447 456 462 61 450 447 456 474 61 + 447 456 462 465 61 447 456 462 468 61 + 447 456 462 471 61 447 456 474 477 61 + 447 456 474 480 61 447 456 474 483 61 + 444 441 447 450 6 444 441 447 453 6 + 444 441 447 456 6 444 441 486 489 59 + 444 441 -486 489 60 444 441 486 492 7 + 441 447 456 459 61 441 486 492 495 1 + 438 435 441 444 7 438 435 441 447 7 + 438 435 441 486 7 435 441 447 450 6 + 435 441 447 453 6 546 543 549 552 12 + 546 543 -549 552 1 543 549 555 558 7 + 528 522 531 534 62 528 522 531 537 62 + 528 522 531 540 62 525 522 531 534 62 + 525 522 531 537 62 525 522 531 540 62 + 519 510 504 522 61 516 510 504 522 61 + 513 510 504 522 61 510 504 522 525 61 + 510 504 522 528 61 507 504 498 543 6 + 507 504 510 513 62 507 504 510 516 62 + 507 504 510 519 62 507 504 522 525 62 + 507 504 522 528 62 507 504 522 531 61 + 504 522 531 534 61 504 522 531 537 61 + 504 522 531 540 61 501 498 504 507 6 + 501 498 504 510 6 501 498 504 522 6 + 501 498 543 546 59 501 498 -543 546 60 + 501 498 543 549 7 498 504 510 513 61 + 498 504 510 516 61 498 504 510 519 61 + 498 504 522 525 61 498 504 522 528 61 + 498 543 549 552 1 495 492 498 501 7 + 495 492 498 504 7 495 492 498 543 7 + 492 498 504 507 6 588 585 591 594 12 + 588 585 -591 594 1 585 591 597 600 7 + 585 591 597 603 7 576 567 561 579 63 + 576 567 -561 579 26 573 567 561 579 63 + 573 567 -561 579 26 570 567 561 579 63 + 570 567 -561 579 26 567 561 579 582 63 + 567 561 -579 582 61 564 561 555 585 6 + 564 561 567 570 6 564 561 567 573 6 + 564 561 567 576 6 564 561 579 582 64 + 558 555 561 564 6 558 555 561 567 6 + 558 555 561 579 63 558 555 -561 579 26 + 558 555 585 588 59 558 555 -585 588 60 + 558 555 585 591 7 555 561 567 570 61 + 555 561 567 573 61 555 561 567 576 61 + 555 561 579 582 63 555 561 -579 582 61 + 555 585 591 594 1 552 549 555 558 7 + 552 549 555 561 7 552 549 555 585 7 + 549 555 561 564 6 609 606 612 615 12 + 609 606 -612 615 1 606 612 618 621 7 + 603 597 606 609 59 603 597 -606 609 60 + 603 597 606 612 7 600 597 606 609 59 + 600 597 -606 609 60 600 597 606 612 7 + 597 606 612 615 1 594 591 597 600 7 + 594 591 597 603 7 594 591 597 606 7 + 666 663 669 672 12 666 663 -669 672 1 + 663 669 675 678 7 648 639 633 651 61 + 645 639 633 651 61 642 639 633 651 61 + 639 633 651 654 61 639 633 651 657 61 + 639 633 651 660 61 636 633 639 642 62 + 636 633 639 645 62 636 633 639 648 62 + 636 633 651 654 62 636 633 651 657 62 + 636 633 651 660 62 630 624 618 663 6 + 630 624 633 636 62 630 624 633 639 61 + 630 624 633 651 61 627 624 618 663 6 + 627 624 633 636 62 627 624 633 639 61 + 627 624 633 651 61 624 633 639 642 61 + 624 633 639 645 61 624 633 639 648 61 + 624 633 651 654 61 624 633 651 657 61 + 624 633 651 660 61 621 618 624 627 6 + 621 618 624 630 6 621 618 624 633 6 + 621 618 663 666 59 621 618 -663 666 60 + 621 618 663 669 7 618 624 633 636 61 + 618 663 669 672 1 615 612 618 621 7 + 615 612 618 624 7 615 612 618 663 7 + 612 618 624 627 6 612 618 624 630 6 + 723 720 726 729 12 723 720 -726 729 1 + 720 726 732 735 7 705 696 690 708 61 + 702 696 690 708 61 699 696 690 708 61 + 696 690 708 711 61 696 690 708 714 61 + 696 690 708 717 61 693 690 696 699 62 + 693 690 696 702 62 693 690 696 705 62 + 693 690 708 711 62 693 690 708 714 62 + 693 690 708 717 62 687 681 675 720 6 + 687 681 690 693 62 687 681 690 696 61 + 687 681 690 708 61 684 681 675 720 6 + 684 681 690 693 62 684 681 690 696 61 + 684 681 690 708 61 681 690 696 699 61 + 681 690 696 702 61 681 690 696 705 61 + 681 690 708 711 61 681 690 708 714 61 + 681 690 708 717 61 678 675 681 684 6 + 678 675 681 687 6 678 675 681 690 6 + 678 675 720 723 59 678 675 -720 723 60 + 678 675 720 726 7 675 681 690 693 61 + 675 720 726 729 1 672 669 675 678 7 + 672 669 675 681 7 672 669 675 720 7 + 669 675 681 684 6 669 675 681 687 6 + 756 753 759 762 12 756 753 -759 762 1 + 753 759 765 768 7 744 738 732 753 6 + 744 738 747 750 64 741 738 732 753 6 + 741 738 747 750 64 735 732 738 741 6 + 735 732 738 744 6 735 732 738 747 63 + 735 732 -738 747 26 735 732 753 756 59 + 735 732 -753 756 60 735 732 753 759 7 + 732 738 747 750 63 732 738 -747 750 61 + 732 753 759 762 1 729 726 732 735 7 + 729 726 732 738 7 729 726 732 753 7 + 726 732 738 741 6 726 732 738 744 6 + 798 795 801 804 12 798 795 -801 804 1 + 795 801 807 810 7 783 780 786 789 12 + 783 780 -786 789 1 783 780 786 792 12 + 783 780 -786 792 1 777 771 765 795 6 + 777 771 780 783 59 777 771 -780 783 7 + 777 771 -780 783 60 777 771 780 786 7 + 774 771 765 795 6 774 771 780 783 59 + 774 771 -780 783 7 774 771 -780 783 60 + 774 771 780 786 7 771 780 786 789 1 + 771 780 786 792 1 768 765 771 774 6 + 768 765 771 777 6 768 765 771 780 6 + 768 765 795 798 59 768 765 -795 798 60 + 768 765 795 801 7 765 795 801 804 1 + 762 759 765 768 7 762 759 765 771 7 + 762 759 765 795 7 759 765 771 774 6 + 759 765 771 777 6 864 861 867 870 12 + 864 861 -867 870 1 861 867 873 876 7 + 846 840 849 852 6 846 840 849 855 6 + 846 840 849 858 6 843 840 849 852 6 + 843 840 849 855 6 843 840 849 858 6 + 837 831 840 843 6 837 831 840 846 6 + 837 831 840 849 6 834 831 840 843 6 + 834 831 840 846 6 834 831 840 849 6 + 831 840 849 852 6 831 840 849 855 6 + 831 840 849 858 6 828 822 831 834 62 + 828 822 831 837 62 828 822 831 840 61 + 825 822 831 834 62 825 822 831 837 62 + 825 822 831 840 61 822 831 840 843 6 + 822 831 840 846 6 819 813 807 861 6 + 819 813 822 825 62 819 813 822 828 62 + 819 813 822 831 61 816 813 807 861 6 + 816 813 822 825 62 816 813 822 828 62 + 816 813 822 831 61 813 822 831 834 61 + 813 822 831 837 61 810 807 813 816 6 + 810 807 813 819 6 810 807 813 822 6 + 810 807 861 864 59 810 807 -861 864 60 + 810 807 861 867 7 807 813 822 825 61 + 807 813 822 828 61 807 861 867 870 1 + 804 801 807 810 7 804 801 807 813 7 + 804 801 807 861 7 801 807 813 816 6 + 801 807 813 819 6 897 894 900 903 12 + 897 894 -900 903 1 894 900 906 909 7 + 885 879 873 894 6 885 879 888 891 64 + 882 879 873 894 6 882 879 888 891 64 + 876 873 879 882 6 876 873 879 885 6 + 876 873 879 888 63 876 873 -879 888 26 + 876 873 894 897 59 876 873 -894 897 60 + 876 873 894 900 7 873 879 888 891 63 + 873 879 -888 891 61 873 894 900 903 1 + 870 867 873 876 7 870 867 873 879 7 + 870 867 873 894 7 867 873 879 882 6 + 867 873 879 885 6 954 951 957 960 12 + 954 951 -957 960 1 951 957 963 966 7 + 936 930 939 942 62 936 930 939 945 62 + 936 930 939 948 62 933 930 939 942 62 + 933 930 939 945 62 933 930 939 948 62 + 927 918 912 930 61 924 918 912 930 61 + 921 918 912 930 61 918 912 930 933 61 + 918 912 930 936 61 915 912 906 951 6 + 915 912 918 921 62 915 912 918 924 62 + 915 912 918 927 62 915 912 930 933 62 + 915 912 930 936 62 915 912 930 939 61 + 912 930 939 942 61 912 930 939 945 61 + 912 930 939 948 61 909 906 912 915 6 + 909 906 912 918 6 909 906 912 930 6 + 909 906 951 954 59 909 906 -951 954 60 + 909 906 951 957 7 906 912 918 921 61 + 906 912 918 924 61 906 912 918 927 61 + 906 912 930 933 61 906 912 930 936 61 + 906 951 957 960 1 903 900 906 909 7 + 903 900 906 912 7 903 900 906 951 7 + 900 906 912 915 6 984 981 987 990 12 + 984 981 -987 990 1 981 987 993 996 7 + 978 969 963 981 6 975 969 963 981 6 + 972 969 963 981 6 966 963 969 972 6 + 966 963 969 975 6 966 963 969 978 6 + 966 963 981 984 59 966 963 -981 984 60 + 966 963 981 987 7 963 981 987 990 1 + 960 957 963 966 7 960 957 963 969 7 + 960 957 963 981 7 957 963 969 972 6 + 957 963 969 975 6 957 963 969 978 6 + 1047 1044 1050 1053 12 1047 1044 -1050 1053 1 + 1044 1050 1056 1059 7 1044 1050 1056 1062 7 + 1035 1032 1038 1041 17 1029 1026 1023 1032 65 + 1026 1023 1032 1035 17 1023 1032 1038 1041 17 + 1020 1017 1023 1026 17 1020 1017 1023 1032 17 + 1017 1023 1026 1029 65 1017 1023 1032 1035 17 + 1014 1011 1008 1038 17 1014 1011 1017 1020 17 + 1014 1011 1017 1023 17 1011 1008 1038 1041 17 + 1008 1011 1017 1020 17 1008 1038 1032 1035 17 + 1005 999 993 1044 6 1005 999 1008 1011 7 + 1005 999 1008 1038 7 1002 999 993 1044 6 + 1002 999 1008 1011 7 1002 999 1008 1038 7 + 999 1008 1011 1014 17 999 1008 1038 1041 17 + 996 993 999 1002 6 996 993 999 1005 6 + 996 993 999 1008 6 996 993 1044 1047 59 + 996 993 -1044 1047 60 996 993 1044 1050 7 + 993 1044 1050 1053 1 990 987 993 996 7 + 990 987 993 999 7 990 987 993 1044 7 + 987 993 999 1002 6 987 993 999 1005 6 + 1068 1065 1071 1074 12 1068 1065 -1071 1074 1 + 1065 1071 1077 1080 7 1062 1056 1065 1068 59 + 1062 1056 -1065 1068 60 1062 1056 1065 1071 7 + 1059 1056 1065 1068 59 1059 1056 -1065 1068 60 + 1059 1056 1065 1071 7 1056 1065 1071 1074 1 + 1053 1050 1056 1059 7 1053 1050 1056 1062 7 + 1053 1050 1056 1065 7 1125 1122 1128 1131 12 + 1125 1122 -1128 1131 1 1122 1128 1134 1137 7 + 1107 1101 1110 1113 62 1107 1101 1110 1116 62 + 1107 1101 1110 1119 62 1104 1101 1110 1113 62 + 1104 1101 1110 1116 62 1104 1101 1110 1119 62 + 1098 1089 1083 1101 61 1095 1089 1083 1101 61 + 1092 1089 1083 1101 61 1089 1083 1101 1104 61 + 1089 1083 1101 1107 61 1086 1083 1077 1122 6 + 1086 1083 1089 1092 62 1086 1083 1089 1095 62 + 1086 1083 1089 1098 62 1086 1083 1101 1104 62 + 1086 1083 1101 1107 62 1086 1083 1101 1110 61 + 1083 1101 1110 1113 61 1083 1101 1110 1116 61 + 1083 1101 1110 1119 61 1080 1077 1083 1086 6 + 1080 1077 1083 1089 6 1080 1077 1083 1101 6 + 1080 1077 1122 1125 59 1080 1077 -1122 1125 60 + 1080 1077 1122 1128 7 1077 1083 1089 1092 61 + 1077 1083 1089 1095 61 1077 1083 1089 1098 61 + 1077 1083 1101 1104 61 1077 1083 1101 1107 61 + 1077 1122 1128 1131 1 1074 1071 1077 1080 7 + 1074 1071 1077 1083 7 1074 1071 1077 1122 7 + 1071 1077 1083 1086 6 1155 1152 1158 1161 12 + 1155 1152 -1158 1161 1 1152 1158 1164 1167 7 + 1149 1140 1134 1152 6 1146 1140 1134 1152 6 + 1143 1140 1134 1152 6 1137 1134 1140 1143 6 + 1137 1134 1140 1146 6 1137 1134 1140 1149 6 + 1137 1134 1152 1155 59 1137 1134 -1152 1155 60 + 1137 1134 1152 1158 7 1134 1152 1158 1161 1 + 1131 1128 1134 1137 7 1131 1128 1134 1140 7 + 1131 1128 1134 1152 7 1128 1134 1140 1143 6 + 1128 1134 1140 1146 6 1128 1134 1140 1149 6 + 1221 1218 1224 1227 12 1221 1218 -1224 1227 1 + 1218 1224 1230 1233 7 1203 1197 1206 1209 6 + 1203 1197 1206 1212 6 1203 1197 1206 1215 6 + 1200 1197 1206 1209 6 1200 1197 1206 1212 6 + 1200 1197 1206 1215 6 1194 1188 1197 1200 6 + 1194 1188 1197 1203 6 1194 1188 1197 1206 6 + 1191 1188 1197 1200 6 1191 1188 1197 1203 6 + 1191 1188 1197 1206 6 1188 1197 1206 1209 6 + 1188 1197 1206 1212 6 1188 1197 1206 1215 6 + 1185 1179 1188 1191 62 1185 1179 1188 1194 62 + 1185 1179 1188 1197 61 1182 1179 1188 1191 62 + 1182 1179 1188 1194 62 1182 1179 1188 1197 61 + 1179 1188 1197 1200 6 1179 1188 1197 1203 6 + 1176 1170 1164 1218 6 1176 1170 1179 1182 62 + 1176 1170 1179 1185 62 1176 1170 1179 1188 61 + 1173 1170 1164 1218 6 1173 1170 1179 1182 62 + 1173 1170 1179 1185 62 1173 1170 1179 1188 61 + 1170 1179 1188 1191 61 1170 1179 1188 1194 61 + 1167 1164 1170 1173 6 1167 1164 1170 1176 6 + 1167 1164 1170 1179 6 1167 1164 1218 1221 59 + 1167 1164 -1218 1221 60 1167 1164 1218 1224 7 + 1164 1170 1179 1182 61 1164 1170 1179 1185 61 + 1164 1218 1224 1227 1 1161 1158 1164 1167 7 + 1161 1158 1164 1170 7 1161 1158 1164 1218 7 + 1158 1164 1170 1173 6 1158 1164 1170 1176 6 + 1251 1248 1254 1257 12 1251 1248 -1254 1257 1 + 1248 1254 1260 1263 7 1245 1236 1230 1248 6 + 1242 1236 1230 1248 6 1239 1236 1230 1248 6 + 1233 1230 1236 1239 6 1233 1230 1236 1242 6 + 1233 1230 1236 1245 6 1233 1230 1248 1251 59 + 1233 1230 -1248 1251 60 1233 1230 1248 1254 7 + 1230 1248 1254 1257 1 1227 1224 1230 1233 7 + 1227 1224 1230 1236 7 1227 1224 1230 1248 7 + 1224 1230 1236 1239 6 1224 1230 1236 1242 6 + 1224 1230 1236 1245 6 1302 1299 1305 1308 12 + 1302 1299 -1305 1308 1 1299 1305 1311 1314 7 + 1281 1275 1284 1287 11 1278 1275 1284 1287 11 + 1275 1284 1287 1290 11 1275 1284 1287 1293 11 + 1275 1284 1287 1296 11 1272 1266 1260 1299 6 + 1272 1266 1275 1278 6 1272 1266 1275 1281 6 + 1272 1266 1275 1284 6 1269 1266 1260 1299 6 + 1269 1266 1275 1278 6 1269 1266 1275 1281 6 + 1269 1266 1275 1284 6 1263 1260 1266 1269 6 + 1263 1260 1266 1272 6 1263 1260 1266 1275 6 + 1263 1260 1299 1302 59 1263 1260 -1299 1302 60 + 1263 1260 1299 1305 7 1260 1266 1275 1278 6 + 1260 1266 1275 1281 6 1260 1299 1305 1308 1 + 1257 1254 1260 1263 7 1257 1254 1260 1266 7 + 1257 1254 1260 1299 7 1254 1260 1266 1269 6 + 1254 1260 1266 1272 6 1353 1350 1356 1359 12 + 1353 1350 -1356 1359 1 1350 1356 1362 1365 7 + 1341 1338 1344 1347 25 1335 1332 1338 1341 23 + 1335 1332 1338 1344 23 1332 1338 1344 1347 25 + 1329 1326 1344 1347 22 1329 1332 1338 1341 23 + 1326 1329 1332 1335 24 1326 1344 1338 1341 25 + 1323 1317 1311 1350 6 1323 1317 1326 1329 7 + 1323 1317 1326 1344 7 1320 1317 1311 1350 6 + 1320 1317 1326 1329 7 1320 1317 1326 1344 7 + 1317 1326 1344 1347 22 1314 1311 1317 1320 6 + 1314 1311 1317 1323 6 1314 1311 1317 1326 6 + 1314 1311 1350 1353 59 1314 1311 -1350 1353 60 + 1314 1311 1350 1356 7 1311 1350 1356 1359 1 + 1308 1305 1311 1314 7 1308 1305 1311 1317 7 + 1308 1305 1311 1350 7 1305 1311 1317 1320 6 + 1305 1311 1317 1323 6 1425 1422 1428 1431 12 + 1425 1422 -1428 1431 1 1422 1428 1434 1437 7 + 1410 1404 1401 1413 21 1407 1404 1401 1413 21 + 1404 1401 1413 1416 21 1404 1401 1413 1419 21 + 1398 1395 1401 1404 21 1398 1395 1401 1413 21 + 1395 1401 1404 1407 21 1395 1401 1404 1410 21 + 1395 1401 1413 1416 21 1395 1401 1413 1419 21 + 1392 1386 1395 1398 26 1392 1386 1395 1401 26 + 1389 1386 1395 1398 26 1389 1386 1395 1401 26 + 1383 1377 1386 1389 6 1383 1377 1386 1392 6 + 1383 1377 1386 1395 6 1380 1377 1386 1389 6 + 1380 1377 1386 1392 6 1380 1377 1386 1395 6 + 1377 1386 1395 1398 26 1374 1368 1362 1422 6 + 1374 1368 1377 1380 62 1374 1368 1377 1383 62 + 1374 1368 1377 1386 61 1371 1368 1362 1422 6 + 1371 1368 1377 1380 62 1371 1368 1377 1383 62 + 1371 1368 1377 1386 61 1368 1377 1386 1389 6 + 1368 1377 1386 1392 6 1365 1362 1368 1371 6 + 1365 1362 1368 1374 6 1365 1362 1368 1377 6 + 1365 1362 1422 1425 59 1365 1362 -1422 1425 60 + 1365 1362 1422 1428 7 1362 1368 1377 1380 61 + 1362 1368 1377 1383 61 1362 1422 1428 1431 1 + 1359 1356 1362 1365 7 1359 1356 1362 1368 7 + 1359 1356 1362 1422 7 1356 1362 1368 1371 6 + 1356 1362 1368 1374 6 1470 1467 1473 1476 12 + 1470 1467 -1473 1476 1 1467 1473 1479 1482 7 + 1467 1473 1479 1485 7 1455 1449 1458 1461 7 + 1455 1449 1458 1464 7 1452 1449 1458 1461 7 + 1452 1449 1458 1464 7 1446 1440 1434 1467 6 + 1446 1440 1449 1452 62 1446 1440 1449 1455 62 + 1446 1440 1449 1458 6 1443 1440 1434 1467 6 + 1443 1440 1449 1452 62 1443 1440 1449 1455 62 + 1443 1440 1449 1458 6 1437 1434 1440 1443 6 + 1437 1434 1440 1446 6 1437 1434 1440 1449 6 + 1437 1434 1467 1470 59 1437 1434 -1467 1470 60 + 1437 1434 1467 1473 7 1434 1440 1449 1452 61 + 1434 1440 1449 1455 61 1434 1467 1473 1476 1 + 1431 1428 1434 1437 7 1431 1428 1434 1440 7 + 1431 1428 1434 1467 7 1428 1434 1440 1443 6 + 1428 1434 1440 1446 6 1491 1488 1494 1497 12 + 1491 1488 -1494 1497 1 1488 1494 1500 1503 7 + 1485 1479 1488 1491 59 1485 1479 -1488 1491 60 + 1485 1479 1488 1494 7 1482 1479 1488 1491 59 + 1482 1479 -1488 1491 60 1482 1479 1488 1494 7 + 1479 1488 1494 1497 1 1476 1473 1479 1482 7 + 1476 1473 1479 1485 7 1476 1473 1479 1488 7 + 1521 1518 1524 1527 12 1521 1518 -1524 1527 1 + 1518 1524 1530 1533 7 1515 1506 1500 1518 6 + 1512 1506 1500 1518 6 1509 1506 1500 1518 6 + 1503 1500 1506 1509 6 1503 1500 1506 1512 6 + 1503 1500 1506 1515 6 1503 1500 1518 1521 59 + 1503 1500 -1518 1521 60 1503 1500 1518 1524 7 + 1500 1518 1524 1527 1 1497 1494 1500 1503 7 + 1497 1494 1500 1506 7 1497 1494 1500 1518 7 + 1494 1500 1506 1509 6 1494 1500 1506 1512 6 + 1494 1500 1506 1515 6 1566 1563 1569 1572 12 + 1566 1563 -1569 1572 1 1563 1569 1575 1578 7 + 1551 1545 1554 1557 7 1551 1545 1554 1560 7 + 1548 1545 1554 1557 7 1548 1545 1554 1560 7 + 1542 1536 1530 1563 6 1542 1536 1545 1548 62 + 1542 1536 1545 1551 62 1542 1536 1545 1554 6 + 1539 1536 1530 1563 6 1539 1536 1545 1548 62 + 1539 1536 1545 1551 62 1539 1536 1545 1554 6 + 1533 1530 1536 1539 6 1533 1530 1536 1542 6 + 1533 1530 1536 1545 6 1533 1530 1563 1566 59 + 1533 1530 -1563 1566 60 1533 1530 1563 1569 7 + 1530 1536 1545 1548 61 1530 1536 1545 1551 61 + 1530 1563 1569 1572 1 1527 1524 1530 1533 7 + 1527 1524 1530 1536 7 1527 1524 1530 1563 7 + 1524 1530 1536 1539 6 1524 1530 1536 1542 6 + 1623 1620 1626 1629 12 1623 1620 -1626 1629 1 + 1620 1626 1632 1635 7 1605 1596 1590 1608 61 + 1602 1596 1590 1608 61 1599 1596 1590 1608 61 + 1596 1590 1608 1611 61 1596 1590 1608 1614 61 + 1596 1590 1608 1617 61 1593 1590 1596 1599 62 + 1593 1590 1596 1602 62 1593 1590 1596 1605 62 + 1593 1590 1608 1611 62 1593 1590 1608 1614 62 + 1593 1590 1608 1617 62 1587 1581 1575 1620 6 + 1587 1581 1590 1593 62 1587 1581 1590 1596 61 + 1587 1581 1590 1608 61 1584 1581 1575 1620 6 + 1584 1581 1590 1593 62 1584 1581 1590 1596 61 + 1584 1581 1590 1608 61 1581 1590 1596 1599 61 + 1581 1590 1596 1602 61 1581 1590 1596 1605 61 + 1581 1590 1608 1611 61 1581 1590 1608 1614 61 + 1581 1590 1608 1617 61 1578 1575 1581 1584 6 + 1578 1575 1581 1587 6 1578 1575 1581 1590 6 + 1578 1575 1620 1623 59 1578 1575 -1620 1623 60 + 1578 1575 1620 1626 7 1575 1581 1590 1593 61 + 1575 1620 1626 1629 1 1572 1569 1575 1578 7 + 1572 1569 1575 1581 7 1572 1569 1575 1620 7 + 1569 1575 1581 1584 6 1569 1575 1581 1587 6 + 1653 1650 1656 1659 12 1653 1650 -1656 1659 1 + 1650 1656 1662 1665 7 1647 1638 1632 1650 6 + 1644 1638 1632 1650 6 1641 1638 1632 1650 6 + 1635 1632 1638 1641 6 1635 1632 1638 1644 6 + 1635 1632 1638 1647 6 1635 1632 1650 1653 59 + 1635 1632 -1650 1653 60 1635 1632 1650 1656 7 + 1632 1650 1656 1659 1 1629 1626 1632 1635 7 + 1629 1626 1632 1638 7 1629 1626 1632 1650 7 + 1626 1632 1638 1641 6 1626 1632 1638 1644 6 + 1626 1632 1638 1647 6 1713 1710 1716 1719 12 + 1713 1710 -1716 1719 1 1710 1716 1722 1725 7 + 1701 1698 1704 1707 17 1695 1692 1698 1701 17 + 1695 1692 1698 1704 17 1692 1698 1704 1707 17 + 1689 1686 1692 1695 17 1689 1686 1692 1698 17 + 1686 1692 1698 1701 17 1683 1680 1677 1704 17 + 1683 1680 1686 1689 17 1683 1680 1686 1692 17 + 1680 1677 1704 1707 17 1680 1686 1692 1695 17 + 1677 1680 1686 1689 17 1677 1704 1698 1701 17 + 1674 1668 1662 1710 6 1674 1668 1677 1680 7 + 1674 1668 1677 1704 7 1671 1668 1662 1710 6 + 1671 1668 1677 1680 7 1671 1668 1677 1704 7 + 1668 1677 1680 1683 17 1668 1677 1704 1707 17 + 1665 1662 1668 1671 6 1665 1662 1668 1674 6 + 1665 1662 1668 1677 6 1665 1662 1710 1713 59 + 1665 1662 -1710 1713 60 1665 1662 1710 1716 7 + 1662 1710 1716 1719 1 1659 1656 1662 1665 7 + 1659 1656 1662 1668 7 1659 1656 1662 1710 7 + 1656 1662 1668 1671 6 1656 1662 1668 1674 6 + 1755 1752 1758 1761 12 1755 1752 -1758 1761 1 + 1752 1758 1764 1767 7 1743 1734 1728 1746 63 + 1743 1734 -1728 1746 26 1740 1734 1728 1746 63 + 1740 1734 -1728 1746 26 1737 1734 1728 1746 63 + 1737 1734 -1728 1746 26 1734 1728 1746 1749 63 + 1734 1728 -1746 1749 61 1731 1728 1722 1752 6 + 1731 1728 1734 1737 6 1731 1728 1734 1740 6 + 1731 1728 1734 1743 6 1731 1728 1746 1749 64 + 1725 1722 1728 1731 6 1725 1722 1728 1734 6 + 1725 1722 1728 1746 63 1725 1722 -1728 1746 26 + 1725 1722 1752 1755 59 1725 1722 -1752 1755 60 + 1725 1722 1752 1758 7 1722 1728 1734 1737 61 + 1722 1728 1734 1740 61 1722 1728 1734 1743 61 + 1722 1728 1746 1749 63 1722 1728 -1746 1749 61 + 1722 1752 1758 1761 1 1719 1716 1722 1725 7 + 1719 1716 1722 1728 7 1719 1716 1722 1752 7 + 1716 1722 1728 1731 6 1818 1815 1821 1824 12 + 1818 1815 -1821 1824 1 1815 1821 1827 1830 7 + 1806 1803 1809 1812 17 1800 1797 1794 1803 65 + 1797 1794 1803 1806 17 1794 1803 1809 1812 17 + 1791 1788 1794 1797 17 1791 1788 1794 1803 17 + 1788 1794 1797 1800 65 1788 1794 1803 1806 17 + 1785 1782 1779 1809 17 1785 1782 1788 1791 17 + 1785 1782 1788 1794 17 1782 1779 1809 1812 17 + 1779 1782 1788 1791 17 1779 1809 1803 1806 17 + 1776 1770 1764 1815 6 1776 1770 1779 1782 7 + 1776 1770 1779 1809 7 1773 1770 1764 1815 6 + 1773 1770 1779 1782 7 1773 1770 1779 1809 7 + 1770 1779 1782 1785 17 1770 1779 1809 1812 17 + 1767 1764 1770 1773 6 1767 1764 1770 1776 6 + 1767 1764 1770 1779 6 1767 1764 1815 1818 59 + 1767 1764 -1815 1818 60 1767 1764 1815 1821 7 + 1764 1815 1821 1824 1 1761 1758 1764 1767 7 + 1761 1758 1764 1770 7 1761 1758 1764 1815 7 + 1758 1764 1770 1773 6 1758 1764 1770 1776 6 + 1866 1863 1869 1872 12 1866 1863 -1869 1872 1 + 1863 1869 1875 1878 7 1863 1869 1875 1881 7 + 1848 1839 1833 1851 61 1845 1839 1833 1851 61 + 1842 1839 1833 1851 61 1839 1833 1851 1854 61 + 1839 1833 1851 1857 61 1839 1833 1851 1860 61 + 1836 1833 1827 1863 6 1836 1833 1839 1842 62 + 1836 1833 1839 1845 62 1836 1833 1839 1848 62 + 1836 1833 1851 1854 62 1836 1833 1851 1857 62 + 1836 1833 1851 1860 62 1830 1827 1833 1836 6 + 1830 1827 1833 1839 6 1830 1827 1833 1851 6 + 1830 1827 1863 1866 59 1830 1827 -1863 1866 60 + 1830 1827 1863 1869 7 1827 1833 1839 1842 61 + 1827 1833 1839 1845 61 1827 1833 1839 1848 61 + 1827 1833 1851 1854 61 1827 1833 1851 1857 61 + 1827 1833 1851 1860 61 1827 1863 1869 1872 1 + 1824 1821 1827 1830 7 1824 1821 1827 1833 7 + 1824 1821 1827 1863 7 1821 1827 1833 1836 6 + 1887 1884 1890 1893 12 1887 1884 -1890 1893 1 + 1884 1890 1896 1899 7 1881 1875 1884 1887 59 + 1881 1875 -1884 1887 60 1881 1875 1884 1890 7 + 1878 1875 1884 1887 59 1878 1875 -1884 1887 60 + 1878 1875 1884 1890 7 1875 1884 1890 1893 1 + 1872 1869 1875 1878 7 1872 1869 1875 1881 7 + 1872 1869 1875 1884 7 1938 1935 1941 1944 12 + 1938 1935 -1941 1944 1 1935 1941 1947 1950 7 + 1923 1920 1926 1929 12 1923 1920 -1926 1929 1 + 1923 1920 1926 1932 12 1923 1920 -1926 1932 1 + 1917 1911 1920 1923 59 1917 1911 -1920 1923 7 + 1917 1911 -1920 1923 60 1917 1911 1920 1926 7 + 1914 1911 1920 1923 59 1914 1911 -1920 1923 7 + 1914 1911 -1920 1923 60 1914 1911 1920 1926 7 + 1911 1920 1926 1929 1 1911 1920 1926 1932 1 + 1908 1902 1896 1935 6 1908 1902 1911 1914 62 + 1908 1902 1911 1917 62 1908 1902 1911 1920 6 + 1905 1902 1896 1935 6 1905 1902 1911 1914 62 + 1905 1902 1911 1917 62 1905 1902 1911 1920 6 + 1899 1896 1902 1905 6 1899 1896 1902 1908 6 + 1899 1896 1902 1911 6 1899 1896 1935 1938 59 + 1899 1896 -1935 1938 60 1899 1896 1935 1941 7 + 1896 1902 1911 1914 61 1896 1902 1911 1917 61 + 1896 1935 1941 1944 1 1893 1890 1896 1899 7 + 1893 1890 1896 1902 7 1893 1890 1896 1935 7 + 1890 1896 1902 1905 6 1890 1896 1902 1908 6 + 1998 1995 2001 2004 12 1998 1995 -2001 2004 1 + 1995 2001 2007 2010 7 1986 1983 1989 1992 17 + 1980 1977 1983 1986 17 1980 1977 1983 1989 17 + 1977 1983 1989 1992 17 1974 1971 1977 1980 17 + 1974 1971 1977 1983 17 1971 1977 1983 1986 17 + 1968 1965 1962 1989 17 1968 1965 1971 1974 17 + 1968 1965 1971 1977 17 1965 1962 1989 1992 17 + 1965 1971 1977 1980 17 1962 1965 1971 1974 17 + 1962 1989 1983 1986 17 1959 1953 1947 1995 6 + 1959 1953 1962 1965 7 1959 1953 1962 1989 7 + 1956 1953 1947 1995 6 1956 1953 1962 1965 7 + 1956 1953 1962 1989 7 1953 1962 1965 1968 17 + 1953 1962 1989 1992 17 1950 1947 1953 1956 6 + 1950 1947 1953 1959 6 1950 1947 1953 1962 6 + 1950 1947 1995 1998 59 1950 1947 -1995 1998 60 + 1950 1947 1995 2001 7 1947 1995 2001 2004 1 + 1944 1941 1947 1950 7 1944 1941 1947 1953 7 + 1944 1941 1947 1995 7 1941 1947 1953 1956 6 + 1941 1947 1953 1959 6 2064 2061 2067 2070 12 + 2064 2061 -2067 2070 1 2061 2067 2073 2076 7 + 2046 2040 2049 2052 6 2046 2040 2049 2055 6 + 2046 2040 2049 2058 6 2043 2040 2049 2052 6 + 2043 2040 2049 2055 6 2043 2040 2049 2058 6 + 2037 2031 2040 2043 6 2037 2031 2040 2046 6 + 2037 2031 2040 2049 6 2034 2031 2040 2043 6 + 2034 2031 2040 2046 6 2034 2031 2040 2049 6 + 2031 2040 2049 2052 6 2031 2040 2049 2055 6 + 2031 2040 2049 2058 6 2028 2022 2031 2034 62 + 2028 2022 2031 2037 62 2028 2022 2031 2040 61 + 2025 2022 2031 2034 62 2025 2022 2031 2037 62 + 2025 2022 2031 2040 61 2022 2031 2040 2043 6 + 2022 2031 2040 2046 6 2019 2013 2007 2061 6 + 2019 2013 2022 2025 62 2019 2013 2022 2028 62 + 2019 2013 2022 2031 61 2016 2013 2007 2061 6 + 2016 2013 2022 2025 62 2016 2013 2022 2028 62 + 2016 2013 2022 2031 61 2013 2022 2031 2034 61 + 2013 2022 2031 2037 61 2010 2007 2013 2016 6 + 2010 2007 2013 2019 6 2010 2007 2013 2022 6 + 2010 2007 2061 2064 59 2010 2007 -2061 2064 60 + 2010 2007 2061 2067 7 2007 2013 2022 2025 61 + 2007 2013 2022 2028 61 2007 2061 2067 2070 1 + 2004 2001 2007 2010 7 2004 2001 2007 2013 7 + 2004 2001 2007 2061 7 2001 2007 2013 2016 6 + 2001 2007 2013 2019 6 2100 2097 2103 2106 12 + 2100 2097 -2103 2106 1 2097 2103 2109 2112 7 + 2085 2079 2073 2097 6 2085 2079 2088 2091 7 + 2085 2079 2088 2094 7 2082 2079 2073 2097 6 + 2082 2079 2088 2091 7 2082 2079 2088 2094 7 + 2076 2073 2079 2082 6 2076 2073 2079 2085 6 + 2076 2073 2079 2088 6 2076 2073 2097 2100 59 + 2076 2073 -2097 2100 60 2076 2073 2097 2103 7 + 2073 2097 2103 2106 1 2070 2067 2073 2076 7 + 2070 2067 2073 2079 7 2070 2067 2073 2097 7 + 2067 2073 2079 2082 6 2067 2073 2079 2085 6 + 2172 2169 2175 2178 12 2172 2169 -2175 2178 1 + 2169 2175 2181 2184 7 2157 2151 2148 2160 21 + 2154 2151 2148 2160 21 2151 2148 2160 2163 21 + 2151 2148 2160 2166 21 2145 2142 2148 2151 21 + 2145 2142 2148 2160 21 2142 2148 2151 2154 21 + 2142 2148 2151 2157 21 2142 2148 2160 2163 21 + 2142 2148 2160 2166 21 2139 2133 2142 2145 26 + 2139 2133 2142 2148 26 2136 2133 2142 2145 26 + 2136 2133 2142 2148 26 2130 2124 2133 2136 6 + 2130 2124 2133 2139 6 2130 2124 2133 2142 6 + 2127 2124 2133 2136 6 2127 2124 2133 2139 6 + 2127 2124 2133 2142 6 2124 2133 2142 2145 26 + 2121 2115 2109 2169 6 2121 2115 2124 2127 62 + 2121 2115 2124 2130 62 2121 2115 2124 2133 61 + 2118 2115 2109 2169 6 2118 2115 2124 2127 62 + 2118 2115 2124 2130 62 2118 2115 2124 2133 61 + 2115 2124 2133 2136 6 2115 2124 2133 2139 6 + 2112 2109 2115 2118 6 2112 2109 2115 2121 6 + 2112 2109 2115 2124 6 2112 2109 2169 2172 59 + 2112 2109 -2169 2172 60 2112 2109 2169 2175 7 + 2109 2115 2124 2127 61 2109 2115 2124 2130 61 + 2109 2169 2175 2178 1 2106 2103 2109 2112 7 + 2106 2103 2109 2115 7 2106 2103 2109 2169 7 + 2103 2109 2115 2118 6 2103 2109 2115 2121 6 + 2220 2217 2223 2226 12 2220 2217 -2223 2226 1 + 2217 2223 2229 2232 7 2202 2193 2187 2205 61 + 2199 2193 2187 2205 61 2196 2193 2187 2205 61 + 2193 2187 2205 2208 61 2193 2187 2205 2211 61 + 2193 2187 2205 2214 61 2190 2187 2181 2217 6 + 2190 2187 2193 2196 62 2190 2187 2193 2199 62 + 2190 2187 2193 2202 62 2190 2187 2205 2208 62 + 2190 2187 2205 2211 62 2190 2187 2205 2214 62 + 2184 2181 2187 2190 6 2184 2181 2187 2193 6 + 2184 2181 2187 2205 6 2184 2181 2217 2220 59 + 2184 2181 -2217 2220 60 2184 2181 2217 2223 7 + 2181 2187 2193 2196 61 2181 2187 2193 2199 61 + 2181 2187 2193 2202 61 2181 2187 2205 2208 61 + 2181 2187 2205 2211 61 2181 2187 2205 2214 61 + 2181 2217 2223 2226 1 2178 2175 2181 2184 7 + 2178 2175 2181 2187 7 2178 2175 2181 2217 7 + 2175 2181 2187 2190 6 2265 2262 2268 2271 12 + 2265 2262 -2268 2271 1 2262 2268 2274 2277 7 + 2250 2244 2253 2256 7 2250 2244 2253 2259 7 + 2247 2244 2253 2256 7 2247 2244 2253 2259 7 + 2241 2235 2229 2262 6 2241 2235 2244 2247 62 + 2241 2235 2244 2250 62 2241 2235 2244 2253 6 + 2238 2235 2229 2262 6 2238 2235 2244 2247 62 + 2238 2235 2244 2250 62 2238 2235 2244 2253 6 + 2232 2229 2235 2238 6 2232 2229 2235 2241 6 + 2232 2229 2235 2244 6 2232 2229 2262 2265 59 + 2232 2229 -2262 2265 60 2232 2229 2262 2268 7 + 2229 2235 2244 2247 61 2229 2235 2244 2250 61 + 2229 2262 2268 2271 1 2226 2223 2229 2232 7 + 2226 2223 2229 2235 7 2226 2223 2229 2262 7 + 2223 2229 2235 2238 6 2223 2229 2235 2241 6 + 2331 2328 2334 2337 12 2331 2328 -2334 2337 1 + 2328 2334 2340 2343 7 2313 2307 2316 2319 6 + 2313 2307 2316 2322 6 2313 2307 2316 2325 6 + 2310 2307 2316 2319 6 2310 2307 2316 2322 6 + 2310 2307 2316 2325 6 2304 2298 2307 2310 6 + 2304 2298 2307 2313 6 2304 2298 2307 2316 6 + 2301 2298 2307 2310 6 2301 2298 2307 2313 6 + 2301 2298 2307 2316 6 2298 2307 2316 2319 6 + 2298 2307 2316 2322 6 2298 2307 2316 2325 6 + 2295 2289 2298 2301 62 2295 2289 2298 2304 62 + 2295 2289 2298 2307 61 2292 2289 2298 2301 62 + 2292 2289 2298 2304 62 2292 2289 2298 2307 61 + 2289 2298 2307 2310 6 2289 2298 2307 2313 6 + 2286 2280 2274 2328 6 2286 2280 2289 2292 62 + 2286 2280 2289 2295 62 2286 2280 2289 2298 61 + 2283 2280 2274 2328 6 2283 2280 2289 2292 62 + 2283 2280 2289 2295 62 2283 2280 2289 2298 61 + 2280 2289 2298 2301 61 2280 2289 2298 2304 61 + 2277 2274 2280 2283 6 2277 2274 2280 2286 6 + 2277 2274 2280 2289 6 2277 2274 2328 2331 59 + 2277 2274 -2328 2331 60 2277 2274 2328 2334 7 + 2274 2280 2289 2292 61 2274 2280 2289 2295 61 + 2274 2328 2334 2337 1 2271 2268 2274 2277 7 + 2271 2268 2274 2280 7 2271 2268 2274 2328 7 + 2268 2274 2280 2283 6 2268 2274 2280 2286 6 + 2388 2385 2391 2394 12 2388 2385 -2391 2394 1 + 2385 2391 2397 2400 7 2370 2361 2355 2373 61 + 2367 2361 2355 2373 61 2364 2361 2355 2373 61 + 2361 2355 2373 2376 61 2361 2355 2373 2379 61 + 2361 2355 2373 2382 61 2358 2355 2361 2364 62 + 2358 2355 2361 2367 62 2358 2355 2361 2370 62 + 2358 2355 2373 2376 62 2358 2355 2373 2379 62 + 2358 2355 2373 2382 62 2352 2346 2340 2385 6 + 2352 2346 2355 2358 62 2352 2346 2355 2361 61 + 2352 2346 2355 2373 61 2349 2346 2340 2385 6 + 2349 2346 2355 2358 62 2349 2346 2355 2361 61 + 2349 2346 2355 2373 61 2346 2355 2361 2364 61 + 2346 2355 2361 2367 61 2346 2355 2361 2370 61 + 2346 2355 2373 2376 61 2346 2355 2373 2379 61 + 2346 2355 2373 2382 61 2343 2340 2346 2349 6 + 2343 2340 2346 2352 6 2343 2340 2346 2355 6 + 2343 2340 2385 2388 59 2343 2340 -2385 2388 60 + 2343 2340 2385 2391 7 2340 2346 2355 2358 61 + 2340 2385 2391 2394 1 2337 2334 2340 2343 7 + 2337 2334 2340 2346 7 2337 2334 2340 2385 7 + 2334 2340 2346 2349 6 2334 2340 2346 2352 6 + 2421 2418 2424 2427 12 2421 2418 -2424 2427 1 + 2418 2424 2430 2433 7 2409 2403 2397 2418 6 + 2409 2403 2412 2415 46 2406 2403 2397 2418 6 + 2406 2403 2412 2415 46 2400 2397 2403 2406 6 + 2400 2397 2403 2409 6 2400 2397 2403 2412 6 + 2400 2397 2418 2421 59 2400 2397 -2418 2421 60 + 2400 2397 2418 2424 7 2397 2403 2412 2415 46 + 2397 2418 2424 2427 1 2394 2391 2397 2400 7 + 2394 2391 2397 2403 7 2394 2391 2397 2418 7 + 2391 2397 2403 2406 6 2391 2397 2403 2409 6 + 2451 2448 2454 2457 12 2451 2448 -2454 2457 1 + 2448 2454 2460 2463 7 2445 2436 2430 2448 6 + 2442 2436 2430 2448 6 2439 2436 2430 2448 6 + 2433 2430 2436 2439 6 2433 2430 2436 2442 6 + 2433 2430 2436 2445 6 2433 2430 2448 2451 59 + 2433 2430 -2448 2451 60 2433 2430 2448 2454 7 + 2430 2448 2454 2457 1 2427 2424 2430 2433 7 + 2427 2424 2430 2436 7 2427 2424 2430 2448 7 + 2424 2430 2436 2439 6 2424 2430 2436 2442 6 + 2424 2430 2436 2445 6 2496 2493 2499 2502 12 + 2496 2493 -2499 2502 1 2493 2499 2505 2508 7 + 2481 2475 2484 2487 7 2481 2475 2484 2490 7 + 2478 2475 2484 2487 7 2478 2475 2484 2490 7 + 2472 2466 2460 2493 6 2472 2466 2475 2478 62 + 2472 2466 2475 2481 62 2472 2466 2475 2484 6 + 2469 2466 2460 2493 6 2469 2466 2475 2478 62 + 2469 2466 2475 2481 62 2469 2466 2475 2484 6 + 2463 2460 2466 2469 6 2463 2460 2466 2472 6 + 2463 2460 2466 2475 6 2463 2460 2493 2496 59 + 2463 2460 -2493 2496 60 2463 2460 2493 2499 7 + 2460 2466 2475 2478 61 2460 2466 2475 2481 61 + 2460 2493 2499 2502 1 2457 2454 2460 2463 7 + 2457 2454 2460 2466 7 2457 2454 2460 2493 7 + 2454 2460 2466 2469 6 2454 2460 2466 2472 6 + 2556 2553 2559 2562 12 2556 2553 -2559 2562 1 + 2553 2559 2565 2568 7 2544 2541 2547 2550 17 + 2538 2535 2541 2544 17 2538 2535 2541 2547 17 + 2535 2541 2547 2550 17 2532 2529 2535 2538 17 + 2532 2529 2535 2541 17 2529 2535 2541 2544 17 + 2526 2523 2520 2547 17 2526 2523 2529 2532 17 + 2526 2523 2529 2535 17 2523 2520 2547 2550 17 + 2523 2529 2535 2538 17 2520 2523 2529 2532 17 + 2520 2547 2541 2544 17 2517 2511 2505 2553 6 + 2517 2511 2520 2523 7 2517 2511 2520 2547 7 + 2514 2511 2505 2553 6 2514 2511 2520 2523 7 + 2514 2511 2520 2547 7 2511 2520 2523 2526 17 + 2511 2520 2547 2550 17 2508 2505 2511 2514 6 + 2508 2505 2511 2517 6 2508 2505 2511 2520 6 + 2508 2505 2553 2556 59 2508 2505 -2553 2556 60 + 2508 2505 2553 2559 7 2505 2553 2559 2562 1 + 2502 2499 2505 2508 7 2502 2499 2505 2511 7 + 2502 2499 2505 2553 7 2499 2505 2511 2514 6 + 2499 2505 2511 2517 6 2595 2601 2604 2607 7 + 2595 2601 2604 2610 7 2595 2601 2631 2634 7 + 2583 2580 2586 2589 12 2583 2580 -2586 2589 1 + 2583 2580 2586 2592 12 2583 2580 -2586 2592 1 + 2577 2571 2565 2595 6 2577 2571 2580 2583 59 + 2577 2571 -2580 2583 7 2577 2571 -2580 2583 60 + 2577 2571 2580 2586 7 2574 2571 2565 2595 6 + 2574 2571 2580 2583 59 2574 2571 -2580 2583 7 + 2574 2571 -2580 2583 60 2574 2571 2580 2586 7 + 2571 2580 2586 2589 1 2571 2580 2586 2592 1 + 2568 2565 2571 2574 6 2568 2565 2571 2577 6 + 2568 2565 2571 2580 6 2568 2565 2595 2598 59 + 2568 2565 -2595 2598 60 2568 2565 2595 2601 7 + 2562 2559 2565 2568 7 2562 2559 2565 2571 7 + 2562 2559 2565 2595 7 2559 2565 2571 2574 6 + 2559 2565 2571 2577 6 2640 2637 2643 2646 12 + 2640 2637 -2643 2646 1 2637 2643 2649 2652 7 + 2634 2631 2637 2640 59 2634 2631 -2637 2640 60 + 2634 2631 2637 2643 7 2631 2637 2643 2646 1 + 2628 2622 2631 2634 6 2628 2622 2631 2637 6 + 2625 2622 2631 2634 6 2625 2622 2631 2637 6 + 2619 2613 2622 2625 62 2619 2613 2622 2628 62 + 2619 2613 2622 2631 61 2616 2613 2622 2625 62 + 2616 2613 2622 2628 62 2616 2613 2622 2631 61 + 2613 2622 2631 2634 6 2610 2604 2601 2631 7 + 2610 2604 2613 2616 6 2610 2604 2613 2619 6 + 2610 2604 2613 2622 6 2607 2604 2601 2631 7 + 2607 2604 2613 2616 6 2607 2604 2613 2619 6 + 2607 2604 2613 2622 6 2604 2601 2631 2634 7 + 2604 2613 2622 2625 61 2604 2613 2622 2628 61 + 2601 2604 2613 2616 6 2601 2604 2613 2619 6 + 2601 2631 2622 2625 6 2601 2631 2622 2628 6 + 2670 2667 2673 2676 12 2670 2667 -2673 2676 1 + 2667 2673 2679 2682 7 2664 2655 2649 2667 6 + 2661 2655 2649 2667 6 2658 2655 2649 2667 6 + 2652 2649 2655 2658 6 2652 2649 2655 2661 6 + 2652 2649 2655 2664 6 2652 2649 2667 2670 59 + 2652 2649 -2667 2670 60 2652 2649 2667 2673 7 + 2649 2667 2673 2676 1 2646 2643 2649 2652 7 + 2646 2643 2649 2655 7 2646 2643 2649 2667 7 + 2643 2649 2655 2658 6 2643 2649 2655 2661 6 + 2643 2649 2655 2664 6 2700 2697 2703 2706 12 + 2700 2697 -2703 2706 1 2697 2703 2709 2712 7 + 2694 2685 2679 2697 6 2691 2685 2679 2697 6 + 2688 2685 2679 2697 6 2682 2679 2685 2688 6 + 2682 2679 2685 2691 6 2682 2679 2685 2694 6 + 2682 2679 2697 2700 59 2682 2679 -2697 2700 60 + 2682 2679 2697 2703 7 2679 2697 2703 2706 1 + 2676 2673 2679 2682 7 2676 2673 2679 2685 7 + 2676 2673 2679 2697 7 2673 2679 2685 2688 6 + 2673 2679 2685 2691 6 2673 2679 2685 2694 6 + 2748 2745 2751 2754 12 2748 2745 -2751 2754 1 + 2745 2751 2757 2760 7 2730 2721 2715 2733 61 + 2727 2721 2715 2733 61 2724 2721 2715 2733 61 + 2721 2715 2733 2736 61 2721 2715 2733 2739 61 + 2721 2715 2733 2742 61 2718 2715 2709 2745 6 + 2718 2715 2721 2724 62 2718 2715 2721 2727 62 + 2718 2715 2721 2730 62 2718 2715 2733 2736 62 + 2718 2715 2733 2739 62 2718 2715 2733 2742 62 + 2712 2709 2715 2718 6 2712 2709 2715 2721 6 + 2712 2709 2715 2733 6 2712 2709 2745 2748 59 + 2712 2709 -2745 2748 60 2712 2709 2745 2751 7 + 2709 2715 2721 2724 61 2709 2715 2721 2727 61 + 2709 2715 2721 2730 61 2709 2715 2733 2736 61 + 2709 2715 2733 2739 61 2709 2715 2733 2742 61 + 2709 2745 2751 2754 1 2706 2703 2709 2712 7 + 2706 2703 2709 2715 7 2706 2703 2709 2745 7 + 2703 2709 2715 2718 6 2802 2808 2811 2814 7 + 2802 2808 2811 2817 7 2802 2808 2838 2841 7 + 2787 2778 2772 2790 61 2784 2778 2772 2790 61 + 2781 2778 2772 2790 61 2778 2772 2790 2793 61 + 2778 2772 2790 2796 61 2778 2772 2790 2799 61 + 2775 2772 2778 2781 62 2775 2772 2778 2784 62 + 2775 2772 2778 2787 62 2775 2772 2790 2793 62 + 2775 2772 2790 2796 62 2775 2772 2790 2799 62 + 2769 2763 2757 2802 6 2769 2763 2772 2775 62 + 2769 2763 2772 2778 61 2769 2763 2772 2790 61 + 2766 2763 2757 2802 6 2766 2763 2772 2775 62 + 2766 2763 2772 2778 61 2766 2763 2772 2790 61 + 2763 2772 2778 2781 61 2763 2772 2778 2784 61 + 2763 2772 2778 2787 61 2763 2772 2790 2793 61 + 2763 2772 2790 2796 61 2763 2772 2790 2799 61 + 2760 2757 2763 2766 6 2760 2757 2763 2769 6 + 2760 2757 2763 2772 6 2760 2757 2802 2805 59 + 2760 2757 -2802 2805 60 2760 2757 2802 2808 7 + 2757 2763 2772 2775 61 2754 2751 2757 2760 7 + 2754 2751 2757 2763 7 2754 2751 2757 2802 7 + 2751 2757 2763 2766 6 2751 2757 2763 2769 6 + 2847 2844 2850 2853 12 2847 2844 -2850 2853 1 + 2844 2850 2856 2859 7 2841 2838 2844 2847 59 + 2841 2838 -2844 2847 60 2841 2838 2844 2850 7 + 2838 2844 2850 2853 1 2835 2829 2838 2841 6 + 2835 2829 2838 2844 6 2832 2829 2838 2841 6 + 2832 2829 2838 2844 6 2826 2820 2829 2832 62 + 2826 2820 2829 2835 62 2826 2820 2829 2838 61 + 2823 2820 2829 2832 62 2823 2820 2829 2835 62 + 2823 2820 2829 2838 61 2820 2829 2838 2841 6 + 2817 2811 2808 2838 7 2817 2811 2820 2823 6 + 2817 2811 2820 2826 6 2817 2811 2820 2829 6 + 2814 2811 2808 2838 7 2814 2811 2820 2823 6 + 2814 2811 2820 2826 6 2814 2811 2820 2829 6 + 2811 2808 2838 2841 7 2811 2820 2829 2832 61 + 2811 2820 2829 2835 61 2808 2811 2820 2823 6 + 2808 2811 2820 2826 6 2808 2838 2829 2832 6 + 2808 2838 2829 2835 6 2880 2877 2883 2886 12 + 2880 2877 -2883 2886 1 2877 2883 2889 2892 7 + 2868 2862 2856 2877 6 2868 2862 2871 2874 46 + 2865 2862 2856 2877 6 2865 2862 2871 2874 46 + 2859 2856 2862 2865 6 2859 2856 2862 2868 6 + 2859 2856 2862 2871 6 2859 2856 2877 2880 59 + 2859 2856 -2877 2880 60 2859 2856 2877 2883 7 + 2856 2862 2871 2874 46 2856 2877 2883 2886 1 + 2853 2850 2856 2859 7 2853 2850 2856 2862 7 + 2853 2850 2856 2877 7 2850 2856 2862 2865 6 + 2850 2856 2862 2868 6 2916 2913 2919 2922 12 + 2916 2913 -2919 2922 1 2913 2919 2925 2928 7 + 2901 2895 2889 2913 6 2901 2895 2904 2907 7 + 2901 2895 2904 2910 7 2898 2895 2889 2913 6 + 2898 2895 2904 2907 7 2898 2895 2904 2910 7 + 2892 2889 2895 2898 6 2892 2889 2895 2901 6 + 2892 2889 2895 2904 6 2892 2889 2913 2916 59 + 2892 2889 -2913 2916 60 2892 2889 2913 2919 7 + 2889 2913 2919 2922 1 2886 2883 2889 2892 7 + 2886 2883 2889 2895 7 2886 2883 2889 2913 7 + 2883 2889 2895 2898 6 2883 2889 2895 2901 6 + 2964 2961 2967 2970 12 2964 2961 -2967 2970 1 + 2961 2967 2973 2976 7 2946 2937 2931 2949 61 + 2943 2937 2931 2949 61 2940 2937 2931 2949 61 + 2937 2931 2949 2952 61 2937 2931 2949 2955 61 + 2937 2931 2949 2958 61 2934 2931 2925 2961 6 + 2934 2931 2937 2940 62 2934 2931 2937 2943 62 + 2934 2931 2937 2946 62 2934 2931 2949 2952 62 + 2934 2931 2949 2955 62 2934 2931 2949 2958 62 + 2928 2925 2931 2934 6 2928 2925 2931 2937 6 + 2928 2925 2931 2949 6 2928 2925 2961 2964 59 + 2928 2925 -2961 2964 60 2928 2925 2961 2967 7 + 2925 2931 2937 2940 61 2925 2931 2937 2943 61 + 2925 2931 2937 2946 61 2925 2931 2949 2952 61 + 2925 2931 2949 2955 61 2925 2931 2949 2958 61 + 2925 2961 2967 2970 1 2922 2919 2925 2928 7 + 2922 2919 2925 2931 7 2922 2919 2925 2961 7 + 2919 2925 2931 2934 6 3021 3018 3024 3027 12 + 3021 3018 -3024 3027 1 3018 3024 3030 3033 7 + 3003 2997 3006 3009 62 3003 2997 3006 3012 62 + 3003 2997 3006 3015 62 3000 2997 3006 3009 62 + 3000 2997 3006 3012 62 3000 2997 3006 3015 62 + 2994 2985 2979 2997 61 2991 2985 2979 2997 61 + 2988 2985 2979 2997 61 2985 2979 2997 3000 61 + 2985 2979 2997 3003 61 2982 2979 2973 3018 6 + 2982 2979 2985 2988 62 2982 2979 2985 2991 62 + 2982 2979 2985 2994 62 2982 2979 2997 3000 62 + 2982 2979 2997 3003 62 2982 2979 2997 3006 61 + 2979 2997 3006 3009 61 2979 2997 3006 3012 61 + 2979 2997 3006 3015 61 2976 2973 2979 2982 6 + 2976 2973 2979 2985 6 2976 2973 2979 2997 6 + 2976 2973 3018 3021 59 2976 2973 -3018 3021 60 + 2976 2973 3018 3024 7 2973 2979 2985 2988 61 + 2973 2979 2985 2991 61 2973 2979 2985 2994 61 + 2973 2979 2997 3000 61 2973 2979 2997 3003 61 + 2973 3018 3024 3027 1 2970 2967 2973 2976 7 + 2970 2967 2973 2979 7 2970 2967 2973 3018 7 + 2967 2973 2979 2982 6 3054 3051 3057 3060 12 + 3054 3051 -3057 3060 1 3051 3057 3063 3066 7 + 3042 3036 3030 3051 6 3042 3036 3045 3048 64 + 3039 3036 3030 3051 6 3039 3036 3045 3048 64 + 3033 3030 3036 3039 6 3033 3030 3036 3042 6 + 3033 3030 3036 3045 63 3033 3030 -3036 3045 26 + 3033 3030 3051 3054 59 3033 3030 -3051 3054 60 + 3033 3030 3051 3057 7 3030 3036 3045 3048 63 + 3030 3036 -3045 3048 61 3030 3051 3057 3060 1 + 3027 3024 3030 3033 7 3027 3024 3030 3036 7 + 3027 3024 3030 3051 7 3024 3030 3036 3039 6 + 3024 3030 3036 3042 6 3090 3087 3093 3096 12 + 3090 3087 -3093 3096 1 3087 3093 3099 3102 7 + 3075 3069 3063 3087 6 3075 3069 3078 3081 7 + 3075 3069 3078 3084 7 3072 3069 3063 3087 6 + 3072 3069 3078 3081 7 3072 3069 3078 3084 7 + 3066 3063 3069 3072 6 3066 3063 3069 3075 6 + 3066 3063 3069 3078 6 3066 3063 3087 3090 59 + 3066 3063 -3087 3090 60 3066 3063 3087 3093 7 + 3063 3087 3093 3096 1 3060 3057 3063 3066 7 + 3060 3057 3063 3069 7 3060 3057 3063 3087 7 + 3057 3063 3069 3072 6 3057 3063 3069 3075 6 + 3141 3138 3144 3147 12 3141 3138 -3144 3147 1 + 3138 3144 3150 3153 7 3126 3123 3129 3132 12 + 3126 3123 -3129 3132 1 3126 3123 3129 3135 12 + 3126 3123 -3129 3135 1 3120 3114 3123 3126 59 + 3120 3114 -3123 3126 7 3120 3114 -3123 3126 60 + 3120 3114 3123 3129 7 3117 3114 3123 3126 59 + 3117 3114 -3123 3126 7 3117 3114 -3123 3126 60 + 3117 3114 3123 3129 7 3114 3123 3129 3132 1 + 3114 3123 3129 3135 1 3111 3105 3099 3138 6 + 3111 3105 3114 3117 62 3111 3105 3114 3120 62 + 3111 3105 3114 3123 6 3108 3105 3099 3138 6 + 3108 3105 3114 3117 62 3108 3105 3114 3120 62 + 3108 3105 3114 3123 6 3102 3099 3105 3108 6 + 3102 3099 3105 3111 6 3102 3099 3105 3114 6 + 3102 3099 3138 3141 59 3102 3099 -3138 3141 60 + 3102 3099 3138 3144 7 3099 3105 3114 3117 61 + 3099 3105 3114 3120 61 3099 3138 3144 3147 1 + 3096 3093 3099 3102 7 3096 3093 3099 3105 7 + 3096 3093 3099 3138 7 3093 3099 3105 3108 6 + 3093 3099 3105 3111 6 3186 3183 3189 3192 12 + 3186 3183 -3189 3192 1 3183 3189 3195 3198 7 + 3171 3165 3174 3177 7 3171 3165 3174 3180 7 + 3168 3165 3174 3177 7 3168 3165 3174 3180 7 + 3162 3156 3150 3183 6 3162 3156 3165 3168 62 + 3162 3156 3165 3171 62 3162 3156 3165 3174 6 + 3159 3156 3150 3183 6 3159 3156 3165 3168 62 + 3159 3156 3165 3171 62 3159 3156 3165 3174 6 + 3153 3150 3156 3159 6 3153 3150 3156 3162 6 + 3153 3150 3156 3165 6 3153 3150 3183 3186 59 + 3153 3150 -3183 3186 60 3153 3150 3183 3189 7 + 3150 3156 3165 3168 61 3150 3156 3165 3171 61 + 3150 3183 3189 3192 1 3147 3144 3150 3153 7 + 3147 3144 3150 3156 7 3147 3144 3150 3183 7 + 3144 3150 3156 3159 6 3144 3150 3156 3162 6 + 3243 3240 3246 3249 12 3243 3240 -3246 3249 1 + 3240 3246 3252 3255 7 3225 3219 3228 3231 62 + 3225 3219 3228 3234 62 3225 3219 3228 3237 62 + 3222 3219 3228 3231 62 3222 3219 3228 3234 62 + 3222 3219 3228 3237 62 3216 3207 3201 3219 61 + 3213 3207 3201 3219 61 3210 3207 3201 3219 61 + 3207 3201 3219 3222 61 3207 3201 3219 3225 61 + 3204 3201 3195 3240 6 3204 3201 3207 3210 62 + 3204 3201 3207 3213 62 3204 3201 3207 3216 62 + 3204 3201 3219 3222 62 3204 3201 3219 3225 62 + 3204 3201 3219 3228 61 3201 3219 3228 3231 61 + 3201 3219 3228 3234 61 3201 3219 3228 3237 61 + 3198 3195 3201 3204 6 3198 3195 3201 3207 6 + 3198 3195 3201 3219 6 3198 3195 3240 3243 59 + 3198 3195 -3240 3243 60 3198 3195 3240 3246 7 + 3195 3201 3207 3210 61 3195 3201 3207 3213 61 + 3195 3201 3207 3216 61 3195 3201 3219 3222 61 + 3195 3201 3219 3225 61 3195 3240 3246 3249 1 + 3192 3189 3195 3198 7 3192 3189 3195 3201 7 + 3192 3189 3195 3240 7 3189 3195 3201 3204 6 + 3309 3306 3312 3315 12 3309 3306 -3312 3315 1 + 3306 3312 3318 3321 7 3291 3285 3294 3297 6 + 3291 3285 3294 3300 6 3291 3285 3294 3303 6 + 3288 3285 3294 3297 6 3288 3285 3294 3300 6 + 3288 3285 3294 3303 6 3282 3276 3285 3288 6 + 3282 3276 3285 3291 6 3282 3276 3285 3294 6 + 3279 3276 3285 3288 6 3279 3276 3285 3291 6 + 3279 3276 3285 3294 6 3276 3285 3294 3297 6 + 3276 3285 3294 3300 6 3276 3285 3294 3303 6 + 3273 3267 3276 3279 62 3273 3267 3276 3282 62 + 3273 3267 3276 3285 61 3270 3267 3276 3279 62 + 3270 3267 3276 3282 62 3270 3267 3276 3285 61 + 3267 3276 3285 3288 6 3267 3276 3285 3291 6 + 3264 3258 3252 3306 6 3264 3258 3267 3270 62 + 3264 3258 3267 3273 62 3264 3258 3267 3276 61 + 3261 3258 3252 3306 6 3261 3258 3267 3270 62 + 3261 3258 3267 3273 62 3261 3258 3267 3276 61 + 3258 3267 3276 3279 61 3258 3267 3276 3282 61 + 3255 3252 3258 3261 6 3255 3252 3258 3264 6 + 3255 3252 3258 3267 6 3255 3252 3306 3309 59 + 3255 3252 -3306 3309 60 3255 3252 3306 3312 7 + 3252 3258 3267 3270 61 3252 3258 3267 3273 61 + 3252 3306 3312 3315 1 3249 3246 3252 3255 7 + 3249 3246 3252 3258 7 3249 3246 3252 3306 7 + 3246 3252 3258 3261 6 3246 3252 3258 3264 6 + 3345 3342 3348 3351 12 3345 3342 -3348 3351 1 + 3342 3348 3354 3357 7 3330 3324 3318 3342 6 + 3330 3324 3333 3336 7 3330 3324 3333 3339 7 + 3327 3324 3318 3342 6 3327 3324 3333 3336 7 + 3327 3324 3333 3339 7 3321 3318 3324 3327 6 + 3321 3318 3324 3330 6 3321 3318 3324 3333 6 + 3321 3318 3342 3345 59 3321 3318 -3342 3345 60 + 3321 3318 3342 3348 7 3318 3342 3348 3351 1 + 3315 3312 3318 3321 7 3315 3312 3318 3324 7 + 3315 3312 3318 3342 7 3312 3318 3324 3327 6 + 3312 3318 3324 3330 6 3402 3399 3405 3408 12 + 3402 3399 -3405 3408 1 3399 3405 3411 3414 7 + 3384 3375 3369 3387 61 3381 3375 3369 3387 61 + 3378 3375 3369 3387 61 3375 3369 3387 3390 61 + 3375 3369 3387 3393 61 3375 3369 3387 3396 61 + 3372 3369 3375 3378 62 3372 3369 3375 3381 62 + 3372 3369 3375 3384 62 3372 3369 3387 3390 62 + 3372 3369 3387 3393 62 3372 3369 3387 3396 62 + 3366 3360 3354 3399 6 3366 3360 3369 3372 62 + 3366 3360 3369 3375 61 3366 3360 3369 3387 61 + 3363 3360 3354 3399 6 3363 3360 3369 3372 62 + 3363 3360 3369 3375 61 3363 3360 3369 3387 61 + 3360 3369 3375 3378 61 3360 3369 3375 3381 61 + 3360 3369 3375 3384 61 3360 3369 3387 3390 61 + 3360 3369 3387 3393 61 3360 3369 3387 3396 61 + 3357 3354 3360 3363 6 3357 3354 3360 3366 6 + 3357 3354 3360 3369 6 3357 3354 3399 3402 59 + 3357 3354 -3399 3402 60 3357 3354 3399 3405 7 + 3354 3360 3369 3372 61 3354 3399 3405 3408 1 + 3351 3348 3354 3357 7 3351 3348 3354 3360 7 + 3351 3348 3354 3399 7 3348 3354 3360 3363 6 + 3348 3354 3360 3366 6 3462 3459 3465 3468 12 + 3462 3459 -3465 3468 1 3459 3465 3471 3474 7 + 3450 3447 3453 3456 17 3444 3441 3447 3450 17 + 3444 3441 3447 3453 17 3441 3447 3453 3456 17 + 3438 3435 3441 3444 17 3438 3435 3441 3447 17 + 3435 3441 3447 3450 17 3432 3429 3426 3453 17 + 3432 3429 3435 3438 17 3432 3429 3435 3441 17 + 3429 3426 3453 3456 17 3429 3435 3441 3444 17 + 3426 3429 3435 3438 17 3426 3453 3447 3450 17 + 3423 3417 3411 3459 6 3423 3417 3426 3429 7 + 3423 3417 3426 3453 7 3420 3417 3411 3459 6 + 3420 3417 3426 3429 7 3420 3417 3426 3453 7 + 3417 3426 3429 3432 17 3417 3426 3453 3456 17 + 3414 3411 3417 3420 6 3414 3411 3417 3423 6 + 3414 3411 3417 3426 6 3414 3411 3459 3462 59 + 3414 3411 -3459 3462 60 3414 3411 3459 3465 7 + 3411 3459 3465 3468 1 3408 3405 3411 3414 7 + 3408 3405 3411 3417 7 3408 3405 3411 3459 7 + 3405 3411 3417 3420 6 3405 3411 3417 3423 6 + 3510 3507 3513 3516 12 3510 3507 -3513 3516 1 + 3507 3513 3519 3522 7 3492 3483 3477 3495 61 + 3489 3483 3477 3495 61 3486 3483 3477 3495 61 + 3483 3477 3495 3498 61 3483 3477 3495 3501 61 + 3483 3477 3495 3504 61 3480 3477 3471 3507 6 + 3480 3477 3483 3486 62 3480 3477 3483 3489 62 + 3480 3477 3483 3492 62 3480 3477 3495 3498 62 + 3480 3477 3495 3501 62 3480 3477 3495 3504 62 + 3474 3471 3477 3480 6 3474 3471 3477 3483 6 + 3474 3471 3477 3495 6 3474 3471 3507 3510 59 + 3474 3471 -3507 3510 60 3474 3471 3507 3513 7 + 3471 3477 3483 3486 61 3471 3477 3483 3489 61 + 3471 3477 3483 3492 61 3471 3477 3495 3498 61 + 3471 3477 3495 3501 61 3471 3477 3495 3504 61 + 3471 3507 3513 3516 1 3468 3465 3471 3474 7 + 3468 3465 3471 3477 7 3468 3465 3471 3507 7 + 3465 3471 3477 3480 6 3555 3552 3558 3561 12 + 3555 3552 -3558 3561 1 3552 3558 3564 3567 7 + 3540 3534 3543 3546 7 3540 3534 3543 3549 7 + 3537 3534 3543 3546 7 3537 3534 3543 3549 7 + 3531 3525 3519 3552 6 3531 3525 3534 3537 62 + 3531 3525 3534 3540 62 3531 3525 3534 3543 6 + 3528 3525 3519 3552 6 3528 3525 3534 3537 62 + 3528 3525 3534 3540 62 3528 3525 3534 3543 6 + 3522 3519 3525 3528 6 3522 3519 3525 3531 6 + 3522 3519 3525 3534 6 3522 3519 3552 3555 59 + 3522 3519 -3552 3555 60 3522 3519 3552 3558 7 + 3519 3525 3534 3537 61 3519 3525 3534 3540 61 + 3519 3552 3558 3561 1 3516 3513 3519 3522 7 + 3516 3513 3519 3525 7 3516 3513 3519 3552 7 + 3513 3519 3525 3528 6 3513 3519 3525 3531 6 + 3612 3609 3615 3618 12 3612 3609 -3615 3618 1 + 3609 3615 3621 3624 7 3609 3615 3621 3627 7 + 3594 3585 3579 3597 61 3591 3585 3579 3597 61 + 3588 3585 3579 3597 61 3585 3579 3597 3600 61 + 3585 3579 3597 3603 61 3585 3579 3597 3606 61 + 3582 3579 3585 3588 62 3582 3579 3585 3591 62 + 3582 3579 3585 3594 62 3582 3579 3597 3600 62 + 3582 3579 3597 3603 62 3582 3579 3597 3606 62 + 3576 3570 3564 3609 6 3576 3570 3579 3582 62 + 3576 3570 3579 3585 61 3576 3570 3579 3597 61 + 3573 3570 3564 3609 6 3573 3570 3579 3582 62 + 3573 3570 3579 3585 61 3573 3570 3579 3597 61 + 3570 3579 3585 3588 61 3570 3579 3585 3591 61 + 3570 3579 3585 3594 61 3570 3579 3597 3600 61 + 3570 3579 3597 3603 61 3570 3579 3597 3606 61 + 3567 3564 3570 3573 6 3567 3564 3570 3576 6 + 3567 3564 3570 3579 6 3567 3564 3609 3612 59 + 3567 3564 -3609 3612 60 3567 3564 3609 3615 7 + 3564 3570 3579 3582 61 3564 3609 3615 3618 1 + 3561 3558 3564 3567 7 3561 3558 3564 3570 7 + 3561 3558 3564 3609 7 3558 3564 3570 3573 6 + 3558 3564 3570 3576 6 3633 3630 3636 3639 12 + 3633 3630 -3636 3639 1 3630 3636 3642 3645 7 + 3627 3621 3630 3633 59 3627 3621 -3630 3633 60 + 3627 3621 3630 3636 7 3624 3621 3630 3633 59 + 3624 3621 -3630 3633 60 3624 3621 3630 3636 7 + 3621 3630 3636 3639 1 3618 3615 3621 3624 7 + 3618 3615 3621 3627 7 3618 3615 3621 3630 7 + 3699 3696 3702 3705 12 3699 3696 -3702 3705 1 + 3696 3702 3708 3711 7 3681 3675 3684 3687 6 + 3681 3675 3684 3690 6 3681 3675 3684 3693 6 + 3678 3675 3684 3687 6 3678 3675 3684 3690 6 + 3678 3675 3684 3693 6 3672 3666 3675 3678 6 + 3672 3666 3675 3681 6 3672 3666 3675 3684 6 + 3669 3666 3675 3678 6 3669 3666 3675 3681 6 + 3669 3666 3675 3684 6 3666 3675 3684 3687 6 + 3666 3675 3684 3690 6 3666 3675 3684 3693 6 + 3663 3657 3666 3669 62 3663 3657 3666 3672 62 + 3663 3657 3666 3675 61 3660 3657 3666 3669 62 + 3660 3657 3666 3672 62 3660 3657 3666 3675 61 + 3657 3666 3675 3678 6 3657 3666 3675 3681 6 + 3654 3648 3642 3696 6 3654 3648 3657 3660 62 + 3654 3648 3657 3663 62 3654 3648 3657 3666 61 + 3651 3648 3642 3696 6 3651 3648 3657 3660 62 + 3651 3648 3657 3663 62 3651 3648 3657 3666 61 + 3648 3657 3666 3669 61 3648 3657 3666 3672 61 + 3645 3642 3648 3651 6 3645 3642 3648 3654 6 + 3645 3642 3648 3657 6 3645 3642 3696 3699 59 + 3645 3642 -3696 3699 60 3645 3642 3696 3702 7 + 3642 3648 3657 3660 61 3642 3648 3657 3663 61 + 3642 3696 3702 3705 1 3639 3636 3642 3645 7 + 3639 3636 3642 3648 7 3639 3636 3642 3696 7 + 3636 3642 3648 3651 6 3636 3642 3648 3654 6 + 3747 3744 3750 3753 12 3747 3744 -3750 3753 1 + 3744 3750 3756 3759 7 3729 3720 3714 3732 61 + 3726 3720 3714 3732 61 3723 3720 3714 3732 61 + 3720 3714 3732 3735 61 3720 3714 3732 3738 61 + 3720 3714 3732 3741 61 3717 3714 3708 3744 6 + 3717 3714 3720 3723 62 3717 3714 3720 3726 62 + 3717 3714 3720 3729 62 3717 3714 3732 3735 62 + 3717 3714 3732 3738 62 3717 3714 3732 3741 62 + 3711 3708 3714 3717 6 3711 3708 3714 3720 6 + 3711 3708 3714 3732 6 3711 3708 3744 3747 59 + 3711 3708 -3744 3747 60 3711 3708 3744 3750 7 + 3708 3714 3720 3723 61 3708 3714 3720 3726 61 + 3708 3714 3720 3729 61 3708 3714 3732 3735 61 + 3708 3714 3732 3738 61 3708 3714 3732 3741 61 + 3708 3744 3750 3753 1 3705 3702 3708 3711 7 + 3705 3702 3708 3714 7 3705 3702 3708 3744 7 + 3702 3708 3714 3717 6 3819 3816 3822 3825 12 + 3819 3816 -3822 3825 1 3816 3822 3828 3831 7 + 3804 3801 3807 3810 17 3804 3801 3807 3813 17 + 3798 3795 3801 3804 17 3798 3795 3801 3807 17 + 3795 3801 3807 3810 17 3792 3789 3786 3813 17 + 3792 3789 3795 3798 17 3792 3789 3795 3801 17 + 3789 3795 3801 3804 17 3786 3789 3795 3798 17 + 3786 3813 3807 3810 28 3783 3780 3786 3789 31 + 3783 3780 3786 3813 31 3780 3786 3789 3792 17 + 3777 3774 3771 3813 29 3777 3774 3780 3783 25 + 3777 3774 3780 3786 25 3771 3774 3780 3783 25 + 3771 3813 3807 3810 28 3768 3762 3756 3816 6 + 3768 3762 3771 3774 7 3768 3762 3771 3813 7 + 3765 3762 3756 3816 6 3765 3762 3771 3774 7 + 3765 3762 3771 3813 7 3762 3771 3774 3777 29 + 3759 3756 3762 3765 6 3759 3756 3762 3768 6 + 3759 3756 3762 3771 6 3759 3756 3816 3819 59 + 3759 3756 -3816 3819 60 3759 3756 3816 3822 7 + 3756 3816 3822 3825 1 3753 3750 3756 3759 7 + 3753 3750 3756 3762 7 3753 3750 3756 3816 7 + 3750 3756 3762 3765 6 3750 3756 3762 3768 6 + 3855 3852 3858 3861 12 3855 3852 -3858 3861 1 + 3852 3858 3864 3867 7 3852 3858 3864 3870 7 + 3840 3834 3828 3852 6 3840 3834 3843 3846 7 + 3840 3834 3843 3849 7 3837 3834 3828 3852 6 + 3837 3834 3843 3846 7 3837 3834 3843 3849 7 + 3831 3828 3834 3837 6 3831 3828 3834 3840 6 + 3831 3828 3834 3843 6 3831 3828 3852 3855 59 + 3831 3828 -3852 3855 60 3831 3828 3852 3858 7 + 3828 3852 3858 3861 1 3825 3822 3828 3831 7 + 3825 3822 3828 3834 7 3825 3822 3828 3852 7 + 3822 3828 3834 3837 6 3822 3828 3834 3840 6 + 3876 3873 3879 3882 12 3876 3873 -3879 3882 1 + 3873 3879 3885 3888 7 3870 3864 3873 3876 59 + 3870 3864 -3873 3876 60 3870 3864 3873 3879 7 + 3867 3864 3873 3876 59 3867 3864 -3873 3876 60 + 3867 3864 3873 3879 7 3864 3873 3879 3882 1 + 3861 3858 3864 3867 7 3861 3858 3864 3870 7 + 3861 3858 3864 3873 7 3933 3930 3936 3939 12 + 3933 3930 -3936 3939 1 3930 3936 3942 3945 7 + 3915 3906 3900 3918 61 3912 3906 3900 3918 61 + 3909 3906 3900 3918 61 3906 3900 3918 3921 61 + 3906 3900 3918 3924 61 3906 3900 3918 3927 61 + 3903 3900 3906 3909 62 3903 3900 3906 3912 62 + 3903 3900 3906 3915 62 3903 3900 3918 3921 62 + 3903 3900 3918 3924 62 3903 3900 3918 3927 62 + 3897 3891 3885 3930 6 3897 3891 3900 3903 62 + 3897 3891 3900 3906 61 3897 3891 3900 3918 61 + 3894 3891 3885 3930 6 3894 3891 3900 3903 62 + 3894 3891 3900 3906 61 3894 3891 3900 3918 61 + 3891 3900 3906 3909 61 3891 3900 3906 3912 61 + 3891 3900 3906 3915 61 3891 3900 3918 3921 61 + 3891 3900 3918 3924 61 3891 3900 3918 3927 61 + 3888 3885 3891 3894 6 3888 3885 3891 3897 6 + 3888 3885 3891 3900 6 3888 3885 3930 3933 59 + 3888 3885 -3930 3933 60 3888 3885 3930 3936 7 + 3885 3891 3900 3903 61 3885 3930 3936 3939 1 + 3882 3879 3885 3888 7 3882 3879 3885 3891 7 + 3882 3879 3885 3930 7 3879 3885 3891 3894 6 + 3879 3885 3891 3897 6 3969 3966 3972 3975 12 + 3969 3966 -3972 3975 1 3966 3972 3978 3981 7 + 3954 3948 3942 3966 6 3954 3948 3957 3960 7 + 3954 3948 3957 3963 7 3951 3948 3942 3966 6 + 3951 3948 3957 3960 7 3951 3948 3957 3963 7 + 3945 3942 3948 3951 6 3945 3942 3948 3954 6 + 3945 3942 3948 3957 6 3945 3942 3966 3969 59 + 3945 3942 -3966 3969 60 3945 3942 3966 3972 7 + 3942 3966 3972 3975 1 3939 3936 3942 3945 7 + 3939 3936 3942 3948 7 3939 3936 3942 3966 7 + 3936 3942 3948 3951 6 3936 3942 3948 3954 6 + 3999 3996 4002 4005 12 3999 3996 -4002 4005 1 + 3996 4002 4008 4011 7 3993 3984 3978 3996 6 + 3990 3984 3978 3996 6 3987 3984 3978 3996 6 + 3981 3978 3984 3987 6 3981 3978 3984 3990 6 + 3981 3978 3984 3993 6 3981 3978 3996 3999 59 + 3981 3978 -3996 3999 60 3981 3978 3996 4002 7 + 3978 3996 4002 4005 1 3975 3972 3978 3981 7 + 3975 3972 3978 3984 7 3975 3972 3978 3996 7 + 3972 3978 3984 3987 6 3972 3978 3984 3990 6 + 3972 3978 3984 3993 6 4056 4053 4059 4062 12 + 4056 4053 -4059 4062 1 4053 4059 4065 4068 7 + 4038 4032 4041 4044 62 4038 4032 4041 4047 62 + 4038 4032 4041 4050 62 4035 4032 4041 4044 62 + 4035 4032 4041 4047 62 4035 4032 4041 4050 62 + 4029 4020 4014 4032 61 4026 4020 4014 4032 61 + 4023 4020 4014 4032 61 4020 4014 4032 4035 61 + 4020 4014 4032 4038 61 4017 4014 4008 4053 6 + 4017 4014 4020 4023 62 4017 4014 4020 4026 62 + 4017 4014 4020 4029 62 4017 4014 4032 4035 62 + 4017 4014 4032 4038 62 4017 4014 4032 4041 61 + 4014 4032 4041 4044 61 4014 4032 4041 4047 61 + 4014 4032 4041 4050 61 4011 4008 4014 4017 6 + 4011 4008 4014 4020 6 4011 4008 4014 4032 6 + 4011 4008 4053 4056 59 4011 4008 -4053 4056 60 + 4011 4008 4053 4059 7 4008 4014 4020 4023 61 + 4008 4014 4020 4026 61 4008 4014 4020 4029 61 + 4008 4014 4032 4035 61 4008 4014 4032 4038 61 + 4008 4053 4059 4062 1 4005 4002 4008 4011 7 + 4005 4002 4008 4014 7 4005 4002 4008 4053 7 + 4002 4008 4014 4017 6 4104 4101 4107 4110 12 + 4104 4101 -4107 4110 1 4101 4107 4113 4116 7 + 4086 4077 4071 4089 61 4083 4077 4071 4089 61 + 4080 4077 4071 4089 61 4077 4071 4089 4092 61 + 4077 4071 4089 4095 61 4077 4071 4089 4098 61 + 4074 4071 4065 4101 6 4074 4071 4077 4080 62 + 4074 4071 4077 4083 62 4074 4071 4077 4086 62 + 4074 4071 4089 4092 62 4074 4071 4089 4095 62 + 4074 4071 4089 4098 62 4068 4065 4071 4074 6 + 4068 4065 4071 4077 6 4068 4065 4071 4089 6 + 4068 4065 4101 4104 59 4068 4065 -4101 4104 60 + 4068 4065 4101 4107 7 4065 4071 4077 4080 61 + 4065 4071 4077 4083 61 4065 4071 4077 4086 61 + 4065 4071 4089 4092 61 4065 4071 4089 4095 61 + 4065 4071 4089 4098 61 4065 4101 4107 4110 1 + 4062 4059 4065 4068 7 4062 4059 4065 4071 7 + 4062 4059 4065 4101 7 4059 4065 4071 4074 6 + 4155 4152 4158 4161 12 4155 4152 -4158 4161 1 + 4152 4158 4164 4167 7 4143 4140 4146 4149 25 + 4137 4134 4140 4143 23 4137 4134 4140 4146 23 + 4134 4140 4146 4149 25 4131 4128 4146 4149 22 + 4131 4134 4140 4143 23 4128 4131 4134 4137 24 + 4128 4146 4140 4143 25 4125 4119 4113 4152 6 + 4125 4119 4128 4131 7 4125 4119 4128 4146 7 + 4122 4119 4113 4152 6 4122 4119 4128 4131 7 + 4122 4119 4128 4146 7 4119 4128 4146 4149 22 + 4116 4113 4119 4122 6 4116 4113 4119 4125 6 + 4116 4113 4119 4128 6 4116 4113 4152 4155 59 + 4116 4113 -4152 4155 60 4116 4113 4152 4158 7 + 4113 4152 4158 4161 1 4110 4107 4113 4116 7 + 4110 4107 4113 4119 7 4110 4107 4113 4152 7 + 4107 4113 4119 4122 6 4107 4113 4119 4125 6 + 4188 4185 4191 4194 12 4188 4185 -4191 4194 1 + 4185 4191 4197 4200 7 4176 4170 4164 4185 6 + 4176 4170 4179 4182 64 4173 4170 4164 4185 6 + 4173 4170 4179 4182 64 4167 4164 4170 4173 6 + 4167 4164 4170 4176 6 4167 4164 4170 4179 63 + 4167 4164 -4170 4179 26 4167 4164 4185 4188 59 + 4167 4164 -4185 4188 60 4167 4164 4185 4191 7 + 4164 4170 4179 4182 63 4164 4170 -4179 4182 61 + 4164 4185 4191 4194 1 4161 4158 4164 4167 7 + 4161 4158 4164 4170 7 4161 4158 4164 4185 7 + 4158 4164 4170 4173 6 4158 4164 4170 4176 6 + 4245 4242 4248 4251 12 4245 4242 -4248 4251 1 + 4242 4248 4254 4257 7 4227 4221 4230 4233 62 + 4227 4221 4230 4236 62 4227 4221 4230 4239 62 + 4224 4221 4230 4233 62 4224 4221 4230 4236 62 + 4224 4221 4230 4239 62 4218 4209 4203 4221 61 + 4215 4209 4203 4221 61 4212 4209 4203 4221 61 + 4209 4203 4221 4224 61 4209 4203 4221 4227 61 + 4206 4203 4197 4242 6 4206 4203 4209 4212 62 + 4206 4203 4209 4215 62 4206 4203 4209 4218 62 + 4206 4203 4221 4224 62 4206 4203 4221 4227 62 + 4206 4203 4221 4230 61 4203 4221 4230 4233 61 + 4203 4221 4230 4236 61 4203 4221 4230 4239 61 + 4200 4197 4203 4206 6 4200 4197 4203 4209 6 + 4200 4197 4203 4221 6 4200 4197 4242 4245 59 + 4200 4197 -4242 4245 60 4200 4197 4242 4248 7 + 4197 4203 4209 4212 61 4197 4203 4209 4215 61 + 4197 4203 4209 4218 61 4197 4203 4221 4224 61 + 4197 4203 4221 4227 61 4197 4242 4248 4251 1 + 4194 4191 4197 4200 7 4194 4191 4197 4203 7 + 4194 4191 4197 4242 7 4191 4197 4203 4206 6 + 4275 4272 4278 4281 12 4275 4272 -4278 4281 1 + 4272 4278 4284 4287 7 4269 4260 4254 4272 6 + 4266 4260 4254 4272 6 4263 4260 4254 4272 6 + 4257 4254 4260 4263 6 4257 4254 4260 4266 6 + 4257 4254 4260 4269 6 4257 4254 4272 4275 59 + 4257 4254 -4272 4275 60 4257 4254 4272 4278 7 + 4254 4272 4278 4281 1 4251 4248 4254 4257 7 + 4251 4248 4254 4260 7 4251 4248 4254 4272 7 + 4248 4254 4260 4263 6 4248 4254 4260 4266 6 + 4248 4254 4260 4269 6 4335 4332 4338 4341 12 + 4335 4332 -4338 4341 1 4332 4338 4344 4347 7 + 4323 4320 4326 4329 17 4317 4314 4320 4323 17 + 4317 4314 4320 4326 17 4314 4320 4326 4329 17 + 4311 4308 4314 4317 17 4311 4308 4314 4320 17 + 4308 4314 4320 4323 17 4305 4302 4299 4326 17 + 4305 4302 4308 4311 17 4305 4302 4308 4314 17 + 4302 4299 4326 4329 17 4302 4308 4314 4317 17 + 4299 4302 4308 4311 17 4299 4326 4320 4323 17 + 4296 4290 4284 4332 6 4296 4290 4299 4302 7 + 4296 4290 4299 4326 7 4293 4290 4284 4332 6 + 4293 4290 4299 4302 7 4293 4290 4299 4326 7 + 4290 4299 4302 4305 17 4290 4299 4326 4329 17 + 4287 4284 4290 4293 6 4287 4284 4290 4296 6 + 4287 4284 4290 4299 6 4287 4284 4332 4335 59 + 4287 4284 -4332 4335 60 4287 4284 4332 4338 7 + 4284 4332 4338 4341 1 4281 4278 4284 4287 7 + 4281 4278 4284 4290 7 4281 4278 4284 4332 7 + 4278 4284 4290 4293 6 4278 4284 4290 4296 6 + 4362 4368 4371 4374 7 4362 4368 4371 4377 7 + 4362 4368 4398 4401 7 4359 4350 4344 4362 6 + 4356 4350 4344 4362 6 4353 4350 4344 4362 6 + 4347 4344 4350 4353 6 4347 4344 4350 4356 6 + 4347 4344 4350 4359 6 4347 4344 4362 4365 59 + 4347 4344 -4362 4365 60 4347 4344 4362 4368 7 + 4341 4338 4344 4347 7 4341 4338 4344 4350 7 + 4341 4338 4344 4362 7 4338 4344 4350 4353 6 + 4338 4344 4350 4356 6 4338 4344 4350 4359 6 + 4407 4404 4410 4413 12 4407 4404 -4410 4413 1 + 4404 4410 4416 4419 7 4401 4398 4404 4407 59 + 4401 4398 -4404 4407 60 4401 4398 4404 4410 7 + 4398 4404 4410 4413 1 4395 4389 4398 4401 6 + 4395 4389 4398 4404 6 4392 4389 4398 4401 6 + 4392 4389 4398 4404 6 4386 4380 4389 4392 62 + 4386 4380 4389 4395 62 4386 4380 4389 4398 61 + 4383 4380 4389 4392 62 4383 4380 4389 4395 62 + 4383 4380 4389 4398 61 4380 4389 4398 4401 6 + 4377 4371 4368 4398 7 4377 4371 4380 4383 6 + 4377 4371 4380 4386 6 4377 4371 4380 4389 6 + 4374 4371 4368 4398 7 4374 4371 4380 4383 6 + 4374 4371 4380 4386 6 4374 4371 4380 4389 6 + 4371 4368 4398 4401 7 4371 4380 4389 4392 61 + 4371 4380 4389 4395 61 4368 4371 4380 4383 6 + 4368 4371 4380 4386 6 4368 4398 4389 4392 6 + 4368 4398 4389 4395 6 4479 4476 4482 4485 12 + 4479 4476 -4482 4485 1 4476 4482 4488 4491 7 + 4464 4458 4455 4467 21 4461 4458 4455 4467 21 + 4458 4455 4467 4470 21 4458 4455 4467 4473 21 + 4452 4449 4455 4458 21 4452 4449 4455 4467 21 + 4449 4455 4458 4461 21 4449 4455 4458 4464 21 + 4449 4455 4467 4470 21 4449 4455 4467 4473 21 + 4446 4440 4449 4452 26 4446 4440 4449 4455 26 + 4443 4440 4449 4452 26 4443 4440 4449 4455 26 + 4437 4431 4440 4443 6 4437 4431 4440 4446 6 + 4437 4431 4440 4449 6 4434 4431 4440 4443 6 + 4434 4431 4440 4446 6 4434 4431 4440 4449 6 + 4431 4440 4449 4452 26 4428 4422 4416 4476 6 + 4428 4422 4431 4434 62 4428 4422 4431 4437 62 + 4428 4422 4431 4440 61 4425 4422 4416 4476 6 + 4425 4422 4431 4434 62 4425 4422 4431 4437 62 + 4425 4422 4431 4440 61 4422 4431 4440 4443 6 + 4422 4431 4440 4446 6 4419 4416 4422 4425 6 + 4419 4416 4422 4428 6 4419 4416 4422 4431 6 + 4419 4416 4476 4479 59 4419 4416 -4476 4479 60 + 4419 4416 4476 4482 7 4416 4422 4431 4434 61 + 4416 4422 4431 4437 61 4416 4476 4482 4485 1 + 4413 4410 4416 4419 7 4413 4410 4416 4422 7 + 4413 4410 4416 4476 7 4410 4416 4422 4425 6 + 4410 4416 4422 4428 6 4515 4512 4518 4521 12 + 4515 4512 -4518 4521 1 4512 4518 4524 4527 7 + 4500 4494 4488 4512 6 4500 4494 4503 4506 7 + 4500 4494 4503 4509 7 4497 4494 4488 4512 6 + 4497 4494 4503 4506 7 4497 4494 4503 4509 7 + 4491 4488 4494 4497 6 4491 4488 4494 4500 6 + 4491 4488 4494 4503 6 4491 4488 4512 4515 59 + 4491 4488 -4512 4515 60 4491 4488 4512 4518 7 + 4488 4512 4518 4521 1 4485 4482 4488 4491 7 + 4485 4482 4488 4494 7 4485 4482 4488 4512 7 + 4482 4488 4494 4497 6 4482 4488 4494 4500 6 + 4566 4563 4569 4572 12 4566 4563 -4569 4572 1 + 4563 4569 4575 4578 7 4551 4548 4554 4557 12 + 4551 4548 -4554 4557 1 4551 4548 4554 4560 12 + 4551 4548 -4554 4560 1 4545 4539 4548 4551 59 + 4545 4539 -4548 4551 7 4545 4539 -4548 4551 60 + 4545 4539 4548 4554 7 4542 4539 4548 4551 59 + 4542 4539 -4548 4551 7 4542 4539 -4548 4551 60 + 4542 4539 4548 4554 7 4539 4548 4554 4557 1 + 4539 4548 4554 4560 1 4536 4530 4524 4563 6 + 4536 4530 4539 4542 62 4536 4530 4539 4545 62 + 4536 4530 4539 4548 6 4533 4530 4524 4563 6 + 4533 4530 4539 4542 62 4533 4530 4539 4545 62 + 4533 4530 4539 4548 6 4527 4524 4530 4533 6 + 4527 4524 4530 4536 6 4527 4524 4530 4539 6 + 4527 4524 4563 4566 59 4527 4524 -4563 4566 60 + 4527 4524 4563 4569 7 4524 4530 4539 4542 61 + 4524 4530 4539 4545 61 4524 4563 4569 4572 1 + 4521 4518 4524 4527 7 4521 4518 4524 4530 7 + 4521 4518 4524 4563 7 4518 4524 4530 4533 6 + 4518 4524 4530 4536 6 4623 4620 4626 4629 12 + 4623 4620 -4626 4629 1 4620 4626 4632 4635 7 + 4605 4596 4590 4608 61 4602 4596 4590 4608 61 + 4599 4596 4590 4608 61 4596 4590 4608 4611 61 + 4596 4590 4608 4614 61 4596 4590 4608 4617 61 + 4593 4590 4596 4599 62 4593 4590 4596 4602 62 + 4593 4590 4596 4605 62 4593 4590 4608 4611 62 + 4593 4590 4608 4614 62 4593 4590 4608 4617 62 + 4587 4581 4575 4620 6 4587 4581 4590 4593 62 + 4587 4581 4590 4596 61 4587 4581 4590 4608 61 + 4584 4581 4575 4620 6 4584 4581 4590 4593 62 + 4584 4581 4590 4596 61 4584 4581 4590 4608 61 + 4581 4590 4596 4599 61 4581 4590 4596 4602 61 + 4581 4590 4596 4605 61 4581 4590 4608 4611 61 + 4581 4590 4608 4614 61 4581 4590 4608 4617 61 + 4578 4575 4581 4584 6 4578 4575 4581 4587 6 + 4578 4575 4581 4590 6 4578 4575 4620 4623 59 + 4578 4575 -4620 4623 60 4578 4575 4620 4626 7 + 4575 4581 4590 4593 61 4575 4620 4626 4629 1 + 4572 4569 4575 4578 7 4572 4569 4575 4581 7 + 4572 4569 4575 4620 7 4569 4575 4581 4584 6 + 4569 4575 4581 4587 6 4668 4665 4671 4674 12 + 4668 4665 -4671 4674 1 4665 4671 4677 4680 7 + 4665 4671 4677 4683 7 4653 4647 4656 4659 7 + 4653 4647 4656 4662 7 4650 4647 4656 4659 7 + 4650 4647 4656 4662 7 4644 4638 4632 4665 6 + 4644 4638 4647 4650 62 4644 4638 4647 4653 62 + 4644 4638 4647 4656 6 4641 4638 4632 4665 6 + 4641 4638 4647 4650 62 4641 4638 4647 4653 62 + 4641 4638 4647 4656 6 4635 4632 4638 4641 6 + 4635 4632 4638 4644 6 4635 4632 4638 4647 6 + 4635 4632 4665 4668 59 4635 4632 -4665 4668 60 + 4635 4632 4665 4671 7 4632 4638 4647 4650 61 + 4632 4638 4647 4653 61 4632 4665 4671 4674 1 + 4629 4626 4632 4635 7 4629 4626 4632 4638 7 + 4629 4626 4632 4665 7 4626 4632 4638 4641 6 + 4626 4632 4638 4644 6 4689 4686 4692 4695 12 + 4689 4686 -4692 4695 1 4686 4692 4698 4701 7 + 4683 4677 4686 4689 59 4683 4677 -4686 4689 60 + 4683 4677 4686 4692 7 4680 4677 4686 4689 59 + 4680 4677 -4686 4689 60 4680 4677 4686 4692 7 + 4677 4686 4692 4695 1 4674 4671 4677 4680 7 + 4674 4671 4677 4683 7 4674 4671 4677 4686 7 + 4731 4728 4734 4737 12 4731 4728 -4734 4737 1 + 4728 4734 4740 4743 7 4716 4713 4719 4722 12 + 4716 4713 -4719 4722 1 4716 4713 4719 4725 12 + 4716 4713 -4719 4725 1 4710 4704 4698 4728 6 + 4710 4704 4713 4716 59 4710 4704 -4713 4716 7 + 4710 4704 -4713 4716 60 4710 4704 4713 4719 7 + 4707 4704 4698 4728 6 4707 4704 4713 4716 59 + 4707 4704 -4713 4716 7 4707 4704 -4713 4716 60 + 4707 4704 4713 4719 7 4704 4713 4719 4722 1 + 4704 4713 4719 4725 1 4701 4698 4704 4707 6 + 4701 4698 4704 4710 6 4701 4698 4704 4713 6 + 4701 4698 4728 4731 59 4701 4698 -4728 4731 60 + 4701 4698 4728 4734 7 4698 4728 4734 4737 1 + 4695 4692 4698 4701 7 4695 4692 4698 4704 7 + 4695 4692 4698 4728 7 4692 4698 4704 4707 6 + 4692 4698 4704 4710 6 4791 4788 4794 4797 12 + 4791 4788 -4794 4797 1 4788 4794 4800 4803 7 + 4779 4776 4782 4785 17 4773 4770 4776 4779 17 + 4773 4770 4776 4782 17 4770 4776 4782 4785 17 + 4767 4764 4770 4773 17 4767 4764 4770 4776 17 + 4764 4770 4776 4779 17 4761 4758 4755 4782 17 + 4761 4758 4764 4767 17 4761 4758 4764 4770 17 + 4758 4755 4782 4785 17 4758 4764 4770 4773 17 + 4755 4758 4764 4767 17 4755 4782 4776 4779 17 + 4752 4746 4740 4788 6 4752 4746 4755 4758 7 + 4752 4746 4755 4782 7 4749 4746 4740 4788 6 + 4749 4746 4755 4758 7 4749 4746 4755 4782 7 + 4746 4755 4758 4761 17 4746 4755 4782 4785 17 + 4743 4740 4746 4749 6 4743 4740 4746 4752 6 + 4743 4740 4746 4755 6 4743 4740 4788 4791 59 + 4743 4740 -4788 4791 60 4743 4740 4788 4794 7 + 4740 4788 4794 4797 1 4737 4734 4740 4743 7 + 4737 4734 4740 4746 7 4737 4734 4740 4788 7 + 4734 4740 4746 4749 6 4734 4740 4746 4752 6 + 4848 4845 4851 4854 12 4848 4845 -4851 4854 1 + 4845 4851 4857 4860 7 4830 4824 4833 4836 62 + 4830 4824 4833 4839 62 4830 4824 4833 4842 62 + 4827 4824 4833 4836 62 4827 4824 4833 4839 62 + 4827 4824 4833 4842 62 4821 4812 4806 4824 61 + 4818 4812 4806 4824 61 4815 4812 4806 4824 61 + 4812 4806 4824 4827 61 4812 4806 4824 4830 61 + 4809 4806 4800 4845 6 4809 4806 4812 4815 62 + 4809 4806 4812 4818 62 4809 4806 4812 4821 62 + 4809 4806 4824 4827 62 4809 4806 4824 4830 62 + 4809 4806 4824 4833 61 4806 4824 4833 4836 61 + 4806 4824 4833 4839 61 4806 4824 4833 4842 61 + 4803 4800 4806 4809 6 4803 4800 4806 4812 6 + 4803 4800 4806 4824 6 4803 4800 4845 4848 59 + 4803 4800 -4845 4848 60 4803 4800 4845 4851 7 + 4800 4806 4812 4815 61 4800 4806 4812 4818 61 + 4800 4806 4812 4821 61 4800 4806 4824 4827 61 + 4800 4806 4824 4830 61 4800 4845 4851 4854 1 + 4797 4794 4800 4803 7 4797 4794 4800 4806 7 + 4797 4794 4800 4845 7 4794 4800 4806 4809 6 + 4884 4881 4887 4890 12 4884 4881 -4887 4890 1 + 4881 4887 4893 4896 7 4869 4863 4857 4881 6 + 4869 4863 4872 4875 7 4869 4863 4872 4878 7 + 4866 4863 4857 4881 6 4866 4863 4872 4875 7 + 4866 4863 4872 4878 7 4860 4857 4863 4866 6 + 4860 4857 4863 4869 6 4860 4857 4863 4872 6 + 4860 4857 4881 4884 59 4860 4857 -4881 4884 60 + 4860 4857 4881 4887 7 4857 4881 4887 4890 1 + 4854 4851 4857 4860 7 4854 4851 4857 4863 7 + 4854 4851 4857 4881 7 4851 4857 4863 4866 6 + 4851 4857 4863 4869 6 4917 4914 4920 4923 12 + 4917 4914 -4920 4923 1 4914 4920 4926 4929 7 + 4905 4899 4893 4914 6 4905 4899 4908 4911 46 + 4902 4899 4893 4914 6 4902 4899 4908 4911 46 + 4896 4893 4899 4902 6 4896 4893 4899 4905 6 + 4896 4893 4899 4908 6 4896 4893 4914 4917 59 + 4896 4893 -4914 4917 60 4896 4893 4914 4920 7 + 4893 4899 4908 4911 46 4893 4914 4920 4923 1 + 4890 4887 4893 4896 7 4890 4887 4893 4899 7 + 4890 4887 4893 4914 7 4887 4893 4899 4902 6 + 4887 4893 4899 4905 6 4965 4962 4968 4971 12 + 4965 4962 -4968 4971 1 4962 4968 4974 4977 7 + 4947 4938 4932 4950 61 4944 4938 4932 4950 61 + 4941 4938 4932 4950 61 4938 4932 4950 4953 61 + 4938 4932 4950 4956 61 4938 4932 4950 4959 61 + 4935 4932 4926 4962 6 4935 4932 4938 4941 62 + 4935 4932 4938 4944 62 4935 4932 4938 4947 62 + 4935 4932 4950 4953 62 4935 4932 4950 4956 62 + 4935 4932 4950 4959 62 4929 4926 4932 4935 6 + 4929 4926 4932 4938 6 4929 4926 4932 4950 6 + 4929 4926 4962 4965 59 4929 4926 -4962 4965 60 + 4929 4926 4962 4968 7 4926 4932 4938 4941 61 + 4926 4932 4938 4944 61 4926 4932 4938 4947 61 + 4926 4932 4950 4953 61 4926 4932 4950 4956 61 + 4926 4932 4950 4959 61 4926 4962 4968 4971 1 + 4923 4920 4926 4929 7 4923 4920 4926 4932 7 + 4923 4920 4926 4962 7 4920 4926 4932 4935 6 + 5007 5004 5010 5013 12 5007 5004 -5010 5013 1 + 5004 5010 5016 5019 7 4995 4986 4980 4998 63 + 4995 4986 -4980 4998 26 4992 4986 4980 4998 63 + 4992 4986 -4980 4998 26 4989 4986 4980 4998 63 + 4989 4986 -4980 4998 26 4986 4980 4998 5001 63 + 4986 4980 -4998 5001 61 4983 4980 4974 5004 6 + 4983 4980 4986 4989 6 4983 4980 4986 4992 6 + 4983 4980 4986 4995 6 4983 4980 4998 5001 64 + 4977 4974 4980 4983 6 4977 4974 4980 4986 6 + 4977 4974 4980 4998 63 4977 4974 -4980 4998 26 + 4977 4974 5004 5007 59 4977 4974 -5004 5007 60 + 4977 4974 5004 5010 7 4974 4980 4986 4989 61 + 4974 4980 4986 4992 61 4974 4980 4986 4995 61 + 4974 4980 4998 5001 63 4974 4980 -4998 5001 61 + 4974 5004 5010 5013 1 4971 4968 4974 4977 7 + 4971 4968 4974 4980 7 4971 4968 4974 5004 7 + 4968 4974 4980 4983 6 5079 5076 5082 5085 12 + 5079 5076 -5082 5085 1 5076 5082 5088 5091 7 + 5064 5058 5055 5067 21 5061 5058 5055 5067 21 + 5058 5055 5067 5070 21 5058 5055 5067 5073 21 + 5052 5049 5055 5058 21 5052 5049 5055 5067 21 + 5049 5055 5058 5061 21 5049 5055 5058 5064 21 + 5049 5055 5067 5070 21 5049 5055 5067 5073 21 + 5046 5040 5049 5052 26 5046 5040 5049 5055 26 + 5043 5040 5049 5052 26 5043 5040 5049 5055 26 + 5037 5031 5040 5043 6 5037 5031 5040 5046 6 + 5037 5031 5040 5049 6 5034 5031 5040 5043 6 + 5034 5031 5040 5046 6 5034 5031 5040 5049 6 + 5031 5040 5049 5052 26 5028 5022 5016 5076 6 + 5028 5022 5031 5034 62 5028 5022 5031 5037 62 + 5028 5022 5031 5040 61 5025 5022 5016 5076 6 + 5025 5022 5031 5034 62 5025 5022 5031 5037 62 + 5025 5022 5031 5040 61 5022 5031 5040 5043 6 + 5022 5031 5040 5046 6 5019 5016 5022 5025 6 + 5019 5016 5022 5028 6 5019 5016 5022 5031 6 + 5019 5016 5076 5079 59 5019 5016 -5076 5079 60 + 5019 5016 5076 5082 7 5016 5022 5031 5034 61 + 5016 5022 5031 5037 61 5016 5076 5082 5085 1 + 5013 5010 5016 5019 7 5013 5010 5016 5022 7 + 5013 5010 5016 5076 7 5010 5016 5022 5025 6 + 5010 5016 5022 5028 6 5124 5121 5127 5130 12 + 5124 5121 -5127 5130 1 5121 5127 5133 5136 7 + 5121 5127 5133 5139 7 5109 5103 5112 5115 7 + 5109 5103 5112 5118 7 5106 5103 5112 5115 7 + 5106 5103 5112 5118 7 5100 5094 5088 5121 6 + 5100 5094 5103 5106 62 5100 5094 5103 5109 62 + 5100 5094 5103 5112 6 5097 5094 5088 5121 6 + 5097 5094 5103 5106 62 5097 5094 5103 5109 62 + 5097 5094 5103 5112 6 5091 5088 5094 5097 6 + 5091 5088 5094 5100 6 5091 5088 5094 5103 6 + 5091 5088 5121 5124 59 5091 5088 -5121 5124 60 + 5091 5088 5121 5127 7 5088 5094 5103 5106 61 + 5088 5094 5103 5109 61 5088 5121 5127 5130 1 + 5085 5082 5088 5091 7 5085 5082 5088 5094 7 + 5085 5082 5088 5121 7 5082 5088 5094 5097 6 + 5082 5088 5094 5100 6 5145 5142 5148 5151 12 + 5145 5142 -5148 5151 1 5142 5148 5154 5157 7 + 5139 5133 5142 5145 59 5139 5133 -5142 5145 60 + 5139 5133 5142 5148 7 5136 5133 5142 5145 59 + 5136 5133 -5142 5145 60 5136 5133 5142 5148 7 + 5133 5142 5148 5151 1 5130 5127 5133 5136 7 + 5130 5127 5133 5139 7 5130 5127 5133 5142 7 + 5205 5202 5208 5211 12 5205 5202 -5208 5211 1 + 5202 5208 5214 5217 7 5193 5190 5196 5199 17 + 5187 5184 5190 5193 17 5187 5184 5190 5196 17 + 5184 5190 5196 5199 17 5181 5178 5184 5187 17 + 5181 5178 5184 5190 17 5178 5184 5190 5193 17 + 5175 5172 5169 5196 17 5175 5172 5178 5181 17 + 5175 5172 5178 5184 17 5172 5169 5196 5199 17 + 5172 5178 5184 5187 17 5169 5172 5178 5181 17 + 5169 5196 5190 5193 17 5166 5160 5154 5202 6 + 5166 5160 5169 5172 7 5166 5160 5169 5196 7 + 5163 5160 5154 5202 6 5163 5160 5169 5172 7 + 5163 5160 5169 5196 7 5160 5169 5172 5175 17 + 5160 5169 5196 5199 17 5157 5154 5160 5163 6 + 5157 5154 5160 5166 6 5157 5154 5160 5169 6 + 5157 5154 5202 5205 59 5157 5154 -5202 5205 60 + 5157 5154 5202 5208 7 5154 5202 5208 5211 1 + 5151 5148 5154 5157 7 5151 5148 5154 5160 7 + 5151 5148 5154 5202 7 5148 5154 5160 5163 6 + 5148 5154 5160 5166 6 5238 5235 5241 5244 12 + 5238 5235 -5241 5244 1 5235 5241 5247 5250 7 + 5226 5220 5214 5235 6 5226 5220 5229 5232 64 + 5223 5220 5214 5235 6 5223 5220 5229 5232 64 + 5217 5214 5220 5223 6 5217 5214 5220 5226 6 + 5217 5214 5220 5229 63 5217 5214 -5220 5229 26 + 5217 5214 5235 5238 59 5217 5214 -5235 5238 60 + 5217 5214 5235 5241 7 5214 5220 5229 5232 63 + 5214 5220 -5229 5232 61 5214 5235 5241 5244 1 + 5211 5208 5214 5217 7 5211 5208 5214 5220 7 + 5211 5208 5214 5235 7 5208 5214 5220 5223 6 + 5208 5214 5220 5226 6 5295 5292 5298 5301 12 + 5295 5292 -5298 5301 1 5292 5298 5304 5307 7 + 5277 5271 5280 5283 62 5277 5271 5280 5286 62 + 5277 5271 5280 5289 62 5274 5271 5280 5283 62 + 5274 5271 5280 5286 62 5274 5271 5280 5289 62 + 5268 5259 5253 5271 61 5265 5259 5253 5271 61 + 5262 5259 5253 5271 61 5259 5253 5271 5274 61 + 5259 5253 5271 5277 61 5256 5253 5247 5292 6 + 5256 5253 5259 5262 62 5256 5253 5259 5265 62 + 5256 5253 5259 5268 62 5256 5253 5271 5274 62 + 5256 5253 5271 5277 62 5256 5253 5271 5280 61 + 5253 5271 5280 5283 61 5253 5271 5280 5286 61 + 5253 5271 5280 5289 61 5250 5247 5253 5256 6 + 5250 5247 5253 5259 6 5250 5247 5253 5271 6 + 5250 5247 5292 5295 59 5250 5247 -5292 5295 60 + 5250 5247 5292 5298 7 5247 5253 5259 5262 61 + 5247 5253 5259 5265 61 5247 5253 5259 5268 61 + 5247 5253 5271 5274 61 5247 5253 5271 5277 61 + 5247 5292 5298 5301 1 5244 5241 5247 5250 7 + 5244 5241 5247 5253 7 5244 5241 5247 5292 7 + 5241 5247 5253 5256 6 5325 5322 5328 5331 12 + 5325 5322 -5328 5331 1 5322 5328 5334 5337 7 + 5319 5310 5304 5322 6 5316 5310 5304 5322 6 + 5313 5310 5304 5322 6 5307 5304 5310 5313 6 + 5307 5304 5310 5316 6 5307 5304 5310 5319 6 + 5307 5304 5322 5325 59 5307 5304 -5322 5325 60 + 5307 5304 5322 5328 7 5304 5322 5328 5331 1 + 5301 5298 5304 5307 7 5301 5298 5304 5310 7 + 5301 5298 5304 5322 7 5298 5304 5310 5313 6 + 5298 5304 5310 5316 6 5298 5304 5310 5319 6 + 5376 5373 5379 5382 12 5376 5373 -5379 5382 1 + 5373 5379 5385 5388 7 5364 5361 5367 5370 25 + 5358 5355 5361 5364 23 5358 5355 5361 5367 23 + 5355 5361 5367 5370 25 5352 5349 5367 5370 22 + 5352 5355 5361 5364 23 5349 5352 5355 5358 24 + 5349 5367 5361 5364 25 5346 5340 5334 5373 6 + 5346 5340 5349 5352 7 5346 5340 5349 5367 7 + 5343 5340 5334 5373 6 5343 5340 5349 5352 7 + 5343 5340 5349 5367 7 5340 5349 5367 5370 22 + 5337 5334 5340 5343 6 5337 5334 5340 5346 6 + 5337 5334 5340 5349 6 5337 5334 5373 5376 59 + 5337 5334 -5373 5376 60 5337 5334 5373 5379 7 + 5334 5373 5379 5382 1 5331 5328 5334 5337 7 + 5331 5328 5334 5340 7 5331 5328 5334 5373 7 + 5328 5334 5340 5343 6 5328 5334 5340 5346 6 + 5412 5409 5415 5418 12 5412 5409 -5415 5418 1 + 5409 5415 5421 5424 7 5397 5391 5385 5409 6 + 5397 5391 5400 5403 7 5397 5391 5400 5406 7 + 5394 5391 5385 5409 6 5394 5391 5400 5403 7 + 5394 5391 5400 5406 7 5388 5385 5391 5394 6 + 5388 5385 5391 5397 6 5388 5385 5391 5400 6 + 5388 5385 5409 5412 59 5388 5385 -5409 5412 60 + 5388 5385 5409 5415 7 5385 5409 5415 5418 1 + 5382 5379 5385 5388 7 5382 5379 5385 5391 7 + 5382 5379 5385 5409 7 5379 5385 5391 5394 6 + 5379 5385 5391 5397 6 5469 5466 5472 5475 12 + 5469 5466 -5472 5475 1 5466 5472 5478 5481 7 + 5451 5445 5454 5457 62 5451 5445 5454 5460 62 + 5451 5445 5454 5463 62 5448 5445 5454 5457 62 + 5448 5445 5454 5460 62 5448 5445 5454 5463 62 + 5442 5433 5427 5445 61 5439 5433 5427 5445 61 + 5436 5433 5427 5445 61 5433 5427 5445 5448 61 + 5433 5427 5445 5451 61 5430 5427 5421 5466 6 + 5430 5427 5433 5436 62 5430 5427 5433 5439 62 + 5430 5427 5433 5442 62 5430 5427 5445 5448 62 + 5430 5427 5445 5451 62 5430 5427 5445 5454 61 + 5427 5445 5454 5457 61 5427 5445 5454 5460 61 + 5427 5445 5454 5463 61 5424 5421 5427 5430 6 + 5424 5421 5427 5433 6 5424 5421 5427 5445 6 + 5424 5421 5466 5469 59 5424 5421 -5466 5469 60 + 5424 5421 5466 5472 7 5421 5427 5433 5436 61 + 5421 5427 5433 5439 61 5421 5427 5433 5442 61 + 5421 5427 5445 5448 61 5421 5427 5445 5451 61 + 5421 5466 5472 5475 1 5418 5415 5421 5424 7 + 5418 5415 5421 5427 7 5418 5415 5421 5466 7 + 5415 5421 5427 5430 6 5502 5499 5505 5508 12 + 5502 5499 -5505 5508 1 5499 5505 5511 5514 7 + 5490 5484 5478 5499 6 5490 5484 5493 5496 64 + 5487 5484 5478 5499 6 5487 5484 5493 5496 64 + 5481 5478 5484 5487 6 5481 5478 5484 5490 6 + 5481 5478 5484 5493 63 5481 5478 -5484 5493 26 + 5481 5478 5499 5502 59 5481 5478 -5499 5502 60 + 5481 5478 5499 5505 7 5478 5484 5493 5496 63 + 5478 5484 -5493 5496 61 5478 5499 5505 5508 1 + 5475 5472 5478 5481 7 5475 5472 5478 5484 7 + 5475 5472 5478 5499 7 5472 5478 5484 5487 6 + 5472 5478 5484 5490 6 5532 5529 5535 5538 12 + 5532 5529 -5535 5538 1 5529 5535 5541 5544 7 + 5526 5517 5511 5529 6 5523 5517 5511 5529 6 + 5520 5517 5511 5529 6 5514 5511 5517 5520 6 + 5514 5511 5517 5523 6 5514 5511 5517 5526 6 + 5514 5511 5529 5532 59 5514 5511 -5529 5532 60 + 5514 5511 5529 5535 7 5511 5529 5535 5538 1 + 5508 5505 5511 5514 7 5508 5505 5511 5517 7 + 5508 5505 5511 5529 7 5505 5511 5517 5520 6 + 5505 5511 5517 5523 6 5505 5511 5517 5526 6 + 5595 5592 5598 5601 12 5595 5592 -5598 5601 1 + 5592 5598 5604 5607 7 5583 5580 5586 5589 17 + 5577 5574 5571 5580 65 5574 5571 5580 5583 17 + 5571 5580 5586 5589 17 5568 5565 5571 5574 17 + 5568 5565 5571 5580 17 5565 5571 5574 5577 65 + 5565 5571 5580 5583 17 5562 5559 5556 5586 17 + 5562 5559 5565 5568 17 5562 5559 5565 5571 17 + 5559 5556 5586 5589 17 5556 5559 5565 5568 17 + 5556 5586 5580 5583 17 5553 5547 5541 5592 6 + 5553 5547 5556 5559 7 5553 5547 5556 5586 7 + 5550 5547 5541 5592 6 5550 5547 5556 5559 7 + 5550 5547 5556 5586 7 5547 5556 5559 5562 17 + 5547 5556 5586 5589 17 5544 5541 5547 5550 6 + 5544 5541 5547 5553 6 5544 5541 5547 5556 6 + 5544 5541 5592 5595 59 5544 5541 -5592 5595 60 + 5544 5541 5592 5598 7 5541 5592 5598 5601 1 + 5538 5535 5541 5544 7 5538 5535 5541 5547 7 + 5538 5535 5541 5592 7 5535 5541 5547 5550 6 + 5535 5541 5547 5553 6 5628 5625 5631 5634 12 + 5628 5625 -5631 5634 1 5625 5631 5637 5640 7 + 5616 5610 5604 5625 6 5616 5610 5619 5622 64 + 5613 5610 5604 5625 6 5613 5610 5619 5622 64 + 5607 5604 5610 5613 6 5607 5604 5610 5616 6 + 5607 5604 5610 5619 63 5607 5604 -5610 5619 26 + 5607 5604 5625 5628 59 5607 5604 -5625 5628 60 + 5607 5604 5625 5631 7 5604 5610 5619 5622 63 + 5604 5610 -5619 5622 61 5604 5625 5631 5634 1 + 5601 5598 5604 5607 7 5601 5598 5604 5610 7 + 5601 5598 5604 5625 7 5598 5604 5610 5613 6 + 5598 5604 5610 5616 6 5688 5685 5691 5694 12 + 5688 5685 -5691 5694 1 5685 5691 5697 5700 7 + 5676 5673 5679 5682 17 5670 5667 5673 5676 17 + 5670 5667 5673 5679 17 5667 5673 5679 5682 17 + 5664 5661 5667 5670 17 5664 5661 5667 5673 17 + 5661 5667 5673 5676 17 5658 5655 5652 5679 17 + 5658 5655 5661 5664 17 5658 5655 5661 5667 17 + 5655 5652 5679 5682 17 5655 5661 5667 5670 17 + 5652 5655 5661 5664 17 5652 5679 5673 5676 17 + 5649 5643 5637 5685 6 5649 5643 5652 5655 7 + 5649 5643 5652 5679 7 5646 5643 5637 5685 6 + 5646 5643 5652 5655 7 5646 5643 5652 5679 7 + 5643 5652 5655 5658 17 5643 5652 5679 5682 17 + 5640 5637 5643 5646 6 5640 5637 5643 5649 6 + 5640 5637 5643 5652 6 5640 5637 5685 5688 59 + 5640 5637 -5685 5688 60 5640 5637 5685 5691 7 + 5637 5685 5691 5694 1 5634 5631 5637 5640 7 + 5634 5631 5637 5643 7 5634 5631 5637 5685 7 + 5631 5637 5643 5646 6 5631 5637 5643 5649 6 + 5718 5715 5721 5724 12 5718 5715 -5721 5724 1 + 5715 5721 5727 5730 7 5712 5703 5697 5715 6 + 5709 5703 5697 5715 6 5706 5703 5697 5715 6 + 5700 5697 5703 5706 6 5700 5697 5703 5709 6 + 5700 5697 5703 5712 6 5700 5697 5715 5718 59 + 5700 5697 -5715 5718 60 5700 5697 5715 5721 7 + 5697 5715 5721 5724 1 5694 5691 5697 5700 7 + 5694 5691 5697 5703 7 5694 5691 5697 5715 7 + 5691 5697 5703 5706 6 5691 5697 5703 5709 6 + 5691 5697 5703 5712 6 5748 5745 5751 5754 12 + 5748 5745 -5751 5754 1 5745 5751 5757 5760 7 + 5742 5733 5727 5745 6 5739 5733 5727 5745 6 + 5736 5733 5727 5745 6 5730 5727 5733 5736 6 + 5730 5727 5733 5739 6 5730 5727 5733 5742 6 + 5730 5727 5745 5748 59 5730 5727 -5745 5748 60 + 5730 5727 5745 5751 7 5727 5745 5751 5754 1 + 5724 5721 5727 5730 7 5724 5721 5727 5733 7 + 5724 5721 5727 5745 7 5721 5727 5733 5736 6 + 5721 5727 5733 5739 6 5721 5727 5733 5742 6 + 5805 5802 5808 5811 12 5805 5802 -5808 5811 1 + 5802 5808 5814 5817 7 5787 5778 5772 5790 61 + 5784 5778 5772 5790 61 5781 5778 5772 5790 61 + 5778 5772 5790 5793 61 5778 5772 5790 5796 61 + 5778 5772 5790 5799 61 5775 5772 5778 5781 62 + 5775 5772 5778 5784 62 5775 5772 5778 5787 62 + 5775 5772 5790 5793 62 5775 5772 5790 5796 62 + 5775 5772 5790 5799 62 5769 5763 5757 5802 6 + 5769 5763 5772 5775 62 5769 5763 5772 5778 61 + 5769 5763 5772 5790 61 5766 5763 5757 5802 6 + 5766 5763 5772 5775 62 5766 5763 5772 5778 61 + 5766 5763 5772 5790 61 5763 5772 5778 5781 61 + 5763 5772 5778 5784 61 5763 5772 5778 5787 61 + 5763 5772 5790 5793 61 5763 5772 5790 5796 61 + 5763 5772 5790 5799 61 5760 5757 5763 5766 6 + 5760 5757 5763 5769 6 5760 5757 5763 5772 6 + 5760 5757 5802 5805 59 5760 5757 -5802 5805 60 + 5760 5757 5802 5808 7 5757 5763 5772 5775 61 + 5757 5802 5808 5811 1 5754 5751 5757 5760 7 + 5754 5751 5757 5763 7 5754 5751 5757 5802 7 + 5751 5757 5763 5766 6 5751 5757 5763 5769 6 + 5835 5832 5838 5841 12 5835 5832 -5838 5841 1 + 5832 5838 5844 5847 7 5829 5820 5814 5832 6 + 5826 5820 5814 5832 6 5823 5820 5814 5832 6 + 5817 5814 5820 5823 6 5817 5814 5820 5826 6 + 5817 5814 5820 5829 6 5817 5814 5832 5835 59 + 5817 5814 -5832 5835 60 5817 5814 5832 5838 7 + 5814 5832 5838 5841 1 5811 5808 5814 5817 7 + 5811 5808 5814 5820 7 5811 5808 5814 5832 7 + 5808 5814 5820 5823 6 5808 5814 5820 5826 6 + 5808 5814 5820 5829 6 5901 5898 5904 5907 12 + 5901 5898 -5904 5907 1 5898 5904 5910 5913 7 + 5883 5877 5886 5889 6 5883 5877 5886 5892 6 + 5883 5877 5886 5895 6 5880 5877 5886 5889 6 + 5880 5877 5886 5892 6 5880 5877 5886 5895 6 + 5874 5868 5877 5880 6 5874 5868 5877 5883 6 + 5874 5868 5877 5886 6 5871 5868 5877 5880 6 + 5871 5868 5877 5883 6 5871 5868 5877 5886 6 + 5868 5877 5886 5889 6 5868 5877 5886 5892 6 + 5868 5877 5886 5895 6 5865 5859 5868 5871 62 + 5865 5859 5868 5874 62 5865 5859 5868 5877 61 + 5862 5859 5868 5871 62 5862 5859 5868 5874 62 + 5862 5859 5868 5877 61 5859 5868 5877 5880 6 + 5859 5868 5877 5883 6 5856 5850 5844 5898 6 + 5856 5850 5859 5862 62 5856 5850 5859 5865 62 + 5856 5850 5859 5868 61 5853 5850 5844 5898 6 + 5853 5850 5859 5862 62 5853 5850 5859 5865 62 + 5853 5850 5859 5868 61 5850 5859 5868 5871 61 + 5850 5859 5868 5874 61 5847 5844 5850 5853 6 + 5847 5844 5850 5856 6 5847 5844 5850 5859 6 + 5847 5844 5898 5901 59 5847 5844 -5898 5901 60 + 5847 5844 5898 5904 7 5844 5850 5859 5862 61 + 5844 5850 5859 5865 61 5844 5898 5904 5907 1 + 5841 5838 5844 5847 7 5841 5838 5844 5850 7 + 5841 5838 5844 5898 7 5838 5844 5850 5853 6 + 5838 5844 5850 5856 6 5946 5943 5949 5952 12 + 5946 5943 -5949 5952 1 5943 5949 5955 5958 7 + 5943 5949 5955 5961 7 5931 5925 5934 5937 7 + 5931 5925 5934 5940 7 5928 5925 5934 5937 7 + 5928 5925 5934 5940 7 5922 5916 5910 5943 6 + 5922 5916 5925 5928 62 5922 5916 5925 5931 62 + 5922 5916 5925 5934 6 5919 5916 5910 5943 6 + 5919 5916 5925 5928 62 5919 5916 5925 5931 62 + 5919 5916 5925 5934 6 5913 5910 5916 5919 6 + 5913 5910 5916 5922 6 5913 5910 5916 5925 6 + 5913 5910 5943 5946 59 5913 5910 -5943 5946 60 + 5913 5910 5943 5949 7 5910 5916 5925 5928 61 + 5910 5916 5925 5931 61 5910 5943 5949 5952 1 + 5907 5904 5910 5913 7 5907 5904 5910 5916 7 + 5907 5904 5910 5943 7 5904 5910 5916 5919 6 + 5904 5910 5916 5922 6 5967 5964 5970 5973 12 + 5967 5964 -5970 5973 1 5964 5970 5976 5979 7 + 5961 5955 5964 5967 59 5961 5955 -5964 5967 60 + 5961 5955 5964 5970 7 5958 5955 5964 5967 59 + 5958 5955 -5964 5967 60 5958 5955 5964 5970 7 + 5955 5964 5970 5973 1 5952 5949 5955 5958 7 + 5952 5949 5955 5961 7 5952 5949 5955 5964 7 + 6039 6036 6042 6045 12 6039 6036 -6042 6045 1 + 6036 6042 6048 6051 7 6024 6018 6015 6027 21 + 6021 6018 6015 6027 21 6018 6015 6027 6030 21 + 6018 6015 6027 6033 21 6012 6009 6015 6018 21 + 6012 6009 6015 6027 21 6009 6015 6018 6021 21 + 6009 6015 6018 6024 21 6009 6015 6027 6030 21 + 6009 6015 6027 6033 21 6006 6000 6009 6012 26 + 6006 6000 6009 6015 26 6003 6000 6009 6012 26 + 6003 6000 6009 6015 26 5997 5991 6000 6003 6 + 5997 5991 6000 6006 6 5997 5991 6000 6009 6 + 5994 5991 6000 6003 6 5994 5991 6000 6006 6 + 5994 5991 6000 6009 6 5991 6000 6009 6012 26 + 5988 5982 5976 6036 6 5988 5982 5991 5994 62 + 5988 5982 5991 5997 62 5988 5982 5991 6000 61 + 5985 5982 5976 6036 6 5985 5982 5991 5994 62 + 5985 5982 5991 5997 62 5985 5982 5991 6000 61 + 5982 5991 6000 6003 6 5982 5991 6000 6006 6 + 5979 5976 5982 5985 6 5979 5976 5982 5988 6 + 5979 5976 5982 5991 6 5979 5976 6036 6039 59 + 5979 5976 -6036 6039 60 5979 5976 6036 6042 7 + 5976 5982 5991 5994 61 5976 5982 5991 5997 61 + 5976 6036 6042 6045 1 5973 5970 5976 5979 7 + 5973 5970 5976 5982 7 5973 5970 5976 6036 7 + 5970 5976 5982 5985 6 5970 5976 5982 5988 6 + 6072 6069 6075 6078 12 6072 6069 -6075 6078 1 + 6069 6075 6081 6084 7 6060 6054 6048 6069 6 + 6060 6054 6063 6066 64 6057 6054 6048 6069 6 + 6057 6054 6063 6066 64 6051 6048 6054 6057 6 + 6051 6048 6054 6060 6 6051 6048 6054 6063 63 + 6051 6048 -6054 6063 26 6051 6048 6069 6072 59 + 6051 6048 -6069 6072 60 6051 6048 6069 6075 7 + 6048 6054 6063 6066 63 6048 6054 -6063 6066 61 + 6048 6069 6075 6078 1 6045 6042 6048 6051 7 + 6045 6042 6048 6054 7 6045 6042 6048 6069 7 + 6042 6048 6054 6057 6 6042 6048 6054 6060 6 + 6123 6120 6126 6129 12 6123 6120 -6126 6129 1 + 6120 6126 6132 6135 7 6102 6096 6105 6108 11 + 6099 6096 6105 6108 11 6096 6105 6108 6111 11 + 6096 6105 6108 6114 11 6096 6105 6108 6117 11 + 6093 6087 6081 6120 6 6093 6087 6096 6099 6 + 6093 6087 6096 6102 6 6093 6087 6096 6105 6 + 6090 6087 6081 6120 6 6090 6087 6096 6099 6 + 6090 6087 6096 6102 6 6090 6087 6096 6105 6 + 6084 6081 6087 6090 6 6084 6081 6087 6093 6 + 6084 6081 6087 6096 6 6084 6081 6120 6123 59 + 6084 6081 -6120 6123 60 6084 6081 6120 6126 7 + 6081 6087 6096 6099 6 6081 6087 6096 6102 6 + 6081 6120 6126 6129 1 6078 6075 6081 6084 7 + 6078 6075 6081 6087 7 6078 6075 6081 6120 7 + 6075 6081 6087 6090 6 6075 6081 6087 6093 6 + 6174 6171 6177 6180 12 6174 6171 -6177 6180 1 + 6171 6177 6183 6186 7 6153 6147 6156 6159 11 + 6150 6147 6156 6159 11 6147 6156 6159 6162 11 + 6147 6156 6159 6165 11 6147 6156 6159 6168 11 + 6144 6138 6132 6171 6 6144 6138 6147 6150 6 + 6144 6138 6147 6153 6 6144 6138 6147 6156 6 + 6141 6138 6132 6171 6 6141 6138 6147 6150 6 + 6141 6138 6147 6153 6 6141 6138 6147 6156 6 + 6135 6132 6138 6141 6 6135 6132 6138 6144 6 + 6135 6132 6138 6147 6 6135 6132 6171 6174 59 + 6135 6132 -6171 6174 60 6135 6132 6171 6177 7 + 6132 6138 6147 6150 6 6132 6138 6147 6153 6 + 6132 6171 6177 6180 1 6129 6126 6132 6135 7 + 6129 6126 6132 6138 7 6129 6126 6132 6171 7 + 6126 6132 6138 6141 6 6126 6132 6138 6144 6 + 6240 6237 6243 6246 12 6240 6237 -6243 6246 1 + 6237 6243 6249 6252 7 6222 6216 6225 6228 6 + 6222 6216 6225 6231 6 6222 6216 6225 6234 6 + 6219 6216 6225 6228 6 6219 6216 6225 6231 6 + 6219 6216 6225 6234 6 6213 6207 6216 6219 6 + 6213 6207 6216 6222 6 6213 6207 6216 6225 6 + 6210 6207 6216 6219 6 6210 6207 6216 6222 6 + 6210 6207 6216 6225 6 6207 6216 6225 6228 6 + 6207 6216 6225 6231 6 6207 6216 6225 6234 6 + 6204 6198 6207 6210 62 6204 6198 6207 6213 62 + 6204 6198 6207 6216 61 6201 6198 6207 6210 62 + 6201 6198 6207 6213 62 6201 6198 6207 6216 61 + 6198 6207 6216 6219 6 6198 6207 6216 6222 6 + 6195 6189 6183 6237 6 6195 6189 6198 6201 62 + 6195 6189 6198 6204 62 6195 6189 6198 6207 61 + 6192 6189 6183 6237 6 6192 6189 6198 6201 62 + 6192 6189 6198 6204 62 6192 6189 6198 6207 61 + 6189 6198 6207 6210 61 6189 6198 6207 6213 61 + 6186 6183 6189 6192 6 6186 6183 6189 6195 6 + 6186 6183 6189 6198 6 6186 6183 6237 6240 59 + 6186 6183 -6237 6240 60 6186 6183 6237 6243 7 + 6183 6189 6198 6201 61 6183 6189 6198 6204 61 + 6183 6237 6243 6246 1 6180 6177 6183 6186 7 + 6180 6177 6183 6189 7 6180 6177 6183 6237 7 + 6177 6183 6189 6192 6 6177 6183 6189 6195 6 + 6282 6279 6285 6288 12 6282 6279 -6285 6288 1 + 6279 6285 6291 6294 7 6267 6264 6270 6273 12 + 6267 6264 -6270 6273 1 6267 6264 6270 6276 12 + 6267 6264 -6270 6276 1 6261 6255 6249 6279 6 + 6261 6255 6264 6267 59 6261 6255 -6264 6267 7 + 6261 6255 -6264 6267 60 6261 6255 6264 6270 7 + 6258 6255 6249 6279 6 6258 6255 6264 6267 59 + 6258 6255 -6264 6267 7 6258 6255 -6264 6267 60 + 6258 6255 6264 6270 7 6255 6264 6270 6273 1 + 6255 6264 6270 6276 1 6252 6249 6255 6258 6 + 6252 6249 6255 6261 6 6252 6249 6255 6264 6 + 6252 6249 6279 6282 59 6252 6249 -6279 6282 60 + 6252 6249 6279 6285 7 6249 6279 6285 6288 1 + 6246 6243 6249 6252 7 6246 6243 6249 6255 7 + 6246 6243 6249 6279 7 6243 6249 6255 6258 6 + 6243 6249 6255 6261 6 6354 6351 6357 6360 12 + 6354 6351 -6357 6360 1 6351 6357 6363 6366 7 + 6339 6333 6330 6342 21 6336 6333 6330 6342 21 + 6333 6330 6342 6345 21 6333 6330 6342 6348 21 + 6327 6324 6330 6333 21 6327 6324 6330 6342 21 + 6324 6330 6333 6336 21 6324 6330 6333 6339 21 + 6324 6330 6342 6345 21 6324 6330 6342 6348 21 + 6321 6315 6324 6327 26 6321 6315 6324 6330 26 + 6318 6315 6324 6327 26 6318 6315 6324 6330 26 + 6312 6306 6315 6318 6 6312 6306 6315 6321 6 + 6312 6306 6315 6324 6 6309 6306 6315 6318 6 + 6309 6306 6315 6321 6 6309 6306 6315 6324 6 + 6306 6315 6324 6327 26 6303 6297 6291 6351 6 + 6303 6297 6306 6309 62 6303 6297 6306 6312 62 + 6303 6297 6306 6315 61 6300 6297 6291 6351 6 + 6300 6297 6306 6309 62 6300 6297 6306 6312 62 + 6300 6297 6306 6315 61 6297 6306 6315 6318 6 + 6297 6306 6315 6321 6 6294 6291 6297 6300 6 + 6294 6291 6297 6303 6 6294 6291 6297 6306 6 + 6294 6291 6351 6354 59 6294 6291 -6351 6354 60 + 6294 6291 6351 6357 7 6291 6297 6306 6309 61 + 6291 6297 6306 6312 61 6291 6351 6357 6360 1 + 6288 6285 6291 6294 7 6288 6285 6291 6297 7 + 6288 6285 6291 6351 7 6285 6291 6297 6300 6 + 6285 6291 6297 6303 6 6396 6393 6399 6402 12 + 6396 6393 -6399 6402 1 6393 6399 6405 6408 7 + 6381 6378 6384 6387 12 6381 6378 -6384 6387 1 + 6381 6378 6384 6390 12 6381 6378 -6384 6390 1 + 6375 6369 6363 6393 6 6375 6369 6378 6381 59 + 6375 6369 -6378 6381 7 6375 6369 -6378 6381 60 + 6375 6369 6378 6384 7 6372 6369 6363 6393 6 + 6372 6369 6378 6381 59 6372 6369 -6378 6381 7 + 6372 6369 -6378 6381 60 6372 6369 6378 6384 7 + 6369 6378 6384 6387 1 6369 6378 6384 6390 1 + 6366 6363 6369 6372 6 6366 6363 6369 6375 6 + 6366 6363 6369 6378 6 6366 6363 6393 6396 59 + 6366 6363 -6393 6396 60 6366 6363 6393 6399 7 + 6363 6393 6399 6402 1 6360 6357 6363 6366 7 + 6360 6357 6363 6369 7 6360 6357 6363 6393 7 + 6357 6363 6369 6372 6 6357 6363 6369 6375 6 + 6426 6423 6429 6432 12 6426 6423 -6429 6432 1 + 6423 6429 6435 6438 7 6420 6411 6405 6423 6 + 6417 6411 6405 6423 6 6414 6411 6405 6423 6 + 6408 6405 6411 6414 6 6408 6405 6411 6417 6 + 6408 6405 6411 6420 6 6408 6405 6423 6426 59 + 6408 6405 -6423 6426 60 6408 6405 6423 6429 7 + 6405 6423 6429 6432 1 6402 6399 6405 6408 7 + 6402 6399 6405 6411 7 6402 6399 6405 6423 7 + 6399 6405 6411 6414 6 6399 6405 6411 6417 6 + 6399 6405 6411 6420 6 6459 6456 6462 6465 12 + 6459 6456 -6462 6465 1 6456 6462 6468 6471 7 + 6447 6441 6435 6456 6 6447 6441 6450 6453 64 + 6444 6441 6435 6456 6 6444 6441 6450 6453 64 + 6438 6435 6441 6444 6 6438 6435 6441 6447 6 + 6438 6435 6441 6450 63 6438 6435 -6441 6450 26 + 6438 6435 6456 6459 59 6438 6435 -6456 6459 60 + 6438 6435 6456 6462 7 6435 6441 6450 6453 63 + 6435 6441 -6450 6453 61 6435 6456 6462 6465 1 + 6432 6429 6435 6438 7 6432 6429 6435 6441 7 + 6432 6429 6435 6456 7 6429 6435 6441 6444 6 + 6429 6435 6441 6447 6 6510 6507 6513 6516 12 + 6510 6507 -6513 6516 1 6507 6513 6519 6522 7 + 6489 6483 6492 6495 11 6486 6483 6492 6495 11 + 6483 6492 6495 6498 11 6483 6492 6495 6501 11 + 6483 6492 6495 6504 11 6480 6474 6468 6507 6 + 6480 6474 6483 6486 6 6480 6474 6483 6489 6 + 6480 6474 6483 6492 6 6477 6474 6468 6507 6 + 6477 6474 6483 6486 6 6477 6474 6483 6489 6 + 6477 6474 6483 6492 6 6471 6468 6474 6477 6 + 6471 6468 6474 6480 6 6471 6468 6474 6483 6 + 6471 6468 6507 6510 59 6471 6468 -6507 6510 60 + 6471 6468 6507 6513 7 6468 6474 6483 6486 6 + 6468 6474 6483 6489 6 6468 6507 6513 6516 1 + 6465 6462 6468 6471 7 6465 6462 6468 6474 7 + 6465 6462 6468 6507 7 6462 6468 6474 6477 6 + 6462 6468 6474 6480 6 6558 6555 6561 6564 12 + 6558 6555 -6561 6564 1 6555 6561 6567 6570 7 + 6540 6531 6525 6543 61 6537 6531 6525 6543 61 + 6534 6531 6525 6543 61 6531 6525 6543 6546 61 + 6531 6525 6543 6549 61 6531 6525 6543 6552 61 + 6528 6525 6519 6555 6 6528 6525 6531 6534 62 + 6528 6525 6531 6537 62 6528 6525 6531 6540 62 + 6528 6525 6543 6546 62 6528 6525 6543 6549 62 + 6528 6525 6543 6552 62 6522 6519 6525 6528 6 + 6522 6519 6525 6531 6 6522 6519 6525 6543 6 + 6522 6519 6555 6558 59 6522 6519 -6555 6558 60 + 6522 6519 6555 6561 7 6519 6525 6531 6534 61 + 6519 6525 6531 6537 61 6519 6525 6531 6540 61 + 6519 6525 6543 6546 61 6519 6525 6543 6549 61 + 6519 6525 6543 6552 61 6519 6555 6561 6564 1 + 6516 6513 6519 6522 7 6516 6513 6519 6525 7 + 6516 6513 6519 6555 7 6513 6519 6525 6528 6 + 6588 6585 6591 6594 12 6588 6585 -6591 6594 1 + 6585 6591 6597 6600 7 6582 6573 6567 6585 6 + 6579 6573 6567 6585 6 6576 6573 6567 6585 6 + 6570 6567 6573 6576 6 6570 6567 6573 6579 6 + 6570 6567 6573 6582 6 6570 6567 6585 6588 59 + 6570 6567 -6585 6588 60 6570 6567 6585 6591 7 + 6567 6585 6591 6594 1 6564 6561 6567 6570 7 + 6564 6561 6567 6573 7 6564 6561 6567 6585 7 + 6561 6567 6573 6576 6 6561 6567 6573 6579 6 + 6561 6567 6573 6582 6 6645 6642 6648 6651 12 + 6645 6642 -6648 6651 1 6642 6648 6654 6657 7 + 6627 6618 6612 6630 61 6624 6618 6612 6630 61 + 6621 6618 6612 6630 61 6618 6612 6630 6633 61 + 6618 6612 6630 6636 61 6618 6612 6630 6639 61 + 6615 6612 6618 6621 62 6615 6612 6618 6624 62 + 6615 6612 6618 6627 62 6615 6612 6630 6633 62 + 6615 6612 6630 6636 62 6615 6612 6630 6639 62 + 6609 6603 6597 6642 6 6609 6603 6612 6615 62 + 6609 6603 6612 6618 61 6609 6603 6612 6630 61 + 6606 6603 6597 6642 6 6606 6603 6612 6615 62 + 6606 6603 6612 6618 61 6606 6603 6612 6630 61 + 6603 6612 6618 6621 61 6603 6612 6618 6624 61 + 6603 6612 6618 6627 61 6603 6612 6630 6633 61 + 6603 6612 6630 6636 61 6603 6612 6630 6639 61 + 6600 6597 6603 6606 6 6600 6597 6603 6609 6 + 6600 6597 6603 6612 6 6600 6597 6642 6645 59 + 6600 6597 -6642 6645 60 6600 6597 6642 6648 7 + 6597 6603 6612 6615 61 6597 6642 6648 6651 1 + 6594 6591 6597 6600 7 6594 6591 6597 6603 7 + 6594 6591 6597 6642 7 6591 6597 6603 6606 6 + 6591 6597 6603 6609 6 6687 6684 6690 6693 12 + 6687 6684 -6690 6693 1 6684 6690 6696 6699 7 + 6675 6666 6660 6678 63 6675 6666 -6660 6678 26 + 6672 6666 6660 6678 63 6672 6666 -6660 6678 26 + 6669 6666 6660 6678 63 6669 6666 -6660 6678 26 + 6666 6660 6678 6681 63 6666 6660 -6678 6681 61 + 6663 6660 6654 6684 6 6663 6660 6666 6669 6 + 6663 6660 6666 6672 6 6663 6660 6666 6675 6 + 6663 6660 6678 6681 64 6657 6654 6660 6663 6 + 6657 6654 6660 6666 6 6657 6654 6660 6678 63 + 6657 6654 -6660 6678 26 6657 6654 6684 6687 59 + 6657 6654 -6684 6687 60 6657 6654 6684 6690 7 + 6654 6660 6666 6669 61 6654 6660 6666 6672 61 + 6654 6660 6666 6675 61 6654 6660 6678 6681 63 + 6654 6660 -6678 6681 61 6654 6684 6690 6693 1 + 6651 6648 6654 6657 7 6651 6648 6654 6660 7 + 6651 6648 6654 6684 7 6648 6654 6660 6663 6 + 6750 6747 6753 6756 12 6750 6747 -6753 6756 1 + 6747 6753 6759 6762 7 6738 6735 6741 6744 17 + 6732 6729 6726 6735 65 6729 6726 6735 6738 17 + 6726 6735 6741 6744 17 6723 6720 6726 6729 17 + 6723 6720 6726 6735 17 6720 6726 6729 6732 65 + 6720 6726 6735 6738 17 6717 6714 6711 6741 17 + 6717 6714 6720 6723 17 6717 6714 6720 6726 17 + 6714 6711 6741 6744 17 6711 6714 6720 6723 17 + 6711 6741 6735 6738 17 6708 6702 6696 6747 6 + 6708 6702 6711 6714 7 6708 6702 6711 6741 7 + 6705 6702 6696 6747 6 6705 6702 6711 6714 7 + 6705 6702 6711 6741 7 6702 6711 6714 6717 17 + 6702 6711 6741 6744 17 6699 6696 6702 6705 6 + 6699 6696 6702 6708 6 6699 6696 6702 6711 6 + 6699 6696 6747 6750 59 6699 6696 -6747 6750 60 + 6699 6696 6747 6753 7 6696 6747 6753 6756 1 + 6693 6690 6696 6699 7 6693 6690 6696 6702 7 + 6693 6690 6696 6747 7 6690 6696 6702 6705 6 + 6690 6696 6702 6708 6 6807 6804 6810 6813 12 + 6807 6804 -6810 6813 1 6804 6810 6816 6819 7 + 6804 6810 6816 6822 7 6789 6783 6792 6795 62 + 6789 6783 6792 6798 62 6789 6783 6792 6801 62 + 6786 6783 6792 6795 62 6786 6783 6792 6798 62 + 6786 6783 6792 6801 62 6780 6771 6765 6783 61 + 6777 6771 6765 6783 61 6774 6771 6765 6783 61 + 6771 6765 6783 6786 61 6771 6765 6783 6789 61 + 6768 6765 6759 6804 6 6768 6765 6771 6774 62 + 6768 6765 6771 6777 62 6768 6765 6771 6780 62 + 6768 6765 6783 6786 62 6768 6765 6783 6789 62 + 6768 6765 6783 6792 61 6765 6783 6792 6795 61 + 6765 6783 6792 6798 61 6765 6783 6792 6801 61 + 6762 6759 6765 6768 6 6762 6759 6765 6771 6 + 6762 6759 6765 6783 6 6762 6759 6804 6807 59 + 6762 6759 -6804 6807 60 6762 6759 6804 6810 7 + 6759 6765 6771 6774 61 6759 6765 6771 6777 61 + 6759 6765 6771 6780 61 6759 6765 6783 6786 61 + 6759 6765 6783 6789 61 6759 6804 6810 6813 1 + 6756 6753 6759 6762 7 6756 6753 6759 6765 7 + 6756 6753 6759 6804 7 6753 6759 6765 6768 6 + 6828 6825 6831 6834 12 6828 6825 -6831 6834 1 + 6825 6831 6837 6840 7 6822 6816 6825 6828 59 + 6822 6816 -6825 6828 60 6822 6816 6825 6831 7 + 6819 6816 6825 6828 59 6819 6816 -6825 6828 60 + 6819 6816 6825 6831 7 6816 6825 6831 6834 1 + 6813 6810 6816 6819 7 6813 6810 6816 6822 7 + 6813 6810 6816 6825 7 6858 6855 6861 6864 12 + 6858 6855 -6861 6864 1 6855 6861 6867 6870 7 + 6852 6843 6837 6855 6 6849 6843 6837 6855 6 + 6846 6843 6837 6855 6 6840 6837 6843 6846 6 + 6840 6837 6843 6849 6 6840 6837 6843 6852 6 + 6840 6837 6855 6858 59 6840 6837 -6855 6858 60 + 6840 6837 6855 6861 7 6837 6855 6861 6864 1 + 6834 6831 6837 6840 7 6834 6831 6837 6843 7 + 6834 6831 6837 6855 7 6831 6837 6843 6846 6 + 6831 6837 6843 6849 6 6831 6837 6843 6852 6 + 6903 6900 6906 6909 12 6903 6900 -6906 6909 1 + 6900 6906 6912 6915 7 6888 6882 6891 6894 7 + 6888 6882 6891 6897 7 6885 6882 6891 6894 7 + 6885 6882 6891 6897 7 6879 6873 6867 6900 6 + 6879 6873 6882 6885 62 6879 6873 6882 6888 62 + 6879 6873 6882 6891 6 6876 6873 6867 6900 6 + 6876 6873 6882 6885 62 6876 6873 6882 6888 62 + 6876 6873 6882 6891 6 6870 6867 6873 6876 6 + 6870 6867 6873 6879 6 6870 6867 6873 6882 6 + 6870 6867 6900 6903 59 6870 6867 -6900 6903 60 + 6870 6867 6900 6906 7 6867 6873 6882 6885 61 + 6867 6873 6882 6888 61 6867 6900 6906 6909 1 + 6864 6861 6867 6870 7 6864 6861 6867 6873 7 + 6864 6861 6867 6900 7 6861 6867 6873 6876 6 + 6861 6867 6873 6879 6 6969 6966 6972 6975 12 + 6969 6966 -6972 6975 1 6966 6972 6978 6981 7 + 6951 6945 6954 6957 6 6951 6945 6954 6960 6 + 6951 6945 6954 6963 6 6948 6945 6954 6957 6 + 6948 6945 6954 6960 6 6948 6945 6954 6963 6 + 6942 6936 6945 6948 6 6942 6936 6945 6951 6 + 6942 6936 6945 6954 6 6939 6936 6945 6948 6 + 6939 6936 6945 6951 6 6939 6936 6945 6954 6 + 6936 6945 6954 6957 6 6936 6945 6954 6960 6 + 6936 6945 6954 6963 6 6933 6927 6936 6939 62 + 6933 6927 6936 6942 62 6933 6927 6936 6945 61 + 6930 6927 6936 6939 62 6930 6927 6936 6942 62 + 6930 6927 6936 6945 61 6927 6936 6945 6948 6 + 6927 6936 6945 6951 6 6924 6918 6912 6966 6 + 6924 6918 6927 6930 62 6924 6918 6927 6933 62 + 6924 6918 6927 6936 61 6921 6918 6912 6966 6 + 6921 6918 6927 6930 62 6921 6918 6927 6933 62 + 6921 6918 6927 6936 61 6918 6927 6936 6939 61 + 6918 6927 6936 6942 61 6915 6912 6918 6921 6 + 6915 6912 6918 6924 6 6915 6912 6918 6927 6 + 6915 6912 6966 6969 59 6915 6912 -6966 6969 60 + 6915 6912 6966 6972 7 6912 6918 6927 6930 61 + 6912 6918 6927 6933 61 6912 6966 6972 6975 1 + 6909 6906 6912 6915 7 6909 6906 6912 6918 7 + 6909 6906 6912 6966 7 6906 6912 6918 6921 6 + 6906 6912 6918 6924 6 6999 6996 7002 7005 12 + 6999 6996 -7002 7005 1 6996 7002 7008 7011 7 + 6993 6984 6978 6996 6 6990 6984 6978 6996 6 + 6987 6984 6978 6996 6 6981 6978 6984 6987 6 + 6981 6978 6984 6990 6 6981 6978 6984 6993 6 + 6981 6978 6996 6999 59 6981 6978 -6996 6999 60 + 6981 6978 6996 7002 7 6978 6996 7002 7005 1 + 6975 6972 6978 6981 7 6975 6972 6978 6984 7 + 6975 6972 6978 6996 7 6972 6978 6984 6987 6 + 6972 6978 6984 6990 6 6972 6978 6984 6993 6 + 7047 7053 7056 7059 7 7047 7053 7056 7062 7 + 7047 7053 7083 7086 7 7029 7023 7032 7035 11 + 7026 7023 7032 7035 11 7023 7032 7035 7038 11 + 7023 7032 7035 7041 11 7023 7032 7035 7044 11 + 7020 7014 7008 7047 6 7020 7014 7023 7026 6 + 7020 7014 7023 7029 6 7020 7014 7023 7032 6 + 7017 7014 7008 7047 6 7017 7014 7023 7026 6 + 7017 7014 7023 7029 6 7017 7014 7023 7032 6 + 7011 7008 7014 7017 6 7011 7008 7014 7020 6 + 7011 7008 7014 7023 6 7011 7008 7047 7050 59 + 7011 7008 -7047 7050 60 7011 7008 7047 7053 7 + 7008 7014 7023 7026 6 7008 7014 7023 7029 6 + 7005 7002 7008 7011 7 7005 7002 7008 7014 7 + 7005 7002 7008 7047 7 7002 7008 7014 7017 6 + 7002 7008 7014 7020 6 7092 7089 7095 7098 12 + 7092 7089 -7095 7098 1 7089 7095 7101 7104 7 + 7086 7083 7089 7092 59 7086 7083 -7089 7092 60 + 7086 7083 7089 7095 7 7083 7089 7095 7098 1 + 7080 7074 7083 7086 6 7080 7074 7083 7089 6 + 7077 7074 7083 7086 6 7077 7074 7083 7089 6 + 7071 7065 7074 7077 62 7071 7065 7074 7080 62 + 7071 7065 7074 7083 61 7068 7065 7074 7077 62 + 7068 7065 7074 7080 62 7068 7065 7074 7083 61 + 7065 7074 7083 7086 6 7062 7056 7053 7083 7 + 7062 7056 7065 7068 6 7062 7056 7065 7071 6 + 7062 7056 7065 7074 6 7059 7056 7053 7083 7 + 7059 7056 7065 7068 6 7059 7056 7065 7071 6 + 7059 7056 7065 7074 6 7056 7053 7083 7086 7 + 7056 7065 7074 7077 61 7056 7065 7074 7080 61 + 7053 7056 7065 7068 6 7053 7056 7065 7071 6 + 7053 7083 7074 7077 6 7053 7083 7074 7080 6 + 7125 7122 7128 7131 12 7125 7122 -7128 7131 1 + 7122 7128 7134 7137 7 7113 7107 7101 7122 6 + 7113 7107 7116 7119 64 7110 7107 7101 7122 6 + 7110 7107 7116 7119 64 7104 7101 7107 7110 6 + 7104 7101 7107 7113 6 7104 7101 7107 7116 63 + 7104 7101 -7107 7116 26 7104 7101 7122 7125 59 + 7104 7101 -7122 7125 60 7104 7101 7122 7128 7 + 7101 7107 7116 7119 63 7101 7107 -7116 7119 61 + 7101 7122 7128 7131 1 7098 7095 7101 7104 7 + 7098 7095 7101 7107 7 7098 7095 7101 7122 7 + 7095 7101 7107 7110 6 7095 7101 7107 7113 6 + 7188 7185 7191 7194 12 7188 7185 -7191 7194 1 + 7185 7191 7197 7200 7 7176 7173 7179 7182 17 + 7170 7167 7164 7173 65 7167 7164 7173 7176 17 + 7164 7173 7179 7182 17 7161 7158 7164 7167 17 + 7161 7158 7164 7173 17 7158 7164 7167 7170 65 + 7158 7164 7173 7176 17 7155 7152 7149 7179 17 + 7155 7152 7158 7161 17 7155 7152 7158 7164 17 + 7152 7149 7179 7182 17 7149 7152 7158 7161 17 + 7149 7179 7173 7176 17 7146 7140 7134 7185 6 + 7146 7140 7149 7152 7 7146 7140 7149 7179 7 + 7143 7140 7134 7185 6 7143 7140 7149 7152 7 + 7143 7140 7149 7179 7 7140 7149 7152 7155 17 + 7140 7149 7179 7182 17 7137 7134 7140 7143 6 + 7137 7134 7140 7146 6 7137 7134 7140 7149 6 + 7137 7134 7185 7188 59 7137 7134 -7185 7188 60 + 7137 7134 7185 7191 7 7134 7185 7191 7194 1 + 7131 7128 7134 7137 7 7131 7128 7134 7140 7 + 7131 7128 7134 7185 7 7128 7134 7140 7143 6 + 7128 7134 7140 7146 6 7230 7227 7233 7236 12 + 7230 7227 -7233 7236 1 7227 7233 7239 7242 7 + 7215 7212 7218 7221 12 7215 7212 -7218 7221 1 + 7215 7212 7218 7224 12 7215 7212 -7218 7224 1 + 7209 7203 7197 7227 6 7209 7203 7212 7215 59 + 7209 7203 -7212 7215 7 7209 7203 -7212 7215 60 + 7209 7203 7212 7218 7 7206 7203 7197 7227 6 + 7206 7203 7212 7215 59 7206 7203 -7212 7215 7 + 7206 7203 -7212 7215 60 7206 7203 7212 7218 7 + 7203 7212 7218 7221 1 7203 7212 7218 7224 1 + 7200 7197 7203 7206 6 7200 7197 7203 7209 6 + 7200 7197 7203 7212 6 7200 7197 7227 7230 59 + 7200 7197 -7227 7230 60 7200 7197 7227 7233 7 + 7197 7227 7233 7236 1 7194 7191 7197 7200 7 + 7194 7191 7197 7203 7 7194 7191 7197 7227 7 + 7191 7197 7203 7206 6 7191 7197 7203 7209 6 + 7272 7269 7275 7278 12 7272 7269 -7275 7278 1 + 7269 7275 7281 7284 7 7260 7251 7245 7263 63 + 7260 7251 -7245 7263 26 7257 7251 7245 7263 63 + 7257 7251 -7245 7263 26 7254 7251 7245 7263 63 + 7254 7251 -7245 7263 26 7251 7245 7263 7266 63 + 7251 7245 -7263 7266 61 7248 7245 7239 7269 6 + 7248 7245 7251 7254 6 7248 7245 7251 7257 6 + 7248 7245 7251 7260 6 7248 7245 7263 7266 64 + 7242 7239 7245 7248 6 7242 7239 7245 7251 6 + 7242 7239 7245 7263 63 7242 7239 -7245 7263 26 + 7242 7239 7269 7272 59 7242 7239 -7269 7272 60 + 7242 7239 7269 7275 7 7239 7245 7251 7254 61 + 7239 7245 7251 7257 61 7239 7245 7251 7260 61 + 7239 7245 7263 7266 63 7239 7245 -7263 7266 61 + 7239 7269 7275 7278 1 7236 7233 7239 7242 7 + 7236 7233 7239 7245 7 7236 7233 7239 7269 7 + 7233 7239 7245 7248 6 7323 7320 7326 7329 12 + 7323 7320 -7326 7329 1 7320 7326 7332 7335 7 + 7320 7326 7332 7338 7 7302 7296 7305 7308 11 + 7299 7296 7305 7308 11 7296 7305 7308 7311 11 + 7296 7305 7308 7314 11 7296 7305 7308 7317 11 + 7293 7287 7281 7320 6 7293 7287 7296 7299 6 + 7293 7287 7296 7302 6 7293 7287 7296 7305 6 + 7290 7287 7281 7320 6 7290 7287 7296 7299 6 + 7290 7287 7296 7302 6 7290 7287 7296 7305 6 + 7284 7281 7287 7290 6 7284 7281 7287 7293 6 + 7284 7281 7287 7296 6 7284 7281 7320 7323 59 + 7284 7281 -7320 7323 60 7284 7281 7320 7326 7 + 7281 7287 7296 7299 6 7281 7287 7296 7302 6 + 7281 7320 7326 7329 1 7278 7275 7281 7284 7 + 7278 7275 7281 7287 7 7278 7275 7281 7320 7 + 7275 7281 7287 7290 6 7275 7281 7287 7293 6 + 7344 7341 7347 7350 12 7344 7341 -7347 7350 1 + 7341 7347 7353 7356 7 7338 7332 7341 7344 59 + 7338 7332 -7341 7344 60 7338 7332 7341 7347 7 + 7335 7332 7341 7344 59 7335 7332 -7341 7344 60 + 7335 7332 7341 7347 7 7332 7341 7347 7350 1 + 7329 7326 7332 7335 7 7329 7326 7332 7338 7 + 7329 7326 7332 7341 7 7392 7389 7395 7398 12 + 7392 7389 -7395 7398 1 7389 7395 7401 7404 7 + 7374 7365 7359 7377 61 7371 7365 7359 7377 61 + 7368 7365 7359 7377 61 7365 7359 7377 7380 61 + 7365 7359 7377 7383 61 7365 7359 7377 7386 61 + 7362 7359 7353 7389 6 7362 7359 7365 7368 62 + 7362 7359 7365 7371 62 7362 7359 7365 7374 62 + 7362 7359 7377 7380 62 7362 7359 7377 7383 62 + 7362 7359 7377 7386 62 7356 7353 7359 7362 6 + 7356 7353 7359 7365 6 7356 7353 7359 7377 6 + 7356 7353 7389 7392 59 7356 7353 -7389 7392 60 + 7356 7353 7389 7395 7 7353 7359 7365 7368 61 + 7353 7359 7365 7371 61 7353 7359 7365 7374 61 + 7353 7359 7377 7380 61 7353 7359 7377 7383 61 + 7353 7359 7377 7386 61 7353 7389 7395 7398 1 + 7350 7347 7353 7356 7 7350 7347 7353 7359 7 + 7350 7347 7353 7389 7 7347 7353 7359 7362 6 + 7422 7419 7425 7428 12 7422 7419 -7425 7428 1 + 7419 7425 7431 7434 7 7416 7407 7401 7419 6 + 7413 7407 7401 7419 6 7410 7407 7401 7419 6 + 7404 7401 7407 7410 6 7404 7401 7407 7413 6 + 7404 7401 7407 7416 6 7404 7401 7419 7422 59 + 7404 7401 -7419 7422 60 7404 7401 7419 7425 7 + 7401 7419 7425 7428 1 7398 7395 7401 7404 7 + 7398 7395 7401 7407 7 7398 7395 7401 7419 7 + 7395 7401 7407 7410 6 7395 7401 7407 7413 6 + 7395 7401 7407 7416 6 7488 7485 7491 7494 12 + 7488 7485 -7491 7494 1 7485 7491 7497 7500 7 + 7470 7464 7473 7476 6 7470 7464 7473 7479 6 + 7470 7464 7473 7482 6 7467 7464 7473 7476 6 + 7467 7464 7473 7479 6 7467 7464 7473 7482 6 + 7461 7455 7464 7467 6 7461 7455 7464 7470 6 + 7461 7455 7464 7473 6 7458 7455 7464 7467 6 + 7458 7455 7464 7470 6 7458 7455 7464 7473 6 + 7455 7464 7473 7476 6 7455 7464 7473 7479 6 + 7455 7464 7473 7482 6 7452 7446 7455 7458 62 + 7452 7446 7455 7461 62 7452 7446 7455 7464 61 + 7449 7446 7455 7458 62 7449 7446 7455 7461 62 + 7449 7446 7455 7464 61 7446 7455 7464 7467 6 + 7446 7455 7464 7470 6 7443 7437 7431 7485 6 + 7443 7437 7446 7449 62 7443 7437 7446 7452 62 + 7443 7437 7446 7455 61 7440 7437 7431 7485 6 + 7440 7437 7446 7449 62 7440 7437 7446 7452 62 + 7440 7437 7446 7455 61 7437 7446 7455 7458 61 + 7437 7446 7455 7461 61 7434 7431 7437 7440 6 + 7434 7431 7437 7443 6 7434 7431 7437 7446 6 + 7434 7431 7485 7488 59 7434 7431 -7485 7488 60 + 7434 7431 7485 7491 7 7431 7437 7446 7449 61 + 7431 7437 7446 7452 61 7431 7485 7491 7494 1 + 7428 7425 7431 7434 7 7428 7425 7431 7437 7 + 7428 7425 7431 7485 7 7425 7431 7437 7440 6 + 7425 7431 7437 7443 6 7518 7515 7521 7524 12 + 7518 7515 -7521 7524 1 7515 7521 7527 7530 7 + 7512 7503 7497 7515 6 7509 7503 7497 7515 6 + 7506 7503 7497 7515 6 7500 7497 7503 7506 6 + 7500 7497 7503 7509 6 7500 7497 7503 7512 6 + 7500 7497 7515 7518 59 7500 7497 -7515 7518 60 + 7500 7497 7515 7521 7 7497 7515 7521 7524 1 + 7494 7491 7497 7500 7 7494 7491 7497 7503 7 + 7494 7491 7497 7515 7 7491 7497 7503 7506 6 + 7491 7497 7503 7509 6 7491 7497 7503 7512 6 + 7551 7548 7554 7557 12 7551 7548 -7554 7557 1 + 7548 7554 7560 7563 7 7539 7533 7527 7548 6 + 7539 7533 7542 7545 64 7536 7533 7527 7548 6 + 7536 7533 7542 7545 64 7530 7527 7533 7536 6 + 7530 7527 7533 7539 6 7530 7527 7533 7542 63 + 7530 7527 -7533 7542 26 7530 7527 7548 7551 59 + 7530 7527 -7548 7551 60 7530 7527 7548 7554 7 + 7527 7533 7542 7545 63 7527 7533 -7542 7545 61 + 7527 7548 7554 7557 1 7524 7521 7527 7530 7 + 7524 7521 7527 7533 7 7524 7521 7527 7548 7 + 7521 7527 7533 7536 6 7521 7527 7533 7539 6 + 7608 7605 7611 7614 12 7608 7605 -7611 7614 1 + 7605 7611 7617 7620 7 7590 7581 7575 7593 61 + 7587 7581 7575 7593 61 7584 7581 7575 7593 61 + 7581 7575 7593 7596 61 7581 7575 7593 7599 61 + 7581 7575 7593 7602 61 7578 7575 7581 7584 62 + 7578 7575 7581 7587 62 7578 7575 7581 7590 62 + 7578 7575 7593 7596 62 7578 7575 7593 7599 62 + 7578 7575 7593 7602 62 7572 7566 7560 7605 6 + 7572 7566 7575 7578 62 7572 7566 7575 7581 61 + 7572 7566 7575 7593 61 7569 7566 7560 7605 6 + 7569 7566 7575 7578 62 7569 7566 7575 7581 61 + 7569 7566 7575 7593 61 7566 7575 7581 7584 61 + 7566 7575 7581 7587 61 7566 7575 7581 7590 61 + 7566 7575 7593 7596 61 7566 7575 7593 7599 61 + 7566 7575 7593 7602 61 7563 7560 7566 7569 6 + 7563 7560 7566 7572 6 7563 7560 7566 7575 6 + 7563 7560 7605 7608 59 7563 7560 -7605 7608 60 + 7563 7560 7605 7611 7 7560 7566 7575 7578 61 + 7560 7605 7611 7614 1 7557 7554 7560 7563 7 + 7557 7554 7560 7566 7 7557 7554 7560 7605 7 + 7554 7560 7566 7569 6 7554 7560 7566 7572 6 + 7653 7650 7656 7659 12 7653 7650 -7656 7659 1 + 7650 7656 7662 7665 7 7638 7632 7641 7644 7 + 7638 7632 7641 7647 7 7635 7632 7641 7644 7 + 7635 7632 7641 7647 7 7629 7623 7617 7650 6 + 7629 7623 7632 7635 62 7629 7623 7632 7638 62 + 7629 7623 7632 7641 6 7626 7623 7617 7650 6 + 7626 7623 7632 7635 62 7626 7623 7632 7638 62 + 7626 7623 7632 7641 6 7620 7617 7623 7626 6 + 7620 7617 7623 7629 6 7620 7617 7623 7632 6 + 7620 7617 7650 7653 59 7620 7617 -7650 7653 60 + 7620 7617 7650 7656 7 7617 7623 7632 7635 61 + 7617 7623 7632 7638 61 7617 7650 7656 7659 1 + 7614 7611 7617 7620 7 7614 7611 7617 7623 7 + 7614 7611 7617 7650 7 7611 7617 7623 7626 6 + 7611 7617 7623 7629 6 7683 7680 7686 7689 12 + 7683 7680 -7686 7689 1 7680 7686 7692 7695 7 + 7677 7668 7662 7680 6 7674 7668 7662 7680 6 + 7671 7668 7662 7680 6 7665 7662 7668 7671 6 + 7665 7662 7668 7674 6 7665 7662 7668 7677 6 + 7665 7662 7680 7683 59 7665 7662 -7680 7683 60 + 7665 7662 7680 7686 7 7662 7680 7686 7689 1 + 7659 7656 7662 7665 7 7659 7656 7662 7668 7 + 7659 7656 7662 7680 7 7656 7662 7668 7671 6 + 7656 7662 7668 7674 6 7656 7662 7668 7677 6 + 7725 7722 7728 7731 12 7725 7722 -7728 7731 1 + 7722 7728 7734 7737 7 7713 7704 7698 7716 63 + 7713 7704 -7698 7716 26 7710 7704 7698 7716 63 + 7710 7704 -7698 7716 26 7707 7704 7698 7716 63 + 7707 7704 -7698 7716 26 7704 7698 7716 7719 63 + 7704 7698 -7716 7719 61 7701 7698 7692 7722 6 + 7701 7698 7704 7707 6 7701 7698 7704 7710 6 + 7701 7698 7704 7713 6 7701 7698 7716 7719 64 + 7695 7692 7698 7701 6 7695 7692 7698 7704 6 + 7695 7692 7698 7716 63 7695 7692 -7698 7716 26 + 7695 7692 7722 7725 59 7695 7692 -7722 7725 60 + 7695 7692 7722 7728 7 7692 7698 7704 7707 61 + 7692 7698 7704 7710 61 7692 7698 7704 7713 61 + 7692 7698 7716 7719 63 7692 7698 -7716 7719 61 + 7692 7722 7728 7731 1 7689 7686 7692 7695 7 + 7689 7686 7692 7698 7 7689 7686 7692 7722 7 + 7686 7692 7698 7701 6 7773 7770 7776 7779 12 + 7773 7770 -7776 7779 1 7770 7776 7782 7785 7 + 7755 7746 7740 7758 61 7752 7746 7740 7758 61 + 7749 7746 7740 7758 61 7746 7740 7758 7761 61 + 7746 7740 7758 7764 61 7746 7740 7758 7767 61 + 7743 7740 7734 7770 6 7743 7740 7746 7749 62 + 7743 7740 7746 7752 62 7743 7740 7746 7755 62 + 7743 7740 7758 7761 62 7743 7740 7758 7764 62 + 7743 7740 7758 7767 62 7737 7734 7740 7743 6 + 7737 7734 7740 7746 6 7737 7734 7740 7758 6 + 7737 7734 7770 7773 59 7737 7734 -7770 7773 60 + 7737 7734 7770 7776 7 7734 7740 7746 7749 61 + 7734 7740 7746 7752 61 7734 7740 7746 7755 61 + 7734 7740 7758 7761 61 7734 7740 7758 7764 61 + 7734 7740 7758 7767 61 7734 7770 7776 7779 1 + 7731 7728 7734 7737 7 7731 7728 7734 7740 7 + 7731 7728 7734 7770 7 7728 7734 7740 7743 6 + 7845 7842 7848 7851 12 7845 7842 -7848 7851 1 + 7842 7848 7854 7857 7 7830 7824 7821 7833 21 + 7827 7824 7821 7833 21 7824 7821 7833 7836 21 + 7824 7821 7833 7839 21 7818 7815 7821 7824 21 + 7818 7815 7821 7833 21 7815 7821 7824 7827 21 + 7815 7821 7824 7830 21 7815 7821 7833 7836 21 + 7815 7821 7833 7839 21 7812 7806 7815 7818 26 + 7812 7806 7815 7821 26 7809 7806 7815 7818 26 + 7809 7806 7815 7821 26 7803 7797 7806 7809 6 + 7803 7797 7806 7812 6 7803 7797 7806 7815 6 + 7800 7797 7806 7809 6 7800 7797 7806 7812 6 + 7800 7797 7806 7815 6 7797 7806 7815 7818 26 + 7794 7788 7782 7842 6 7794 7788 7797 7800 62 + 7794 7788 7797 7803 62 7794 7788 7797 7806 61 + 7791 7788 7782 7842 6 7791 7788 7797 7800 62 + 7791 7788 7797 7803 62 7791 7788 7797 7806 61 + 7788 7797 7806 7809 6 7788 7797 7806 7812 6 + 7785 7782 7788 7791 6 7785 7782 7788 7794 6 + 7785 7782 7788 7797 6 7785 7782 7842 7845 59 + 7785 7782 -7842 7845 60 7785 7782 7842 7848 7 + 7782 7788 7797 7800 61 7782 7788 7797 7803 61 + 7782 7842 7848 7851 1 7779 7776 7782 7785 7 + 7779 7776 7782 7788 7 7779 7776 7782 7842 7 + 7776 7782 7788 7791 6 7776 7782 7788 7794 6 + 7908 7905 7911 7914 12 7908 7905 -7911 7914 1 + 7905 7911 7917 7920 7 7896 7893 7899 7902 17 + 7890 7887 7884 7893 65 7887 7884 7893 7896 17 + 7884 7893 7899 7902 17 7881 7878 7884 7887 17 + 7881 7878 7884 7893 17 7878 7884 7887 7890 65 + 7878 7884 7893 7896 17 7875 7872 7869 7899 17 + 7875 7872 7878 7881 17 7875 7872 7878 7884 17 + 7872 7869 7899 7902 17 7869 7872 7878 7881 17 + 7869 7899 7893 7896 17 7866 7860 7854 7905 6 + 7866 7860 7869 7872 7 7866 7860 7869 7899 7 + 7863 7860 7854 7905 6 7863 7860 7869 7872 7 + 7863 7860 7869 7899 7 7860 7869 7872 7875 17 + 7860 7869 7899 7902 17 7857 7854 7860 7863 6 + 7857 7854 7860 7866 6 7857 7854 7860 7869 6 + 7857 7854 7905 7908 59 7857 7854 -7905 7908 60 + 7857 7854 7905 7911 7 7854 7905 7911 7914 1 + 7851 7848 7854 7857 7 7851 7848 7854 7860 7 + 7851 7848 7854 7905 7 7848 7854 7860 7863 6 + 7848 7854 7860 7866 6 7950 7947 7953 7956 12 + 7950 7947 -7953 7956 1 7947 7953 7959 7962 7 + 7938 7929 7923 7941 63 7938 7929 -7923 7941 26 + 7935 7929 7923 7941 63 7935 7929 -7923 7941 26 + 7932 7929 7923 7941 63 7932 7929 -7923 7941 26 + 7929 7923 7941 7944 63 7929 7923 -7941 7944 61 + 7926 7923 7917 7947 6 7926 7923 7929 7932 6 + 7926 7923 7929 7935 6 7926 7923 7929 7938 6 + 7926 7923 7941 7944 64 7920 7917 7923 7926 6 + 7920 7917 7923 7929 6 7920 7917 7923 7941 63 + 7920 7917 -7923 7941 26 7920 7917 7947 7950 59 + 7920 7917 -7947 7950 60 7920 7917 7947 7953 7 + 7917 7923 7929 7932 61 7917 7923 7929 7935 61 + 7917 7923 7929 7938 61 7917 7923 7941 7944 63 + 7917 7923 -7941 7944 61 7917 7947 7953 7956 1 + 7914 7911 7917 7920 7 7914 7911 7917 7923 7 + 7914 7911 7917 7947 7 7911 7917 7923 7926 6 + 7980 7977 7983 7986 12 7980 7977 -7983 7986 1 + 7977 7983 7989 7992 7 7974 7965 7959 7977 6 + 7971 7965 7959 7977 6 7968 7965 7959 7977 6 + 7962 7959 7965 7968 6 7962 7959 7965 7971 6 + 7962 7959 7965 7974 6 7962 7959 7977 7980 59 + 7962 7959 -7977 7980 60 7962 7959 7977 7983 7 + 7959 7977 7983 7986 1 7956 7953 7959 7962 7 + 7956 7953 7959 7965 7 7956 7953 7959 7977 7 + 7953 7959 7965 7968 6 7953 7959 7965 7971 6 + 7953 7959 7965 7974 6 8037 8034 8040 8043 12 + 8037 8034 -8040 8043 1 8034 8040 8046 8049 7 + 8019 8010 8004 8022 61 8016 8010 8004 8022 61 + 8013 8010 8004 8022 61 8010 8004 8022 8025 61 + 8010 8004 8022 8028 61 8010 8004 8022 8031 61 + 8007 8004 8010 8013 62 8007 8004 8010 8016 62 + 8007 8004 8010 8019 62 8007 8004 8022 8025 62 + 8007 8004 8022 8028 62 8007 8004 8022 8031 62 + 8001 7995 7989 8034 6 8001 7995 8004 8007 62 + 8001 7995 8004 8010 61 8001 7995 8004 8022 61 + 7998 7995 7989 8034 6 7998 7995 8004 8007 62 + 7998 7995 8004 8010 61 7998 7995 8004 8022 61 + 7995 8004 8010 8013 61 7995 8004 8010 8016 61 + 7995 8004 8010 8019 61 7995 8004 8022 8025 61 + 7995 8004 8022 8028 61 7995 8004 8022 8031 61 + 7992 7989 7995 7998 6 7992 7989 7995 8001 6 + 7992 7989 7995 8004 6 7992 7989 8034 8037 59 + 7992 7989 -8034 8037 60 7992 7989 8034 8040 7 + 7989 7995 8004 8007 61 7989 8034 8040 8043 1 + 7986 7983 7989 7992 7 7986 7983 7989 7995 7 + 7986 7983 7989 8034 7 7983 7989 7995 7998 6 + 7983 7989 7995 8001 6 8067 8064 8070 8073 12 + 8067 8064 -8070 8073 1 8064 8070 8076 8079 7 + 8061 8052 8046 8064 6 8058 8052 8046 8064 6 + 8055 8052 8046 8064 6 8049 8046 8052 8055 6 + 8049 8046 8052 8058 6 8049 8046 8052 8061 6 + 8049 8046 8064 8067 59 8049 8046 -8064 8067 60 + 8049 8046 8064 8070 7 8046 8064 8070 8073 1 + 8043 8040 8046 8049 7 8043 8040 8046 8052 7 + 8043 8040 8046 8064 7 8040 8046 8052 8055 6 + 8040 8046 8052 8058 6 8040 8046 8052 8061 6 + 8124 8121 8127 8130 12 8124 8121 -8127 8130 1 + 8121 8127 8133 8136 7 8121 8127 8133 8139 7 + 8106 8097 8091 8109 61 8103 8097 8091 8109 61 + 8100 8097 8091 8109 61 8097 8091 8109 8112 61 + 8097 8091 8109 8115 61 8097 8091 8109 8118 61 + 8094 8091 8097 8100 62 8094 8091 8097 8103 62 + 8094 8091 8097 8106 62 8094 8091 8109 8112 62 + 8094 8091 8109 8115 62 8094 8091 8109 8118 62 + 8088 8082 8076 8121 6 8088 8082 8091 8094 62 + 8088 8082 8091 8097 61 8088 8082 8091 8109 61 + 8085 8082 8076 8121 6 8085 8082 8091 8094 62 + 8085 8082 8091 8097 61 8085 8082 8091 8109 61 + 8082 8091 8097 8100 61 8082 8091 8097 8103 61 + 8082 8091 8097 8106 61 8082 8091 8109 8112 61 + 8082 8091 8109 8115 61 8082 8091 8109 8118 61 + 8079 8076 8082 8085 6 8079 8076 8082 8088 6 + 8079 8076 8082 8091 6 8079 8076 8121 8124 59 + 8079 8076 -8121 8124 60 8079 8076 8121 8127 7 + 8076 8082 8091 8094 61 8076 8121 8127 8130 1 + 8073 8070 8076 8079 7 8073 8070 8076 8082 7 + 8073 8070 8076 8121 7 8070 8076 8082 8085 6 + 8070 8076 8082 8088 6 8145 8142 8148 8151 12 + 8145 8142 -8148 8151 1 8142 8148 8154 8157 7 + 8139 8133 8142 8145 59 8139 8133 -8142 8145 60 + 8139 8133 8142 8148 7 8136 8133 8142 8145 59 + 8136 8133 -8142 8145 60 8136 8133 8142 8148 7 + 8133 8142 8148 8151 1 8130 8127 8133 8136 7 + 8130 8127 8133 8139 7 8130 8127 8133 8142 7 + 8190 8187 8193 8196 12 8190 8187 -8193 8196 1 + 8187 8193 8199 8202 7 8175 8169 8178 8181 7 + 8175 8169 8178 8184 7 8172 8169 8178 8181 7 + 8172 8169 8178 8184 7 8166 8160 8154 8187 6 + 8166 8160 8169 8172 62 8166 8160 8169 8175 62 + 8166 8160 8169 8178 6 8163 8160 8154 8187 6 + 8163 8160 8169 8172 62 8163 8160 8169 8175 62 + 8163 8160 8169 8178 6 8157 8154 8160 8163 6 + 8157 8154 8160 8166 6 8157 8154 8160 8169 6 + 8157 8154 8187 8190 59 8157 8154 -8187 8190 60 + 8157 8154 8187 8193 7 8154 8160 8169 8172 61 + 8154 8160 8169 8175 61 8154 8187 8193 8196 1 + 8151 8148 8154 8157 7 8151 8148 8154 8160 7 + 8151 8148 8154 8187 7 8148 8154 8160 8163 6 + 8148 8154 8160 8166 6 8226 8223 8229 8232 12 + 8226 8223 -8229 8232 1 8223 8229 8235 8238 7 + 8223 8229 8235 8241 7 8211 8205 8199 8223 6 + 8211 8205 8214 8217 7 8211 8205 8214 8220 7 + 8208 8205 8199 8223 6 8208 8205 8214 8217 7 + 8208 8205 8214 8220 7 8202 8199 8205 8208 6 + 8202 8199 8205 8211 6 8202 8199 8205 8214 6 + 8202 8199 8223 8226 59 8202 8199 -8223 8226 60 + 8202 8199 8223 8229 7 8199 8223 8229 8232 1 + 8196 8193 8199 8202 7 8196 8193 8199 8205 7 + 8196 8193 8199 8223 7 8193 8199 8205 8208 6 + 8193 8199 8205 8211 6 8247 8244 8250 8253 12 + 8247 8244 -8250 8253 1 8244 8250 8256 8259 7 + 8241 8235 8244 8247 59 8241 8235 -8244 8247 60 + 8241 8235 8244 8250 7 8238 8235 8244 8247 59 + 8238 8235 -8244 8247 60 8238 8235 8244 8250 7 + 8235 8244 8250 8253 1 8232 8229 8235 8238 7 + 8232 8229 8235 8241 7 8232 8229 8235 8244 7 + 8304 8301 8307 8310 12 8304 8301 -8307 8310 1 + 8301 8307 8313 8316 7 8286 8280 8289 8292 62 + 8286 8280 8289 8295 62 8286 8280 8289 8298 62 + 8283 8280 8289 8292 62 8283 8280 8289 8295 62 + 8283 8280 8289 8298 62 8277 8268 8262 8280 61 + 8274 8268 8262 8280 61 8271 8268 8262 8280 61 + 8268 8262 8280 8283 61 8268 8262 8280 8286 61 + 8265 8262 8256 8301 6 8265 8262 8268 8271 62 + 8265 8262 8268 8274 62 8265 8262 8268 8277 62 + 8265 8262 8280 8283 62 8265 8262 8280 8286 62 + 8265 8262 8280 8289 61 8262 8280 8289 8292 61 + 8262 8280 8289 8295 61 8262 8280 8289 8298 61 + 8259 8256 8262 8265 6 8259 8256 8262 8268 6 + 8259 8256 8262 8280 6 8259 8256 8301 8304 59 + 8259 8256 -8301 8304 60 8259 8256 8301 8307 7 + 8256 8262 8268 8271 61 8256 8262 8268 8274 61 + 8256 8262 8268 8277 61 8256 8262 8280 8283 61 + 8256 8262 8280 8286 61 8256 8301 8307 8310 1 + 8253 8250 8256 8259 7 8253 8250 8256 8262 7 + 8253 8250 8256 8301 7 8250 8256 8262 8265 6 + 8370 8367 8373 8376 12 8370 8367 -8373 8376 1 + 8367 8373 8379 8382 7 8352 8346 8355 8358 6 + 8352 8346 8355 8361 6 8352 8346 8355 8364 6 + 8349 8346 8355 8358 6 8349 8346 8355 8361 6 + 8349 8346 8355 8364 6 8343 8337 8346 8349 6 + 8343 8337 8346 8352 6 8343 8337 8346 8355 6 + 8340 8337 8346 8349 6 8340 8337 8346 8352 6 + 8340 8337 8346 8355 6 8337 8346 8355 8358 6 + 8337 8346 8355 8361 6 8337 8346 8355 8364 6 + 8334 8328 8337 8340 62 8334 8328 8337 8343 62 + 8334 8328 8337 8346 61 8331 8328 8337 8340 62 + 8331 8328 8337 8343 62 8331 8328 8337 8346 61 + 8328 8337 8346 8349 6 8328 8337 8346 8352 6 + 8325 8319 8313 8367 6 8325 8319 8328 8331 62 + 8325 8319 8328 8334 62 8325 8319 8328 8337 61 + 8322 8319 8313 8367 6 8322 8319 8328 8331 62 + 8322 8319 8328 8334 62 8322 8319 8328 8337 61 + 8319 8328 8337 8340 61 8319 8328 8337 8343 61 + 8316 8313 8319 8322 6 8316 8313 8319 8325 6 + 8316 8313 8319 8328 6 8316 8313 8367 8370 59 + 8316 8313 -8367 8370 60 8316 8313 8367 8373 7 + 8313 8319 8328 8331 61 8313 8319 8328 8334 61 + 8313 8367 8373 8376 1 8310 8307 8313 8316 7 + 8310 8307 8313 8319 7 8310 8307 8313 8367 7 + 8307 8313 8319 8322 6 8307 8313 8319 8325 6 + 8418 8415 8421 8424 12 8418 8415 -8421 8424 1 + 8415 8421 8427 8430 7 8400 8391 8385 8403 61 + 8397 8391 8385 8403 61 8394 8391 8385 8403 61 + 8391 8385 8403 8406 61 8391 8385 8403 8409 61 + 8391 8385 8403 8412 61 8388 8385 8379 8415 6 + 8388 8385 8391 8394 62 8388 8385 8391 8397 62 + 8388 8385 8391 8400 62 8388 8385 8403 8406 62 + 8388 8385 8403 8409 62 8388 8385 8403 8412 62 + 8382 8379 8385 8388 6 8382 8379 8385 8391 6 + 8382 8379 8385 8403 6 8382 8379 8415 8418 59 + 8382 8379 -8415 8418 60 8382 8379 8415 8421 7 + 8379 8385 8391 8394 61 8379 8385 8391 8397 61 + 8379 8385 8391 8400 61 8379 8385 8403 8406 61 + 8379 8385 8403 8409 61 8379 8385 8403 8412 61 + 8379 8415 8421 8424 1 8376 8373 8379 8382 7 + 8376 8373 8379 8385 7 8376 8373 8379 8415 7 + 8373 8379 8385 8388 6 8460 8457 8463 8466 12 + 8460 8457 -8463 8466 1 8457 8463 8469 8472 7 + 8445 8442 8448 8451 12 8445 8442 -8448 8451 1 + 8445 8442 8448 8454 12 8445 8442 -8448 8454 1 + 8439 8433 8427 8457 6 8439 8433 8442 8445 59 + 8439 8433 -8442 8445 7 8439 8433 -8442 8445 60 + 8439 8433 8442 8448 7 8436 8433 8427 8457 6 + 8436 8433 8442 8445 59 8436 8433 -8442 8445 7 + 8436 8433 -8442 8445 60 8436 8433 8442 8448 7 + 8433 8442 8448 8451 1 8433 8442 8448 8454 1 + 8430 8427 8433 8436 6 8430 8427 8433 8439 6 + 8430 8427 8433 8442 6 8430 8427 8457 8460 59 + 8430 8427 -8457 8460 60 8430 8427 8457 8463 7 + 8427 8457 8463 8466 1 8424 8421 8427 8430 7 + 8424 8421 8427 8433 7 8424 8421 8427 8457 7 + 8421 8427 8433 8436 6 8421 8427 8433 8439 6 + 8490 8487 8493 8496 12 8490 8487 -8493 8496 1 + 8487 8493 8499 8502 7 8484 8475 8469 8487 6 + 8481 8475 8469 8487 6 8478 8475 8469 8487 6 + 8472 8469 8475 8478 6 8472 8469 8475 8481 6 + 8472 8469 8475 8484 6 8472 8469 8487 8490 59 + 8472 8469 -8487 8490 60 8472 8469 8487 8493 7 + 8469 8487 8493 8496 1 8466 8463 8469 8472 7 + 8466 8463 8469 8475 7 8466 8463 8469 8487 7 + 8463 8469 8475 8478 6 8463 8469 8475 8481 6 + 8463 8469 8475 8484 6 8538 8535 8541 8544 12 + 8538 8535 -8541 8544 1 8535 8541 8547 8550 7 + 8520 8511 8505 8523 61 8517 8511 8505 8523 61 + 8514 8511 8505 8523 61 8511 8505 8523 8526 61 + 8511 8505 8523 8529 61 8511 8505 8523 8532 61 + 8508 8505 8499 8535 6 8508 8505 8511 8514 62 + 8508 8505 8511 8517 62 8508 8505 8511 8520 62 + 8508 8505 8523 8526 62 8508 8505 8523 8529 62 + 8508 8505 8523 8532 62 8502 8499 8505 8508 6 + 8502 8499 8505 8511 6 8502 8499 8505 8523 6 + 8502 8499 8535 8538 59 8502 8499 -8535 8538 60 + 8502 8499 8535 8541 7 8499 8505 8511 8514 61 + 8499 8505 8511 8517 61 8499 8505 8511 8520 61 + 8499 8505 8523 8526 61 8499 8505 8523 8529 61 + 8499 8505 8523 8532 61 8499 8535 8541 8544 1 + 8496 8493 8499 8502 7 8496 8493 8499 8505 7 + 8496 8493 8499 8535 7 8493 8499 8505 8508 6 + 8571 8568 8574 8577 12 8571 8568 -8574 8577 1 + 8568 8574 8580 8583 7 8559 8553 8547 8568 6 + 8559 8553 8562 8565 64 8556 8553 8547 8568 6 + 8556 8553 8562 8565 64 8550 8547 8553 8556 6 + 8550 8547 8553 8559 6 8550 8547 8553 8562 63 + 8550 8547 -8553 8562 26 8550 8547 8568 8571 59 + 8550 8547 -8568 8571 60 8550 8547 8568 8574 7 + 8547 8553 8562 8565 63 8547 8553 -8562 8565 61 + 8547 8568 8574 8577 1 8544 8541 8547 8550 7 + 8544 8541 8547 8553 7 8544 8541 8547 8568 7 + 8541 8547 8553 8556 6 8541 8547 8553 8559 6 + 8601 8598 8604 8607 12 8601 8598 -8604 8607 1 + 8598 8604 8610 8613 7 8598 8604 8610 8616 7 + 8595 8586 8580 8598 6 8592 8586 8580 8598 6 + 8589 8586 8580 8598 6 8583 8580 8586 8589 6 + 8583 8580 8586 8592 6 8583 8580 8586 8595 6 + 8583 8580 8598 8601 59 8583 8580 -8598 8601 60 + 8583 8580 8598 8604 7 8580 8598 8604 8607 1 + 8577 8574 8580 8583 7 8577 8574 8580 8586 7 + 8577 8574 8580 8598 7 8574 8580 8586 8589 6 + 8574 8580 8586 8592 6 8574 8580 8586 8595 6 + 8619 8625 8628 8631 7 8619 8625 8628 8634 7 + 8619 8625 8655 8658 7 8616 8610 8619 8622 59 + 8616 8610 -8619 8622 60 8616 8610 8619 8625 7 + 8613 8610 8619 8622 59 8613 8610 -8619 8622 60 + 8613 8610 8619 8625 7 8607 8604 8610 8613 7 + 8607 8604 8610 8616 7 8607 8604 8610 8619 7 + 8664 8661 8667 8670 12 8664 8661 -8667 8670 1 + 8661 8667 8673 8676 7 8658 8655 8661 8664 59 + 8658 8655 -8661 8664 60 8658 8655 8661 8667 7 + 8655 8661 8667 8670 1 8652 8646 8655 8658 6 + 8652 8646 8655 8661 6 8649 8646 8655 8658 6 + 8649 8646 8655 8661 6 8643 8637 8646 8649 62 + 8643 8637 8646 8652 62 8643 8637 8646 8655 61 + 8640 8637 8646 8649 62 8640 8637 8646 8652 62 + 8640 8637 8646 8655 61 8637 8646 8655 8658 6 + 8634 8628 8625 8655 7 8634 8628 8637 8640 6 + 8634 8628 8637 8643 6 8634 8628 8637 8646 6 + 8631 8628 8625 8655 7 8631 8628 8637 8640 6 + 8631 8628 8637 8643 6 8631 8628 8637 8646 6 + 8628 8625 8655 8658 7 8628 8637 8646 8649 61 + 8628 8637 8646 8652 61 8625 8628 8637 8640 6 + 8625 8628 8637 8643 6 8625 8655 8646 8649 6 + 8625 8655 8646 8652 6 8721 8718 8724 8727 12 + 8721 8718 -8724 8727 1 8718 8724 8730 8733 7 + 8703 8697 8706 8709 62 8703 8697 8706 8712 62 + 8703 8697 8706 8715 62 8700 8697 8706 8709 62 + 8700 8697 8706 8712 62 8700 8697 8706 8715 62 + 8694 8685 8679 8697 61 8691 8685 8679 8697 61 + 8688 8685 8679 8697 61 8685 8679 8697 8700 61 + 8685 8679 8697 8703 61 8682 8679 8673 8718 6 + 8682 8679 8685 8688 62 8682 8679 8685 8691 62 + 8682 8679 8685 8694 62 8682 8679 8697 8700 62 + 8682 8679 8697 8703 62 8682 8679 8697 8706 61 + 8679 8697 8706 8709 61 8679 8697 8706 8712 61 + 8679 8697 8706 8715 61 8676 8673 8679 8682 6 + 8676 8673 8679 8685 6 8676 8673 8679 8697 6 + 8676 8673 8718 8721 59 8676 8673 -8718 8721 60 + 8676 8673 8718 8724 7 8673 8679 8685 8688 61 + 8673 8679 8685 8691 61 8673 8679 8685 8694 61 + 8673 8679 8697 8700 61 8673 8679 8697 8703 61 + 8673 8718 8724 8727 1 8670 8667 8673 8676 7 + 8670 8667 8673 8679 7 8670 8667 8673 8718 7 + 8667 8673 8679 8682 6 8787 8784 8790 8793 12 + 8787 8784 -8790 8793 1 8784 8790 8796 8799 7 + 8769 8763 8772 8775 6 8769 8763 8772 8778 6 + 8769 8763 8772 8781 6 8766 8763 8772 8775 6 + 8766 8763 8772 8778 6 8766 8763 8772 8781 6 + 8760 8754 8763 8766 6 8760 8754 8763 8769 6 + 8760 8754 8763 8772 6 8757 8754 8763 8766 6 + 8757 8754 8763 8769 6 8757 8754 8763 8772 6 + 8754 8763 8772 8775 6 8754 8763 8772 8778 6 + 8754 8763 8772 8781 6 8751 8745 8754 8757 62 + 8751 8745 8754 8760 62 8751 8745 8754 8763 61 + 8748 8745 8754 8757 62 8748 8745 8754 8760 62 + 8748 8745 8754 8763 61 8745 8754 8763 8766 6 + 8745 8754 8763 8769 6 8742 8736 8730 8784 6 + 8742 8736 8745 8748 62 8742 8736 8745 8751 62 + 8742 8736 8745 8754 61 8739 8736 8730 8784 6 + 8739 8736 8745 8748 62 8739 8736 8745 8751 62 + 8739 8736 8745 8754 61 8736 8745 8754 8757 61 + 8736 8745 8754 8760 61 8733 8730 8736 8739 6 + 8733 8730 8736 8742 6 8733 8730 8736 8745 6 + 8733 8730 8784 8787 59 8733 8730 -8784 8787 60 + 8733 8730 8784 8790 7 8730 8736 8745 8748 61 + 8730 8736 8745 8751 61 8730 8784 8790 8793 1 + 8727 8724 8730 8733 7 8727 8724 8730 8736 7 + 8727 8724 8730 8784 7 8724 8730 8736 8739 6 + 8724 8730 8736 8742 6 8829 8826 8832 8835 12 + 8829 8826 -8832 8835 1 8826 8832 8838 8841 7 + 8817 8808 8802 8820 63 8817 8808 -8802 8820 26 + 8814 8808 8802 8820 63 8814 8808 -8802 8820 26 + 8811 8808 8802 8820 63 8811 8808 -8802 8820 26 + 8808 8802 8820 8823 63 8808 8802 -8820 8823 61 + 8805 8802 8796 8826 6 8805 8802 8808 8811 6 + 8805 8802 8808 8814 6 8805 8802 8808 8817 6 + 8805 8802 8820 8823 64 8799 8796 8802 8805 6 + 8799 8796 8802 8808 6 8799 8796 8802 8820 63 + 8799 8796 -8802 8820 26 8799 8796 8826 8829 59 + 8799 8796 -8826 8829 60 8799 8796 8826 8832 7 + 8796 8802 8808 8811 61 8796 8802 8808 8814 61 + 8796 8802 8808 8817 61 8796 8802 8820 8823 63 + 8796 8802 -8820 8823 61 8796 8826 8832 8835 1 + 8793 8790 8796 8799 7 8793 8790 8796 8802 7 + 8793 8790 8796 8826 7 8790 8796 8802 8805 6 + 8886 8883 8889 8892 12 8886 8883 -8889 8892 1 + 8883 8889 8895 8898 7 8868 8859 8853 8871 61 + 8865 8859 8853 8871 61 8862 8859 8853 8871 61 + 8859 8853 8871 8874 61 8859 8853 8871 8877 61 + 8859 8853 8871 8880 61 8856 8853 8859 8862 62 + 8856 8853 8859 8865 62 8856 8853 8859 8868 62 + 8856 8853 8871 8874 62 8856 8853 8871 8877 62 + 8856 8853 8871 8880 62 8850 8844 8838 8883 6 + 8850 8844 8853 8856 62 8850 8844 8853 8859 61 + 8850 8844 8853 8871 61 8847 8844 8838 8883 6 + 8847 8844 8853 8856 62 8847 8844 8853 8859 61 + 8847 8844 8853 8871 61 8844 8853 8859 8862 61 + 8844 8853 8859 8865 61 8844 8853 8859 8868 61 + 8844 8853 8871 8874 61 8844 8853 8871 8877 61 + 8844 8853 8871 8880 61 8841 8838 8844 8847 6 + 8841 8838 8844 8850 6 8841 8838 8844 8853 6 + 8841 8838 8883 8886 59 8841 8838 -8883 8886 60 + 8841 8838 8883 8889 7 8838 8844 8853 8856 61 + 8838 8883 8889 8892 1 8835 8832 8838 8841 7 + 8835 8832 8838 8844 7 8835 8832 8838 8883 7 + 8832 8838 8844 8847 6 8832 8838 8844 8850 6 + 8916 8913 8919 8922 12 8916 8913 -8919 8922 1 + 8913 8919 8925 8928 7 8910 8901 8895 8913 6 + 8907 8901 8895 8913 6 8904 8901 8895 8913 6 + 8898 8895 8901 8904 6 8898 8895 8901 8907 6 + 8898 8895 8901 8910 6 8898 8895 8913 8916 59 + 8898 8895 -8913 8916 60 8898 8895 8913 8919 7 + 8895 8913 8919 8922 1 8892 8889 8895 8898 7 + 8892 8889 8895 8901 7 8892 8889 8895 8913 7 + 8889 8895 8901 8904 6 8889 8895 8901 8907 6 + 8889 8895 8901 8910 6 8946 8943 8949 8952 12 + 8946 8943 -8949 8952 1 8943 8949 8955 8958 7 + 8940 8931 8925 8943 6 8937 8931 8925 8943 6 + 8934 8931 8925 8943 6 8928 8925 8931 8934 6 + 8928 8925 8931 8937 6 8928 8925 8931 8940 6 + 8928 8925 8943 8946 59 8928 8925 -8943 8946 60 + 8928 8925 8943 8949 7 8925 8943 8949 8952 1 + 8922 8919 8925 8928 7 8922 8919 8925 8931 7 + 8922 8919 8925 8943 7 8919 8925 8931 8934 6 + 8919 8925 8931 8937 6 8919 8925 8931 8940 6 + 8979 8976 8982 8985 12 8979 8976 -8982 8985 1 + 8976 8982 8988 8991 7 8976 8982 8988 8994 7 + 8967 8961 8955 8976 6 8967 8961 8970 8973 64 + 8964 8961 8955 8976 6 8964 8961 8970 8973 64 + 8958 8955 8961 8964 6 8958 8955 8961 8967 6 + 8958 8955 8961 8970 63 8958 8955 -8961 8970 26 + 8958 8955 8976 8979 59 8958 8955 -8976 8979 60 + 8958 8955 8976 8982 7 8955 8961 8970 8973 63 + 8955 8961 -8970 8973 61 8955 8976 8982 8985 1 + 8952 8949 8955 8958 7 8952 8949 8955 8961 7 + 8952 8949 8955 8976 7 8949 8955 8961 8964 6 + 8949 8955 8961 8967 6 9000 8997 9003 9006 12 + 9000 8997 -9003 9006 1 8997 9003 9009 9012 7 + 8994 8988 8997 9000 59 8994 8988 -8997 9000 60 + 8994 8988 8997 9003 7 8991 8988 8997 9000 59 + 8991 8988 -8997 9000 60 8991 8988 8997 9003 7 + 8988 8997 9003 9006 1 8985 8982 8988 8991 7 + 8985 8982 8988 8994 7 8985 8982 8988 8997 7 + 9057 9054 9060 9063 12 9057 9054 -9060 9063 1 + 9054 9060 9066 9069 7 9039 9033 9042 9045 62 + 9039 9033 9042 9048 62 9039 9033 9042 9051 62 + 9036 9033 9042 9045 62 9036 9033 9042 9048 62 + 9036 9033 9042 9051 62 9030 9021 9015 9033 61 + 9027 9021 9015 9033 61 9024 9021 9015 9033 61 + 9021 9015 9033 9036 61 9021 9015 9033 9039 61 + 9018 9015 9009 9054 6 9018 9015 9021 9024 62 + 9018 9015 9021 9027 62 9018 9015 9021 9030 62 + 9018 9015 9033 9036 62 9018 9015 9033 9039 62 + 9018 9015 9033 9042 61 9015 9033 9042 9045 61 + 9015 9033 9042 9048 61 9015 9033 9042 9051 61 + 9012 9009 9015 9018 6 9012 9009 9015 9021 6 + 9012 9009 9015 9033 6 9012 9009 9054 9057 59 + 9012 9009 -9054 9057 60 9012 9009 9054 9060 7 + 9009 9015 9021 9024 61 9009 9015 9021 9027 61 + 9009 9015 9021 9030 61 9009 9015 9033 9036 61 + 9009 9015 9033 9039 61 9009 9054 9060 9063 1 + 9006 9003 9009 9012 7 9006 9003 9009 9015 7 + 9006 9003 9009 9054 7 9003 9009 9015 9018 6 + 9090 9087 9093 9096 12 9090 9087 -9093 9096 1 + 9087 9093 9099 9102 7 9078 9072 9066 9087 6 + 9078 9072 9081 9084 64 9075 9072 9066 9087 6 + 9075 9072 9081 9084 64 9069 9066 9072 9075 6 + 9069 9066 9072 9078 6 9069 9066 9072 9081 63 + 9069 9066 -9072 9081 26 9069 9066 9087 9090 59 + 9069 9066 -9087 9090 60 9069 9066 9087 9093 7 + 9066 9072 9081 9084 63 9066 9072 -9081 9084 61 + 9066 9087 9093 9096 1 9063 9060 9066 9069 7 + 9063 9060 9066 9072 7 9063 9060 9066 9087 7 + 9060 9066 9072 9075 6 9060 9066 9072 9078 6 + 9132 9129 9135 9138 12 9132 9129 -9135 9138 1 + 9129 9135 9141 9144 7 9117 9114 9120 9123 12 + 9117 9114 -9120 9123 1 9117 9114 9120 9126 12 + 9117 9114 -9120 9126 1 9111 9105 9099 9129 6 + 9111 9105 9114 9117 59 9111 9105 -9114 9117 7 + 9111 9105 -9114 9117 60 9111 9105 9114 9120 7 + 9108 9105 9099 9129 6 9108 9105 9114 9117 59 + 9108 9105 -9114 9117 7 9108 9105 -9114 9117 60 + 9108 9105 9114 9120 7 9105 9114 9120 9123 1 + 9105 9114 9120 9126 1 9102 9099 9105 9108 6 + 9102 9099 9105 9111 6 9102 9099 9105 9114 6 + 9102 9099 9129 9132 59 9102 9099 -9129 9132 60 + 9102 9099 9129 9135 7 9099 9129 9135 9138 1 + 9096 9093 9099 9102 7 9096 9093 9099 9105 7 + 9096 9093 9099 9129 7 9093 9099 9105 9108 6 + 9093 9099 9105 9111 6 9192 9189 9195 9198 12 + 9192 9189 -9195 9198 1 9189 9195 9201 9204 7 + 9180 9177 9183 9186 17 9174 9171 9177 9180 17 + 9174 9171 9177 9183 17 9171 9177 9183 9186 17 + 9168 9165 9171 9174 17 9168 9165 9171 9177 17 + 9165 9171 9177 9180 17 9162 9159 9156 9183 17 + 9162 9159 9165 9168 17 9162 9159 9165 9171 17 + 9159 9156 9183 9186 17 9159 9165 9171 9174 17 + 9156 9159 9165 9168 17 9156 9183 9177 9180 17 + 9153 9147 9141 9189 6 9153 9147 9156 9159 7 + 9153 9147 9156 9183 7 9150 9147 9141 9189 6 + 9150 9147 9156 9159 7 9150 9147 9156 9183 7 + 9147 9156 9159 9162 17 9147 9156 9183 9186 17 + 9144 9141 9147 9150 6 9144 9141 9147 9153 6 + 9144 9141 9147 9156 6 9144 9141 9189 9192 59 + 9144 9141 -9189 9192 60 9144 9141 9189 9195 7 + 9141 9189 9195 9198 1 9138 9135 9141 9144 7 + 9138 9135 9141 9147 7 9138 9135 9141 9189 7 + 9135 9141 9147 9150 6 9135 9141 9147 9153 6 + 9258 9255 9261 9264 12 9258 9255 -9261 9264 1 + 9255 9261 9267 9270 7 9240 9234 9243 9246 6 + 9240 9234 9243 9249 6 9240 9234 9243 9252 6 + 9237 9234 9243 9246 6 9237 9234 9243 9249 6 + 9237 9234 9243 9252 6 9231 9225 9234 9237 6 + 9231 9225 9234 9240 6 9231 9225 9234 9243 6 + 9228 9225 9234 9237 6 9228 9225 9234 9240 6 + 9228 9225 9234 9243 6 9225 9234 9243 9246 6 + 9225 9234 9243 9249 6 9225 9234 9243 9252 6 + 9222 9216 9225 9228 62 9222 9216 9225 9231 62 + 9222 9216 9225 9234 61 9219 9216 9225 9228 62 + 9219 9216 9225 9231 62 9219 9216 9225 9234 61 + 9216 9225 9234 9237 6 9216 9225 9234 9240 6 + 9213 9207 9201 9255 6 9213 9207 9216 9219 62 + 9213 9207 9216 9222 62 9213 9207 9216 9225 61 + 9210 9207 9201 9255 6 9210 9207 9216 9219 62 + 9210 9207 9216 9222 62 9210 9207 9216 9225 61 + 9207 9216 9225 9228 61 9207 9216 9225 9231 61 + 9204 9201 9207 9210 6 9204 9201 9207 9213 6 + 9204 9201 9207 9216 6 9204 9201 9255 9258 59 + 9204 9201 -9255 9258 60 9204 9201 9255 9261 7 + 9201 9207 9216 9219 61 9201 9207 9216 9222 61 + 9201 9255 9261 9264 1 9198 9195 9201 9204 7 + 9198 9195 9201 9207 7 9198 9195 9201 9255 7 + 9195 9201 9207 9210 6 9195 9201 9207 9213 6 + 9324 9321 9327 9330 12 9324 9321 -9327 9330 1 + 9321 9327 9333 9336 7 9306 9300 9309 9312 6 + 9306 9300 9309 9315 6 9306 9300 9309 9318 6 + 9303 9300 9309 9312 6 9303 9300 9309 9315 6 + 9303 9300 9309 9318 6 9297 9291 9300 9303 6 + 9297 9291 9300 9306 6 9297 9291 9300 9309 6 + 9294 9291 9300 9303 6 9294 9291 9300 9306 6 + 9294 9291 9300 9309 6 9291 9300 9309 9312 6 + 9291 9300 9309 9315 6 9291 9300 9309 9318 6 + 9288 9282 9291 9294 62 9288 9282 9291 9297 62 + 9288 9282 9291 9300 61 9285 9282 9291 9294 62 + 9285 9282 9291 9297 62 9285 9282 9291 9300 61 + 9282 9291 9300 9303 6 9282 9291 9300 9306 6 + 9279 9273 9267 9321 6 9279 9273 9282 9285 62 + 9279 9273 9282 9288 62 9279 9273 9282 9291 61 + 9276 9273 9267 9321 6 9276 9273 9282 9285 62 + 9276 9273 9282 9288 62 9276 9273 9282 9291 61 + 9273 9282 9291 9294 61 9273 9282 9291 9297 61 + 9270 9267 9273 9276 6 9270 9267 9273 9279 6 + 9270 9267 9273 9282 6 9270 9267 9321 9324 59 + 9270 9267 -9321 9324 60 9270 9267 9321 9327 7 + 9267 9273 9282 9285 61 9267 9273 9282 9288 61 + 9267 9321 9327 9330 1 9264 9261 9267 9270 7 + 9264 9261 9267 9273 7 9264 9261 9267 9321 7 + 9261 9267 9273 9276 6 9261 9267 9273 9279 6 + 9375 9372 9378 9381 12 9375 9372 -9378 9381 1 + 9372 9378 9384 9387 7 9354 9348 9357 9360 11 + 9351 9348 9357 9360 11 9348 9357 9360 9363 11 + 9348 9357 9360 9366 11 9348 9357 9360 9369 11 + 9345 9339 9333 9372 6 9345 9339 9348 9351 6 + 9345 9339 9348 9354 6 9345 9339 9348 9357 6 + 9342 9339 9333 9372 6 9342 9339 9348 9351 6 + 9342 9339 9348 9354 6 9342 9339 9348 9357 6 + 9336 9333 9339 9342 6 9336 9333 9339 9345 6 + 9336 9333 9339 9348 6 9336 9333 9372 9375 59 + 9336 9333 -9372 9375 60 9336 9333 9372 9378 7 + 9333 9339 9348 9351 6 9333 9339 9348 9354 6 + 9333 9372 9378 9381 1 9330 9327 9333 9336 7 + 9330 9327 9333 9339 7 9330 9327 9333 9372 7 + 9327 9333 9339 9342 6 9327 9333 9339 9345 6 + 9432 9429 9435 9438 12 9432 9429 -9435 9438 1 + 9429 9435 9441 9444 7 9414 9405 9399 9417 61 + 9411 9405 9399 9417 61 9408 9405 9399 9417 61 + 9405 9399 9417 9420 61 9405 9399 9417 9423 61 + 9405 9399 9417 9426 61 9402 9399 9405 9408 62 + 9402 9399 9405 9411 62 9402 9399 9405 9414 62 + 9402 9399 9417 9420 62 9402 9399 9417 9423 62 + 9402 9399 9417 9426 62 9396 9390 9384 9429 6 + 9396 9390 9399 9402 62 9396 9390 9399 9405 61 + 9396 9390 9399 9417 61 9393 9390 9384 9429 6 + 9393 9390 9399 9402 62 9393 9390 9399 9405 61 + 9393 9390 9399 9417 61 9390 9399 9405 9408 61 + 9390 9399 9405 9411 61 9390 9399 9405 9414 61 + 9390 9399 9417 9420 61 9390 9399 9417 9423 61 + 9390 9399 9417 9426 61 9387 9384 9390 9393 6 + 9387 9384 9390 9396 6 9387 9384 9390 9399 6 + 9387 9384 9429 9432 59 9387 9384 -9429 9432 60 + 9387 9384 9429 9435 7 9384 9390 9399 9402 61 + 9384 9429 9435 9438 1 9381 9378 9384 9387 7 + 9381 9378 9384 9390 7 9381 9378 9384 9429 7 + 9378 9384 9390 9393 6 9378 9384 9390 9396 6 + 9468 9465 9471 9474 12 9468 9465 -9471 9474 1 + 9465 9471 9477 9480 7 9453 9447 9441 9465 6 + 9453 9447 9456 9459 7 9453 9447 9456 9462 7 + 9450 9447 9441 9465 6 9450 9447 9456 9459 7 + 9450 9447 9456 9462 7 9444 9441 9447 9450 6 + 9444 9441 9447 9453 6 9444 9441 9447 9456 6 + 9444 9441 9465 9468 59 9444 9441 -9465 9468 60 + 9444 9441 9465 9471 7 9441 9465 9471 9474 1 + 9438 9435 9441 9444 7 9438 9435 9441 9447 7 + 9438 9435 9441 9465 7 9435 9441 9447 9450 6 + 9435 9441 9447 9453 6 9531 9528 9534 9537 12 + 9531 9528 -9534 9537 1 9528 9534 9540 9543 7 + 9519 9516 9522 9525 17 9513 9510 9507 9516 65 + 9510 9507 9516 9519 17 9507 9516 9522 9525 17 + 9504 9501 9507 9510 17 9504 9501 9507 9516 17 + 9501 9507 9510 9513 65 9501 9507 9516 9519 17 + 9498 9495 9492 9522 17 9498 9495 9501 9504 17 + 9498 9495 9501 9507 17 9495 9492 9522 9525 17 + 9492 9495 9501 9504 17 9492 9522 9516 9519 17 + 9489 9483 9477 9528 6 9489 9483 9492 9495 7 + 9489 9483 9492 9522 7 9486 9483 9477 9528 6 + 9486 9483 9492 9495 7 9486 9483 9492 9522 7 + 9483 9492 9495 9498 17 9483 9492 9522 9525 17 + 9480 9477 9483 9486 6 9480 9477 9483 9489 6 + 9480 9477 9483 9492 6 9480 9477 9528 9531 59 + 9480 9477 -9528 9531 60 9480 9477 9528 9534 7 + 9477 9528 9534 9537 1 9474 9471 9477 9480 7 + 9474 9471 9477 9483 7 9474 9471 9477 9528 7 + 9471 9477 9483 9486 6 9471 9477 9483 9489 6 + 9573 9570 9576 9579 12 9573 9570 -9576 9579 1 + 9570 9576 9582 9585 7 9558 9555 9561 9564 12 + 9558 9555 -9561 9564 1 9558 9555 9561 9567 12 + 9558 9555 -9561 9567 1 9552 9546 9540 9570 6 + 9552 9546 9555 9558 59 9552 9546 -9555 9558 7 + 9552 9546 -9555 9558 60 9552 9546 9555 9561 7 + 9549 9546 9540 9570 6 9549 9546 9555 9558 59 + 9549 9546 -9555 9558 7 9549 9546 -9555 9558 60 + 9549 9546 9555 9561 7 9546 9555 9561 9564 1 + 9546 9555 9561 9567 1 9543 9540 9546 9549 6 + 9543 9540 9546 9552 6 9543 9540 9546 9555 6 + 9543 9540 9570 9573 59 9543 9540 -9570 9573 60 + 9543 9540 9570 9576 7 9540 9570 9576 9579 1 + 9537 9534 9540 9543 7 9537 9534 9540 9546 7 + 9537 9534 9540 9570 7 9534 9540 9546 9549 6 + 9534 9540 9546 9552 6 9603 9600 9606 9609 12 + 9603 9600 -9606 9609 1 9600 9606 9612 9615 7 + 9597 9588 9582 9600 6 9594 9588 9582 9600 6 + 9591 9588 9582 9600 6 9585 9582 9588 9591 6 + 9585 9582 9588 9594 6 9585 9582 9588 9597 6 + 9585 9582 9600 9603 59 9585 9582 -9600 9603 60 + 9585 9582 9600 9606 7 9582 9600 9606 9609 1 + 9579 9576 9582 9585 7 9579 9576 9582 9588 7 + 9579 9576 9582 9600 7 9576 9582 9588 9591 6 + 9576 9582 9588 9594 6 9576 9582 9588 9597 6 + 9654 9651 9657 9660 12 9654 9651 -9657 9660 1 + 9651 9657 9663 9666 7 9633 9627 9636 9639 11 + 9630 9627 9636 9639 11 9627 9636 9639 9642 11 + 9627 9636 9639 9645 11 9627 9636 9639 9648 11 + 9624 9618 9612 9651 6 9624 9618 9627 9630 6 + 9624 9618 9627 9633 6 9624 9618 9627 9636 6 + 9621 9618 9612 9651 6 9621 9618 9627 9630 6 + 9621 9618 9627 9633 6 9621 9618 9627 9636 6 + 9615 9612 9618 9621 6 9615 9612 9618 9624 6 + 9615 9612 9618 9627 6 9615 9612 9651 9654 59 + 9615 9612 -9651 9654 60 9615 9612 9651 9657 7 + 9612 9618 9627 9630 6 9612 9618 9627 9633 6 + 9612 9651 9657 9660 1 9609 9606 9612 9615 7 + 9609 9606 9612 9618 7 9609 9606 9612 9651 7 + 9606 9612 9618 9621 6 9606 9612 9618 9624 6 + 9702 9699 9705 9708 12 9702 9699 -9705 9708 1 + 9699 9705 9711 9714 7 9684 9675 9669 9687 61 + 9681 9675 9669 9687 61 9678 9675 9669 9687 61 + 9675 9669 9687 9690 61 9675 9669 9687 9693 61 + 9675 9669 9687 9696 61 9672 9669 9663 9699 6 + 9672 9669 9675 9678 62 9672 9669 9675 9681 62 + 9672 9669 9675 9684 62 9672 9669 9687 9690 62 + 9672 9669 9687 9693 62 9672 9669 9687 9696 62 + 9666 9663 9669 9672 6 9666 9663 9669 9675 6 + 9666 9663 9669 9687 6 9666 9663 9699 9702 59 + 9666 9663 -9699 9702 60 9666 9663 9699 9705 7 + 9663 9669 9675 9678 61 9663 9669 9675 9681 61 + 9663 9669 9675 9684 61 9663 9669 9687 9690 61 + 9663 9669 9687 9693 61 9663 9669 9687 9696 61 + 9663 9699 9705 9708 1 9660 9657 9663 9666 7 + 9660 9657 9663 9669 7 9660 9657 9663 9699 7 + 9657 9663 9669 9672 6 9732 9738 9741 9744 7 + 9732 9738 9741 9747 7 9732 9738 9768 9771 7 + 9723 9717 9711 9732 6 9723 9717 9726 9729 64 + 9720 9717 9711 9732 6 9720 9717 9726 9729 64 + 9714 9711 9717 9720 6 9714 9711 9717 9723 6 + 9714 9711 9717 9726 63 9714 9711 -9717 9726 26 + 9714 9711 9732 9735 59 9714 9711 -9732 9735 60 + 9714 9711 9732 9738 7 9711 9717 9726 9729 63 + 9711 9717 -9726 9729 61 9708 9705 9711 9714 7 + 9708 9705 9711 9717 7 9708 9705 9711 9732 7 + 9705 9711 9717 9720 6 9705 9711 9717 9723 6 + 9777 9774 9780 9783 12 9777 9774 -9780 9783 1 + 9774 9780 9786 9789 7 9771 9768 9774 9777 59 + 9771 9768 -9774 9777 60 9771 9768 9774 9780 7 + 9768 9774 9780 9783 1 9765 9759 9768 9771 6 + 9765 9759 9768 9774 6 9762 9759 9768 9771 6 + 9762 9759 9768 9774 6 9756 9750 9759 9762 62 + 9756 9750 9759 9765 62 9756 9750 9759 9768 61 + 9753 9750 9759 9762 62 9753 9750 9759 9765 62 + 9753 9750 9759 9768 61 9750 9759 9768 9771 6 + 9747 9741 9738 9768 7 9747 9741 9750 9753 6 + 9747 9741 9750 9756 6 9747 9741 9750 9759 6 + 9744 9741 9738 9768 7 9744 9741 9750 9753 6 + 9744 9741 9750 9756 6 9744 9741 9750 9759 6 + 9741 9738 9768 9771 7 9741 9750 9759 9762 61 + 9741 9750 9759 9765 61 9738 9741 9750 9753 6 + 9738 9741 9750 9756 6 9738 9768 9759 9762 6 + 9738 9768 9759 9765 6 9834 9831 9837 9840 12 + 9834 9831 -9837 9840 1 9831 9837 9843 9846 7 + 9816 9807 9801 9819 61 9813 9807 9801 9819 61 + 9810 9807 9801 9819 61 9807 9801 9819 9822 61 + 9807 9801 9819 9825 61 9807 9801 9819 9828 61 + 9804 9801 9807 9810 62 9804 9801 9807 9813 62 + 9804 9801 9807 9816 62 9804 9801 9819 9822 62 + 9804 9801 9819 9825 62 9804 9801 9819 9828 62 + 9798 9792 9786 9831 6 9798 9792 9801 9804 62 + 9798 9792 9801 9807 61 9798 9792 9801 9819 61 + 9795 9792 9786 9831 6 9795 9792 9801 9804 62 + 9795 9792 9801 9807 61 9795 9792 9801 9819 61 + 9792 9801 9807 9810 61 9792 9801 9807 9813 61 + 9792 9801 9807 9816 61 9792 9801 9819 9822 61 + 9792 9801 9819 9825 61 9792 9801 9819 9828 61 + 9789 9786 9792 9795 6 9789 9786 9792 9798 6 + 9789 9786 9792 9801 6 9789 9786 9831 9834 59 + 9789 9786 -9831 9834 60 9789 9786 9831 9837 7 + 9786 9792 9801 9804 61 9786 9831 9837 9840 1 + 9783 9780 9786 9789 7 9783 9780 9786 9792 7 + 9783 9780 9786 9831 7 9780 9786 9792 9795 6 + 9780 9786 9792 9798 6 9900 9897 9903 9906 12 + 9900 9897 -9903 9906 1 9897 9903 9909 9912 7 + 9882 9876 9885 9888 6 9882 9876 9885 9891 6 + 9882 9876 9885 9894 6 9879 9876 9885 9888 6 + 9879 9876 9885 9891 6 9879 9876 9885 9894 6 + 9873 9867 9876 9879 6 9873 9867 9876 9882 6 + 9873 9867 9876 9885 6 9870 9867 9876 9879 6 + 9870 9867 9876 9882 6 9870 9867 9876 9885 6 + 9867 9876 9885 9888 6 9867 9876 9885 9891 6 + 9867 9876 9885 9894 6 9864 9858 9867 9870 62 + 9864 9858 9867 9873 62 9864 9858 9867 9876 61 + 9861 9858 9867 9870 62 9861 9858 9867 9873 62 + 9861 9858 9867 9876 61 9858 9867 9876 9879 6 + 9858 9867 9876 9882 6 9855 9849 9843 9897 6 + 9855 9849 9858 9861 62 9855 9849 9858 9864 62 + 9855 9849 9858 9867 61 9852 9849 9843 9897 6 + 9852 9849 9858 9861 62 9852 9849 9858 9864 62 + 9852 9849 9858 9867 61 9849 9858 9867 9870 61 + 9849 9858 9867 9873 61 9846 9843 9849 9852 6 + 9846 9843 9849 9855 6 9846 9843 9849 9858 6 + 9846 9843 9897 9900 59 9846 9843 -9897 9900 60 + 9846 9843 9897 9903 7 9843 9849 9858 9861 61 + 9843 9849 9858 9864 61 9843 9897 9903 9906 1 + 9840 9837 9843 9846 7 9840 9837 9843 9849 7 + 9840 9837 9843 9897 7 9837 9843 9849 9852 6 + 9837 9843 9849 9855 6 9966 9963 9969 9972 12 + 9966 9963 -9969 9972 1 9963 9969 9975 9978 7 + 9948 9942 9951 9954 6 9948 9942 9951 9957 6 + 9948 9942 9951 9960 6 9945 9942 9951 9954 6 + 9945 9942 9951 9957 6 9945 9942 9951 9960 6 + 9939 9933 9942 9945 6 9939 9933 9942 9948 6 + 9939 9933 9942 9951 6 9936 9933 9942 9945 6 + 9936 9933 9942 9948 6 9936 9933 9942 9951 6 + 9933 9942 9951 9954 6 9933 9942 9951 9957 6 + 9933 9942 9951 9960 6 9930 9924 9933 9936 62 + 9930 9924 9933 9939 62 9930 9924 9933 9942 61 + 9927 9924 9933 9936 62 9927 9924 9933 9939 62 + 9927 9924 9933 9942 61 9924 9933 9942 9945 6 + 9924 9933 9942 9948 6 9921 9915 9909 9963 6 + 9921 9915 9924 9927 62 9921 9915 9924 9930 62 + 9921 9915 9924 9933 61 9918 9915 9909 9963 6 + 9918 9915 9924 9927 62 9918 9915 9924 9930 62 + 9918 9915 9924 9933 61 9915 9924 9933 9936 61 + 9915 9924 9933 9939 61 9912 9909 9915 9918 6 + 9912 9909 9915 9921 6 9912 9909 9915 9924 6 + 9912 9909 9963 9966 59 9912 9909 -9963 9966 60 + 9912 9909 9963 9969 7 9909 9915 9924 9927 61 + 9909 9915 9924 9930 61 9909 9963 9969 9972 1 + 9906 9903 9909 9912 7 9906 9903 9909 9915 7 + 9906 9903 9909 9963 7 9903 9909 9915 9918 6 + 9903 9909 9915 9921 6 10008 10005 10011 10014 12 + 10008 10005 -10011 10014 1 10005 10011 10017 10020 7 + 9993 9990 9996 9999 12 9993 9990 -9996 9999 1 + 9993 9990 9996 10002 12 9993 9990 -9996 10002 1 + 9987 9981 9975 10005 6 9987 9981 9990 9993 59 + 9987 9981 -9990 9993 7 9987 9981 -9990 9993 60 + 9987 9981 9990 9996 7 9984 9981 9975 10005 6 + 9984 9981 9990 9993 59 9984 9981 -9990 9993 7 + 9984 9981 -9990 9993 60 9984 9981 9990 9996 7 + 9981 9990 9996 9999 1 9981 9990 9996 10002 1 + 9978 9975 9981 9984 6 9978 9975 9981 9987 6 + 9978 9975 9981 9990 6 9978 9975 10005 10008 59 + 9978 9975 -10005 10008 60 9978 9975 10005 10011 7 + 9975 10005 10011 10014 1 9972 9969 9975 9978 7 + 9972 9969 9975 9981 7 9972 9969 9975 10005 7 + 9969 9975 9981 9984 6 9969 9975 9981 9987 6 + 10056 10053 10059 10062 12 10056 10053 -10059 10062 1 + 10053 10059 10065 10068 7 10038 10029 10023 10041 61 + 10035 10029 10023 10041 61 10032 10029 10023 10041 61 + 10029 10023 10041 10044 61 10029 10023 10041 10047 61 + 10029 10023 10041 10050 61 10026 10023 10017 10053 6 + 10026 10023 10029 10032 62 10026 10023 10029 10035 62 + 10026 10023 10029 10038 62 10026 10023 10041 10044 62 + 10026 10023 10041 10047 62 10026 10023 10041 10050 62 + 10020 10017 10023 10026 6 10020 10017 10023 10029 6 + 10020 10017 10023 10041 6 10020 10017 10053 10056 59 + 10020 10017 -10053 10056 60 10020 10017 10053 10059 7 + 10017 10023 10029 10032 61 10017 10023 10029 10035 61 + 10017 10023 10029 10038 61 10017 10023 10041 10044 61 + 10017 10023 10041 10047 61 10017 10023 10041 10050 61 + 10017 10053 10059 10062 1 10014 10011 10017 10020 7 + 10014 10011 10017 10023 7 10014 10011 10017 10053 7 + 10011 10017 10023 10026 6 10092 10089 10095 10098 12 + 10092 10089 -10095 10098 1 10089 10095 10101 10104 7 + 10077 10071 10065 10089 6 10077 10071 10080 10083 7 + 10077 10071 10080 10086 7 10074 10071 10065 10089 6 + 10074 10071 10080 10083 7 10074 10071 10080 10086 7 + 10068 10065 10071 10074 6 10068 10065 10071 10077 6 + 10068 10065 10071 10080 6 10068 10065 10089 10092 59 + 10068 10065 -10089 10092 60 10068 10065 10089 10095 7 + 10065 10089 10095 10098 1 10062 10059 10065 10068 7 + 10062 10059 10065 10071 7 10062 10059 10065 10089 7 + 10059 10065 10071 10074 6 10059 10065 10071 10077 6 + 10149 10146 10152 10155 12 10149 10146 -10152 10155 1 + 10146 10152 10158 10161 7 10131 10125 10134 10137 62 + 10131 10125 10134 10140 62 10131 10125 10134 10143 62 + 10128 10125 10134 10137 62 10128 10125 10134 10140 62 + 10128 10125 10134 10143 62 10122 10113 10107 10125 61 + 10119 10113 10107 10125 61 10116 10113 10107 10125 61 + 10113 10107 10125 10128 61 10113 10107 10125 10131 61 + 10110 10107 10101 10146 6 10110 10107 10113 10116 62 + 10110 10107 10113 10119 62 10110 10107 10113 10122 62 + 10110 10107 10125 10128 62 10110 10107 10125 10131 62 + 10110 10107 10125 10134 61 10107 10125 10134 10137 61 + 10107 10125 10134 10140 61 10107 10125 10134 10143 61 + 10104 10101 10107 10110 6 10104 10101 10107 10113 6 + 10104 10101 10107 10125 6 10104 10101 10146 10149 59 + 10104 10101 -10146 10149 60 10104 10101 10146 10152 7 + 10101 10107 10113 10116 61 10101 10107 10113 10119 61 + 10101 10107 10113 10122 61 10101 10107 10125 10128 61 + 10101 10107 10125 10131 61 10101 10146 10152 10155 1 + 10098 10095 10101 10104 7 10098 10095 10101 10107 7 + 10098 10095 10101 10146 7 10095 10101 10107 10110 6 + 10200 10197 10203 10206 12 10200 10197 -10203 10206 1 + 10197 10203 10209 10212 7 10179 10173 10182 10185 11 + 10176 10173 10182 10185 11 10173 10182 10185 10188 11 + 10173 10182 10185 10191 11 10173 10182 10185 10194 11 + 10170 10164 10158 10197 6 10170 10164 10173 10176 6 + 10170 10164 10173 10179 6 10170 10164 10173 10182 6 + 10167 10164 10158 10197 6 10167 10164 10173 10176 6 + 10167 10164 10173 10179 6 10167 10164 10173 10182 6 + 10161 10158 10164 10167 6 10161 10158 10164 10170 6 + 10161 10158 10164 10173 6 10161 10158 10197 10200 59 + 10161 10158 -10197 10200 60 10161 10158 10197 10203 7 + 10158 10164 10173 10176 6 10158 10164 10173 10179 6 + 10158 10197 10203 10206 1 10155 10152 10158 10161 7 + 10155 10152 10158 10164 7 10155 10152 10158 10197 7 + 10152 10158 10164 10167 6 10152 10158 10164 10170 6 + 10245 10242 10248 10251 12 10245 10242 -10248 10251 1 + 10242 10248 10254 10257 7 10230 10224 10233 10236 7 + 10230 10224 10233 10239 7 10227 10224 10233 10236 7 + 10227 10224 10233 10239 7 10221 10215 10209 10242 6 + 10221 10215 10224 10227 62 10221 10215 10224 10230 62 + 10221 10215 10224 10233 6 10218 10215 10209 10242 6 + 10218 10215 10224 10227 62 10218 10215 10224 10230 62 + 10218 10215 10224 10233 6 10212 10209 10215 10218 6 + 10212 10209 10215 10221 6 10212 10209 10215 10224 6 + 10212 10209 10242 10245 59 10212 10209 -10242 10245 60 + 10212 10209 10242 10248 7 10209 10215 10224 10227 61 + 10209 10215 10224 10230 61 10209 10242 10248 10251 1 + 10206 10203 10209 10212 7 10206 10203 10209 10215 7 + 10206 10203 10209 10242 7 10203 10209 10215 10218 6 + 10203 10209 10215 10221 6 10293 10290 10296 10299 12 + 10293 10290 -10296 10299 1 10290 10296 10302 10305 7 + 10290 10296 10302 10308 7 10275 10266 10260 10278 61 + 10272 10266 10260 10278 61 10269 10266 10260 10278 61 + 10266 10260 10278 10281 61 10266 10260 10278 10284 61 + 10266 10260 10278 10287 61 10263 10260 10254 10290 6 + 10263 10260 10266 10269 62 10263 10260 10266 10272 62 + 10263 10260 10266 10275 62 10263 10260 10278 10281 62 + 10263 10260 10278 10284 62 10263 10260 10278 10287 62 + 10257 10254 10260 10263 6 10257 10254 10260 10266 6 + 10257 10254 10260 10278 6 10257 10254 10290 10293 59 + 10257 10254 -10290 10293 60 10257 10254 10290 10296 7 + 10254 10260 10266 10269 61 10254 10260 10266 10272 61 + 10254 10260 10266 10275 61 10254 10260 10278 10281 61 + 10254 10260 10278 10284 61 10254 10260 10278 10287 61 + 10254 10290 10296 10299 1 10251 10248 10254 10257 7 + 10251 10248 10254 10260 7 10251 10248 10254 10290 7 + 10248 10254 10260 10263 6 10314 10311 10317 10320 12 + 10314 10311 -10317 10320 1 10311 10317 10323 10326 7 + 10308 10302 10311 10314 59 10308 10302 -10311 10314 60 + 10308 10302 10311 10317 7 10305 10302 10311 10314 59 + 10305 10302 -10311 10314 60 10305 10302 10311 10317 7 + 10302 10311 10317 10320 1 10299 10296 10302 10305 7 + 10299 10296 10302 10308 7 10299 10296 10302 10311 7 + 10356 10353 10359 10362 12 10356 10353 -10359 10362 1 + 10353 10359 10365 10368 7 10341 10338 10344 10347 12 + 10341 10338 -10344 10347 1 10341 10338 10344 10350 12 + 10341 10338 -10344 10350 1 10335 10329 10323 10353 6 + 10335 10329 10338 10341 59 10335 10329 -10338 10341 7 + 10335 10329 -10338 10341 60 10335 10329 10338 10344 7 + 10332 10329 10323 10353 6 10332 10329 10338 10341 59 + 10332 10329 -10338 10341 7 10332 10329 -10338 10341 60 + 10332 10329 10338 10344 7 10329 10338 10344 10347 1 + 10329 10338 10344 10350 1 10326 10323 10329 10332 6 + 10326 10323 10329 10335 6 10326 10323 10329 10338 6 + 10326 10323 10353 10356 59 10326 10323 -10353 10356 60 + 10326 10323 10353 10359 7 10323 10353 10359 10362 1 + 10320 10317 10323 10326 7 10320 10317 10323 10329 7 + 10320 10317 10323 10353 7 10317 10323 10329 10332 6 + 10317 10323 10329 10335 6 10398 10395 10401 10404 12 + 10398 10395 -10401 10404 1 10395 10401 10407 10410 7 + 10386 10377 10371 10389 63 10386 10377 -10371 10389 26 + 10383 10377 10371 10389 63 10383 10377 -10371 10389 26 + 10380 10377 10371 10389 63 10380 10377 -10371 10389 26 + 10377 10371 10389 10392 63 10377 10371 -10389 10392 61 + 10374 10371 10365 10395 6 10374 10371 10377 10380 6 + 10374 10371 10377 10383 6 10374 10371 10377 10386 6 + 10374 10371 10389 10392 64 10368 10365 10371 10374 6 + 10368 10365 10371 10377 6 10368 10365 10371 10389 63 + 10368 10365 -10371 10389 26 10368 10365 10395 10398 59 + 10368 10365 -10395 10398 60 10368 10365 10395 10401 7 + 10365 10371 10377 10380 61 10365 10371 10377 10383 61 + 10365 10371 10377 10386 61 10365 10371 10389 10392 63 + 10365 10371 -10389 10392 61 10365 10395 10401 10404 1 + 10362 10359 10365 10368 7 10362 10359 10365 10371 7 + 10362 10359 10365 10395 7 10359 10365 10371 10374 6 + 10446 10443 10449 10452 12 10446 10443 -10449 10452 1 + 10443 10449 10455 10458 7 10428 10419 10413 10431 61 + 10425 10419 10413 10431 61 10422 10419 10413 10431 61 + 10419 10413 10431 10434 61 10419 10413 10431 10437 61 + 10419 10413 10431 10440 61 10416 10413 10407 10443 6 + 10416 10413 10419 10422 62 10416 10413 10419 10425 62 + 10416 10413 10419 10428 62 10416 10413 10431 10434 62 + 10416 10413 10431 10437 62 10416 10413 10431 10440 62 + 10410 10407 10413 10416 6 10410 10407 10413 10419 6 + 10410 10407 10413 10431 6 10410 10407 10443 10446 59 + 10410 10407 -10443 10446 60 10410 10407 10443 10449 7 + 10407 10413 10419 10422 61 10407 10413 10419 10425 61 + 10407 10413 10419 10428 61 10407 10413 10431 10434 61 + 10407 10413 10431 10437 61 10407 10413 10431 10440 61 + 10407 10443 10449 10452 1 10404 10401 10407 10410 7 + 10404 10401 10407 10413 7 10404 10401 10407 10443 7 + 10401 10407 10413 10416 6 10476 10473 10479 10482 12 + 10476 10473 -10479 10482 1 10473 10479 10485 10488 7 + 10470 10461 10455 10473 6 10467 10461 10455 10473 6 + 10464 10461 10455 10473 6 10458 10455 10461 10464 6 + 10458 10455 10461 10467 6 10458 10455 10461 10470 6 + 10458 10455 10473 10476 59 10458 10455 -10473 10476 60 + 10458 10455 10473 10479 7 10455 10473 10479 10482 1 + 10452 10449 10455 10458 7 10452 10449 10455 10461 7 + 10452 10449 10455 10473 7 10449 10455 10461 10464 6 + 10449 10455 10461 10467 6 10449 10455 10461 10470 6 + 10536 10533 10539 10542 12 10536 10533 -10539 10542 1 + 10533 10539 10545 10548 7 10524 10521 10527 10530 17 + 10518 10515 10521 10524 17 10518 10515 10521 10527 17 + 10515 10521 10527 10530 17 10512 10509 10515 10518 17 + 10512 10509 10515 10521 17 10509 10515 10521 10524 17 + 10506 10503 10500 10527 17 10506 10503 10509 10512 17 + 10506 10503 10509 10515 17 10503 10500 10527 10530 17 + 10503 10509 10515 10518 17 10500 10503 10509 10512 17 + 10500 10527 10521 10524 17 10497 10491 10485 10533 6 + 10497 10491 10500 10503 7 10497 10491 10500 10527 7 + 10494 10491 10485 10533 6 10494 10491 10500 10503 7 + 10494 10491 10500 10527 7 10491 10500 10503 10506 17 + 10491 10500 10527 10530 17 10488 10485 10491 10494 6 + 10488 10485 10491 10497 6 10488 10485 10491 10500 6 + 10488 10485 10533 10536 59 10488 10485 -10533 10536 60 + 10488 10485 10533 10539 7 10485 10533 10539 10542 1 + 10482 10479 10485 10488 7 10482 10479 10485 10491 7 + 10482 10479 10485 10533 7 10479 10485 10491 10494 6 + 10479 10485 10491 10497 6 10593 10590 10596 10599 12 + 10593 10590 -10596 10599 1 10590 10596 10602 10605 7 + 10575 10566 10560 10578 61 10572 10566 10560 10578 61 + 10569 10566 10560 10578 61 10566 10560 10578 10581 61 + 10566 10560 10578 10584 61 10566 10560 10578 10587 61 + 10563 10560 10566 10569 62 10563 10560 10566 10572 62 + 10563 10560 10566 10575 62 10563 10560 10578 10581 62 + 10563 10560 10578 10584 62 10563 10560 10578 10587 62 + 10557 10551 10545 10590 6 10557 10551 10560 10563 62 + 10557 10551 10560 10566 61 10557 10551 10560 10578 61 + 10554 10551 10545 10590 6 10554 10551 10560 10563 62 + 10554 10551 10560 10566 61 10554 10551 10560 10578 61 + 10551 10560 10566 10569 61 10551 10560 10566 10572 61 + 10551 10560 10566 10575 61 10551 10560 10578 10581 61 + 10551 10560 10578 10584 61 10551 10560 10578 10587 61 + 10548 10545 10551 10554 6 10548 10545 10551 10557 6 + 10548 10545 10551 10560 6 10548 10545 10590 10593 59 + 10548 10545 -10590 10593 60 10548 10545 10590 10596 7 + 10545 10551 10560 10563 61 10545 10590 10596 10599 1 + 10542 10539 10545 10548 7 10542 10539 10545 10551 7 + 10542 10539 10545 10590 7 10539 10545 10551 10554 6 + 10539 10545 10551 10557 6 10626 10623 10629 10632 12 + 10626 10623 -10629 10632 1 10623 10629 10635 10638 7 + 10614 10608 10602 10623 6 10614 10608 10617 10620 46 + 10611 10608 10602 10623 6 10611 10608 10617 10620 46 + 10605 10602 10608 10611 6 10605 10602 10608 10614 6 + 10605 10602 10608 10617 6 10605 10602 10623 10626 59 + 10605 10602 -10623 10626 60 10605 10602 10623 10629 7 + 10602 10608 10617 10620 46 10602 10623 10629 10632 1 + 10599 10596 10602 10605 7 10599 10596 10602 10608 7 + 10599 10596 10602 10623 7 10596 10602 10608 10611 6 + 10596 10602 10608 10614 6 10659 10656 10662 10665 12 + 10659 10656 -10662 10665 1 10656 10662 10668 10671 7 + 10647 10641 10635 10656 6 10647 10641 10650 10653 64 + 10644 10641 10635 10656 6 10644 10641 10650 10653 64 + 10638 10635 10641 10644 6 10638 10635 10641 10647 6 + 10638 10635 10641 10650 63 10638 10635 -10641 10650 26 + 10638 10635 10656 10659 59 10638 10635 -10656 10659 60 + 10638 10635 10656 10662 7 10635 10641 10650 10653 63 + 10635 10641 -10650 10653 61 10635 10656 10662 10665 1 + 10632 10629 10635 10638 7 10632 10629 10635 10641 7 + 10632 10629 10635 10656 7 10629 10635 10641 10644 6 + 10629 10635 10641 10647 6 10695 10692 10698 10701 12 + 10695 10692 -10698 10701 1 10692 10698 10704 10707 7 + 10680 10674 10668 10692 6 10680 10674 10683 10686 7 + 10680 10674 10683 10689 7 10677 10674 10668 10692 6 + 10677 10674 10683 10686 7 10677 10674 10683 10689 7 + 10671 10668 10674 10677 6 10671 10668 10674 10680 6 + 10671 10668 10674 10683 6 10671 10668 10692 10695 59 + 10671 10668 -10692 10695 60 10671 10668 10692 10698 7 + 10668 10692 10698 10701 1 10665 10662 10668 10671 7 + 10665 10662 10668 10674 7 10665 10662 10668 10692 7 + 10662 10668 10674 10677 6 10662 10668 10674 10680 6 + 10746 10743 10749 10752 12 10746 10743 -10749 10752 1 + 10743 10749 10755 10758 7 10725 10719 10728 10731 11 + 10722 10719 10728 10731 11 10719 10728 10731 10734 11 + 10719 10728 10731 10737 11 10719 10728 10731 10740 11 + 10716 10710 10704 10743 6 10716 10710 10719 10722 6 + 10716 10710 10719 10725 6 10716 10710 10719 10728 6 + 10713 10710 10704 10743 6 10713 10710 10719 10722 6 + 10713 10710 10719 10725 6 10713 10710 10719 10728 6 + 10707 10704 10710 10713 6 10707 10704 10710 10716 6 + 10707 10704 10710 10719 6 10707 10704 10743 10746 59 + 10707 10704 -10743 10746 60 10707 10704 10743 10749 7 + 10704 10710 10719 10722 6 10704 10710 10719 10725 6 + 10704 10743 10749 10752 1 10701 10698 10704 10707 7 + 10701 10698 10704 10710 7 10701 10698 10704 10743 7 + 10698 10704 10710 10713 6 10698 10704 10710 10716 6 + 10776 10773 10779 10782 12 10776 10773 -10779 10782 1 + 10773 10779 10785 10788 7 10770 10761 10755 10773 6 + 10767 10761 10755 10773 6 10764 10761 10755 10773 6 + 10758 10755 10761 10764 6 10758 10755 10761 10767 6 + 10758 10755 10761 10770 6 10758 10755 10773 10776 59 + 10758 10755 -10773 10776 60 10758 10755 10773 10779 7 + 10755 10773 10779 10782 1 10752 10749 10755 10758 7 + 10752 10749 10755 10761 7 10752 10749 10755 10773 7 + 10749 10755 10761 10764 6 10749 10755 10761 10767 6 + 10749 10755 10761 10770 6 10818 10815 10821 10824 12 + 10818 10815 -10821 10824 1 10815 10821 10827 10830 7 + 10815 10821 10827 10833 7 10806 10797 10791 10809 63 + 10806 10797 -10791 10809 26 10803 10797 10791 10809 63 + 10803 10797 -10791 10809 26 10800 10797 10791 10809 63 + 10800 10797 -10791 10809 26 10797 10791 10809 10812 63 + 10797 10791 -10809 10812 61 10794 10791 10785 10815 6 + 10794 10791 10797 10800 6 10794 10791 10797 10803 6 + 10794 10791 10797 10806 6 10794 10791 10809 10812 64 + 10788 10785 10791 10794 6 10788 10785 10791 10797 6 + 10788 10785 10791 10809 63 10788 10785 -10791 10809 26 + 10788 10785 10815 10818 59 10788 10785 -10815 10818 60 + 10788 10785 10815 10821 7 10785 10791 10797 10800 61 + 10785 10791 10797 10803 61 10785 10791 10797 10806 61 + 10785 10791 10809 10812 63 10785 10791 -10809 10812 61 + 10785 10815 10821 10824 1 10782 10779 10785 10788 7 + 10782 10779 10785 10791 7 10782 10779 10785 10815 7 + 10779 10785 10791 10794 6 10839 10836 10842 10845 12 + 10839 10836 -10842 10845 1 10836 10842 10848 10851 7 + 10833 10827 10836 10839 59 10833 10827 -10836 10839 60 + 10833 10827 10836 10842 7 10830 10827 10836 10839 59 + 10830 10827 -10836 10839 60 10830 10827 10836 10842 7 + 10827 10836 10842 10845 1 10824 10821 10827 10830 7 + 10824 10821 10827 10833 7 10824 10821 10827 10836 7 + 10896 10893 10899 10902 12 10896 10893 -10899 10902 1 + 10893 10899 10905 10908 7 10878 10872 10881 10884 62 + 10878 10872 10881 10887 62 10878 10872 10881 10890 62 + 10875 10872 10881 10884 62 10875 10872 10881 10887 62 + 10875 10872 10881 10890 62 10869 10860 10854 10872 61 + 10866 10860 10854 10872 61 10863 10860 10854 10872 61 + 10860 10854 10872 10875 61 10860 10854 10872 10878 61 + 10857 10854 10848 10893 6 10857 10854 10860 10863 62 + 10857 10854 10860 10866 62 10857 10854 10860 10869 62 + 10857 10854 10872 10875 62 10857 10854 10872 10878 62 + 10857 10854 10872 10881 61 10854 10872 10881 10884 61 + 10854 10872 10881 10887 61 10854 10872 10881 10890 61 + 10851 10848 10854 10857 6 10851 10848 10854 10860 6 + 10851 10848 10854 10872 6 10851 10848 10893 10896 59 + 10851 10848 -10893 10896 60 10851 10848 10893 10899 7 + 10848 10854 10860 10863 61 10848 10854 10860 10866 61 + 10848 10854 10860 10869 61 10848 10854 10872 10875 61 + 10848 10854 10872 10878 61 10848 10893 10899 10902 1 + 10845 10842 10848 10851 7 10845 10842 10848 10854 7 + 10845 10842 10848 10893 7 10842 10848 10854 10857 6 + 10938 10935 10941 10944 12 10938 10935 -10941 10944 1 + 10935 10941 10947 10950 7 10935 10941 10947 10953 7 + 10926 10917 10911 10929 63 10926 10917 -10911 10929 26 + 10923 10917 10911 10929 63 10923 10917 -10911 10929 26 + 10920 10917 10911 10929 63 10920 10917 -10911 10929 26 + 10917 10911 10929 10932 63 10917 10911 -10929 10932 61 + 10914 10911 10905 10935 6 10914 10911 10917 10920 6 + 10914 10911 10917 10923 6 10914 10911 10917 10926 6 + 10914 10911 10929 10932 64 10908 10905 10911 10914 6 + 10908 10905 10911 10917 6 10908 10905 10911 10929 63 + 10908 10905 -10911 10929 26 10908 10905 10935 10938 59 + 10908 10905 -10935 10938 60 10908 10905 10935 10941 7 + 10905 10911 10917 10920 61 10905 10911 10917 10923 61 + 10905 10911 10917 10926 61 10905 10911 10929 10932 63 + 10905 10911 -10929 10932 61 10905 10935 10941 10944 1 + 10902 10899 10905 10908 7 10902 10899 10905 10911 7 + 10902 10899 10905 10935 7 10899 10905 10911 10914 6 + 10959 10956 10962 10965 12 10959 10956 -10962 10965 1 + 10956 10962 10968 10971 7 10953 10947 10956 10959 59 + 10953 10947 -10956 10959 60 10953 10947 10956 10962 7 + 10950 10947 10956 10959 59 10950 10947 -10956 10959 60 + 10950 10947 10956 10962 7 10947 10956 10962 10965 1 + 10944 10941 10947 10950 7 10944 10941 10947 10953 7 + 10944 10941 10947 10956 7 11004 11001 11007 11010 12 + 11004 11001 -11007 11010 1 11001 11007 11013 11016 7 + 10989 10983 10992 10995 7 10989 10983 10992 10998 7 + 10986 10983 10992 10995 7 10986 10983 10992 10998 7 + 10980 10974 10968 11001 6 10980 10974 10983 10986 62 + 10980 10974 10983 10989 62 10980 10974 10983 10992 6 + 10977 10974 10968 11001 6 10977 10974 10983 10986 62 + 10977 10974 10983 10989 62 10977 10974 10983 10992 6 + 10971 10968 10974 10977 6 10971 10968 10974 10980 6 + 10971 10968 10974 10983 6 10971 10968 11001 11004 59 + 10971 10968 -11001 11004 60 10971 10968 11001 11007 7 + 10968 10974 10983 10986 61 10968 10974 10983 10989 61 + 10968 11001 11007 11010 1 10965 10962 10968 10971 7 + 10965 10962 10968 10974 7 10965 10962 10968 11001 7 + 10962 10968 10974 10977 6 10962 10968 10974 10980 6 + 11052 11049 11055 11058 12 11052 11049 -11055 11058 1 + 11049 11055 11061 11064 7 11034 11025 11019 11037 61 + 11031 11025 11019 11037 61 11028 11025 11019 11037 61 + 11025 11019 11037 11040 61 11025 11019 11037 11043 61 + 11025 11019 11037 11046 61 11022 11019 11013 11049 6 + 11022 11019 11025 11028 62 11022 11019 11025 11031 62 + 11022 11019 11025 11034 62 11022 11019 11037 11040 62 + 11022 11019 11037 11043 62 11022 11019 11037 11046 62 + 11016 11013 11019 11022 6 11016 11013 11019 11025 6 + 11016 11013 11019 11037 6 11016 11013 11049 11052 59 + 11016 11013 -11049 11052 60 11016 11013 11049 11055 7 + 11013 11019 11025 11028 61 11013 11019 11025 11031 61 + 11013 11019 11025 11034 61 11013 11019 11037 11040 61 + 11013 11019 11037 11043 61 11013 11019 11037 11046 61 + 11013 11049 11055 11058 1 11010 11007 11013 11016 7 + 11010 11007 11013 11019 7 11010 11007 11013 11049 7 + 11007 11013 11019 11022 6 11100 11097 11103 11106 12 + 11100 11097 -11103 11106 1 11097 11103 11109 11112 7 + 11082 11073 11067 11085 61 11079 11073 11067 11085 61 + 11076 11073 11067 11085 61 11073 11067 11085 11088 61 + 11073 11067 11085 11091 61 11073 11067 11085 11094 61 + 11070 11067 11061 11097 6 11070 11067 11073 11076 62 + 11070 11067 11073 11079 62 11070 11067 11073 11082 62 + 11070 11067 11085 11088 62 11070 11067 11085 11091 62 + 11070 11067 11085 11094 62 11064 11061 11067 11070 6 + 11064 11061 11067 11073 6 11064 11061 11067 11085 6 + 11064 11061 11097 11100 59 11064 11061 -11097 11100 60 + 11064 11061 11097 11103 7 11061 11067 11073 11076 61 + 11061 11067 11073 11079 61 11061 11067 11073 11082 61 + 11061 11067 11085 11088 61 11061 11067 11085 11091 61 + 11061 11067 11085 11094 61 11061 11097 11103 11106 1 + 11058 11055 11061 11064 7 11058 11055 11061 11067 7 + 11058 11055 11061 11097 7 11055 11061 11067 11070 6 + 11151 11148 11154 11157 12 11151 11148 -11154 11157 1 + 11148 11154 11160 11163 7 11139 11136 11142 11145 25 + 11133 11130 11136 11139 23 11133 11130 11136 11142 23 + 11130 11136 11142 11145 25 11127 11124 11142 11145 22 + 11127 11130 11136 11139 23 11124 11127 11130 11133 24 + 11124 11142 11136 11139 25 11121 11115 11109 11148 6 + 11121 11115 11124 11127 7 11121 11115 11124 11142 7 + 11118 11115 11109 11148 6 11118 11115 11124 11127 7 + 11118 11115 11124 11142 7 11115 11124 11142 11145 22 + 11112 11109 11115 11118 6 11112 11109 11115 11121 6 + 11112 11109 11115 11124 6 11112 11109 11148 11151 59 + 11112 11109 -11148 11151 60 11112 11109 11148 11154 7 + 11109 11148 11154 11157 1 11106 11103 11109 11112 7 + 11106 11103 11109 11115 7 11106 11103 11109 11148 7 + 11103 11109 11115 11118 6 11103 11109 11115 11121 6 + 11199 11196 11202 11205 12 11199 11196 -11202 11205 1 + 11196 11202 11208 11211 7 11181 11172 11166 11184 61 + 11178 11172 11166 11184 61 11175 11172 11166 11184 61 + 11172 11166 11184 11187 61 11172 11166 11184 11190 61 + 11172 11166 11184 11193 61 11169 11166 11160 11196 6 + 11169 11166 11172 11175 62 11169 11166 11172 11178 62 + 11169 11166 11172 11181 62 11169 11166 11184 11187 62 + 11169 11166 11184 11190 62 11169 11166 11184 11193 62 + 11163 11160 11166 11169 6 11163 11160 11166 11172 6 + 11163 11160 11166 11184 6 11163 11160 11196 11199 59 + 11163 11160 -11196 11199 60 11163 11160 11196 11202 7 + 11160 11166 11172 11175 61 11160 11166 11172 11178 61 + 11160 11166 11172 11181 61 11160 11166 11184 11187 61 + 11160 11166 11184 11190 61 11160 11166 11184 11193 61 + 11160 11196 11202 11205 1 11157 11154 11160 11163 7 + 11157 11154 11160 11166 7 11157 11154 11160 11196 7 + 11154 11160 11166 11169 6 11235 11232 11238 11241 12 + 11235 11232 -11238 11241 1 11232 11238 11244 11247 7 + 11220 11214 11208 11232 6 11220 11214 11223 11226 7 + 11220 11214 11223 11229 7 11217 11214 11208 11232 6 + 11217 11214 11223 11226 7 11217 11214 11223 11229 7 + 11211 11208 11214 11217 6 11211 11208 11214 11220 6 + 11211 11208 11214 11223 6 11211 11208 11232 11235 59 + 11211 11208 -11232 11235 60 11211 11208 11232 11238 7 + 11208 11232 11238 11241 1 11205 11202 11208 11211 7 + 11205 11202 11208 11214 7 11205 11202 11208 11232 7 + 11202 11208 11214 11217 6 11202 11208 11214 11220 6 + 11265 11262 11268 11271 12 11265 11262 -11268 11271 1 + 11262 11268 11274 11277 7 11262 11268 11274 11280 7 + 11259 11250 11244 11262 6 11256 11250 11244 11262 6 + 11253 11250 11244 11262 6 11247 11244 11250 11253 6 + 11247 11244 11250 11256 6 11247 11244 11250 11259 6 + 11247 11244 11262 11265 59 11247 11244 -11262 11265 60 + 11247 11244 11262 11268 7 11244 11262 11268 11271 1 + 11241 11238 11244 11247 7 11241 11238 11244 11250 7 + 11241 11238 11244 11262 7 11238 11244 11250 11253 6 + 11238 11244 11250 11256 6 11238 11244 11250 11259 6 + 11286 11283 11289 11292 12 11286 11283 -11289 11292 1 + 11283 11289 11295 11298 7 11280 11274 11283 11286 59 + 11280 11274 -11283 11286 60 11280 11274 11283 11289 7 + 11277 11274 11283 11286 59 11277 11274 -11283 11286 60 + 11277 11274 11283 11289 7 11274 11283 11289 11292 1 + 11271 11268 11274 11277 7 11271 11268 11274 11280 7 + 11271 11268 11274 11283 7 11349 11346 11352 11355 12 + 11349 11346 -11352 11355 1 11346 11352 11358 11361 7 + 11337 11334 11340 11343 17 11331 11328 11325 11334 65 + 11328 11325 11334 11337 17 11325 11334 11340 11343 17 + 11322 11319 11325 11328 17 11322 11319 11325 11334 17 + 11319 11325 11328 11331 65 11319 11325 11334 11337 17 + 11316 11313 11310 11340 17 11316 11313 11319 11322 17 + 11316 11313 11319 11325 17 11313 11310 11340 11343 17 + 11310 11313 11319 11322 17 11310 11340 11334 11337 17 + 11307 11301 11295 11346 6 11307 11301 11310 11313 7 + 11307 11301 11310 11340 7 11304 11301 11295 11346 6 + 11304 11301 11310 11313 7 11304 11301 11310 11340 7 + 11301 11310 11313 11316 17 11301 11310 11340 11343 17 + 11298 11295 11301 11304 6 11298 11295 11301 11307 6 + 11298 11295 11301 11310 6 11298 11295 11346 11349 59 + 11298 11295 -11346 11349 60 11298 11295 11346 11352 7 + 11295 11346 11352 11355 1 11292 11289 11295 11298 7 + 11292 11289 11295 11301 7 11292 11289 11295 11346 7 + 11289 11295 11301 11304 6 11289 11295 11301 11307 6 + 11400 11397 11403 11406 12 11400 11397 -11403 11406 1 + 11397 11403 11409 11412 7 11388 11385 11391 11394 25 + 11382 11379 11385 11388 23 11382 11379 11385 11391 23 + 11379 11385 11391 11394 25 11376 11373 11391 11394 22 + 11376 11379 11385 11388 23 11373 11376 11379 11382 24 + 11373 11391 11385 11388 25 11370 11364 11358 11397 6 + 11370 11364 11373 11376 7 11370 11364 11373 11391 7 + 11367 11364 11358 11397 6 11367 11364 11373 11376 7 + 11367 11364 11373 11391 7 11364 11373 11391 11394 22 + 11361 11358 11364 11367 6 11361 11358 11364 11370 6 + 11361 11358 11364 11373 6 11361 11358 11397 11400 59 + 11361 11358 -11397 11400 60 11361 11358 11397 11403 7 + 11358 11397 11403 11406 1 11355 11352 11358 11361 7 + 11355 11352 11358 11364 7 11355 11352 11358 11397 7 + 11352 11358 11364 11367 6 11352 11358 11364 11370 6 + 11433 11430 11436 11439 12 11433 11430 -11436 11439 1 + 11430 11436 11442 11445 7 11421 11415 11409 11430 6 + 11421 11415 11424 11427 46 11418 11415 11409 11430 6 + 11418 11415 11424 11427 46 11412 11409 11415 11418 6 + 11412 11409 11415 11421 6 11412 11409 11415 11424 6 + 11412 11409 11430 11433 59 11412 11409 -11430 11433 60 + 11412 11409 11430 11436 7 11409 11415 11424 11427 46 + 11409 11430 11436 11439 1 11406 11403 11409 11412 7 + 11406 11403 11409 11415 7 11406 11403 11409 11430 7 + 11403 11409 11415 11418 6 11403 11409 11415 11421 6 + 11481 11478 11484 11487 12 11481 11478 -11484 11487 1 + 11478 11484 11490 11493 7 11463 11454 11448 11466 61 + 11460 11454 11448 11466 61 11457 11454 11448 11466 61 + 11454 11448 11466 11469 61 11454 11448 11466 11472 61 + 11454 11448 11466 11475 61 11451 11448 11442 11478 6 + 11451 11448 11454 11457 62 11451 11448 11454 11460 62 + 11451 11448 11454 11463 62 11451 11448 11466 11469 62 + 11451 11448 11466 11472 62 11451 11448 11466 11475 62 + 11445 11442 11448 11451 6 11445 11442 11448 11454 6 + 11445 11442 11448 11466 6 11445 11442 11478 11481 59 + 11445 11442 -11478 11481 60 11445 11442 11478 11484 7 + 11442 11448 11454 11457 61 11442 11448 11454 11460 61 + 11442 11448 11454 11463 61 11442 11448 11466 11469 61 + 11442 11448 11466 11472 61 11442 11448 11466 11475 61 + 11442 11478 11484 11487 1 11439 11436 11442 11445 7 + 11439 11436 11442 11448 7 11439 11436 11442 11478 7 + 11436 11442 11448 11451 6 11514 11511 11517 11520 12 + 11514 11511 -11517 11520 1 11511 11517 11523 11526 7 + 11502 11496 11490 11511 6 11502 11496 11505 11508 64 + 11499 11496 11490 11511 6 11499 11496 11505 11508 64 + 11493 11490 11496 11499 6 11493 11490 11496 11502 6 + 11493 11490 11496 11505 63 11493 11490 -11496 11505 26 + 11493 11490 11511 11514 59 11493 11490 -11511 11514 60 + 11493 11490 11511 11517 7 11490 11496 11505 11508 63 + 11490 11496 -11505 11508 61 11490 11511 11517 11520 1 + 11487 11484 11490 11493 7 11487 11484 11490 11496 7 + 11487 11484 11490 11511 7 11484 11490 11496 11499 6 + 11484 11490 11496 11502 6 11565 11562 11568 11571 12 + 11565 11562 -11568 11571 1 11562 11568 11574 11577 7 + 11562 11568 11574 11580 7 11544 11538 11547 11550 11 + 11541 11538 11547 11550 11 11538 11547 11550 11553 11 + 11538 11547 11550 11556 11 11538 11547 11550 11559 11 + 11535 11529 11523 11562 6 11535 11529 11538 11541 6 + 11535 11529 11538 11544 6 11535 11529 11538 11547 6 + 11532 11529 11523 11562 6 11532 11529 11538 11541 6 + 11532 11529 11538 11544 6 11532 11529 11538 11547 6 + 11526 11523 11529 11532 6 11526 11523 11529 11535 6 + 11526 11523 11529 11538 6 11526 11523 11562 11565 59 + 11526 11523 -11562 11565 60 11526 11523 11562 11568 7 + 11523 11529 11538 11541 6 11523 11529 11538 11544 6 + 11523 11562 11568 11571 1 11520 11517 11523 11526 7 + 11520 11517 11523 11529 7 11520 11517 11523 11562 7 + 11517 11523 11529 11532 6 11517 11523 11529 11535 6 + 11586 11583 11589 11592 12 11586 11583 -11589 11592 1 + 11583 11589 11595 11598 7 11580 11574 11583 11586 59 + 11580 11574 -11583 11586 60 11580 11574 11583 11589 7 + 11577 11574 11583 11586 59 11577 11574 -11583 11586 60 + 11577 11574 11583 11589 7 11574 11583 11589 11592 1 + 11571 11568 11574 11577 7 11571 11568 11574 11580 7 + 11571 11568 11574 11583 7 11628 11625 11631 11634 12 + 11628 11625 -11631 11634 1 11625 11631 11637 11640 7 + 11613 11610 11616 11619 12 11613 11610 -11616 11619 1 + 11613 11610 11616 11622 12 11613 11610 -11616 11622 1 + 11607 11601 11595 11625 6 11607 11601 11610 11613 59 + 11607 11601 -11610 11613 7 11607 11601 -11610 11613 60 + 11607 11601 11610 11616 7 11604 11601 11595 11625 6 + 11604 11601 11610 11613 59 11604 11601 -11610 11613 7 + 11604 11601 -11610 11613 60 11604 11601 11610 11616 7 + 11601 11610 11616 11619 1 11601 11610 11616 11622 1 + 11598 11595 11601 11604 6 11598 11595 11601 11607 6 + 11598 11595 11601 11610 6 11598 11595 11625 11628 59 + 11598 11595 -11625 11628 60 11598 11595 11625 11631 7 + 11595 11625 11631 11634 1 11592 11589 11595 11598 7 + 11592 11589 11595 11601 7 11592 11589 11595 11625 7 + 11589 11595 11601 11604 6 11589 11595 11601 11607 6 + 11676 11673 11679 11682 12 11676 11673 -11679 11682 1 + 11673 11679 11685 11688 7 11658 11649 11643 11661 61 + 11655 11649 11643 11661 61 11652 11649 11643 11661 61 + 11649 11643 11661 11664 61 11649 11643 11661 11667 61 + 11649 11643 11661 11670 61 11646 11643 11637 11673 6 + 11646 11643 11649 11652 62 11646 11643 11649 11655 62 + 11646 11643 11649 11658 62 11646 11643 11661 11664 62 + 11646 11643 11661 11667 62 11646 11643 11661 11670 62 + 11640 11637 11643 11646 6 11640 11637 11643 11649 6 + 11640 11637 11643 11661 6 11640 11637 11673 11676 59 + 11640 11637 -11673 11676 60 11640 11637 11673 11679 7 + 11637 11643 11649 11652 61 11637 11643 11649 11655 61 + 11637 11643 11649 11658 61 11637 11643 11661 11664 61 + 11637 11643 11661 11667 61 11637 11643 11661 11670 61 + 11637 11673 11679 11682 1 11634 11631 11637 11640 7 + 11634 11631 11637 11643 7 11634 11631 11637 11673 7 + 11631 11637 11643 11646 6 11733 11730 11736 11739 12 + 11733 11730 -11736 11739 1 11730 11736 11742 11745 7 + 11715 11706 11700 11718 61 11712 11706 11700 11718 61 + 11709 11706 11700 11718 61 11706 11700 11718 11721 61 + 11706 11700 11718 11724 61 11706 11700 11718 11727 61 + 11703 11700 11706 11709 62 11703 11700 11706 11712 62 + 11703 11700 11706 11715 62 11703 11700 11718 11721 62 + 11703 11700 11718 11724 62 11703 11700 11718 11727 62 + 11697 11691 11685 11730 6 11697 11691 11700 11703 62 + 11697 11691 11700 11706 61 11697 11691 11700 11718 61 + 11694 11691 11685 11730 6 11694 11691 11700 11703 62 + 11694 11691 11700 11706 61 11694 11691 11700 11718 61 + 11691 11700 11706 11709 61 11691 11700 11706 11712 61 + 11691 11700 11706 11715 61 11691 11700 11718 11721 61 + 11691 11700 11718 11724 61 11691 11700 11718 11727 61 + 11688 11685 11691 11694 6 11688 11685 11691 11697 6 + 11688 11685 11691 11700 6 11688 11685 11730 11733 59 + 11688 11685 -11730 11733 60 11688 11685 11730 11736 7 + 11685 11691 11700 11703 61 11685 11730 11736 11739 1 + 11682 11679 11685 11688 7 11682 11679 11685 11691 7 + 11682 11679 11685 11730 7 11679 11685 11691 11694 6 + 11679 11685 11691 11697 6 11790 11787 11793 11796 12 + 11790 11787 -11793 11796 1 11787 11793 11799 11802 7 + 11772 11763 11757 11775 61 11769 11763 11757 11775 61 + 11766 11763 11757 11775 61 11763 11757 11775 11778 61 + 11763 11757 11775 11781 61 11763 11757 11775 11784 61 + 11760 11757 11763 11766 62 11760 11757 11763 11769 62 + 11760 11757 11763 11772 62 11760 11757 11775 11778 62 + 11760 11757 11775 11781 62 11760 11757 11775 11784 62 + 11754 11748 11742 11787 6 11754 11748 11757 11760 62 + 11754 11748 11757 11763 61 11754 11748 11757 11775 61 + 11751 11748 11742 11787 6 11751 11748 11757 11760 62 + 11751 11748 11757 11763 61 11751 11748 11757 11775 61 + 11748 11757 11763 11766 61 11748 11757 11763 11769 61 + 11748 11757 11763 11772 61 11748 11757 11775 11778 61 + 11748 11757 11775 11781 61 11748 11757 11775 11784 61 + 11745 11742 11748 11751 6 11745 11742 11748 11754 6 + 11745 11742 11748 11757 6 11745 11742 11787 11790 59 + 11745 11742 -11787 11790 60 11745 11742 11787 11793 7 + 11742 11748 11757 11760 61 11742 11787 11793 11796 1 + 11739 11736 11742 11745 7 11739 11736 11742 11748 7 + 11739 11736 11742 11787 7 11736 11742 11748 11751 6 + 11736 11742 11748 11754 6 11835 11832 11838 11841 12 + 11835 11832 -11838 11841 1 11832 11838 11844 11847 7 + 11820 11814 11823 11826 7 11820 11814 11823 11829 7 + 11817 11814 11823 11826 7 11817 11814 11823 11829 7 + 11811 11805 11799 11832 6 11811 11805 11814 11817 62 + 11811 11805 11814 11820 62 11811 11805 11814 11823 6 + 11808 11805 11799 11832 6 11808 11805 11814 11817 62 + 11808 11805 11814 11820 62 11808 11805 11814 11823 6 + 11802 11799 11805 11808 6 11802 11799 11805 11811 6 + 11802 11799 11805 11814 6 11802 11799 11832 11835 59 + 11802 11799 -11832 11835 60 11802 11799 11832 11838 7 + 11799 11805 11814 11817 61 11799 11805 11814 11820 61 + 11799 11832 11838 11841 1 11796 11793 11799 11802 7 + 11796 11793 11799 11805 7 11796 11793 11799 11832 7 + 11793 11799 11805 11808 6 11793 11799 11805 11811 6 + 11886 11883 11889 11892 12 11886 11883 -11889 11892 1 + 11883 11889 11895 11898 7 11874 11871 11877 11880 25 + 11868 11865 11871 11874 23 11868 11865 11871 11877 23 + 11865 11871 11877 11880 25 11862 11859 11877 11880 22 + 11862 11865 11871 11874 23 11859 11862 11865 11868 24 + 11859 11877 11871 11874 25 11856 11850 11844 11883 6 + 11856 11850 11859 11862 7 11856 11850 11859 11877 7 + 11853 11850 11844 11883 6 11853 11850 11859 11862 7 + 11853 11850 11859 11877 7 11850 11859 11877 11880 22 + 11847 11844 11850 11853 6 11847 11844 11850 11856 6 + 11847 11844 11850 11859 6 11847 11844 11883 11886 59 + 11847 11844 -11883 11886 60 11847 11844 11883 11889 7 + 11844 11883 11889 11892 1 11841 11838 11844 11847 7 + 11841 11838 11844 11850 7 11841 11838 11844 11883 7 + 11838 11844 11850 11853 6 11838 11844 11850 11856 6 + 11937 11934 11940 11943 12 11937 11934 -11940 11943 1 + 11934 11940 11946 11949 7 11925 11922 11928 11931 25 + 11919 11916 11922 11925 23 11919 11916 11922 11928 23 + 11916 11922 11928 11931 25 11913 11910 11928 11931 22 + 11913 11916 11922 11925 23 11910 11913 11916 11919 24 + 11910 11928 11922 11925 25 11907 11901 11895 11934 6 + 11907 11901 11910 11913 7 11907 11901 11910 11928 7 + 11904 11901 11895 11934 6 11904 11901 11910 11913 7 + 11904 11901 11910 11928 7 11901 11910 11928 11931 22 + 11898 11895 11901 11904 6 11898 11895 11901 11907 6 + 11898 11895 11901 11910 6 11898 11895 11934 11937 59 + 11898 11895 -11934 11937 60 11898 11895 11934 11940 7 + 11895 11934 11940 11943 1 11892 11889 11895 11898 7 + 11892 11889 11895 11901 7 11892 11889 11895 11934 7 + 11889 11895 11901 11904 6 11889 11895 11901 11907 6 + 11988 11985 11991 11994 12 11988 11985 -11991 11994 1 + 11985 11991 11997 12000 7 11976 11973 11979 11982 25 + 11970 11967 11973 11976 23 11970 11967 11973 11979 23 + 11967 11973 11979 11982 25 11964 11961 11979 11982 22 + 11964 11967 11973 11976 23 11961 11964 11967 11970 24 + 11961 11979 11973 11976 25 11958 11952 11946 11985 6 + 11958 11952 11961 11964 7 11958 11952 11961 11979 7 + 11955 11952 11946 11985 6 11955 11952 11961 11964 7 + 11955 11952 11961 11979 7 11952 11961 11979 11982 22 + 11949 11946 11952 11955 6 11949 11946 11952 11958 6 + 11949 11946 11952 11961 6 11949 11946 11985 11988 59 + 11949 11946 -11985 11988 60 11949 11946 11985 11991 7 + 11946 11985 11991 11994 1 11943 11940 11946 11949 7 + 11943 11940 11946 11952 7 11943 11940 11946 11985 7 + 11940 11946 11952 11955 6 11940 11946 11952 11958 6 + 12039 12036 12042 12045 12 12039 12036 -12042 12045 1 + 12036 12042 12048 12051 7 12027 12024 12030 12033 25 + 12021 12018 12024 12027 23 12021 12018 12024 12030 23 + 12018 12024 12030 12033 25 12015 12012 12030 12033 22 + 12015 12018 12024 12027 23 12012 12015 12018 12021 24 + 12012 12030 12024 12027 25 12009 12003 11997 12036 6 + 12009 12003 12012 12015 7 12009 12003 12012 12030 7 + 12006 12003 11997 12036 6 12006 12003 12012 12015 7 + 12006 12003 12012 12030 7 12003 12012 12030 12033 22 + 12000 11997 12003 12006 6 12000 11997 12003 12009 6 + 12000 11997 12003 12012 6 12000 11997 12036 12039 59 + 12000 11997 -12036 12039 60 12000 11997 12036 12042 7 + 11997 12036 12042 12045 1 11994 11991 11997 12000 7 + 11994 11991 11997 12003 7 11994 11991 11997 12036 7 + 11991 11997 12003 12006 6 11991 11997 12003 12009 6 + 12090 12087 12093 12096 12 12090 12087 -12093 12096 1 + 12087 12093 12099 12102 7 12078 12075 12081 12084 25 + 12072 12069 12075 12078 23 12072 12069 12075 12081 23 + 12069 12075 12081 12084 25 12066 12063 12081 12084 22 + 12066 12069 12075 12078 23 12063 12066 12069 12072 24 + 12063 12081 12075 12078 25 12060 12054 12048 12087 6 + 12060 12054 12063 12066 7 12060 12054 12063 12081 7 + 12057 12054 12048 12087 6 12057 12054 12063 12066 7 + 12057 12054 12063 12081 7 12054 12063 12081 12084 22 + 12051 12048 12054 12057 6 12051 12048 12054 12060 6 + 12051 12048 12054 12063 6 12051 12048 12087 12090 59 + 12051 12048 -12087 12090 60 12051 12048 12087 12093 7 + 12048 12087 12093 12096 1 12045 12042 12048 12051 7 + 12045 12042 12048 12054 7 12045 12042 12048 12087 7 + 12042 12048 12054 12057 6 12042 12048 12054 12060 6 + 12129 12126 12132 12135 25 12123 12120 12126 12129 23 + 12123 12120 12126 12132 23 12120 12126 12132 12135 25 + 12117 12114 12132 12135 22 12117 12120 12126 12129 23 + 12114 12117 12120 12123 24 12114 12132 12126 12129 25 + 12111 12105 12099 12138 6 12111 12105 12114 12117 7 + 12111 12105 12114 12132 7 12108 12105 12099 12138 6 + 12108 12105 12114 12117 7 12108 12105 12114 12132 7 + 12105 12114 12132 12135 22 12102 12099 12105 12108 6 + 12102 12099 12105 12111 6 12102 12099 12105 12114 6 + 12102 12099 12138 12141 7 12102 12099 12138 12144 7 + 12096 12093 12099 12102 7 12096 12093 12099 12105 7 + 12096 12093 12099 12138 7 12093 12099 12105 12108 6 + 12093 12099 12105 12111 6 51 63 -57 -60 33 + 99 120 -126 -129 33 114 126 -120 -123 33 + 108 120 -114 -117 33 102 114 -108 -111 33 + 99 108 -102 -105 33 72 84 -78 -81 33 + 132 144 -138 -141 33 189 201 -195 -198 33 + 219 231 -225 -228 33 240 252 -246 -249 33 + 306 318 -312 -315 33 372 384 -378 -381 33 + 429 441 -435 -438 33 486 498 -492 -495 33 + 543 555 -549 -552 33 585 597 -591 -594 33 + 606 618 -612 -615 33 663 675 -669 -672 33 + 720 732 -726 -729 33 780 789 -786 -792 34 + 753 765 -759 -762 33 795 807 -801 -804 33 + 861 873 -867 -870 33 894 906 -900 -903 33 + 951 963 -957 -960 33 1008 1032 -1038 -1041 33 + 1023 1038 -1032 -1035 33 1011 1023 -1017 -1020 33 + 1008 1017 -1011 -1014 33 981 993 -987 -990 33 + 1044 1056 -1050 -1053 33 1065 1077 -1071 -1074 33 + 1122 1134 -1128 -1131 33 1152 1164 -1158 -1161 33 + 1218 1230 -1224 -1227 33 1248 1260 -1254 -1257 33 + 1326 1338 -1344 -1347 33 1332 1344 -1338 -1341 34 + 1329 1338 -1332 -1335 33 1299 1311 -1305 -1308 33 + 1401 1416 -1413 -1419 34 1401 1407 -1404 -1410 34 + 1386 1401 -1395 -1398 34 1350 1362 -1356 -1359 33 + 1422 1434 -1428 -1431 33 1467 1479 -1473 -1476 33 + 1488 1500 -1494 -1497 33 1518 1530 -1524 -1527 33 + 1563 1575 -1569 -1572 33 1620 1632 -1626 -1629 33 + 1677 1698 -1704 -1707 33 1692 1704 -1698 -1701 33 + 1686 1698 -1692 -1695 33 1680 1692 -1686 -1689 33 + 1677 1686 -1680 -1683 33 1650 1662 -1656 -1659 33 + 1710 1722 -1716 -1719 33 1779 1803 -1809 -1812 33 + 1794 1809 -1803 -1806 33 1782 1794 -1788 -1791 33 + 1779 1788 -1782 -1785 33 1752 1764 -1758 -1761 33 + 1815 1827 -1821 -1824 33 1863 1875 -1869 -1872 33 + 1920 1929 -1926 -1932 34 1884 1896 -1890 -1893 33 + 1962 1983 -1989 -1992 33 1977 1989 -1983 -1986 33 + 1971 1983 -1977 -1980 33 1965 1977 -1971 -1974 33 + 1962 1971 -1965 -1968 33 1935 1947 -1941 -1944 33 + 1995 2007 -2001 -2004 33 2061 2073 -2067 -2070 33 + 2148 2163 -2160 -2166 34 2148 2154 -2151 -2157 34 + 2133 2148 -2142 -2145 34 2097 2109 -2103 -2106 33 + 2169 2181 -2175 -2178 33 2217 2229 -2223 -2226 33 + 2262 2274 -2268 -2271 33 2328 2340 -2334 -2337 33 + 2385 2397 -2391 -2394 33 2418 2430 -2424 -2427 33 + 2448 2460 -2454 -2457 33 2520 2541 -2547 -2550 33 + 2535 2547 -2541 -2544 33 2529 2541 -2535 -2538 33 + 2523 2535 -2529 -2532 33 2520 2529 -2523 -2526 33 + 2493 2505 -2499 -2502 33 2580 2589 -2586 -2592 34 + 2553 2565 -2559 -2562 33 2637 2649 -2643 -2646 33 + 2667 2679 -2673 -2676 33 2697 2709 -2703 -2706 33 + 2745 2757 -2751 -2754 33 2844 2856 -2850 -2853 33 + 2877 2889 -2883 -2886 33 2913 2925 -2919 -2922 33 + 2961 2973 -2967 -2970 33 3018 3030 -3024 -3027 33 + 3051 3063 -3057 -3060 33 3123 3132 -3129 -3135 34 + 3087 3099 -3093 -3096 33 3138 3150 -3144 -3147 33 + 3183 3195 -3189 -3192 33 3240 3252 -3246 -3249 33 + 3306 3318 -3312 -3315 33 3342 3354 -3348 -3351 33 + 3426 3447 -3453 -3456 33 3441 3453 -3447 -3450 33 + 3435 3447 -3441 -3444 33 3429 3441 -3435 -3438 33 + 3426 3435 -3429 -3432 33 3399 3411 -3405 -3408 33 + 3459 3471 -3465 -3468 33 3507 3519 -3513 -3516 33 + 3552 3564 -3558 -3561 33 3609 3621 -3615 -3618 33 + 3630 3642 -3636 -3639 33 3696 3708 -3702 -3705 33 + 3801 3813 -3807 -3810 33 3795 3807 -3801 -3804 33 + 3789 3801 -3795 -3798 33 3786 3795 -3789 -3792 33 + 3774 3786 -3780 -3783 34 3771 3780 -3774 -3777 33 + 3744 3756 -3750 -3753 33 3816 3828 -3822 -3825 33 + 3852 3864 -3858 -3861 33 3873 3885 -3879 -3882 33 + 3930 3942 -3936 -3939 33 3966 3978 -3972 -3975 33 + 3996 4008 -4002 -4005 33 4053 4065 -4059 -4062 33 + 4128 4140 -4146 -4149 33 4134 4146 -4140 -4143 34 + 4131 4140 -4134 -4137 33 4101 4113 -4107 -4110 33 + 4152 4164 -4158 -4161 33 4185 4197 -4191 -4194 33 + 4242 4254 -4248 -4251 33 4299 4320 -4326 -4329 33 + 4314 4326 -4320 -4323 33 4308 4320 -4314 -4317 33 + 4302 4314 -4308 -4311 33 4299 4308 -4302 -4305 33 + 4272 4284 -4278 -4281 33 4332 4344 -4338 -4341 33 + 4455 4470 -4467 -4473 34 4455 4461 -4458 -4464 34 + 4440 4455 -4449 -4452 34 4404 4416 -4410 -4413 33 + 4476 4488 -4482 -4485 33 4548 4557 -4554 -4560 34 + 4512 4524 -4518 -4521 33 4563 4575 -4569 -4572 33 + 4620 4632 -4626 -4629 33 4665 4677 -4671 -4674 33 + 4713 4722 -4719 -4725 34 4686 4698 -4692 -4695 33 + 4755 4776 -4782 -4785 33 4770 4782 -4776 -4779 33 + 4764 4776 -4770 -4773 33 4758 4770 -4764 -4767 33 + 4755 4764 -4758 -4761 33 4728 4740 -4734 -4737 33 + 4788 4800 -4794 -4797 33 4845 4857 -4851 -4854 33 + 4881 4893 -4887 -4890 33 4914 4926 -4920 -4923 33 + 4962 4974 -4968 -4971 33 5055 5070 -5067 -5073 34 + 5055 5061 -5058 -5064 34 5040 5055 -5049 -5052 34 + 5004 5016 -5010 -5013 33 5076 5088 -5082 -5085 33 + 5121 5133 -5127 -5130 33 5169 5190 -5196 -5199 33 + 5184 5196 -5190 -5193 33 5178 5190 -5184 -5187 33 + 5172 5184 -5178 -5181 33 5169 5178 -5172 -5175 33 + 5142 5154 -5148 -5151 33 5202 5214 -5208 -5211 33 + 5235 5247 -5241 -5244 33 5292 5304 -5298 -5301 33 + 5349 5361 -5367 -5370 33 5355 5367 -5361 -5364 34 + 5352 5361 -5355 -5358 33 5322 5334 -5328 -5331 33 + 5373 5385 -5379 -5382 33 5409 5421 -5415 -5418 33 + 5466 5478 -5472 -5475 33 5499 5511 -5505 -5508 33 + 5556 5580 -5586 -5589 33 5571 5586 -5580 -5583 33 + 5559 5571 -5565 -5568 33 5556 5565 -5559 -5562 33 + 5529 5541 -5535 -5538 33 5592 5604 -5598 -5601 33 + 5652 5673 -5679 -5682 33 5667 5679 -5673 -5676 33 + 5661 5673 -5667 -5670 33 5655 5667 -5661 -5664 33 + 5652 5661 -5655 -5658 33 5625 5637 -5631 -5634 33 + 5685 5697 -5691 -5694 33 5715 5727 -5721 -5724 33 + 5745 5757 -5751 -5754 33 5802 5814 -5808 -5811 33 + 5832 5844 -5838 -5841 33 5898 5910 -5904 -5907 33 + 5943 5955 -5949 -5952 33 6015 6030 -6027 -6033 34 + 6015 6021 -6018 -6024 34 6000 6015 -6009 -6012 34 + 5964 5976 -5970 -5973 33 6036 6048 -6042 -6045 33 + 6069 6081 -6075 -6078 33 6120 6132 -6126 -6129 33 + 6171 6183 -6177 -6180 33 6264 6273 -6270 -6276 34 + 6237 6249 -6243 -6246 33 6330 6345 -6342 -6348 34 + 6330 6336 -6333 -6339 34 6315 6330 -6324 -6327 34 + 6279 6291 -6285 -6288 33 6378 6387 -6384 -6390 34 + 6351 6363 -6357 -6360 33 6393 6405 -6399 -6402 33 + 6423 6435 -6429 -6432 33 6456 6468 -6462 -6465 33 + 6507 6519 -6513 -6516 33 6555 6567 -6561 -6564 33 + 6585 6597 -6591 -6594 33 6642 6654 -6648 -6651 33 + 6711 6735 -6741 -6744 33 6726 6741 -6735 -6738 33 + 6714 6726 -6720 -6723 33 6711 6720 -6714 -6717 33 + 6684 6696 -6690 -6693 33 6747 6759 -6753 -6756 33 + 6804 6816 -6810 -6813 33 6825 6837 -6831 -6834 33 + 6855 6867 -6861 -6864 33 6900 6912 -6906 -6909 33 + 6966 6978 -6972 -6975 33 6996 7008 -7002 -7005 33 + 7089 7101 -7095 -7098 33 7149 7173 -7179 -7182 33 + 7164 7179 -7173 -7176 33 7152 7164 -7158 -7161 33 + 7149 7158 -7152 -7155 33 7122 7134 -7128 -7131 33 + 7212 7221 -7218 -7224 34 7185 7197 -7191 -7194 33 + 7227 7239 -7233 -7236 33 7269 7281 -7275 -7278 33 + 7320 7332 -7326 -7329 33 7341 7353 -7347 -7350 33 + 7389 7401 -7395 -7398 33 7419 7431 -7425 -7428 33 + 7485 7497 -7491 -7494 33 7515 7527 -7521 -7524 33 + 7548 7560 -7554 -7557 33 7605 7617 -7611 -7614 33 + 7650 7662 -7656 -7659 33 7680 7692 -7686 -7689 33 + 7722 7734 -7728 -7731 33 7821 7836 -7833 -7839 34 + 7821 7827 -7824 -7830 34 7806 7821 -7815 -7818 34 + 7770 7782 -7776 -7779 33 7869 7893 -7899 -7902 33 + 7884 7899 -7893 -7896 33 7872 7884 -7878 -7881 33 + 7869 7878 -7872 -7875 33 7842 7854 -7848 -7851 33 + 7905 7917 -7911 -7914 33 7947 7959 -7953 -7956 33 + 7977 7989 -7983 -7986 33 8034 8046 -8040 -8043 33 + 8064 8076 -8070 -8073 33 8121 8133 -8127 -8130 33 + 8142 8154 -8148 -8151 33 8187 8199 -8193 -8196 33 + 8223 8235 -8229 -8232 33 8244 8256 -8250 -8253 33 + 8301 8313 -8307 -8310 33 8367 8379 -8373 -8376 33 + 8442 8451 -8448 -8454 34 8415 8427 -8421 -8424 33 + 8457 8469 -8463 -8466 33 8487 8499 -8493 -8496 33 + 8535 8547 -8541 -8544 33 8568 8580 -8574 -8577 33 + 8598 8610 -8604 -8607 33 8661 8673 -8667 -8670 33 + 8718 8730 -8724 -8727 33 8784 8796 -8790 -8793 33 + 8826 8838 -8832 -8835 33 8883 8895 -8889 -8892 33 + 8913 8925 -8919 -8922 33 8943 8955 -8949 -8952 33 + 8976 8988 -8982 -8985 33 8997 9009 -9003 -9006 33 + 9054 9066 -9060 -9063 33 9114 9123 -9120 -9126 34 + 9087 9099 -9093 -9096 33 9156 9177 -9183 -9186 33 + 9171 9183 -9177 -9180 33 9165 9177 -9171 -9174 33 + 9159 9171 -9165 -9168 33 9156 9165 -9159 -9162 33 + 9129 9141 -9135 -9138 33 9189 9201 -9195 -9198 33 + 9255 9267 -9261 -9264 33 9321 9333 -9327 -9330 33 + 9372 9384 -9378 -9381 33 9429 9441 -9435 -9438 33 + 9492 9516 -9522 -9525 33 9507 9522 -9516 -9519 33 + 9495 9507 -9501 -9504 33 9492 9501 -9495 -9498 33 + 9465 9477 -9471 -9474 33 9555 9564 -9561 -9567 34 + 9528 9540 -9534 -9537 33 9570 9582 -9576 -9579 33 + 9600 9612 -9606 -9609 33 9651 9663 -9657 -9660 33 + 9699 9711 -9705 -9708 33 9774 9786 -9780 -9783 33 + 9831 9843 -9837 -9840 33 9897 9909 -9903 -9906 33 + 9990 9999 -9996 -10002 34 9963 9975 -9969 -9972 33 + 10005 10017 -10011 -10014 33 10053 10065 -10059 -10062 33 + 10089 10101 -10095 -10098 33 10146 10158 -10152 -10155 33 + 10197 10209 -10203 -10206 33 10242 10254 -10248 -10251 33 + 10290 10302 -10296 -10299 33 10338 10347 -10344 -10350 34 + 10311 10323 -10317 -10320 33 10353 10365 -10359 -10362 33 + 10395 10407 -10401 -10404 33 10443 10455 -10449 -10452 33 + 10500 10521 -10527 -10530 33 10515 10527 -10521 -10524 33 + 10509 10521 -10515 -10518 33 10503 10515 -10509 -10512 33 + 10500 10509 -10503 -10506 33 10473 10485 -10479 -10482 33 + 10533 10545 -10539 -10542 33 10590 10602 -10596 -10599 33 + 10623 10635 -10629 -10632 33 10656 10668 -10662 -10665 33 + 10692 10704 -10698 -10701 33 10743 10755 -10749 -10752 33 + 10773 10785 -10779 -10782 33 10815 10827 -10821 -10824 33 + 10836 10848 -10842 -10845 33 10893 10905 -10899 -10902 33 + 10935 10947 -10941 -10944 33 10956 10968 -10962 -10965 33 + 11001 11013 -11007 -11010 33 11049 11061 -11055 -11058 33 + 11124 11136 -11142 -11145 33 11130 11142 -11136 -11139 34 + 11127 11136 -11130 -11133 33 11097 11109 -11103 -11106 33 + 11148 11160 -11154 -11157 33 11196 11208 -11202 -11205 33 + 11232 11244 -11238 -11241 33 11262 11274 -11268 -11271 33 + 11310 11334 -11340 -11343 33 11325 11340 -11334 -11337 33 + 11313 11325 -11319 -11322 33 11310 11319 -11313 -11316 33 + 11283 11295 -11289 -11292 33 11373 11385 -11391 -11394 33 + 11379 11391 -11385 -11388 34 11376 11385 -11379 -11382 33 + 11346 11358 -11352 -11355 33 11397 11409 -11403 -11406 33 + 11430 11442 -11436 -11439 33 11478 11490 -11484 -11487 33 + 11511 11523 -11517 -11520 33 11562 11574 -11568 -11571 33 + 11610 11619 -11616 -11622 34 11583 11595 -11589 -11592 33 + 11625 11637 -11631 -11634 33 11673 11685 -11679 -11682 33 + 11730 11742 -11736 -11739 33 11787 11799 -11793 -11796 33 + 11859 11871 -11877 -11880 33 11865 11877 -11871 -11874 34 + 11862 11871 -11865 -11868 33 11832 11844 -11838 -11841 33 + 11910 11922 -11928 -11931 33 11916 11928 -11922 -11925 34 + 11913 11922 -11916 -11919 33 11883 11895 -11889 -11892 33 + 11961 11973 -11979 -11982 33 11967 11979 -11973 -11976 34 + 11964 11973 -11967 -11970 33 11934 11946 -11940 -11943 33 + 12012 12024 -12030 -12033 33 12018 12030 -12024 -12027 34 + 12015 12024 -12018 -12021 33 11985 11997 -11991 -11994 33 + 12063 12075 -12081 -12084 33 12069 12081 -12075 -12078 34 + 12066 12075 -12069 -12072 33 12036 12048 -12042 -12045 33 + 12114 12126 -12132 -12135 33 12120 12132 -12126 -12129 34 + 12117 12126 -12120 -12123 33 12087 12099 -12093 -12096 33 + 12351 12273 12276 12354 34 12348 12270 12273 12351 66 + 12330 12243 12249 12336 6 12330 12243 12246 12333 64 + 12324 12237 12243 12330 6 12324 12237 12240 12327 64 + 12321 12231 12237 12324 6 12318 12228 12231 12321 6 + 12315 12228 12231 12321 6 12294 12174 12180 12300 6 + 12294 12174 12177 12297 64 12288 12168 12174 12294 6 + 12288 12168 12171 12291 64 12285 12162 12168 12288 6 + 12282 12159 12162 12285 6 12279 12159 12162 12285 6 + 12276 12252 12249 12336 7 12276 12252 12255 12339 34 + 12276 12273 12270 12348 34 12270 12258 12255 12339 34 + 12270 12273 12276 12354 34 12264 12261 12267 12342 1 + 12264 12261 12267 12345 1 12261 12258 12255 12339 34 + 12261 12258 12270 12348 24 12258 12261 12267 12342 1 + 12258 12261 12267 12345 1 12258 12270 12273 12351 40 + 12255 12252 12249 12336 7 12255 12252 12276 12354 34 + 12255 12258 12270 12348 34 12252 12249 12243 12330 6 + 12252 12276 12273 12351 40 12249 12234 12231 12321 45 + 12249 12243 12237 12324 6 12249 12243 12246 12333 63 + 12249 12243 -12246 12333 61 12249 12252 12276 12354 34 + 12249 12252 12255 12339 34 12246 12243 12237 12324 63 + 12246 12243 -12237 12324 26 12246 12243 12249 12336 6 + 12243 12237 12231 12321 6 12243 12237 12240 12327 63 + 12243 12237 -12240 12327 61 12240 12237 12231 12321 63 + 12240 12237 -12231 12321 26 12240 12237 12243 12330 63 + 12240 12237 -12243 12330 26 12237 12231 12228 12318 6 + 12237 12231 12228 12315 6 12237 12243 12249 12336 6 + 12237 12243 12246 12333 63 12237 12243 -12246 12333 61 + 12234 12231 12228 12318 63 12234 12231 -12228 12318 26 + 12234 12231 12228 12315 63 12234 12231 -12228 12315 26 + 12234 12231 12237 12324 63 12234 12231 -12237 12324 26 + 12234 12249 12243 12330 63 12234 12249 -12243 12330 26 + 12231 12234 12249 12336 45 12231 12237 12243 12330 6 + 12231 12237 12240 12327 63 12231 12237 -12240 12327 61 + 12228 12231 12237 12324 6 12225 12228 12231 12321 63 + 12225 12228 -12231 12321 26 12216 12225 12228 12318 45 + 12216 12225 12228 12315 45 12210 12183 12180 12300 7 + 12210 12183 12186 12303 52 12210 12207 12204 12312 48 + 12201 12195 12198 12306 21 12201 12195 12198 12309 21 + 12195 12201 12204 12312 48 12192 12189 12186 12303 55 + 12192 12195 12198 12306 21 12192 12195 12198 12309 21 + 12186 12183 12180 12300 7 12183 12180 12174 12294 6 + 12180 12165 12162 12285 45 12180 12174 12168 12288 6 + 12180 12174 12177 12297 63 12180 12174 -12177 12297 61 + 12180 12183 12186 12303 52 12177 12174 12168 12288 63 + 12177 12174 -12168 12288 26 12177 12174 12180 12300 6 + 12174 12168 12162 12285 6 12174 12168 12171 12291 63 + 12174 12168 -12171 12291 61 12171 12168 12162 12285 63 + 12171 12168 -12162 12285 26 12171 12168 12174 12294 63 + 12171 12168 -12174 12294 26 12168 12162 12159 12279 6 + 12168 12162 12159 12282 6 12168 12174 12180 12300 6 + 12168 12174 12177 12297 63 12168 12174 -12177 12297 61 + 12165 12162 12159 12279 63 12165 12162 -12159 12279 26 + 12165 12162 12159 12282 63 12165 12162 -12159 12282 26 + 12165 12162 12168 12288 63 12165 12162 -12168 12288 26 + 12165 12180 12174 12294 63 12165 12180 -12174 12294 26 + 12162 12168 12174 12294 6 12162 12168 12171 12291 63 + 12162 12168 -12171 12291 61 12162 12165 12180 12300 45 + 12159 12162 12168 12288 6 12156 12159 12162 12285 63 + 12156 12159 -12162 12285 26 12147 12156 12159 12279 45 + 12147 12156 12159 12282 45 12201 12207 -12204 -12312 33 + 12195 12306 -12198 -12309 34 12183 12189 -12186 -12303 33 + 12423 12393 12396 12426 17 12411 12369 12372 12414 17 + 12405 12366 12363 12408 17 12405 12366 12369 12411 17 + 12402 12390 12387 12420 17 12402 12390 12393 12423 17 + 12399 12384 12387 12420 17 12393 12390 12387 12420 17 + 12390 12393 12396 12426 17 12387 12390 12393 12423 17 + 12384 12381 12396 12426 17 12381 12384 12387 12420 17 + 12381 12396 12393 12423 17 12378 12360 12363 12408 17 + 12375 12357 12372 12414 17 12375 12381 12396 12426 17 + 12369 12366 12363 12408 17 12366 12369 12372 12414 17 + 12363 12360 12378 12417 58 12363 12366 12369 12411 17 + 12360 12357 12372 12414 17 12357 12360 12363 12408 17 + 12357 12360 12378 12417 58 12357 12372 12369 12411 17 + 12381 12393 -12396 -12426 33 12390 12396 -12393 -12423 33 + 12384 12390 -12387 -12420 33 12357 12369 -12372 -12414 33 + 12366 12372 -12369 -12411 33 12360 12366 -12363 -12408 33 +%FLAG DIHEDRALS_WITHOUT_HYDROGEN +%FORMAT(10I8) + 54 51 57 63 1 51 57 63 72 2 + 51 57 -63 72 3 51 57 -63 72 4 + 51 57 -63 72 5 27 18 12 51 6 + 18 12 51 54 7 18 12 51 57 8 + 18 12 -51 57 9 18 12 -51 57 10 + 18 12 -51 57 5 18 27 36 39 11 + 12 18 27 36 6 12 51 57 63 1 + 0 12 18 27 6 0 12 51 54 7 + 0 12 51 57 7 75 72 78 84 1 + 72 78 84 90 12 72 78 -84 90 13 + 72 78 -84 90 10 72 78 -84 90 5 + 72 78 84 132 2 72 78 -84 132 3 + 72 78 -84 132 4 72 78 -84 132 5 + 63 72 78 84 1 57 63 72 75 7 + 57 63 72 78 14 57 63 -72 78 15 + 57 63 -72 78 16 57 63 -72 78 5 + 135 132 138 144 1 132 138 144 150 12 + 132 138 -144 150 13 132 138 -144 150 10 + 132 138 -144 150 5 132 138 144 189 2 + 132 138 -144 189 3 132 138 -144 189 4 + 132 138 -144 189 5 108 102 99 126 17 + 108 114 -120 126 17 102 99 126 120 17 + 102 108 -114 120 17 99 90 84 132 6 + 99 102 108 114 17 99 126 -120 114 17 + 90 84 132 135 7 90 84 132 138 8 + 90 84 -132 138 9 90 84 -132 138 10 + 90 84 -132 138 5 90 99 102 108 17 + 90 99 126 120 17 84 90 99 102 7 + 84 90 99 126 7 84 132 138 144 1 + 78 84 90 99 6 78 84 132 135 7 + 78 84 132 138 14 78 84 -132 138 15 + 78 84 -132 138 16 78 84 -132 138 5 + 192 189 195 201 1 189 195 201 207 12 + 189 195 -201 207 13 189 195 -201 207 10 + 189 195 -201 207 5 189 195 201 219 2 + 189 195 -201 219 3 189 195 -201 219 4 + 189 195 -201 219 5 159 150 144 189 6 + 150 144 189 192 7 150 144 189 195 8 + 150 144 -189 195 9 150 144 -189 195 10 + 150 144 -189 195 5 144 150 159 165 18 + 144 150 -159 165 19 144 150 -159 165 20 + 144 150 159 177 18 144 150 -159 177 19 + 144 150 -159 177 20 144 189 195 201 1 + 138 144 150 159 6 138 144 189 192 7 + 138 144 189 195 14 138 144 -189 195 15 + 138 144 -189 195 16 138 144 -189 195 5 + 222 219 225 231 1 219 225 231 240 2 + 219 225 -231 240 3 219 225 -231 240 4 + 219 225 -231 240 5 207 201 219 222 7 + 207 201 219 225 8 207 201 -219 225 9 + 207 201 -219 225 10 207 201 -219 225 5 + 201 219 225 231 1 195 201 219 222 7 + 195 201 219 225 14 195 201 -219 225 15 + 195 201 -219 225 16 195 201 -219 225 5 + 243 240 246 252 1 240 246 252 258 12 + 240 246 -252 258 13 240 246 -252 258 10 + 240 246 -252 258 5 240 246 252 306 2 + 240 246 -252 306 3 240 246 -252 306 4 + 240 246 -252 306 5 231 240 246 252 1 + 225 231 240 243 7 225 231 240 246 14 + 225 231 -240 246 15 225 231 -240 246 16 + 225 231 -240 246 5 309 306 312 318 1 + 306 312 318 324 12 306 312 -318 324 13 + 306 312 -318 324 10 306 312 -318 324 5 + 306 312 318 372 2 306 312 -318 372 3 + 306 312 -318 372 4 306 312 -318 372 5 + 267 258 252 306 6 267 276 285 294 6 + 258 252 306 309 7 258 252 306 312 8 + 258 252 -306 312 9 258 252 -306 312 10 + 258 252 -306 312 5 258 267 276 285 18 + 258 267 -276 285 19 258 267 -276 285 20 + 252 258 267 276 18 252 258 -267 276 19 + 252 258 -267 276 20 252 306 312 318 1 + 246 252 258 267 6 246 252 306 309 7 + 246 252 306 312 14 246 252 -306 312 15 + 246 252 -306 312 16 246 252 -306 312 5 + 375 372 378 384 1 372 378 384 390 12 + 372 378 -384 390 13 372 378 -384 390 10 + 372 378 -384 390 5 372 378 384 429 2 + 372 378 -384 429 3 372 378 -384 429 4 + 372 378 -384 429 5 333 324 318 372 6 + 333 342 351 360 6 324 318 372 375 7 + 324 318 372 378 8 324 318 -372 378 9 + 324 318 -372 378 10 324 318 -372 378 5 + 324 333 342 351 18 324 333 -342 351 19 + 324 333 -342 351 20 318 324 333 342 18 + 318 324 -333 342 19 318 324 -333 342 20 + 318 372 378 384 1 312 318 324 333 6 + 312 318 372 375 7 312 318 372 378 14 + 312 318 -372 378 15 312 318 -372 378 16 + 312 318 -372 378 5 432 429 435 441 1 + 429 435 441 447 12 429 435 -441 447 13 + 429 435 -441 447 10 429 435 -441 447 5 + 429 435 441 486 2 429 435 -441 486 3 + 429 435 -441 486 4 429 435 -441 486 5 + 408 390 384 429 6 396 390 384 429 6 + 396 390 408 417 18 396 390 -408 417 19 + 396 390 -408 417 20 390 384 429 432 7 + 390 384 429 435 8 390 384 -429 435 9 + 390 384 -429 435 10 390 384 -429 435 5 + 384 390 408 417 18 384 390 -408 417 19 + 384 390 -408 417 20 384 429 435 441 1 + 378 384 390 396 6 378 384 390 408 6 + 378 384 429 432 7 378 384 429 435 14 + 378 384 -429 435 15 378 384 -429 435 16 + 378 384 -429 435 5 489 486 492 498 1 + 486 492 498 504 12 486 492 -498 504 13 + 486 492 -498 504 10 486 492 -498 504 5 + 486 492 498 543 2 486 492 -498 543 3 + 486 492 -498 543 4 486 492 -498 543 5 + 456 447 441 486 6 447 441 486 489 7 + 447 441 486 492 8 447 441 -486 492 9 + 447 441 -486 492 10 447 441 -486 492 5 + 441 447 456 462 18 441 447 -456 462 19 + 441 447 -456 462 20 441 447 456 474 18 + 441 447 -456 474 19 441 447 -456 474 20 + 441 486 492 498 1 435 441 447 456 6 + 435 441 486 489 7 435 441 486 492 14 + 435 441 -486 492 15 435 441 -486 492 16 + 435 441 -486 492 5 546 543 549 555 1 + 543 549 555 561 12 543 549 -555 561 13 + 543 549 -555 561 10 543 549 -555 561 5 + 543 549 555 585 2 543 549 -555 585 3 + 543 549 -555 585 4 543 549 -555 585 5 + 522 504 498 543 6 510 504 498 543 6 + 510 504 522 531 18 510 504 -522 531 19 + 510 504 -522 531 20 504 498 543 546 7 + 504 498 543 549 8 504 498 -543 549 9 + 504 498 -543 549 10 504 498 -543 549 5 + 498 504 522 531 18 498 504 -522 531 19 + 498 504 -522 531 20 498 543 549 555 1 + 492 498 504 510 6 492 498 504 522 6 + 492 498 543 546 7 492 498 543 549 14 + 492 498 -543 549 15 492 498 -543 549 16 + 492 498 -543 549 5 588 585 591 597 1 + 585 591 597 606 2 585 591 -597 606 3 + 585 591 -597 606 4 585 591 -597 606 5 + 579 561 555 585 6 567 561 555 585 6 + 561 555 585 588 7 561 555 585 591 8 + 561 555 -585 591 9 561 555 -585 591 10 + 561 555 -585 591 5 555 585 591 597 1 + 549 555 561 567 6 549 555 561 579 6 + 549 555 585 588 7 549 555 585 591 14 + 549 555 -585 591 15 549 555 -585 591 16 + 549 555 -585 591 5 609 606 612 618 1 + 606 612 618 624 12 606 612 -618 624 13 + 606 612 -618 624 10 606 612 -618 624 5 + 606 612 618 663 2 606 612 -618 663 3 + 606 612 -618 663 4 606 612 -618 663 5 + 597 606 612 618 1 591 597 606 609 7 + 591 597 606 612 14 591 597 -606 612 15 + 591 597 -606 612 16 591 597 -606 612 5 + 666 663 669 675 1 663 669 675 681 12 + 663 669 -675 681 13 663 669 -675 681 10 + 663 669 -675 681 5 663 669 675 720 2 + 663 669 -675 720 3 663 669 -675 720 4 + 663 669 -675 720 5 633 624 618 663 6 + 624 618 663 666 7 624 618 663 669 8 + 624 618 -663 669 9 624 618 -663 669 10 + 624 618 -663 669 5 618 624 633 639 18 + 618 624 -633 639 19 618 624 -633 639 20 + 618 624 633 651 18 618 624 -633 651 19 + 618 624 -633 651 20 618 663 669 675 1 + 612 618 624 633 6 612 618 663 666 7 + 612 618 663 669 14 612 618 -663 669 15 + 612 618 -663 669 16 612 618 -663 669 5 + 723 720 726 732 1 720 726 732 738 12 + 720 726 -732 738 13 720 726 -732 738 10 + 720 726 -732 738 5 720 726 732 753 2 + 720 726 -732 753 3 720 726 -732 753 4 + 720 726 -732 753 5 690 681 675 720 6 + 681 675 720 723 7 681 675 720 726 8 + 681 675 -720 726 9 681 675 -720 726 10 + 681 675 -720 726 5 675 681 690 696 18 + 675 681 -690 696 19 675 681 -690 696 20 + 675 681 690 708 18 675 681 -690 708 19 + 675 681 -690 708 20 675 720 726 732 1 + 669 675 681 690 6 669 675 720 723 7 + 669 675 720 726 14 669 675 -720 726 15 + 669 675 -720 726 16 669 675 -720 726 5 + 756 753 759 765 1 753 759 765 771 12 + 753 759 -765 771 13 753 759 -765 771 10 + 753 759 -765 771 5 753 759 765 795 2 + 753 759 -765 795 3 753 759 -765 795 4 + 753 759 -765 795 5 747 738 732 753 6 + 738 732 753 756 7 738 732 753 759 8 + 738 732 -753 759 9 738 732 -753 759 10 + 738 732 -753 759 5 732 753 759 765 1 + 726 732 738 747 6 726 732 753 756 7 + 726 732 753 759 14 726 732 -753 759 15 + 726 732 -753 759 16 726 732 -753 759 5 + 798 795 801 807 1 795 801 807 813 12 + 795 801 -807 813 13 795 801 -807 813 10 + 795 801 -807 813 5 795 801 807 861 2 + 795 801 -807 861 3 795 801 -807 861 4 + 795 801 -807 861 5 780 771 765 795 6 + 771 765 795 798 7 771 765 795 801 8 + 771 765 -795 801 9 771 765 -795 801 10 + 771 765 -795 801 5 765 771 780 783 7 + 765 771 780 786 8 765 771 -780 786 9 + 765 771 -780 786 10 765 771 -780 786 5 + 765 795 801 807 1 759 765 771 780 6 + 759 765 795 798 7 759 765 795 801 14 + 759 765 -795 801 15 759 765 -795 801 16 + 759 765 -795 801 5 864 861 867 873 1 + 861 867 873 879 12 861 867 -873 879 13 + 861 867 -873 879 10 861 867 -873 879 5 + 861 867 873 894 2 861 867 -873 894 3 + 861 867 -873 894 4 861 867 -873 894 5 + 822 813 807 861 6 822 831 840 849 6 + 813 807 861 864 7 813 807 861 867 8 + 813 807 -861 867 9 813 807 -861 867 10 + 813 807 -861 867 5 813 822 831 840 18 + 813 822 -831 840 19 813 822 -831 840 20 + 807 813 822 831 18 807 813 -822 831 19 + 807 813 -822 831 20 807 861 867 873 1 + 801 807 813 822 6 801 807 861 864 7 + 801 807 861 867 14 801 807 -861 867 15 + 801 807 -861 867 16 801 807 -861 867 5 + 897 894 900 906 1 894 900 906 912 12 + 894 900 -906 912 13 894 900 -906 912 10 + 894 900 -906 912 5 894 900 906 951 2 + 894 900 -906 951 3 894 900 -906 951 4 + 894 900 -906 951 5 888 879 873 894 6 + 879 873 894 897 7 879 873 894 900 8 + 879 873 -894 900 9 879 873 -894 900 10 + 879 873 -894 900 5 873 894 900 906 1 + 867 873 879 888 6 867 873 894 897 7 + 867 873 894 900 14 867 873 -894 900 15 + 867 873 -894 900 16 867 873 -894 900 5 + 954 951 957 963 1 951 957 963 969 12 + 951 957 -963 969 13 951 957 -963 969 10 + 951 957 -963 969 5 951 957 963 981 2 + 951 957 -963 981 3 951 957 -963 981 4 + 951 957 -963 981 5 930 912 906 951 6 + 918 912 906 951 6 918 912 930 939 18 + 918 912 -930 939 19 918 912 -930 939 20 + 912 906 951 954 7 912 906 951 957 8 + 912 906 -951 957 9 912 906 -951 957 10 + 912 906 -951 957 5 906 912 930 939 18 + 906 912 -930 939 19 906 912 -930 939 20 + 906 951 957 963 1 900 906 912 918 6 + 900 906 912 930 6 900 906 951 954 7 + 900 906 951 957 14 900 906 -951 957 15 + 900 906 -951 957 16 900 906 -951 957 5 + 984 981 987 993 1 981 987 993 999 12 + 981 987 -993 999 13 981 987 -993 999 10 + 981 987 -993 999 5 981 987 993 1044 2 + 981 987 -993 1044 3 981 987 -993 1044 4 + 981 987 -993 1044 5 969 963 981 984 7 + 969 963 981 987 8 969 963 -981 987 9 + 969 963 -981 987 10 969 963 -981 987 5 + 963 981 987 993 1 957 963 981 984 7 + 957 963 981 987 14 957 963 -981 987 15 + 957 963 -981 987 16 957 963 -981 987 5 + 1047 1044 1050 1056 1 1044 1050 1056 1065 2 + 1044 1050 -1056 1065 3 1044 1050 -1056 1065 4 + 1044 1050 -1056 1065 5 1026 1023 1032 1038 17 + 1017 1011 1008 1038 17 1017 1023 -1032 1038 17 + 1011 1008 1038 1032 17 1011 1017 1023 1026 17 + 1011 1017 -1023 1032 17 1008 999 993 1044 6 + 1008 1011 1017 1023 17 1008 1038 -1032 1023 17 + 999 993 1044 1047 7 999 993 1044 1050 8 + 999 993 -1044 1050 9 999 993 -1044 1050 10 + 999 993 -1044 1050 5 999 1008 1011 1017 17 + 999 1008 1038 1032 17 993 999 1008 1011 7 + 993 999 1008 1038 7 993 1044 1050 1056 1 + 987 993 999 1008 6 987 993 1044 1047 7 + 987 993 1044 1050 14 987 993 -1044 1050 15 + 987 993 -1044 1050 16 987 993 -1044 1050 5 + 1068 1065 1071 1077 1 1065 1071 1077 1083 12 + 1065 1071 -1077 1083 13 1065 1071 -1077 1083 10 + 1065 1071 -1077 1083 5 1065 1071 1077 1122 2 + 1065 1071 -1077 1122 3 1065 1071 -1077 1122 4 + 1065 1071 -1077 1122 5 1056 1065 1071 1077 1 + 1050 1056 1065 1068 7 1050 1056 1065 1071 14 + 1050 1056 -1065 1071 15 1050 1056 -1065 1071 16 + 1050 1056 -1065 1071 5 1125 1122 1128 1134 1 + 1122 1128 1134 1140 12 1122 1128 -1134 1140 13 + 1122 1128 -1134 1140 10 1122 1128 -1134 1140 5 + 1122 1128 1134 1152 2 1122 1128 -1134 1152 3 + 1122 1128 -1134 1152 4 1122 1128 -1134 1152 5 + 1101 1083 1077 1122 6 1089 1083 1077 1122 6 + 1089 1083 1101 1110 18 1089 1083 -1101 1110 19 + 1089 1083 -1101 1110 20 1083 1077 1122 1125 7 + 1083 1077 1122 1128 8 1083 1077 -1122 1128 9 + 1083 1077 -1122 1128 10 1083 1077 -1122 1128 5 + 1077 1083 1101 1110 18 1077 1083 -1101 1110 19 + 1077 1083 -1101 1110 20 1077 1122 1128 1134 1 + 1071 1077 1083 1089 6 1071 1077 1083 1101 6 + 1071 1077 1122 1125 7 1071 1077 1122 1128 14 + 1071 1077 -1122 1128 15 1071 1077 -1122 1128 16 + 1071 1077 -1122 1128 5 1155 1152 1158 1164 1 + 1152 1158 1164 1170 12 1152 1158 -1164 1170 13 + 1152 1158 -1164 1170 10 1152 1158 -1164 1170 5 + 1152 1158 1164 1218 2 1152 1158 -1164 1218 3 + 1152 1158 -1164 1218 4 1152 1158 -1164 1218 5 + 1140 1134 1152 1155 7 1140 1134 1152 1158 8 + 1140 1134 -1152 1158 9 1140 1134 -1152 1158 10 + 1140 1134 -1152 1158 5 1134 1152 1158 1164 1 + 1128 1134 1152 1155 7 1128 1134 1152 1158 14 + 1128 1134 -1152 1158 15 1128 1134 -1152 1158 16 + 1128 1134 -1152 1158 5 1221 1218 1224 1230 1 + 1218 1224 1230 1236 12 1218 1224 -1230 1236 13 + 1218 1224 -1230 1236 10 1218 1224 -1230 1236 5 + 1218 1224 1230 1248 2 1218 1224 -1230 1248 3 + 1218 1224 -1230 1248 4 1218 1224 -1230 1248 5 + 1179 1170 1164 1218 6 1179 1188 1197 1206 6 + 1170 1164 1218 1221 7 1170 1164 1218 1224 8 + 1170 1164 -1218 1224 9 1170 1164 -1218 1224 10 + 1170 1164 -1218 1224 5 1170 1179 1188 1197 18 + 1170 1179 -1188 1197 19 1170 1179 -1188 1197 20 + 1164 1170 1179 1188 18 1164 1170 -1179 1188 19 + 1164 1170 -1179 1188 20 1164 1218 1224 1230 1 + 1158 1164 1170 1179 6 1158 1164 1218 1221 7 + 1158 1164 1218 1224 14 1158 1164 -1218 1224 15 + 1158 1164 -1218 1224 16 1158 1164 -1218 1224 5 + 1251 1248 1254 1260 1 1248 1254 1260 1266 12 + 1248 1254 -1260 1266 13 1248 1254 -1260 1266 10 + 1248 1254 -1260 1266 5 1248 1254 1260 1299 2 + 1248 1254 -1260 1299 3 1248 1254 -1260 1299 4 + 1248 1254 -1260 1299 5 1236 1230 1248 1251 7 + 1236 1230 1248 1254 8 1236 1230 -1248 1254 9 + 1236 1230 -1248 1254 10 1236 1230 -1248 1254 5 + 1230 1248 1254 1260 1 1224 1230 1248 1251 7 + 1224 1230 1248 1254 14 1224 1230 -1248 1254 15 + 1224 1230 -1248 1254 16 1224 1230 -1248 1254 5 + 1302 1299 1305 1311 1 1299 1305 1311 1317 12 + 1299 1305 -1311 1317 13 1299 1305 -1311 1317 10 + 1299 1305 -1311 1317 5 1299 1305 1311 1350 2 + 1299 1305 -1311 1350 3 1299 1305 -1311 1350 4 + 1299 1305 -1311 1350 5 1275 1266 1260 1299 6 + 1266 1260 1299 1302 7 1266 1260 1299 1305 8 + 1266 1260 -1299 1305 9 1266 1260 -1299 1305 10 + 1266 1260 -1299 1305 5 1266 1275 1284 1287 11 + 1260 1266 1275 1284 6 1260 1299 1305 1311 1 + 1254 1260 1266 1275 6 1254 1260 1299 1302 7 + 1254 1260 1299 1305 14 1254 1260 -1299 1305 15 + 1254 1260 -1299 1305 16 1254 1260 -1299 1305 5 + 1353 1350 1356 1362 1 1350 1356 1362 1368 12 + 1350 1356 -1362 1368 13 1350 1356 -1362 1368 10 + 1350 1356 -1362 1368 5 1350 1356 1362 1422 2 + 1350 1356 -1362 1422 3 1350 1356 -1362 1422 4 + 1350 1356 -1362 1422 5 1332 1329 -1326 1344 21 + 1329 1326 -1344 1338 22 1329 1332 -1338 1344 23 + 1326 1317 1311 1350 6 1326 1329 -1332 1338 24 + 1326 1344 -1338 1332 25 1317 1311 1350 1353 7 + 1317 1311 1350 1356 8 1317 1311 -1350 1356 9 + 1317 1311 -1350 1356 10 1317 1311 -1350 1356 5 + 1317 1326 1329 1332 21 1317 1326 1344 1338 22 + 1311 1317 1326 1329 7 1311 1317 1326 1344 7 + 1311 1350 1356 1362 1 1305 1311 1317 1326 6 + 1305 1311 1350 1353 7 1305 1311 1350 1356 14 + 1305 1311 -1350 1356 15 1305 1311 -1350 1356 16 + 1305 1311 -1350 1356 5 1425 1422 1428 1434 1 + 1422 1428 1434 1440 12 1422 1428 -1434 1440 13 + 1422 1428 -1434 1440 10 1422 1428 -1434 1440 5 + 1422 1428 1434 1467 2 1422 1428 -1434 1467 3 + 1422 1428 -1434 1467 4 1422 1428 -1434 1467 5 + 1386 1395 1401 1404 21 1386 1395 1401 1413 21 + 1377 1368 1362 1422 6 1377 1386 1395 1401 26 + 1368 1362 1422 1425 7 1368 1362 1422 1428 8 + 1368 1362 -1422 1428 9 1368 1362 -1422 1428 10 + 1368 1362 -1422 1428 5 1368 1377 1386 1395 6 + 1362 1368 1377 1386 18 1362 1368 -1377 1386 19 + 1362 1368 -1377 1386 20 1362 1422 1428 1434 1 + 1356 1362 1368 1377 6 1356 1362 1422 1425 7 + 1356 1362 1422 1428 14 1356 1362 -1422 1428 15 + 1356 1362 -1422 1428 16 1356 1362 -1422 1428 5 + 1470 1467 1473 1479 1 1467 1473 1479 1488 2 + 1467 1473 -1479 1488 3 1467 1473 -1479 1488 4 + 1467 1473 -1479 1488 5 1449 1440 1434 1467 6 + 1440 1434 1467 1470 7 1440 1434 1467 1473 8 + 1440 1434 -1467 1473 9 1440 1434 -1467 1473 10 + 1440 1434 -1467 1473 5 1440 1449 1458 1461 7 + 1440 1449 1458 1464 7 1434 1440 1449 1458 6 + 1434 1467 1473 1479 1 1428 1434 1440 1449 6 + 1428 1434 1467 1470 7 1428 1434 1467 1473 14 + 1428 1434 -1467 1473 15 1428 1434 -1467 1473 16 + 1428 1434 -1467 1473 5 1491 1488 1494 1500 1 + 1488 1494 1500 1506 12 1488 1494 -1500 1506 13 + 1488 1494 -1500 1506 10 1488 1494 -1500 1506 5 + 1488 1494 1500 1518 2 1488 1494 -1500 1518 3 + 1488 1494 -1500 1518 4 1488 1494 -1500 1518 5 + 1479 1488 1494 1500 1 1473 1479 1488 1491 7 + 1473 1479 1488 1494 14 1473 1479 -1488 1494 15 + 1473 1479 -1488 1494 16 1473 1479 -1488 1494 5 + 1521 1518 1524 1530 1 1518 1524 1530 1536 12 + 1518 1524 -1530 1536 13 1518 1524 -1530 1536 10 + 1518 1524 -1530 1536 5 1518 1524 1530 1563 2 + 1518 1524 -1530 1563 3 1518 1524 -1530 1563 4 + 1518 1524 -1530 1563 5 1506 1500 1518 1521 7 + 1506 1500 1518 1524 8 1506 1500 -1518 1524 9 + 1506 1500 -1518 1524 10 1506 1500 -1518 1524 5 + 1500 1518 1524 1530 1 1494 1500 1518 1521 7 + 1494 1500 1518 1524 14 1494 1500 -1518 1524 15 + 1494 1500 -1518 1524 16 1494 1500 -1518 1524 5 + 1566 1563 1569 1575 1 1563 1569 1575 1581 12 + 1563 1569 -1575 1581 13 1563 1569 -1575 1581 10 + 1563 1569 -1575 1581 5 1563 1569 1575 1620 2 + 1563 1569 -1575 1620 3 1563 1569 -1575 1620 4 + 1563 1569 -1575 1620 5 1545 1536 1530 1563 6 + 1536 1530 1563 1566 7 1536 1530 1563 1569 8 + 1536 1530 -1563 1569 9 1536 1530 -1563 1569 10 + 1536 1530 -1563 1569 5 1536 1545 1554 1557 7 + 1536 1545 1554 1560 7 1530 1536 1545 1554 6 + 1530 1563 1569 1575 1 1524 1530 1536 1545 6 + 1524 1530 1563 1566 7 1524 1530 1563 1569 14 + 1524 1530 -1563 1569 15 1524 1530 -1563 1569 16 + 1524 1530 -1563 1569 5 1623 1620 1626 1632 1 + 1620 1626 1632 1638 12 1620 1626 -1632 1638 13 + 1620 1626 -1632 1638 10 1620 1626 -1632 1638 5 + 1620 1626 1632 1650 2 1620 1626 -1632 1650 3 + 1620 1626 -1632 1650 4 1620 1626 -1632 1650 5 + 1590 1581 1575 1620 6 1581 1575 1620 1623 7 + 1581 1575 1620 1626 8 1581 1575 -1620 1626 9 + 1581 1575 -1620 1626 10 1581 1575 -1620 1626 5 + 1575 1581 1590 1596 18 1575 1581 -1590 1596 19 + 1575 1581 -1590 1596 20 1575 1581 1590 1608 18 + 1575 1581 -1590 1608 19 1575 1581 -1590 1608 20 + 1575 1620 1626 1632 1 1569 1575 1581 1590 6 + 1569 1575 1620 1623 7 1569 1575 1620 1626 14 + 1569 1575 -1620 1626 15 1569 1575 -1620 1626 16 + 1569 1575 -1620 1626 5 1653 1650 1656 1662 1 + 1650 1656 1662 1668 12 1650 1656 -1662 1668 13 + 1650 1656 -1662 1668 10 1650 1656 -1662 1668 5 + 1650 1656 1662 1710 2 1650 1656 -1662 1710 3 + 1650 1656 -1662 1710 4 1650 1656 -1662 1710 5 + 1638 1632 1650 1653 7 1638 1632 1650 1656 8 + 1638 1632 -1650 1656 9 1638 1632 -1650 1656 10 + 1638 1632 -1650 1656 5 1632 1650 1656 1662 1 + 1626 1632 1650 1653 7 1626 1632 1650 1656 14 + 1626 1632 -1650 1656 15 1626 1632 -1650 1656 16 + 1626 1632 -1650 1656 5 1713 1710 1716 1722 1 + 1710 1716 1722 1728 12 1710 1716 -1722 1728 13 + 1710 1716 -1722 1728 10 1710 1716 -1722 1728 5 + 1710 1716 1722 1752 2 1710 1716 -1722 1752 3 + 1710 1716 -1722 1752 4 1710 1716 -1722 1752 5 + 1686 1680 1677 1704 17 1686 1692 -1698 1704 17 + 1680 1677 1704 1698 17 1680 1686 -1692 1698 17 + 1677 1668 1662 1710 6 1677 1680 1686 1692 17 + 1677 1704 -1698 1692 17 1668 1662 1710 1713 7 + 1668 1662 1710 1716 8 1668 1662 -1710 1716 9 + 1668 1662 -1710 1716 10 1668 1662 -1710 1716 5 + 1668 1677 1680 1686 17 1668 1677 1704 1698 17 + 1662 1668 1677 1680 7 1662 1668 1677 1704 7 + 1662 1710 1716 1722 1 1656 1662 1668 1677 6 + 1656 1662 1710 1713 7 1656 1662 1710 1716 14 + 1656 1662 -1710 1716 15 1656 1662 -1710 1716 16 + 1656 1662 -1710 1716 5 1755 1752 1758 1764 1 + 1752 1758 1764 1770 12 1752 1758 -1764 1770 13 + 1752 1758 -1764 1770 10 1752 1758 -1764 1770 5 + 1752 1758 1764 1815 2 1752 1758 -1764 1815 3 + 1752 1758 -1764 1815 4 1752 1758 -1764 1815 5 + 1746 1728 1722 1752 6 1734 1728 1722 1752 6 + 1728 1722 1752 1755 7 1728 1722 1752 1758 8 + 1728 1722 -1752 1758 9 1728 1722 -1752 1758 10 + 1728 1722 -1752 1758 5 1722 1752 1758 1764 1 + 1716 1722 1728 1734 6 1716 1722 1728 1746 6 + 1716 1722 1752 1755 7 1716 1722 1752 1758 14 + 1716 1722 -1752 1758 15 1716 1722 -1752 1758 16 + 1716 1722 -1752 1758 5 1818 1815 1821 1827 1 + 1815 1821 1827 1833 12 1815 1821 -1827 1833 13 + 1815 1821 -1827 1833 10 1815 1821 -1827 1833 5 + 1815 1821 1827 1863 2 1815 1821 -1827 1863 3 + 1815 1821 -1827 1863 4 1815 1821 -1827 1863 5 + 1797 1794 1803 1809 17 1788 1782 1779 1809 17 + 1788 1794 -1803 1809 17 1782 1779 1809 1803 17 + 1782 1788 1794 1797 17 1782 1788 -1794 1803 17 + 1779 1770 1764 1815 6 1779 1782 1788 1794 17 + 1779 1809 -1803 1794 17 1770 1764 1815 1818 7 + 1770 1764 1815 1821 8 1770 1764 -1815 1821 9 + 1770 1764 -1815 1821 10 1770 1764 -1815 1821 5 + 1770 1779 1782 1788 17 1770 1779 1809 1803 17 + 1764 1770 1779 1782 7 1764 1770 1779 1809 7 + 1764 1815 1821 1827 1 1758 1764 1770 1779 6 + 1758 1764 1815 1818 7 1758 1764 1815 1821 14 + 1758 1764 -1815 1821 15 1758 1764 -1815 1821 16 + 1758 1764 -1815 1821 5 1866 1863 1869 1875 1 + 1863 1869 1875 1884 2 1863 1869 -1875 1884 3 + 1863 1869 -1875 1884 4 1863 1869 -1875 1884 5 + 1851 1833 1827 1863 6 1839 1833 1827 1863 6 + 1833 1827 1863 1866 7 1833 1827 1863 1869 8 + 1833 1827 -1863 1869 9 1833 1827 -1863 1869 10 + 1833 1827 -1863 1869 5 1827 1863 1869 1875 1 + 1821 1827 1833 1839 6 1821 1827 1833 1851 6 + 1821 1827 1863 1866 7 1821 1827 1863 1869 14 + 1821 1827 -1863 1869 15 1821 1827 -1863 1869 16 + 1821 1827 -1863 1869 5 1887 1884 1890 1896 1 + 1884 1890 1896 1902 12 1884 1890 -1896 1902 13 + 1884 1890 -1896 1902 10 1884 1890 -1896 1902 5 + 1884 1890 1896 1935 2 1884 1890 -1896 1935 3 + 1884 1890 -1896 1935 4 1884 1890 -1896 1935 5 + 1875 1884 1890 1896 1 1869 1875 1884 1887 7 + 1869 1875 1884 1890 14 1869 1875 -1884 1890 15 + 1869 1875 -1884 1890 16 1869 1875 -1884 1890 5 + 1938 1935 1941 1947 1 1935 1941 1947 1953 12 + 1935 1941 -1947 1953 13 1935 1941 -1947 1953 10 + 1935 1941 -1947 1953 5 1935 1941 1947 1995 2 + 1935 1941 -1947 1995 3 1935 1941 -1947 1995 4 + 1935 1941 -1947 1995 5 1911 1902 1896 1935 6 + 1902 1896 1935 1938 7 1902 1896 1935 1941 8 + 1902 1896 -1935 1941 9 1902 1896 -1935 1941 10 + 1902 1896 -1935 1941 5 1902 1911 1920 1923 7 + 1902 1911 1920 1926 8 1902 1911 -1920 1926 9 + 1902 1911 -1920 1926 10 1902 1911 -1920 1926 5 + 1896 1902 1911 1920 6 1896 1935 1941 1947 1 + 1890 1896 1902 1911 6 1890 1896 1935 1938 7 + 1890 1896 1935 1941 14 1890 1896 -1935 1941 15 + 1890 1896 -1935 1941 16 1890 1896 -1935 1941 5 + 1998 1995 2001 2007 1 1995 2001 2007 2013 12 + 1995 2001 -2007 2013 13 1995 2001 -2007 2013 10 + 1995 2001 -2007 2013 5 1995 2001 2007 2061 2 + 1995 2001 -2007 2061 3 1995 2001 -2007 2061 4 + 1995 2001 -2007 2061 5 1971 1965 1962 1989 17 + 1971 1977 -1983 1989 17 1965 1962 1989 1983 17 + 1965 1971 -1977 1983 17 1962 1953 1947 1995 6 + 1962 1965 1971 1977 17 1962 1989 -1983 1977 17 + 1953 1947 1995 1998 7 1953 1947 1995 2001 8 + 1953 1947 -1995 2001 9 1953 1947 -1995 2001 10 + 1953 1947 -1995 2001 5 1953 1962 1965 1971 17 + 1953 1962 1989 1983 17 1947 1953 1962 1965 7 + 1947 1953 1962 1989 7 1947 1995 2001 2007 1 + 1941 1947 1953 1962 6 1941 1947 1995 1998 7 + 1941 1947 1995 2001 14 1941 1947 -1995 2001 15 + 1941 1947 -1995 2001 16 1941 1947 -1995 2001 5 + 2064 2061 2067 2073 1 2061 2067 2073 2079 12 + 2061 2067 -2073 2079 13 2061 2067 -2073 2079 10 + 2061 2067 -2073 2079 5 2061 2067 2073 2097 2 + 2061 2067 -2073 2097 3 2061 2067 -2073 2097 4 + 2061 2067 -2073 2097 5 2022 2013 2007 2061 6 + 2022 2031 2040 2049 6 2013 2007 2061 2064 7 + 2013 2007 2061 2067 8 2013 2007 -2061 2067 9 + 2013 2007 -2061 2067 10 2013 2007 -2061 2067 5 + 2013 2022 2031 2040 18 2013 2022 -2031 2040 19 + 2013 2022 -2031 2040 20 2007 2013 2022 2031 18 + 2007 2013 -2022 2031 19 2007 2013 -2022 2031 20 + 2007 2061 2067 2073 1 2001 2007 2013 2022 6 + 2001 2007 2061 2064 7 2001 2007 2061 2067 14 + 2001 2007 -2061 2067 15 2001 2007 -2061 2067 16 + 2001 2007 -2061 2067 5 2100 2097 2103 2109 1 + 2097 2103 2109 2115 12 2097 2103 -2109 2115 13 + 2097 2103 -2109 2115 10 2097 2103 -2109 2115 5 + 2097 2103 2109 2169 2 2097 2103 -2109 2169 3 + 2097 2103 -2109 2169 4 2097 2103 -2109 2169 5 + 2088 2079 2073 2097 6 2079 2073 2097 2100 7 + 2079 2073 2097 2103 8 2079 2073 -2097 2103 9 + 2079 2073 -2097 2103 10 2079 2073 -2097 2103 5 + 2073 2079 2088 2091 7 2073 2079 2088 2094 7 + 2073 2097 2103 2109 1 2067 2073 2079 2088 6 + 2067 2073 2097 2100 7 2067 2073 2097 2103 14 + 2067 2073 -2097 2103 15 2067 2073 -2097 2103 16 + 2067 2073 -2097 2103 5 2172 2169 2175 2181 1 + 2169 2175 2181 2187 12 2169 2175 -2181 2187 13 + 2169 2175 -2181 2187 10 2169 2175 -2181 2187 5 + 2169 2175 2181 2217 2 2169 2175 -2181 2217 3 + 2169 2175 -2181 2217 4 2169 2175 -2181 2217 5 + 2133 2142 2148 2151 21 2133 2142 2148 2160 21 + 2124 2115 2109 2169 6 2124 2133 2142 2148 26 + 2115 2109 2169 2172 7 2115 2109 2169 2175 8 + 2115 2109 -2169 2175 9 2115 2109 -2169 2175 10 + 2115 2109 -2169 2175 5 2115 2124 2133 2142 6 + 2109 2115 2124 2133 18 2109 2115 -2124 2133 19 + 2109 2115 -2124 2133 20 2109 2169 2175 2181 1 + 2103 2109 2115 2124 6 2103 2109 2169 2172 7 + 2103 2109 2169 2175 14 2103 2109 -2169 2175 15 + 2103 2109 -2169 2175 16 2103 2109 -2169 2175 5 + 2220 2217 2223 2229 1 2217 2223 2229 2235 12 + 2217 2223 -2229 2235 13 2217 2223 -2229 2235 10 + 2217 2223 -2229 2235 5 2217 2223 2229 2262 2 + 2217 2223 -2229 2262 3 2217 2223 -2229 2262 4 + 2217 2223 -2229 2262 5 2205 2187 2181 2217 6 + 2193 2187 2181 2217 6 2187 2181 2217 2220 7 + 2187 2181 2217 2223 8 2187 2181 -2217 2223 9 + 2187 2181 -2217 2223 10 2187 2181 -2217 2223 5 + 2181 2217 2223 2229 1 2175 2181 2187 2193 6 + 2175 2181 2187 2205 6 2175 2181 2217 2220 7 + 2175 2181 2217 2223 14 2175 2181 -2217 2223 15 + 2175 2181 -2217 2223 16 2175 2181 -2217 2223 5 + 2265 2262 2268 2274 1 2262 2268 2274 2280 12 + 2262 2268 -2274 2280 13 2262 2268 -2274 2280 10 + 2262 2268 -2274 2280 5 2262 2268 2274 2328 2 + 2262 2268 -2274 2328 3 2262 2268 -2274 2328 4 + 2262 2268 -2274 2328 5 2244 2235 2229 2262 6 + 2235 2229 2262 2265 7 2235 2229 2262 2268 8 + 2235 2229 -2262 2268 9 2235 2229 -2262 2268 10 + 2235 2229 -2262 2268 5 2235 2244 2253 2256 7 + 2235 2244 2253 2259 7 2229 2235 2244 2253 6 + 2229 2262 2268 2274 1 2223 2229 2235 2244 6 + 2223 2229 2262 2265 7 2223 2229 2262 2268 14 + 2223 2229 -2262 2268 15 2223 2229 -2262 2268 16 + 2223 2229 -2262 2268 5 2331 2328 2334 2340 1 + 2328 2334 2340 2346 12 2328 2334 -2340 2346 13 + 2328 2334 -2340 2346 10 2328 2334 -2340 2346 5 + 2328 2334 2340 2385 2 2328 2334 -2340 2385 3 + 2328 2334 -2340 2385 4 2328 2334 -2340 2385 5 + 2289 2280 2274 2328 6 2289 2298 2307 2316 6 + 2280 2274 2328 2331 7 2280 2274 2328 2334 8 + 2280 2274 -2328 2334 9 2280 2274 -2328 2334 10 + 2280 2274 -2328 2334 5 2280 2289 2298 2307 18 + 2280 2289 -2298 2307 19 2280 2289 -2298 2307 20 + 2274 2280 2289 2298 18 2274 2280 -2289 2298 19 + 2274 2280 -2289 2298 20 2274 2328 2334 2340 1 + 2268 2274 2280 2289 6 2268 2274 2328 2331 7 + 2268 2274 2328 2334 14 2268 2274 -2328 2334 15 + 2268 2274 -2328 2334 16 2268 2274 -2328 2334 5 + 2388 2385 2391 2397 1 2385 2391 2397 2403 12 + 2385 2391 -2397 2403 13 2385 2391 -2397 2403 10 + 2385 2391 -2397 2403 5 2385 2391 2397 2418 2 + 2385 2391 -2397 2418 3 2385 2391 -2397 2418 4 + 2385 2391 -2397 2418 5 2355 2346 2340 2385 6 + 2346 2340 2385 2388 7 2346 2340 2385 2391 8 + 2346 2340 -2385 2391 9 2346 2340 -2385 2391 10 + 2346 2340 -2385 2391 5 2340 2346 2355 2361 18 + 2340 2346 -2355 2361 19 2340 2346 -2355 2361 20 + 2340 2346 2355 2373 18 2340 2346 -2355 2373 19 + 2340 2346 -2355 2373 20 2340 2385 2391 2397 1 + 2334 2340 2346 2355 6 2334 2340 2385 2388 7 + 2334 2340 2385 2391 14 2334 2340 -2385 2391 15 + 2334 2340 -2385 2391 16 2334 2340 -2385 2391 5 + 2421 2418 2424 2430 1 2418 2424 2430 2436 12 + 2418 2424 -2430 2436 13 2418 2424 -2430 2436 10 + 2418 2424 -2430 2436 5 2418 2424 2430 2448 2 + 2418 2424 -2430 2448 3 2418 2424 -2430 2448 4 + 2418 2424 -2430 2448 5 2412 2403 2397 2418 6 + 2403 2397 2418 2421 7 2403 2397 2418 2424 8 + 2403 2397 -2418 2424 9 2403 2397 -2418 2424 10 + 2403 2397 -2418 2424 5 2397 2418 2424 2430 1 + 2391 2397 2403 2412 6 2391 2397 2418 2421 7 + 2391 2397 2418 2424 14 2391 2397 -2418 2424 15 + 2391 2397 -2418 2424 16 2391 2397 -2418 2424 5 + 2451 2448 2454 2460 1 2448 2454 2460 2466 12 + 2448 2454 -2460 2466 13 2448 2454 -2460 2466 10 + 2448 2454 -2460 2466 5 2448 2454 2460 2493 2 + 2448 2454 -2460 2493 3 2448 2454 -2460 2493 4 + 2448 2454 -2460 2493 5 2436 2430 2448 2451 7 + 2436 2430 2448 2454 8 2436 2430 -2448 2454 9 + 2436 2430 -2448 2454 10 2436 2430 -2448 2454 5 + 2430 2448 2454 2460 1 2424 2430 2448 2451 7 + 2424 2430 2448 2454 14 2424 2430 -2448 2454 15 + 2424 2430 -2448 2454 16 2424 2430 -2448 2454 5 + 2496 2493 2499 2505 1 2493 2499 2505 2511 12 + 2493 2499 -2505 2511 13 2493 2499 -2505 2511 10 + 2493 2499 -2505 2511 5 2493 2499 2505 2553 2 + 2493 2499 -2505 2553 3 2493 2499 -2505 2553 4 + 2493 2499 -2505 2553 5 2475 2466 2460 2493 6 + 2466 2460 2493 2496 7 2466 2460 2493 2499 8 + 2466 2460 -2493 2499 9 2466 2460 -2493 2499 10 + 2466 2460 -2493 2499 5 2466 2475 2484 2487 7 + 2466 2475 2484 2490 7 2460 2466 2475 2484 6 + 2460 2493 2499 2505 1 2454 2460 2466 2475 6 + 2454 2460 2493 2496 7 2454 2460 2493 2499 14 + 2454 2460 -2493 2499 15 2454 2460 -2493 2499 16 + 2454 2460 -2493 2499 5 2556 2553 2559 2565 1 + 2553 2559 2565 2571 12 2553 2559 -2565 2571 13 + 2553 2559 -2565 2571 10 2553 2559 -2565 2571 5 + 2553 2559 2565 2595 2 2553 2559 -2565 2595 3 + 2553 2559 -2565 2595 4 2553 2559 -2565 2595 5 + 2529 2523 2520 2547 17 2529 2535 -2541 2547 17 + 2523 2520 2547 2541 17 2523 2529 -2535 2541 17 + 2520 2511 2505 2553 6 2520 2523 2529 2535 17 + 2520 2547 -2541 2535 17 2511 2505 2553 2556 7 + 2511 2505 2553 2559 8 2511 2505 -2553 2559 9 + 2511 2505 -2553 2559 10 2511 2505 -2553 2559 5 + 2511 2520 2523 2529 17 2511 2520 2547 2541 17 + 2505 2511 2520 2523 7 2505 2511 2520 2547 7 + 2505 2553 2559 2565 1 2499 2505 2511 2520 6 + 2499 2505 2553 2556 7 2499 2505 2553 2559 14 + 2499 2505 -2553 2559 15 2499 2505 -2553 2559 16 + 2499 2505 -2553 2559 5 2598 2595 2601 2604 1 + 2598 2595 2601 2631 1 2595 2601 2604 2613 12 + 2595 2601 -2604 2613 13 2595 2601 -2604 2613 10 + 2595 2601 -2604 2613 5 2595 2601 2631 2622 12 + 2595 2601 -2631 2622 13 2595 2601 -2631 2622 10 + 2595 2601 -2631 2622 5 2595 2601 2631 2637 2 + 2595 2601 -2631 2637 3 2595 2601 -2631 2637 4 + 2595 2601 -2631 2637 5 2580 2571 2565 2595 6 + 2571 2565 2595 2598 7 2571 2565 2595 2601 8 + 2571 2565 -2595 2601 9 2571 2565 -2595 2601 10 + 2571 2565 -2595 2601 5 2565 2571 2580 2583 7 + 2565 2571 2580 2586 8 2565 2571 -2580 2586 9 + 2565 2571 -2580 2586 10 2565 2571 -2580 2586 5 + 2565 2595 2601 2604 1 2565 2595 2601 2631 1 + 2559 2565 2571 2580 6 2559 2565 2595 2598 7 + 2559 2565 2595 2601 14 2559 2565 -2595 2601 15 + 2559 2565 -2595 2601 16 2559 2565 -2595 2601 5 + 2640 2637 2643 2649 1 2637 2643 2649 2655 12 + 2637 2643 -2649 2655 13 2637 2643 -2649 2655 10 + 2637 2643 -2649 2655 5 2637 2643 2649 2667 2 + 2637 2643 -2649 2667 3 2637 2643 -2649 2667 4 + 2637 2643 -2649 2667 5 2631 2637 2643 2649 1 + 2622 2631 2637 2640 7 2622 2631 2637 2643 8 + 2622 2631 -2637 2643 9 2622 2631 -2637 2643 10 + 2622 2631 -2637 2643 5 2613 2604 -2601 2631 7 + 2613 2622 2631 2637 6 2604 2601 -2631 2622 7 + 2604 2601 2631 2637 7 2604 2613 -2622 2631 18 + 2604 2613 -2622 2631 19 2604 2613 -2622 2631 20 + 2601 2604 -2613 2622 6 2601 2631 -2622 2613 6 + 2601 2631 2637 2640 7 2601 2631 2637 2643 14 + 2601 2631 -2637 2643 15 2601 2631 -2637 2643 16 + 2601 2631 -2637 2643 5 2670 2667 2673 2679 1 + 2667 2673 2679 2685 12 2667 2673 -2679 2685 13 + 2667 2673 -2679 2685 10 2667 2673 -2679 2685 5 + 2667 2673 2679 2697 2 2667 2673 -2679 2697 3 + 2667 2673 -2679 2697 4 2667 2673 -2679 2697 5 + 2655 2649 2667 2670 7 2655 2649 2667 2673 8 + 2655 2649 -2667 2673 9 2655 2649 -2667 2673 10 + 2655 2649 -2667 2673 5 2649 2667 2673 2679 1 + 2643 2649 2667 2670 7 2643 2649 2667 2673 14 + 2643 2649 -2667 2673 15 2643 2649 -2667 2673 16 + 2643 2649 -2667 2673 5 2700 2697 2703 2709 1 + 2697 2703 2709 2715 12 2697 2703 -2709 2715 13 + 2697 2703 -2709 2715 10 2697 2703 -2709 2715 5 + 2697 2703 2709 2745 2 2697 2703 -2709 2745 3 + 2697 2703 -2709 2745 4 2697 2703 -2709 2745 5 + 2685 2679 2697 2700 7 2685 2679 2697 2703 8 + 2685 2679 -2697 2703 9 2685 2679 -2697 2703 10 + 2685 2679 -2697 2703 5 2679 2697 2703 2709 1 + 2673 2679 2697 2700 7 2673 2679 2697 2703 14 + 2673 2679 -2697 2703 15 2673 2679 -2697 2703 16 + 2673 2679 -2697 2703 5 2748 2745 2751 2757 1 + 2745 2751 2757 2763 12 2745 2751 -2757 2763 13 + 2745 2751 -2757 2763 10 2745 2751 -2757 2763 5 + 2745 2751 2757 2802 2 2745 2751 -2757 2802 3 + 2745 2751 -2757 2802 4 2745 2751 -2757 2802 5 + 2733 2715 2709 2745 6 2721 2715 2709 2745 6 + 2715 2709 2745 2748 7 2715 2709 2745 2751 8 + 2715 2709 -2745 2751 9 2715 2709 -2745 2751 10 + 2715 2709 -2745 2751 5 2709 2745 2751 2757 1 + 2703 2709 2715 2721 6 2703 2709 2715 2733 6 + 2703 2709 2745 2748 7 2703 2709 2745 2751 14 + 2703 2709 -2745 2751 15 2703 2709 -2745 2751 16 + 2703 2709 -2745 2751 5 2805 2802 2808 2811 1 + 2805 2802 2808 2838 1 2802 2808 2811 2820 12 + 2802 2808 -2811 2820 13 2802 2808 -2811 2820 10 + 2802 2808 -2811 2820 5 2802 2808 2838 2829 12 + 2802 2808 -2838 2829 13 2802 2808 -2838 2829 10 + 2802 2808 -2838 2829 5 2802 2808 2838 2844 2 + 2802 2808 -2838 2844 3 2802 2808 -2838 2844 4 + 2802 2808 -2838 2844 5 2772 2763 2757 2802 6 + 2763 2757 2802 2805 7 2763 2757 2802 2808 8 + 2763 2757 -2802 2808 9 2763 2757 -2802 2808 10 + 2763 2757 -2802 2808 5 2757 2763 2772 2778 18 + 2757 2763 -2772 2778 19 2757 2763 -2772 2778 20 + 2757 2763 2772 2790 18 2757 2763 -2772 2790 19 + 2757 2763 -2772 2790 20 2757 2802 2808 2811 1 + 2757 2802 2808 2838 1 2751 2757 2763 2772 6 + 2751 2757 2802 2805 7 2751 2757 2802 2808 14 + 2751 2757 -2802 2808 15 2751 2757 -2802 2808 16 + 2751 2757 -2802 2808 5 2847 2844 2850 2856 1 + 2844 2850 2856 2862 12 2844 2850 -2856 2862 13 + 2844 2850 -2856 2862 10 2844 2850 -2856 2862 5 + 2844 2850 2856 2877 2 2844 2850 -2856 2877 3 + 2844 2850 -2856 2877 4 2844 2850 -2856 2877 5 + 2838 2844 2850 2856 1 2829 2838 2844 2847 7 + 2829 2838 2844 2850 8 2829 2838 -2844 2850 9 + 2829 2838 -2844 2850 10 2829 2838 -2844 2850 5 + 2820 2811 -2808 2838 7 2820 2829 2838 2844 6 + 2811 2808 -2838 2829 7 2811 2808 2838 2844 7 + 2811 2820 -2829 2838 18 2811 2820 -2829 2838 19 + 2811 2820 -2829 2838 20 2808 2811 -2820 2829 6 + 2808 2838 -2829 2820 6 2808 2838 2844 2847 7 + 2808 2838 2844 2850 14 2808 2838 -2844 2850 15 + 2808 2838 -2844 2850 16 2808 2838 -2844 2850 5 + 2880 2877 2883 2889 1 2877 2883 2889 2895 12 + 2877 2883 -2889 2895 13 2877 2883 -2889 2895 10 + 2877 2883 -2889 2895 5 2877 2883 2889 2913 2 + 2877 2883 -2889 2913 3 2877 2883 -2889 2913 4 + 2877 2883 -2889 2913 5 2871 2862 2856 2877 6 + 2862 2856 2877 2880 7 2862 2856 2877 2883 8 + 2862 2856 -2877 2883 9 2862 2856 -2877 2883 10 + 2862 2856 -2877 2883 5 2856 2877 2883 2889 1 + 2850 2856 2862 2871 6 2850 2856 2877 2880 7 + 2850 2856 2877 2883 14 2850 2856 -2877 2883 15 + 2850 2856 -2877 2883 16 2850 2856 -2877 2883 5 + 2916 2913 2919 2925 1 2913 2919 2925 2931 12 + 2913 2919 -2925 2931 13 2913 2919 -2925 2931 10 + 2913 2919 -2925 2931 5 2913 2919 2925 2961 2 + 2913 2919 -2925 2961 3 2913 2919 -2925 2961 4 + 2913 2919 -2925 2961 5 2904 2895 2889 2913 6 + 2895 2889 2913 2916 7 2895 2889 2913 2919 8 + 2895 2889 -2913 2919 9 2895 2889 -2913 2919 10 + 2895 2889 -2913 2919 5 2889 2895 2904 2907 7 + 2889 2895 2904 2910 7 2889 2913 2919 2925 1 + 2883 2889 2895 2904 6 2883 2889 2913 2916 7 + 2883 2889 2913 2919 14 2883 2889 -2913 2919 15 + 2883 2889 -2913 2919 16 2883 2889 -2913 2919 5 + 2964 2961 2967 2973 1 2961 2967 2973 2979 12 + 2961 2967 -2973 2979 13 2961 2967 -2973 2979 10 + 2961 2967 -2973 2979 5 2961 2967 2973 3018 2 + 2961 2967 -2973 3018 3 2961 2967 -2973 3018 4 + 2961 2967 -2973 3018 5 2949 2931 2925 2961 6 + 2937 2931 2925 2961 6 2931 2925 2961 2964 7 + 2931 2925 2961 2967 8 2931 2925 -2961 2967 9 + 2931 2925 -2961 2967 10 2931 2925 -2961 2967 5 + 2925 2961 2967 2973 1 2919 2925 2931 2937 6 + 2919 2925 2931 2949 6 2919 2925 2961 2964 7 + 2919 2925 2961 2967 14 2919 2925 -2961 2967 15 + 2919 2925 -2961 2967 16 2919 2925 -2961 2967 5 + 3021 3018 3024 3030 1 3018 3024 3030 3036 12 + 3018 3024 -3030 3036 13 3018 3024 -3030 3036 10 + 3018 3024 -3030 3036 5 3018 3024 3030 3051 2 + 3018 3024 -3030 3051 3 3018 3024 -3030 3051 4 + 3018 3024 -3030 3051 5 2997 2979 2973 3018 6 + 2985 2979 2973 3018 6 2985 2979 2997 3006 18 + 2985 2979 -2997 3006 19 2985 2979 -2997 3006 20 + 2979 2973 3018 3021 7 2979 2973 3018 3024 8 + 2979 2973 -3018 3024 9 2979 2973 -3018 3024 10 + 2979 2973 -3018 3024 5 2973 2979 2997 3006 18 + 2973 2979 -2997 3006 19 2973 2979 -2997 3006 20 + 2973 3018 3024 3030 1 2967 2973 2979 2985 6 + 2967 2973 2979 2997 6 2967 2973 3018 3021 7 + 2967 2973 3018 3024 14 2967 2973 -3018 3024 15 + 2967 2973 -3018 3024 16 2967 2973 -3018 3024 5 + 3054 3051 3057 3063 1 3051 3057 3063 3069 12 + 3051 3057 -3063 3069 13 3051 3057 -3063 3069 10 + 3051 3057 -3063 3069 5 3051 3057 3063 3087 2 + 3051 3057 -3063 3087 3 3051 3057 -3063 3087 4 + 3051 3057 -3063 3087 5 3045 3036 3030 3051 6 + 3036 3030 3051 3054 7 3036 3030 3051 3057 8 + 3036 3030 -3051 3057 9 3036 3030 -3051 3057 10 + 3036 3030 -3051 3057 5 3030 3051 3057 3063 1 + 3024 3030 3036 3045 6 3024 3030 3051 3054 7 + 3024 3030 3051 3057 14 3024 3030 -3051 3057 15 + 3024 3030 -3051 3057 16 3024 3030 -3051 3057 5 + 3090 3087 3093 3099 1 3087 3093 3099 3105 12 + 3087 3093 -3099 3105 13 3087 3093 -3099 3105 10 + 3087 3093 -3099 3105 5 3087 3093 3099 3138 2 + 3087 3093 -3099 3138 3 3087 3093 -3099 3138 4 + 3087 3093 -3099 3138 5 3078 3069 3063 3087 6 + 3069 3063 3087 3090 7 3069 3063 3087 3093 8 + 3069 3063 -3087 3093 9 3069 3063 -3087 3093 10 + 3069 3063 -3087 3093 5 3063 3069 3078 3081 7 + 3063 3069 3078 3084 7 3063 3087 3093 3099 1 + 3057 3063 3069 3078 6 3057 3063 3087 3090 7 + 3057 3063 3087 3093 14 3057 3063 -3087 3093 15 + 3057 3063 -3087 3093 16 3057 3063 -3087 3093 5 + 3141 3138 3144 3150 1 3138 3144 3150 3156 12 + 3138 3144 -3150 3156 13 3138 3144 -3150 3156 10 + 3138 3144 -3150 3156 5 3138 3144 3150 3183 2 + 3138 3144 -3150 3183 3 3138 3144 -3150 3183 4 + 3138 3144 -3150 3183 5 3114 3105 3099 3138 6 + 3105 3099 3138 3141 7 3105 3099 3138 3144 8 + 3105 3099 -3138 3144 9 3105 3099 -3138 3144 10 + 3105 3099 -3138 3144 5 3105 3114 3123 3126 7 + 3105 3114 3123 3129 8 3105 3114 -3123 3129 9 + 3105 3114 -3123 3129 10 3105 3114 -3123 3129 5 + 3099 3105 3114 3123 6 3099 3138 3144 3150 1 + 3093 3099 3105 3114 6 3093 3099 3138 3141 7 + 3093 3099 3138 3144 14 3093 3099 -3138 3144 15 + 3093 3099 -3138 3144 16 3093 3099 -3138 3144 5 + 3186 3183 3189 3195 1 3183 3189 3195 3201 12 + 3183 3189 -3195 3201 13 3183 3189 -3195 3201 10 + 3183 3189 -3195 3201 5 3183 3189 3195 3240 2 + 3183 3189 -3195 3240 3 3183 3189 -3195 3240 4 + 3183 3189 -3195 3240 5 3165 3156 3150 3183 6 + 3156 3150 3183 3186 7 3156 3150 3183 3189 8 + 3156 3150 -3183 3189 9 3156 3150 -3183 3189 10 + 3156 3150 -3183 3189 5 3156 3165 3174 3177 7 + 3156 3165 3174 3180 7 3150 3156 3165 3174 6 + 3150 3183 3189 3195 1 3144 3150 3156 3165 6 + 3144 3150 3183 3186 7 3144 3150 3183 3189 14 + 3144 3150 -3183 3189 15 3144 3150 -3183 3189 16 + 3144 3150 -3183 3189 5 3243 3240 3246 3252 1 + 3240 3246 3252 3258 12 3240 3246 -3252 3258 13 + 3240 3246 -3252 3258 10 3240 3246 -3252 3258 5 + 3240 3246 3252 3306 2 3240 3246 -3252 3306 3 + 3240 3246 -3252 3306 4 3240 3246 -3252 3306 5 + 3219 3201 3195 3240 6 3207 3201 3195 3240 6 + 3207 3201 3219 3228 18 3207 3201 -3219 3228 19 + 3207 3201 -3219 3228 20 3201 3195 3240 3243 7 + 3201 3195 3240 3246 8 3201 3195 -3240 3246 9 + 3201 3195 -3240 3246 10 3201 3195 -3240 3246 5 + 3195 3201 3219 3228 18 3195 3201 -3219 3228 19 + 3195 3201 -3219 3228 20 3195 3240 3246 3252 1 + 3189 3195 3201 3207 6 3189 3195 3201 3219 6 + 3189 3195 3240 3243 7 3189 3195 3240 3246 14 + 3189 3195 -3240 3246 15 3189 3195 -3240 3246 16 + 3189 3195 -3240 3246 5 3309 3306 3312 3318 1 + 3306 3312 3318 3324 12 3306 3312 -3318 3324 13 + 3306 3312 -3318 3324 10 3306 3312 -3318 3324 5 + 3306 3312 3318 3342 2 3306 3312 -3318 3342 3 + 3306 3312 -3318 3342 4 3306 3312 -3318 3342 5 + 3267 3258 3252 3306 6 3267 3276 3285 3294 6 + 3258 3252 3306 3309 7 3258 3252 3306 3312 8 + 3258 3252 -3306 3312 9 3258 3252 -3306 3312 10 + 3258 3252 -3306 3312 5 3258 3267 3276 3285 18 + 3258 3267 -3276 3285 19 3258 3267 -3276 3285 20 + 3252 3258 3267 3276 18 3252 3258 -3267 3276 19 + 3252 3258 -3267 3276 20 3252 3306 3312 3318 1 + 3246 3252 3258 3267 6 3246 3252 3306 3309 7 + 3246 3252 3306 3312 14 3246 3252 -3306 3312 15 + 3246 3252 -3306 3312 16 3246 3252 -3306 3312 5 + 3345 3342 3348 3354 1 3342 3348 3354 3360 12 + 3342 3348 -3354 3360 13 3342 3348 -3354 3360 10 + 3342 3348 -3354 3360 5 3342 3348 3354 3399 2 + 3342 3348 -3354 3399 3 3342 3348 -3354 3399 4 + 3342 3348 -3354 3399 5 3333 3324 3318 3342 6 + 3324 3318 3342 3345 7 3324 3318 3342 3348 8 + 3324 3318 -3342 3348 9 3324 3318 -3342 3348 10 + 3324 3318 -3342 3348 5 3318 3324 3333 3336 7 + 3318 3324 3333 3339 7 3318 3342 3348 3354 1 + 3312 3318 3324 3333 6 3312 3318 3342 3345 7 + 3312 3318 3342 3348 14 3312 3318 -3342 3348 15 + 3312 3318 -3342 3348 16 3312 3318 -3342 3348 5 + 3402 3399 3405 3411 1 3399 3405 3411 3417 12 + 3399 3405 -3411 3417 13 3399 3405 -3411 3417 10 + 3399 3405 -3411 3417 5 3399 3405 3411 3459 2 + 3399 3405 -3411 3459 3 3399 3405 -3411 3459 4 + 3399 3405 -3411 3459 5 3369 3360 3354 3399 6 + 3360 3354 3399 3402 7 3360 3354 3399 3405 8 + 3360 3354 -3399 3405 9 3360 3354 -3399 3405 10 + 3360 3354 -3399 3405 5 3354 3360 3369 3375 18 + 3354 3360 -3369 3375 19 3354 3360 -3369 3375 20 + 3354 3360 3369 3387 18 3354 3360 -3369 3387 19 + 3354 3360 -3369 3387 20 3354 3399 3405 3411 1 + 3348 3354 3360 3369 6 3348 3354 3399 3402 7 + 3348 3354 3399 3405 14 3348 3354 -3399 3405 15 + 3348 3354 -3399 3405 16 3348 3354 -3399 3405 5 + 3462 3459 3465 3471 1 3459 3465 3471 3477 12 + 3459 3465 -3471 3477 13 3459 3465 -3471 3477 10 + 3459 3465 -3471 3477 5 3459 3465 3471 3507 2 + 3459 3465 -3471 3507 3 3459 3465 -3471 3507 4 + 3459 3465 -3471 3507 5 3435 3429 3426 3453 17 + 3435 3441 -3447 3453 17 3429 3426 3453 3447 17 + 3429 3435 -3441 3447 17 3426 3417 3411 3459 6 + 3426 3429 3435 3441 17 3426 3453 -3447 3441 17 + 3417 3411 3459 3462 7 3417 3411 3459 3465 8 + 3417 3411 -3459 3465 9 3417 3411 -3459 3465 10 + 3417 3411 -3459 3465 5 3417 3426 3429 3435 17 + 3417 3426 3453 3447 17 3411 3417 3426 3429 7 + 3411 3417 3426 3453 7 3411 3459 3465 3471 1 + 3405 3411 3417 3426 6 3405 3411 3459 3462 7 + 3405 3411 3459 3465 14 3405 3411 -3459 3465 15 + 3405 3411 -3459 3465 16 3405 3411 -3459 3465 5 + 3510 3507 3513 3519 1 3507 3513 3519 3525 12 + 3507 3513 -3519 3525 13 3507 3513 -3519 3525 10 + 3507 3513 -3519 3525 5 3507 3513 3519 3552 2 + 3507 3513 -3519 3552 3 3507 3513 -3519 3552 4 + 3507 3513 -3519 3552 5 3495 3477 3471 3507 6 + 3483 3477 3471 3507 6 3477 3471 3507 3510 7 + 3477 3471 3507 3513 8 3477 3471 -3507 3513 9 + 3477 3471 -3507 3513 10 3477 3471 -3507 3513 5 + 3471 3507 3513 3519 1 3465 3471 3477 3483 6 + 3465 3471 3477 3495 6 3465 3471 3507 3510 7 + 3465 3471 3507 3513 14 3465 3471 -3507 3513 15 + 3465 3471 -3507 3513 16 3465 3471 -3507 3513 5 + 3555 3552 3558 3564 1 3552 3558 3564 3570 12 + 3552 3558 -3564 3570 13 3552 3558 -3564 3570 10 + 3552 3558 -3564 3570 5 3552 3558 3564 3609 2 + 3552 3558 -3564 3609 3 3552 3558 -3564 3609 4 + 3552 3558 -3564 3609 5 3534 3525 3519 3552 6 + 3525 3519 3552 3555 7 3525 3519 3552 3558 8 + 3525 3519 -3552 3558 9 3525 3519 -3552 3558 10 + 3525 3519 -3552 3558 5 3525 3534 3543 3546 7 + 3525 3534 3543 3549 7 3519 3525 3534 3543 6 + 3519 3552 3558 3564 1 3513 3519 3525 3534 6 + 3513 3519 3552 3555 7 3513 3519 3552 3558 14 + 3513 3519 -3552 3558 15 3513 3519 -3552 3558 16 + 3513 3519 -3552 3558 5 3612 3609 3615 3621 1 + 3609 3615 3621 3630 2 3609 3615 -3621 3630 3 + 3609 3615 -3621 3630 4 3609 3615 -3621 3630 5 + 3579 3570 3564 3609 6 3570 3564 3609 3612 7 + 3570 3564 3609 3615 8 3570 3564 -3609 3615 9 + 3570 3564 -3609 3615 10 3570 3564 -3609 3615 5 + 3564 3570 3579 3585 18 3564 3570 -3579 3585 19 + 3564 3570 -3579 3585 20 3564 3570 3579 3597 18 + 3564 3570 -3579 3597 19 3564 3570 -3579 3597 20 + 3564 3609 3615 3621 1 3558 3564 3570 3579 6 + 3558 3564 3609 3612 7 3558 3564 3609 3615 14 + 3558 3564 -3609 3615 15 3558 3564 -3609 3615 16 + 3558 3564 -3609 3615 5 3633 3630 3636 3642 1 + 3630 3636 3642 3648 12 3630 3636 -3642 3648 13 + 3630 3636 -3642 3648 10 3630 3636 -3642 3648 5 + 3630 3636 3642 3696 2 3630 3636 -3642 3696 3 + 3630 3636 -3642 3696 4 3630 3636 -3642 3696 5 + 3621 3630 3636 3642 1 3615 3621 3630 3633 7 + 3615 3621 3630 3636 14 3615 3621 -3630 3636 15 + 3615 3621 -3630 3636 16 3615 3621 -3630 3636 5 + 3699 3696 3702 3708 1 3696 3702 3708 3714 12 + 3696 3702 -3708 3714 13 3696 3702 -3708 3714 10 + 3696 3702 -3708 3714 5 3696 3702 3708 3744 2 + 3696 3702 -3708 3744 3 3696 3702 -3708 3744 4 + 3696 3702 -3708 3744 5 3657 3648 3642 3696 6 + 3657 3666 3675 3684 6 3648 3642 3696 3699 7 + 3648 3642 3696 3702 8 3648 3642 -3696 3702 9 + 3648 3642 -3696 3702 10 3648 3642 -3696 3702 5 + 3648 3657 3666 3675 18 3648 3657 -3666 3675 19 + 3648 3657 -3666 3675 20 3642 3648 3657 3666 18 + 3642 3648 -3657 3666 19 3642 3648 -3657 3666 20 + 3642 3696 3702 3708 1 3636 3642 3648 3657 6 + 3636 3642 3696 3699 7 3636 3642 3696 3702 14 + 3636 3642 -3696 3702 15 3636 3642 -3696 3702 16 + 3636 3642 -3696 3702 5 3747 3744 3750 3756 1 + 3744 3750 3756 3762 12 3744 3750 -3756 3762 13 + 3744 3750 -3756 3762 10 3744 3750 -3756 3762 5 + 3744 3750 3756 3816 2 3744 3750 -3756 3816 3 + 3744 3750 -3756 3816 4 3744 3750 -3756 3816 5 + 3732 3714 3708 3744 6 3720 3714 3708 3744 6 + 3714 3708 3744 3747 7 3714 3708 3744 3750 8 + 3714 3708 -3744 3750 9 3714 3708 -3744 3750 10 + 3714 3708 -3744 3750 5 3708 3744 3750 3756 1 + 3702 3708 3714 3720 6 3702 3708 3714 3732 6 + 3702 3708 3744 3747 7 3702 3708 3744 3750 14 + 3702 3708 -3744 3750 15 3702 3708 -3744 3750 16 + 3702 3708 -3744 3750 5 3819 3816 3822 3828 1 + 3816 3822 3828 3834 12 3816 3822 -3828 3834 13 + 3816 3822 -3828 3834 10 3816 3822 -3828 3834 5 + 3816 3822 3828 3852 2 3816 3822 -3828 3852 3 + 3816 3822 -3828 3852 4 3816 3822 -3828 3852 5 + 3795 3789 3786 3813 17 3795 3801 -3807 3813 17 + 3789 3786 3813 3807 27 3789 3795 -3801 3807 17 + 3786 3789 3795 3801 17 3786 3813 -3807 3801 28 + 3780 3774 -3771 3813 29 3780 3786 3789 3795 17 + 3780 3786 3813 3807 27 3774 3771 -3813 3786 30 + 3774 3771 3813 3807 30 3774 3780 3786 3789 31 + 3774 3780 -3786 3813 31 3771 3762 3756 3816 6 + 3771 3774 -3780 3786 25 3771 3813 -3786 3780 27 + 3771 3813 3786 3789 27 3771 3813 3807 3801 28 + 3762 3756 3816 3819 7 3762 3756 3816 3822 8 + 3762 3756 -3816 3822 9 3762 3756 -3816 3822 10 + 3762 3756 -3816 3822 5 3762 3771 3774 3780 29 + 3762 3771 3813 3786 30 3762 3771 3813 3807 30 + 3756 3762 3771 3774 7 3756 3762 3771 3813 7 + 3756 3816 3822 3828 1 3750 3756 3762 3771 6 + 3750 3756 3816 3819 7 3750 3756 3816 3822 14 + 3750 3756 -3816 3822 15 3750 3756 -3816 3822 16 + 3750 3756 -3816 3822 5 3855 3852 3858 3864 1 + 3852 3858 3864 3873 2 3852 3858 -3864 3873 3 + 3852 3858 -3864 3873 4 3852 3858 -3864 3873 5 + 3843 3834 3828 3852 6 3834 3828 3852 3855 7 + 3834 3828 3852 3858 8 3834 3828 -3852 3858 9 + 3834 3828 -3852 3858 10 3834 3828 -3852 3858 5 + 3828 3834 3843 3846 7 3828 3834 3843 3849 7 + 3828 3852 3858 3864 1 3822 3828 3834 3843 6 + 3822 3828 3852 3855 7 3822 3828 3852 3858 14 + 3822 3828 -3852 3858 15 3822 3828 -3852 3858 16 + 3822 3828 -3852 3858 5 3876 3873 3879 3885 1 + 3873 3879 3885 3891 12 3873 3879 -3885 3891 13 + 3873 3879 -3885 3891 10 3873 3879 -3885 3891 5 + 3873 3879 3885 3930 2 3873 3879 -3885 3930 3 + 3873 3879 -3885 3930 4 3873 3879 -3885 3930 5 + 3864 3873 3879 3885 1 3858 3864 3873 3876 7 + 3858 3864 3873 3879 14 3858 3864 -3873 3879 15 + 3858 3864 -3873 3879 16 3858 3864 -3873 3879 5 + 3933 3930 3936 3942 1 3930 3936 3942 3948 12 + 3930 3936 -3942 3948 13 3930 3936 -3942 3948 10 + 3930 3936 -3942 3948 5 3930 3936 3942 3966 2 + 3930 3936 -3942 3966 3 3930 3936 -3942 3966 4 + 3930 3936 -3942 3966 5 3900 3891 3885 3930 6 + 3891 3885 3930 3933 7 3891 3885 3930 3936 8 + 3891 3885 -3930 3936 9 3891 3885 -3930 3936 10 + 3891 3885 -3930 3936 5 3885 3891 3900 3906 18 + 3885 3891 -3900 3906 19 3885 3891 -3900 3906 20 + 3885 3891 3900 3918 18 3885 3891 -3900 3918 19 + 3885 3891 -3900 3918 20 3885 3930 3936 3942 1 + 3879 3885 3891 3900 6 3879 3885 3930 3933 7 + 3879 3885 3930 3936 14 3879 3885 -3930 3936 15 + 3879 3885 -3930 3936 16 3879 3885 -3930 3936 5 + 3969 3966 3972 3978 1 3966 3972 3978 3984 12 + 3966 3972 -3978 3984 13 3966 3972 -3978 3984 10 + 3966 3972 -3978 3984 5 3966 3972 3978 3996 2 + 3966 3972 -3978 3996 3 3966 3972 -3978 3996 4 + 3966 3972 -3978 3996 5 3957 3948 3942 3966 6 + 3948 3942 3966 3969 7 3948 3942 3966 3972 8 + 3948 3942 -3966 3972 9 3948 3942 -3966 3972 10 + 3948 3942 -3966 3972 5 3942 3948 3957 3960 7 + 3942 3948 3957 3963 7 3942 3966 3972 3978 1 + 3936 3942 3948 3957 6 3936 3942 3966 3969 7 + 3936 3942 3966 3972 14 3936 3942 -3966 3972 15 + 3936 3942 -3966 3972 16 3936 3942 -3966 3972 5 + 3999 3996 4002 4008 1 3996 4002 4008 4014 12 + 3996 4002 -4008 4014 13 3996 4002 -4008 4014 10 + 3996 4002 -4008 4014 5 3996 4002 4008 4053 2 + 3996 4002 -4008 4053 3 3996 4002 -4008 4053 4 + 3996 4002 -4008 4053 5 3984 3978 3996 3999 7 + 3984 3978 3996 4002 8 3984 3978 -3996 4002 9 + 3984 3978 -3996 4002 10 3984 3978 -3996 4002 5 + 3978 3996 4002 4008 1 3972 3978 3996 3999 7 + 3972 3978 3996 4002 14 3972 3978 -3996 4002 15 + 3972 3978 -3996 4002 16 3972 3978 -3996 4002 5 + 4056 4053 4059 4065 1 4053 4059 4065 4071 12 + 4053 4059 -4065 4071 13 4053 4059 -4065 4071 10 + 4053 4059 -4065 4071 5 4053 4059 4065 4101 2 + 4053 4059 -4065 4101 3 4053 4059 -4065 4101 4 + 4053 4059 -4065 4101 5 4032 4014 4008 4053 6 + 4020 4014 4008 4053 6 4020 4014 4032 4041 18 + 4020 4014 -4032 4041 19 4020 4014 -4032 4041 20 + 4014 4008 4053 4056 7 4014 4008 4053 4059 8 + 4014 4008 -4053 4059 9 4014 4008 -4053 4059 10 + 4014 4008 -4053 4059 5 4008 4014 4032 4041 18 + 4008 4014 -4032 4041 19 4008 4014 -4032 4041 20 + 4008 4053 4059 4065 1 4002 4008 4014 4020 6 + 4002 4008 4014 4032 6 4002 4008 4053 4056 7 + 4002 4008 4053 4059 14 4002 4008 -4053 4059 15 + 4002 4008 -4053 4059 16 4002 4008 -4053 4059 5 + 4104 4101 4107 4113 1 4101 4107 4113 4119 12 + 4101 4107 -4113 4119 13 4101 4107 -4113 4119 10 + 4101 4107 -4113 4119 5 4101 4107 4113 4152 2 + 4101 4107 -4113 4152 3 4101 4107 -4113 4152 4 + 4101 4107 -4113 4152 5 4089 4071 4065 4101 6 + 4077 4071 4065 4101 6 4071 4065 4101 4104 7 + 4071 4065 4101 4107 8 4071 4065 -4101 4107 9 + 4071 4065 -4101 4107 10 4071 4065 -4101 4107 5 + 4065 4101 4107 4113 1 4059 4065 4071 4077 6 + 4059 4065 4071 4089 6 4059 4065 4101 4104 7 + 4059 4065 4101 4107 14 4059 4065 -4101 4107 15 + 4059 4065 -4101 4107 16 4059 4065 -4101 4107 5 + 4155 4152 4158 4164 1 4152 4158 4164 4170 12 + 4152 4158 -4164 4170 13 4152 4158 -4164 4170 10 + 4152 4158 -4164 4170 5 4152 4158 4164 4185 2 + 4152 4158 -4164 4185 3 4152 4158 -4164 4185 4 + 4152 4158 -4164 4185 5 4134 4131 -4128 4146 21 + 4131 4128 -4146 4140 22 4131 4134 -4140 4146 23 + 4128 4119 4113 4152 6 4128 4131 -4134 4140 24 + 4128 4146 -4140 4134 25 4119 4113 4152 4155 7 + 4119 4113 4152 4158 8 4119 4113 -4152 4158 9 + 4119 4113 -4152 4158 10 4119 4113 -4152 4158 5 + 4119 4128 4131 4134 21 4119 4128 4146 4140 22 + 4113 4119 4128 4131 7 4113 4119 4128 4146 7 + 4113 4152 4158 4164 1 4107 4113 4119 4128 6 + 4107 4113 4152 4155 7 4107 4113 4152 4158 14 + 4107 4113 -4152 4158 15 4107 4113 -4152 4158 16 + 4107 4113 -4152 4158 5 4188 4185 4191 4197 1 + 4185 4191 4197 4203 12 4185 4191 -4197 4203 13 + 4185 4191 -4197 4203 10 4185 4191 -4197 4203 5 + 4185 4191 4197 4242 2 4185 4191 -4197 4242 3 + 4185 4191 -4197 4242 4 4185 4191 -4197 4242 5 + 4179 4170 4164 4185 6 4170 4164 4185 4188 7 + 4170 4164 4185 4191 8 4170 4164 -4185 4191 9 + 4170 4164 -4185 4191 10 4170 4164 -4185 4191 5 + 4164 4185 4191 4197 1 4158 4164 4170 4179 6 + 4158 4164 4185 4188 7 4158 4164 4185 4191 14 + 4158 4164 -4185 4191 15 4158 4164 -4185 4191 16 + 4158 4164 -4185 4191 5 4245 4242 4248 4254 1 + 4242 4248 4254 4260 12 4242 4248 -4254 4260 13 + 4242 4248 -4254 4260 10 4242 4248 -4254 4260 5 + 4242 4248 4254 4272 2 4242 4248 -4254 4272 3 + 4242 4248 -4254 4272 4 4242 4248 -4254 4272 5 + 4221 4203 4197 4242 6 4209 4203 4197 4242 6 + 4209 4203 4221 4230 18 4209 4203 -4221 4230 19 + 4209 4203 -4221 4230 20 4203 4197 4242 4245 7 + 4203 4197 4242 4248 8 4203 4197 -4242 4248 9 + 4203 4197 -4242 4248 10 4203 4197 -4242 4248 5 + 4197 4203 4221 4230 18 4197 4203 -4221 4230 19 + 4197 4203 -4221 4230 20 4197 4242 4248 4254 1 + 4191 4197 4203 4209 6 4191 4197 4203 4221 6 + 4191 4197 4242 4245 7 4191 4197 4242 4248 14 + 4191 4197 -4242 4248 15 4191 4197 -4242 4248 16 + 4191 4197 -4242 4248 5 4275 4272 4278 4284 1 + 4272 4278 4284 4290 12 4272 4278 -4284 4290 13 + 4272 4278 -4284 4290 10 4272 4278 -4284 4290 5 + 4272 4278 4284 4332 2 4272 4278 -4284 4332 3 + 4272 4278 -4284 4332 4 4272 4278 -4284 4332 5 + 4260 4254 4272 4275 7 4260 4254 4272 4278 8 + 4260 4254 -4272 4278 9 4260 4254 -4272 4278 10 + 4260 4254 -4272 4278 5 4254 4272 4278 4284 1 + 4248 4254 4272 4275 7 4248 4254 4272 4278 14 + 4248 4254 -4272 4278 15 4248 4254 -4272 4278 16 + 4248 4254 -4272 4278 5 4335 4332 4338 4344 1 + 4332 4338 4344 4350 12 4332 4338 -4344 4350 13 + 4332 4338 -4344 4350 10 4332 4338 -4344 4350 5 + 4332 4338 4344 4362 2 4332 4338 -4344 4362 3 + 4332 4338 -4344 4362 4 4332 4338 -4344 4362 5 + 4308 4302 4299 4326 17 4308 4314 -4320 4326 17 + 4302 4299 4326 4320 17 4302 4308 -4314 4320 17 + 4299 4290 4284 4332 6 4299 4302 4308 4314 17 + 4299 4326 -4320 4314 17 4290 4284 4332 4335 7 + 4290 4284 4332 4338 8 4290 4284 -4332 4338 9 + 4290 4284 -4332 4338 10 4290 4284 -4332 4338 5 + 4290 4299 4302 4308 17 4290 4299 4326 4320 17 + 4284 4290 4299 4302 7 4284 4290 4299 4326 7 + 4284 4332 4338 4344 1 4278 4284 4290 4299 6 + 4278 4284 4332 4335 7 4278 4284 4332 4338 14 + 4278 4284 -4332 4338 15 4278 4284 -4332 4338 16 + 4278 4284 -4332 4338 5 4365 4362 4368 4371 1 + 4365 4362 4368 4398 1 4362 4368 4371 4380 12 + 4362 4368 -4371 4380 13 4362 4368 -4371 4380 10 + 4362 4368 -4371 4380 5 4362 4368 4398 4389 12 + 4362 4368 -4398 4389 13 4362 4368 -4398 4389 10 + 4362 4368 -4398 4389 5 4362 4368 4398 4404 2 + 4362 4368 -4398 4404 3 4362 4368 -4398 4404 4 + 4362 4368 -4398 4404 5 4350 4344 4362 4365 7 + 4350 4344 4362 4368 8 4350 4344 -4362 4368 9 + 4350 4344 -4362 4368 10 4350 4344 -4362 4368 5 + 4344 4362 4368 4371 1 4344 4362 4368 4398 1 + 4338 4344 4362 4365 7 4338 4344 4362 4368 14 + 4338 4344 -4362 4368 15 4338 4344 -4362 4368 16 + 4338 4344 -4362 4368 5 4407 4404 4410 4416 1 + 4404 4410 4416 4422 12 4404 4410 -4416 4422 13 + 4404 4410 -4416 4422 10 4404 4410 -4416 4422 5 + 4404 4410 4416 4476 2 4404 4410 -4416 4476 3 + 4404 4410 -4416 4476 4 4404 4410 -4416 4476 5 + 4398 4404 4410 4416 1 4389 4398 4404 4407 7 + 4389 4398 4404 4410 8 4389 4398 -4404 4410 9 + 4389 4398 -4404 4410 10 4389 4398 -4404 4410 5 + 4380 4371 -4368 4398 7 4380 4389 4398 4404 6 + 4371 4368 -4398 4389 7 4371 4368 4398 4404 7 + 4371 4380 -4389 4398 18 4371 4380 -4389 4398 19 + 4371 4380 -4389 4398 20 4368 4371 -4380 4389 6 + 4368 4398 -4389 4380 6 4368 4398 4404 4407 7 + 4368 4398 4404 4410 14 4368 4398 -4404 4410 15 + 4368 4398 -4404 4410 16 4368 4398 -4404 4410 5 + 4479 4476 4482 4488 1 4476 4482 4488 4494 12 + 4476 4482 -4488 4494 13 4476 4482 -4488 4494 10 + 4476 4482 -4488 4494 5 4476 4482 4488 4512 2 + 4476 4482 -4488 4512 3 4476 4482 -4488 4512 4 + 4476 4482 -4488 4512 5 4440 4449 4455 4458 21 + 4440 4449 4455 4467 21 4431 4422 4416 4476 6 + 4431 4440 4449 4455 26 4422 4416 4476 4479 7 + 4422 4416 4476 4482 8 4422 4416 -4476 4482 9 + 4422 4416 -4476 4482 10 4422 4416 -4476 4482 5 + 4422 4431 4440 4449 6 4416 4422 4431 4440 18 + 4416 4422 -4431 4440 19 4416 4422 -4431 4440 20 + 4416 4476 4482 4488 1 4410 4416 4422 4431 6 + 4410 4416 4476 4479 7 4410 4416 4476 4482 14 + 4410 4416 -4476 4482 15 4410 4416 -4476 4482 16 + 4410 4416 -4476 4482 5 4515 4512 4518 4524 1 + 4512 4518 4524 4530 12 4512 4518 -4524 4530 13 + 4512 4518 -4524 4530 10 4512 4518 -4524 4530 5 + 4512 4518 4524 4563 2 4512 4518 -4524 4563 3 + 4512 4518 -4524 4563 4 4512 4518 -4524 4563 5 + 4503 4494 4488 4512 6 4494 4488 4512 4515 7 + 4494 4488 4512 4518 8 4494 4488 -4512 4518 9 + 4494 4488 -4512 4518 10 4494 4488 -4512 4518 5 + 4488 4494 4503 4506 7 4488 4494 4503 4509 7 + 4488 4512 4518 4524 1 4482 4488 4494 4503 6 + 4482 4488 4512 4515 7 4482 4488 4512 4518 14 + 4482 4488 -4512 4518 15 4482 4488 -4512 4518 16 + 4482 4488 -4512 4518 5 4566 4563 4569 4575 1 + 4563 4569 4575 4581 12 4563 4569 -4575 4581 13 + 4563 4569 -4575 4581 10 4563 4569 -4575 4581 5 + 4563 4569 4575 4620 2 4563 4569 -4575 4620 3 + 4563 4569 -4575 4620 4 4563 4569 -4575 4620 5 + 4539 4530 4524 4563 6 4530 4524 4563 4566 7 + 4530 4524 4563 4569 8 4530 4524 -4563 4569 9 + 4530 4524 -4563 4569 10 4530 4524 -4563 4569 5 + 4530 4539 4548 4551 7 4530 4539 4548 4554 8 + 4530 4539 -4548 4554 9 4530 4539 -4548 4554 10 + 4530 4539 -4548 4554 5 4524 4530 4539 4548 6 + 4524 4563 4569 4575 1 4518 4524 4530 4539 6 + 4518 4524 4563 4566 7 4518 4524 4563 4569 14 + 4518 4524 -4563 4569 15 4518 4524 -4563 4569 16 + 4518 4524 -4563 4569 5 4623 4620 4626 4632 1 + 4620 4626 4632 4638 12 4620 4626 -4632 4638 13 + 4620 4626 -4632 4638 10 4620 4626 -4632 4638 5 + 4620 4626 4632 4665 2 4620 4626 -4632 4665 3 + 4620 4626 -4632 4665 4 4620 4626 -4632 4665 5 + 4590 4581 4575 4620 6 4581 4575 4620 4623 7 + 4581 4575 4620 4626 8 4581 4575 -4620 4626 9 + 4581 4575 -4620 4626 10 4581 4575 -4620 4626 5 + 4575 4581 4590 4596 18 4575 4581 -4590 4596 19 + 4575 4581 -4590 4596 20 4575 4581 4590 4608 18 + 4575 4581 -4590 4608 19 4575 4581 -4590 4608 20 + 4575 4620 4626 4632 1 4569 4575 4581 4590 6 + 4569 4575 4620 4623 7 4569 4575 4620 4626 14 + 4569 4575 -4620 4626 15 4569 4575 -4620 4626 16 + 4569 4575 -4620 4626 5 4668 4665 4671 4677 1 + 4665 4671 4677 4686 2 4665 4671 -4677 4686 3 + 4665 4671 -4677 4686 4 4665 4671 -4677 4686 5 + 4647 4638 4632 4665 6 4638 4632 4665 4668 7 + 4638 4632 4665 4671 8 4638 4632 -4665 4671 9 + 4638 4632 -4665 4671 10 4638 4632 -4665 4671 5 + 4638 4647 4656 4659 7 4638 4647 4656 4662 7 + 4632 4638 4647 4656 6 4632 4665 4671 4677 1 + 4626 4632 4638 4647 6 4626 4632 4665 4668 7 + 4626 4632 4665 4671 14 4626 4632 -4665 4671 15 + 4626 4632 -4665 4671 16 4626 4632 -4665 4671 5 + 4689 4686 4692 4698 1 4686 4692 4698 4704 12 + 4686 4692 -4698 4704 13 4686 4692 -4698 4704 10 + 4686 4692 -4698 4704 5 4686 4692 4698 4728 2 + 4686 4692 -4698 4728 3 4686 4692 -4698 4728 4 + 4686 4692 -4698 4728 5 4677 4686 4692 4698 1 + 4671 4677 4686 4689 7 4671 4677 4686 4692 14 + 4671 4677 -4686 4692 15 4671 4677 -4686 4692 16 + 4671 4677 -4686 4692 5 4731 4728 4734 4740 1 + 4728 4734 4740 4746 12 4728 4734 -4740 4746 13 + 4728 4734 -4740 4746 10 4728 4734 -4740 4746 5 + 4728 4734 4740 4788 2 4728 4734 -4740 4788 3 + 4728 4734 -4740 4788 4 4728 4734 -4740 4788 5 + 4713 4704 4698 4728 6 4704 4698 4728 4731 7 + 4704 4698 4728 4734 8 4704 4698 -4728 4734 9 + 4704 4698 -4728 4734 10 4704 4698 -4728 4734 5 + 4698 4704 4713 4716 7 4698 4704 4713 4719 8 + 4698 4704 -4713 4719 9 4698 4704 -4713 4719 10 + 4698 4704 -4713 4719 5 4698 4728 4734 4740 1 + 4692 4698 4704 4713 6 4692 4698 4728 4731 7 + 4692 4698 4728 4734 14 4692 4698 -4728 4734 15 + 4692 4698 -4728 4734 16 4692 4698 -4728 4734 5 + 4791 4788 4794 4800 1 4788 4794 4800 4806 12 + 4788 4794 -4800 4806 13 4788 4794 -4800 4806 10 + 4788 4794 -4800 4806 5 4788 4794 4800 4845 2 + 4788 4794 -4800 4845 3 4788 4794 -4800 4845 4 + 4788 4794 -4800 4845 5 4764 4758 4755 4782 17 + 4764 4770 -4776 4782 17 4758 4755 4782 4776 17 + 4758 4764 -4770 4776 17 4755 4746 4740 4788 6 + 4755 4758 4764 4770 17 4755 4782 -4776 4770 17 + 4746 4740 4788 4791 7 4746 4740 4788 4794 8 + 4746 4740 -4788 4794 9 4746 4740 -4788 4794 10 + 4746 4740 -4788 4794 5 4746 4755 4758 4764 17 + 4746 4755 4782 4776 17 4740 4746 4755 4758 7 + 4740 4746 4755 4782 7 4740 4788 4794 4800 1 + 4734 4740 4746 4755 6 4734 4740 4788 4791 7 + 4734 4740 4788 4794 14 4734 4740 -4788 4794 15 + 4734 4740 -4788 4794 16 4734 4740 -4788 4794 5 + 4848 4845 4851 4857 1 4845 4851 4857 4863 12 + 4845 4851 -4857 4863 13 4845 4851 -4857 4863 10 + 4845 4851 -4857 4863 5 4845 4851 4857 4881 2 + 4845 4851 -4857 4881 3 4845 4851 -4857 4881 4 + 4845 4851 -4857 4881 5 4824 4806 4800 4845 6 + 4812 4806 4800 4845 6 4812 4806 4824 4833 18 + 4812 4806 -4824 4833 19 4812 4806 -4824 4833 20 + 4806 4800 4845 4848 7 4806 4800 4845 4851 8 + 4806 4800 -4845 4851 9 4806 4800 -4845 4851 10 + 4806 4800 -4845 4851 5 4800 4806 4824 4833 18 + 4800 4806 -4824 4833 19 4800 4806 -4824 4833 20 + 4800 4845 4851 4857 1 4794 4800 4806 4812 6 + 4794 4800 4806 4824 6 4794 4800 4845 4848 7 + 4794 4800 4845 4851 14 4794 4800 -4845 4851 15 + 4794 4800 -4845 4851 16 4794 4800 -4845 4851 5 + 4884 4881 4887 4893 1 4881 4887 4893 4899 12 + 4881 4887 -4893 4899 13 4881 4887 -4893 4899 10 + 4881 4887 -4893 4899 5 4881 4887 4893 4914 2 + 4881 4887 -4893 4914 3 4881 4887 -4893 4914 4 + 4881 4887 -4893 4914 5 4872 4863 4857 4881 6 + 4863 4857 4881 4884 7 4863 4857 4881 4887 8 + 4863 4857 -4881 4887 9 4863 4857 -4881 4887 10 + 4863 4857 -4881 4887 5 4857 4863 4872 4875 7 + 4857 4863 4872 4878 7 4857 4881 4887 4893 1 + 4851 4857 4863 4872 6 4851 4857 4881 4884 7 + 4851 4857 4881 4887 14 4851 4857 -4881 4887 15 + 4851 4857 -4881 4887 16 4851 4857 -4881 4887 5 + 4917 4914 4920 4926 1 4914 4920 4926 4932 12 + 4914 4920 -4926 4932 13 4914 4920 -4926 4932 10 + 4914 4920 -4926 4932 5 4914 4920 4926 4962 2 + 4914 4920 -4926 4962 3 4914 4920 -4926 4962 4 + 4914 4920 -4926 4962 5 4908 4899 4893 4914 6 + 4899 4893 4914 4917 7 4899 4893 4914 4920 8 + 4899 4893 -4914 4920 9 4899 4893 -4914 4920 10 + 4899 4893 -4914 4920 5 4893 4914 4920 4926 1 + 4887 4893 4899 4908 6 4887 4893 4914 4917 7 + 4887 4893 4914 4920 14 4887 4893 -4914 4920 15 + 4887 4893 -4914 4920 16 4887 4893 -4914 4920 5 + 4965 4962 4968 4974 1 4962 4968 4974 4980 12 + 4962 4968 -4974 4980 13 4962 4968 -4974 4980 10 + 4962 4968 -4974 4980 5 4962 4968 4974 5004 2 + 4962 4968 -4974 5004 3 4962 4968 -4974 5004 4 + 4962 4968 -4974 5004 5 4950 4932 4926 4962 6 + 4938 4932 4926 4962 6 4932 4926 4962 4965 7 + 4932 4926 4962 4968 8 4932 4926 -4962 4968 9 + 4932 4926 -4962 4968 10 4932 4926 -4962 4968 5 + 4926 4962 4968 4974 1 4920 4926 4932 4938 6 + 4920 4926 4932 4950 6 4920 4926 4962 4965 7 + 4920 4926 4962 4968 14 4920 4926 -4962 4968 15 + 4920 4926 -4962 4968 16 4920 4926 -4962 4968 5 + 5007 5004 5010 5016 1 5004 5010 5016 5022 12 + 5004 5010 -5016 5022 13 5004 5010 -5016 5022 10 + 5004 5010 -5016 5022 5 5004 5010 5016 5076 2 + 5004 5010 -5016 5076 3 5004 5010 -5016 5076 4 + 5004 5010 -5016 5076 5 4998 4980 4974 5004 6 + 4986 4980 4974 5004 6 4980 4974 5004 5007 7 + 4980 4974 5004 5010 8 4980 4974 -5004 5010 9 + 4980 4974 -5004 5010 10 4980 4974 -5004 5010 5 + 4974 5004 5010 5016 1 4968 4974 4980 4986 6 + 4968 4974 4980 4998 6 4968 4974 5004 5007 7 + 4968 4974 5004 5010 14 4968 4974 -5004 5010 15 + 4968 4974 -5004 5010 16 4968 4974 -5004 5010 5 + 5079 5076 5082 5088 1 5076 5082 5088 5094 12 + 5076 5082 -5088 5094 13 5076 5082 -5088 5094 10 + 5076 5082 -5088 5094 5 5076 5082 5088 5121 2 + 5076 5082 -5088 5121 3 5076 5082 -5088 5121 4 + 5076 5082 -5088 5121 5 5040 5049 5055 5058 21 + 5040 5049 5055 5067 21 5031 5022 5016 5076 6 + 5031 5040 5049 5055 26 5022 5016 5076 5079 7 + 5022 5016 5076 5082 8 5022 5016 -5076 5082 9 + 5022 5016 -5076 5082 10 5022 5016 -5076 5082 5 + 5022 5031 5040 5049 6 5016 5022 5031 5040 18 + 5016 5022 -5031 5040 19 5016 5022 -5031 5040 20 + 5016 5076 5082 5088 1 5010 5016 5022 5031 6 + 5010 5016 5076 5079 7 5010 5016 5076 5082 14 + 5010 5016 -5076 5082 15 5010 5016 -5076 5082 16 + 5010 5016 -5076 5082 5 5124 5121 5127 5133 1 + 5121 5127 5133 5142 2 5121 5127 -5133 5142 3 + 5121 5127 -5133 5142 4 5121 5127 -5133 5142 5 + 5103 5094 5088 5121 6 5094 5088 5121 5124 7 + 5094 5088 5121 5127 8 5094 5088 -5121 5127 9 + 5094 5088 -5121 5127 10 5094 5088 -5121 5127 5 + 5094 5103 5112 5115 7 5094 5103 5112 5118 7 + 5088 5094 5103 5112 6 5088 5121 5127 5133 1 + 5082 5088 5094 5103 6 5082 5088 5121 5124 7 + 5082 5088 5121 5127 14 5082 5088 -5121 5127 15 + 5082 5088 -5121 5127 16 5082 5088 -5121 5127 5 + 5145 5142 5148 5154 1 5142 5148 5154 5160 12 + 5142 5148 -5154 5160 13 5142 5148 -5154 5160 10 + 5142 5148 -5154 5160 5 5142 5148 5154 5202 2 + 5142 5148 -5154 5202 3 5142 5148 -5154 5202 4 + 5142 5148 -5154 5202 5 5133 5142 5148 5154 1 + 5127 5133 5142 5145 7 5127 5133 5142 5148 14 + 5127 5133 -5142 5148 15 5127 5133 -5142 5148 16 + 5127 5133 -5142 5148 5 5205 5202 5208 5214 1 + 5202 5208 5214 5220 12 5202 5208 -5214 5220 13 + 5202 5208 -5214 5220 10 5202 5208 -5214 5220 5 + 5202 5208 5214 5235 2 5202 5208 -5214 5235 3 + 5202 5208 -5214 5235 4 5202 5208 -5214 5235 5 + 5178 5172 5169 5196 17 5178 5184 -5190 5196 17 + 5172 5169 5196 5190 17 5172 5178 -5184 5190 17 + 5169 5160 5154 5202 6 5169 5172 5178 5184 17 + 5169 5196 -5190 5184 17 5160 5154 5202 5205 7 + 5160 5154 5202 5208 8 5160 5154 -5202 5208 9 + 5160 5154 -5202 5208 10 5160 5154 -5202 5208 5 + 5160 5169 5172 5178 17 5160 5169 5196 5190 17 + 5154 5160 5169 5172 7 5154 5160 5169 5196 7 + 5154 5202 5208 5214 1 5148 5154 5160 5169 6 + 5148 5154 5202 5205 7 5148 5154 5202 5208 14 + 5148 5154 -5202 5208 15 5148 5154 -5202 5208 16 + 5148 5154 -5202 5208 5 5238 5235 5241 5247 1 + 5235 5241 5247 5253 12 5235 5241 -5247 5253 13 + 5235 5241 -5247 5253 10 5235 5241 -5247 5253 5 + 5235 5241 5247 5292 2 5235 5241 -5247 5292 3 + 5235 5241 -5247 5292 4 5235 5241 -5247 5292 5 + 5229 5220 5214 5235 6 5220 5214 5235 5238 7 + 5220 5214 5235 5241 8 5220 5214 -5235 5241 9 + 5220 5214 -5235 5241 10 5220 5214 -5235 5241 5 + 5214 5235 5241 5247 1 5208 5214 5220 5229 6 + 5208 5214 5235 5238 7 5208 5214 5235 5241 14 + 5208 5214 -5235 5241 15 5208 5214 -5235 5241 16 + 5208 5214 -5235 5241 5 5295 5292 5298 5304 1 + 5292 5298 5304 5310 12 5292 5298 -5304 5310 13 + 5292 5298 -5304 5310 10 5292 5298 -5304 5310 5 + 5292 5298 5304 5322 2 5292 5298 -5304 5322 3 + 5292 5298 -5304 5322 4 5292 5298 -5304 5322 5 + 5271 5253 5247 5292 6 5259 5253 5247 5292 6 + 5259 5253 5271 5280 18 5259 5253 -5271 5280 19 + 5259 5253 -5271 5280 20 5253 5247 5292 5295 7 + 5253 5247 5292 5298 8 5253 5247 -5292 5298 9 + 5253 5247 -5292 5298 10 5253 5247 -5292 5298 5 + 5247 5253 5271 5280 18 5247 5253 -5271 5280 19 + 5247 5253 -5271 5280 20 5247 5292 5298 5304 1 + 5241 5247 5253 5259 6 5241 5247 5253 5271 6 + 5241 5247 5292 5295 7 5241 5247 5292 5298 14 + 5241 5247 -5292 5298 15 5241 5247 -5292 5298 16 + 5241 5247 -5292 5298 5 5325 5322 5328 5334 1 + 5322 5328 5334 5340 12 5322 5328 -5334 5340 13 + 5322 5328 -5334 5340 10 5322 5328 -5334 5340 5 + 5322 5328 5334 5373 2 5322 5328 -5334 5373 3 + 5322 5328 -5334 5373 4 5322 5328 -5334 5373 5 + 5310 5304 5322 5325 7 5310 5304 5322 5328 8 + 5310 5304 -5322 5328 9 5310 5304 -5322 5328 10 + 5310 5304 -5322 5328 5 5304 5322 5328 5334 1 + 5298 5304 5322 5325 7 5298 5304 5322 5328 14 + 5298 5304 -5322 5328 15 5298 5304 -5322 5328 16 + 5298 5304 -5322 5328 5 5376 5373 5379 5385 1 + 5373 5379 5385 5391 12 5373 5379 -5385 5391 13 + 5373 5379 -5385 5391 10 5373 5379 -5385 5391 5 + 5373 5379 5385 5409 2 5373 5379 -5385 5409 3 + 5373 5379 -5385 5409 4 5373 5379 -5385 5409 5 + 5355 5352 -5349 5367 21 5352 5349 -5367 5361 22 + 5352 5355 -5361 5367 23 5349 5340 5334 5373 6 + 5349 5352 -5355 5361 24 5349 5367 -5361 5355 25 + 5340 5334 5373 5376 7 5340 5334 5373 5379 8 + 5340 5334 -5373 5379 9 5340 5334 -5373 5379 10 + 5340 5334 -5373 5379 5 5340 5349 5352 5355 21 + 5340 5349 5367 5361 22 5334 5340 5349 5352 7 + 5334 5340 5349 5367 7 5334 5373 5379 5385 1 + 5328 5334 5340 5349 6 5328 5334 5373 5376 7 + 5328 5334 5373 5379 14 5328 5334 -5373 5379 15 + 5328 5334 -5373 5379 16 5328 5334 -5373 5379 5 + 5412 5409 5415 5421 1 5409 5415 5421 5427 12 + 5409 5415 -5421 5427 13 5409 5415 -5421 5427 10 + 5409 5415 -5421 5427 5 5409 5415 5421 5466 2 + 5409 5415 -5421 5466 3 5409 5415 -5421 5466 4 + 5409 5415 -5421 5466 5 5400 5391 5385 5409 6 + 5391 5385 5409 5412 7 5391 5385 5409 5415 8 + 5391 5385 -5409 5415 9 5391 5385 -5409 5415 10 + 5391 5385 -5409 5415 5 5385 5391 5400 5403 7 + 5385 5391 5400 5406 7 5385 5409 5415 5421 1 + 5379 5385 5391 5400 6 5379 5385 5409 5412 7 + 5379 5385 5409 5415 14 5379 5385 -5409 5415 15 + 5379 5385 -5409 5415 16 5379 5385 -5409 5415 5 + 5469 5466 5472 5478 1 5466 5472 5478 5484 12 + 5466 5472 -5478 5484 13 5466 5472 -5478 5484 10 + 5466 5472 -5478 5484 5 5466 5472 5478 5499 2 + 5466 5472 -5478 5499 3 5466 5472 -5478 5499 4 + 5466 5472 -5478 5499 5 5445 5427 5421 5466 6 + 5433 5427 5421 5466 6 5433 5427 5445 5454 18 + 5433 5427 -5445 5454 19 5433 5427 -5445 5454 20 + 5427 5421 5466 5469 7 5427 5421 5466 5472 8 + 5427 5421 -5466 5472 9 5427 5421 -5466 5472 10 + 5427 5421 -5466 5472 5 5421 5427 5445 5454 18 + 5421 5427 -5445 5454 19 5421 5427 -5445 5454 20 + 5421 5466 5472 5478 1 5415 5421 5427 5433 6 + 5415 5421 5427 5445 6 5415 5421 5466 5469 7 + 5415 5421 5466 5472 14 5415 5421 -5466 5472 15 + 5415 5421 -5466 5472 16 5415 5421 -5466 5472 5 + 5502 5499 5505 5511 1 5499 5505 5511 5517 12 + 5499 5505 -5511 5517 13 5499 5505 -5511 5517 10 + 5499 5505 -5511 5517 5 5499 5505 5511 5529 2 + 5499 5505 -5511 5529 3 5499 5505 -5511 5529 4 + 5499 5505 -5511 5529 5 5493 5484 5478 5499 6 + 5484 5478 5499 5502 7 5484 5478 5499 5505 8 + 5484 5478 -5499 5505 9 5484 5478 -5499 5505 10 + 5484 5478 -5499 5505 5 5478 5499 5505 5511 1 + 5472 5478 5484 5493 6 5472 5478 5499 5502 7 + 5472 5478 5499 5505 14 5472 5478 -5499 5505 15 + 5472 5478 -5499 5505 16 5472 5478 -5499 5505 5 + 5532 5529 5535 5541 1 5529 5535 5541 5547 12 + 5529 5535 -5541 5547 13 5529 5535 -5541 5547 10 + 5529 5535 -5541 5547 5 5529 5535 5541 5592 2 + 5529 5535 -5541 5592 3 5529 5535 -5541 5592 4 + 5529 5535 -5541 5592 5 5517 5511 5529 5532 7 + 5517 5511 5529 5535 8 5517 5511 -5529 5535 9 + 5517 5511 -5529 5535 10 5517 5511 -5529 5535 5 + 5511 5529 5535 5541 1 5505 5511 5529 5532 7 + 5505 5511 5529 5535 14 5505 5511 -5529 5535 15 + 5505 5511 -5529 5535 16 5505 5511 -5529 5535 5 + 5595 5592 5598 5604 1 5592 5598 5604 5610 12 + 5592 5598 -5604 5610 13 5592 5598 -5604 5610 10 + 5592 5598 -5604 5610 5 5592 5598 5604 5625 2 + 5592 5598 -5604 5625 3 5592 5598 -5604 5625 4 + 5592 5598 -5604 5625 5 5574 5571 5580 5586 17 + 5565 5559 5556 5586 17 5565 5571 -5580 5586 17 + 5559 5556 5586 5580 17 5559 5565 5571 5574 17 + 5559 5565 -5571 5580 17 5556 5547 5541 5592 6 + 5556 5559 5565 5571 17 5556 5586 -5580 5571 17 + 5547 5541 5592 5595 7 5547 5541 5592 5598 8 + 5547 5541 -5592 5598 9 5547 5541 -5592 5598 10 + 5547 5541 -5592 5598 5 5547 5556 5559 5565 17 + 5547 5556 5586 5580 17 5541 5547 5556 5559 7 + 5541 5547 5556 5586 7 5541 5592 5598 5604 1 + 5535 5541 5547 5556 6 5535 5541 5592 5595 7 + 5535 5541 5592 5598 14 5535 5541 -5592 5598 15 + 5535 5541 -5592 5598 16 5535 5541 -5592 5598 5 + 5628 5625 5631 5637 1 5625 5631 5637 5643 12 + 5625 5631 -5637 5643 13 5625 5631 -5637 5643 10 + 5625 5631 -5637 5643 5 5625 5631 5637 5685 2 + 5625 5631 -5637 5685 3 5625 5631 -5637 5685 4 + 5625 5631 -5637 5685 5 5619 5610 5604 5625 6 + 5610 5604 5625 5628 7 5610 5604 5625 5631 8 + 5610 5604 -5625 5631 9 5610 5604 -5625 5631 10 + 5610 5604 -5625 5631 5 5604 5625 5631 5637 1 + 5598 5604 5610 5619 6 5598 5604 5625 5628 7 + 5598 5604 5625 5631 14 5598 5604 -5625 5631 15 + 5598 5604 -5625 5631 16 5598 5604 -5625 5631 5 + 5688 5685 5691 5697 1 5685 5691 5697 5703 12 + 5685 5691 -5697 5703 13 5685 5691 -5697 5703 10 + 5685 5691 -5697 5703 5 5685 5691 5697 5715 2 + 5685 5691 -5697 5715 3 5685 5691 -5697 5715 4 + 5685 5691 -5697 5715 5 5661 5655 5652 5679 17 + 5661 5667 -5673 5679 17 5655 5652 5679 5673 17 + 5655 5661 -5667 5673 17 5652 5643 5637 5685 6 + 5652 5655 5661 5667 17 5652 5679 -5673 5667 17 + 5643 5637 5685 5688 7 5643 5637 5685 5691 8 + 5643 5637 -5685 5691 9 5643 5637 -5685 5691 10 + 5643 5637 -5685 5691 5 5643 5652 5655 5661 17 + 5643 5652 5679 5673 17 5637 5643 5652 5655 7 + 5637 5643 5652 5679 7 5637 5685 5691 5697 1 + 5631 5637 5643 5652 6 5631 5637 5685 5688 7 + 5631 5637 5685 5691 14 5631 5637 -5685 5691 15 + 5631 5637 -5685 5691 16 5631 5637 -5685 5691 5 + 5718 5715 5721 5727 1 5715 5721 5727 5733 12 + 5715 5721 -5727 5733 13 5715 5721 -5727 5733 10 + 5715 5721 -5727 5733 5 5715 5721 5727 5745 2 + 5715 5721 -5727 5745 3 5715 5721 -5727 5745 4 + 5715 5721 -5727 5745 5 5703 5697 5715 5718 7 + 5703 5697 5715 5721 8 5703 5697 -5715 5721 9 + 5703 5697 -5715 5721 10 5703 5697 -5715 5721 5 + 5697 5715 5721 5727 1 5691 5697 5715 5718 7 + 5691 5697 5715 5721 14 5691 5697 -5715 5721 15 + 5691 5697 -5715 5721 16 5691 5697 -5715 5721 5 + 5748 5745 5751 5757 1 5745 5751 5757 5763 12 + 5745 5751 -5757 5763 13 5745 5751 -5757 5763 10 + 5745 5751 -5757 5763 5 5745 5751 5757 5802 2 + 5745 5751 -5757 5802 3 5745 5751 -5757 5802 4 + 5745 5751 -5757 5802 5 5733 5727 5745 5748 7 + 5733 5727 5745 5751 8 5733 5727 -5745 5751 9 + 5733 5727 -5745 5751 10 5733 5727 -5745 5751 5 + 5727 5745 5751 5757 1 5721 5727 5745 5748 7 + 5721 5727 5745 5751 14 5721 5727 -5745 5751 15 + 5721 5727 -5745 5751 16 5721 5727 -5745 5751 5 + 5805 5802 5808 5814 1 5802 5808 5814 5820 12 + 5802 5808 -5814 5820 13 5802 5808 -5814 5820 10 + 5802 5808 -5814 5820 5 5802 5808 5814 5832 2 + 5802 5808 -5814 5832 3 5802 5808 -5814 5832 4 + 5802 5808 -5814 5832 5 5772 5763 5757 5802 6 + 5763 5757 5802 5805 7 5763 5757 5802 5808 8 + 5763 5757 -5802 5808 9 5763 5757 -5802 5808 10 + 5763 5757 -5802 5808 5 5757 5763 5772 5778 18 + 5757 5763 -5772 5778 19 5757 5763 -5772 5778 20 + 5757 5763 5772 5790 18 5757 5763 -5772 5790 19 + 5757 5763 -5772 5790 20 5757 5802 5808 5814 1 + 5751 5757 5763 5772 6 5751 5757 5802 5805 7 + 5751 5757 5802 5808 14 5751 5757 -5802 5808 15 + 5751 5757 -5802 5808 16 5751 5757 -5802 5808 5 + 5835 5832 5838 5844 1 5832 5838 5844 5850 12 + 5832 5838 -5844 5850 13 5832 5838 -5844 5850 10 + 5832 5838 -5844 5850 5 5832 5838 5844 5898 2 + 5832 5838 -5844 5898 3 5832 5838 -5844 5898 4 + 5832 5838 -5844 5898 5 5820 5814 5832 5835 7 + 5820 5814 5832 5838 8 5820 5814 -5832 5838 9 + 5820 5814 -5832 5838 10 5820 5814 -5832 5838 5 + 5814 5832 5838 5844 1 5808 5814 5832 5835 7 + 5808 5814 5832 5838 14 5808 5814 -5832 5838 15 + 5808 5814 -5832 5838 16 5808 5814 -5832 5838 5 + 5901 5898 5904 5910 1 5898 5904 5910 5916 12 + 5898 5904 -5910 5916 13 5898 5904 -5910 5916 10 + 5898 5904 -5910 5916 5 5898 5904 5910 5943 2 + 5898 5904 -5910 5943 3 5898 5904 -5910 5943 4 + 5898 5904 -5910 5943 5 5859 5850 5844 5898 6 + 5859 5868 5877 5886 6 5850 5844 5898 5901 7 + 5850 5844 5898 5904 8 5850 5844 -5898 5904 9 + 5850 5844 -5898 5904 10 5850 5844 -5898 5904 5 + 5850 5859 5868 5877 18 5850 5859 -5868 5877 19 + 5850 5859 -5868 5877 20 5844 5850 5859 5868 18 + 5844 5850 -5859 5868 19 5844 5850 -5859 5868 20 + 5844 5898 5904 5910 1 5838 5844 5850 5859 6 + 5838 5844 5898 5901 7 5838 5844 5898 5904 14 + 5838 5844 -5898 5904 15 5838 5844 -5898 5904 16 + 5838 5844 -5898 5904 5 5946 5943 5949 5955 1 + 5943 5949 5955 5964 2 5943 5949 -5955 5964 3 + 5943 5949 -5955 5964 4 5943 5949 -5955 5964 5 + 5925 5916 5910 5943 6 5916 5910 5943 5946 7 + 5916 5910 5943 5949 8 5916 5910 -5943 5949 9 + 5916 5910 -5943 5949 10 5916 5910 -5943 5949 5 + 5916 5925 5934 5937 7 5916 5925 5934 5940 7 + 5910 5916 5925 5934 6 5910 5943 5949 5955 1 + 5904 5910 5916 5925 6 5904 5910 5943 5946 7 + 5904 5910 5943 5949 14 5904 5910 -5943 5949 15 + 5904 5910 -5943 5949 16 5904 5910 -5943 5949 5 + 5967 5964 5970 5976 1 5964 5970 5976 5982 12 + 5964 5970 -5976 5982 13 5964 5970 -5976 5982 10 + 5964 5970 -5976 5982 5 5964 5970 5976 6036 2 + 5964 5970 -5976 6036 3 5964 5970 -5976 6036 4 + 5964 5970 -5976 6036 5 5955 5964 5970 5976 1 + 5949 5955 5964 5967 7 5949 5955 5964 5970 14 + 5949 5955 -5964 5970 15 5949 5955 -5964 5970 16 + 5949 5955 -5964 5970 5 6039 6036 6042 6048 1 + 6036 6042 6048 6054 12 6036 6042 -6048 6054 13 + 6036 6042 -6048 6054 10 6036 6042 -6048 6054 5 + 6036 6042 6048 6069 2 6036 6042 -6048 6069 3 + 6036 6042 -6048 6069 4 6036 6042 -6048 6069 5 + 6000 6009 6015 6018 21 6000 6009 6015 6027 21 + 5991 5982 5976 6036 6 5991 6000 6009 6015 26 + 5982 5976 6036 6039 7 5982 5976 6036 6042 8 + 5982 5976 -6036 6042 9 5982 5976 -6036 6042 10 + 5982 5976 -6036 6042 5 5982 5991 6000 6009 6 + 5976 5982 5991 6000 18 5976 5982 -5991 6000 19 + 5976 5982 -5991 6000 20 5976 6036 6042 6048 1 + 5970 5976 5982 5991 6 5970 5976 6036 6039 7 + 5970 5976 6036 6042 14 5970 5976 -6036 6042 15 + 5970 5976 -6036 6042 16 5970 5976 -6036 6042 5 + 6072 6069 6075 6081 1 6069 6075 6081 6087 12 + 6069 6075 -6081 6087 13 6069 6075 -6081 6087 10 + 6069 6075 -6081 6087 5 6069 6075 6081 6120 2 + 6069 6075 -6081 6120 3 6069 6075 -6081 6120 4 + 6069 6075 -6081 6120 5 6063 6054 6048 6069 6 + 6054 6048 6069 6072 7 6054 6048 6069 6075 8 + 6054 6048 -6069 6075 9 6054 6048 -6069 6075 10 + 6054 6048 -6069 6075 5 6048 6069 6075 6081 1 + 6042 6048 6054 6063 6 6042 6048 6069 6072 7 + 6042 6048 6069 6075 14 6042 6048 -6069 6075 15 + 6042 6048 -6069 6075 16 6042 6048 -6069 6075 5 + 6123 6120 6126 6132 1 6120 6126 6132 6138 12 + 6120 6126 -6132 6138 13 6120 6126 -6132 6138 10 + 6120 6126 -6132 6138 5 6120 6126 6132 6171 2 + 6120 6126 -6132 6171 3 6120 6126 -6132 6171 4 + 6120 6126 -6132 6171 5 6096 6087 6081 6120 6 + 6087 6081 6120 6123 7 6087 6081 6120 6126 8 + 6087 6081 -6120 6126 9 6087 6081 -6120 6126 10 + 6087 6081 -6120 6126 5 6087 6096 6105 6108 11 + 6081 6087 6096 6105 6 6081 6120 6126 6132 1 + 6075 6081 6087 6096 6 6075 6081 6120 6123 7 + 6075 6081 6120 6126 14 6075 6081 -6120 6126 15 + 6075 6081 -6120 6126 16 6075 6081 -6120 6126 5 + 6174 6171 6177 6183 1 6171 6177 6183 6189 12 + 6171 6177 -6183 6189 13 6171 6177 -6183 6189 10 + 6171 6177 -6183 6189 5 6171 6177 6183 6237 2 + 6171 6177 -6183 6237 3 6171 6177 -6183 6237 4 + 6171 6177 -6183 6237 5 6147 6138 6132 6171 6 + 6138 6132 6171 6174 7 6138 6132 6171 6177 8 + 6138 6132 -6171 6177 9 6138 6132 -6171 6177 10 + 6138 6132 -6171 6177 5 6138 6147 6156 6159 11 + 6132 6138 6147 6156 6 6132 6171 6177 6183 1 + 6126 6132 6138 6147 6 6126 6132 6171 6174 7 + 6126 6132 6171 6177 14 6126 6132 -6171 6177 15 + 6126 6132 -6171 6177 16 6126 6132 -6171 6177 5 + 6240 6237 6243 6249 1 6237 6243 6249 6255 12 + 6237 6243 -6249 6255 13 6237 6243 -6249 6255 10 + 6237 6243 -6249 6255 5 6237 6243 6249 6279 2 + 6237 6243 -6249 6279 3 6237 6243 -6249 6279 4 + 6237 6243 -6249 6279 5 6198 6189 6183 6237 6 + 6198 6207 6216 6225 6 6189 6183 6237 6240 7 + 6189 6183 6237 6243 8 6189 6183 -6237 6243 9 + 6189 6183 -6237 6243 10 6189 6183 -6237 6243 5 + 6189 6198 6207 6216 18 6189 6198 -6207 6216 19 + 6189 6198 -6207 6216 20 6183 6189 6198 6207 18 + 6183 6189 -6198 6207 19 6183 6189 -6198 6207 20 + 6183 6237 6243 6249 1 6177 6183 6189 6198 6 + 6177 6183 6237 6240 7 6177 6183 6237 6243 14 + 6177 6183 -6237 6243 15 6177 6183 -6237 6243 16 + 6177 6183 -6237 6243 5 6282 6279 6285 6291 1 + 6279 6285 6291 6297 12 6279 6285 -6291 6297 13 + 6279 6285 -6291 6297 10 6279 6285 -6291 6297 5 + 6279 6285 6291 6351 2 6279 6285 -6291 6351 3 + 6279 6285 -6291 6351 4 6279 6285 -6291 6351 5 + 6264 6255 6249 6279 6 6255 6249 6279 6282 7 + 6255 6249 6279 6285 8 6255 6249 -6279 6285 9 + 6255 6249 -6279 6285 10 6255 6249 -6279 6285 5 + 6249 6255 6264 6267 7 6249 6255 6264 6270 8 + 6249 6255 -6264 6270 9 6249 6255 -6264 6270 10 + 6249 6255 -6264 6270 5 6249 6279 6285 6291 1 + 6243 6249 6255 6264 6 6243 6249 6279 6282 7 + 6243 6249 6279 6285 14 6243 6249 -6279 6285 15 + 6243 6249 -6279 6285 16 6243 6249 -6279 6285 5 + 6354 6351 6357 6363 1 6351 6357 6363 6369 12 + 6351 6357 -6363 6369 13 6351 6357 -6363 6369 10 + 6351 6357 -6363 6369 5 6351 6357 6363 6393 2 + 6351 6357 -6363 6393 3 6351 6357 -6363 6393 4 + 6351 6357 -6363 6393 5 6315 6324 6330 6333 21 + 6315 6324 6330 6342 21 6306 6297 6291 6351 6 + 6306 6315 6324 6330 26 6297 6291 6351 6354 7 + 6297 6291 6351 6357 8 6297 6291 -6351 6357 9 + 6297 6291 -6351 6357 10 6297 6291 -6351 6357 5 + 6297 6306 6315 6324 6 6291 6297 6306 6315 18 + 6291 6297 -6306 6315 19 6291 6297 -6306 6315 20 + 6291 6351 6357 6363 1 6285 6291 6297 6306 6 + 6285 6291 6351 6354 7 6285 6291 6351 6357 14 + 6285 6291 -6351 6357 15 6285 6291 -6351 6357 16 + 6285 6291 -6351 6357 5 6396 6393 6399 6405 1 + 6393 6399 6405 6411 12 6393 6399 -6405 6411 13 + 6393 6399 -6405 6411 10 6393 6399 -6405 6411 5 + 6393 6399 6405 6423 2 6393 6399 -6405 6423 3 + 6393 6399 -6405 6423 4 6393 6399 -6405 6423 5 + 6378 6369 6363 6393 6 6369 6363 6393 6396 7 + 6369 6363 6393 6399 8 6369 6363 -6393 6399 9 + 6369 6363 -6393 6399 10 6369 6363 -6393 6399 5 + 6363 6369 6378 6381 7 6363 6369 6378 6384 8 + 6363 6369 -6378 6384 9 6363 6369 -6378 6384 10 + 6363 6369 -6378 6384 5 6363 6393 6399 6405 1 + 6357 6363 6369 6378 6 6357 6363 6393 6396 7 + 6357 6363 6393 6399 14 6357 6363 -6393 6399 15 + 6357 6363 -6393 6399 16 6357 6363 -6393 6399 5 + 6426 6423 6429 6435 1 6423 6429 6435 6441 12 + 6423 6429 -6435 6441 13 6423 6429 -6435 6441 10 + 6423 6429 -6435 6441 5 6423 6429 6435 6456 2 + 6423 6429 -6435 6456 3 6423 6429 -6435 6456 4 + 6423 6429 -6435 6456 5 6411 6405 6423 6426 7 + 6411 6405 6423 6429 8 6411 6405 -6423 6429 9 + 6411 6405 -6423 6429 10 6411 6405 -6423 6429 5 + 6405 6423 6429 6435 1 6399 6405 6423 6426 7 + 6399 6405 6423 6429 14 6399 6405 -6423 6429 15 + 6399 6405 -6423 6429 16 6399 6405 -6423 6429 5 + 6459 6456 6462 6468 1 6456 6462 6468 6474 12 + 6456 6462 -6468 6474 13 6456 6462 -6468 6474 10 + 6456 6462 -6468 6474 5 6456 6462 6468 6507 2 + 6456 6462 -6468 6507 3 6456 6462 -6468 6507 4 + 6456 6462 -6468 6507 5 6450 6441 6435 6456 6 + 6441 6435 6456 6459 7 6441 6435 6456 6462 8 + 6441 6435 -6456 6462 9 6441 6435 -6456 6462 10 + 6441 6435 -6456 6462 5 6435 6456 6462 6468 1 + 6429 6435 6441 6450 6 6429 6435 6456 6459 7 + 6429 6435 6456 6462 14 6429 6435 -6456 6462 15 + 6429 6435 -6456 6462 16 6429 6435 -6456 6462 5 + 6510 6507 6513 6519 1 6507 6513 6519 6525 12 + 6507 6513 -6519 6525 13 6507 6513 -6519 6525 10 + 6507 6513 -6519 6525 5 6507 6513 6519 6555 2 + 6507 6513 -6519 6555 3 6507 6513 -6519 6555 4 + 6507 6513 -6519 6555 5 6483 6474 6468 6507 6 + 6474 6468 6507 6510 7 6474 6468 6507 6513 8 + 6474 6468 -6507 6513 9 6474 6468 -6507 6513 10 + 6474 6468 -6507 6513 5 6474 6483 6492 6495 11 + 6468 6474 6483 6492 6 6468 6507 6513 6519 1 + 6462 6468 6474 6483 6 6462 6468 6507 6510 7 + 6462 6468 6507 6513 14 6462 6468 -6507 6513 15 + 6462 6468 -6507 6513 16 6462 6468 -6507 6513 5 + 6558 6555 6561 6567 1 6555 6561 6567 6573 12 + 6555 6561 -6567 6573 13 6555 6561 -6567 6573 10 + 6555 6561 -6567 6573 5 6555 6561 6567 6585 2 + 6555 6561 -6567 6585 3 6555 6561 -6567 6585 4 + 6555 6561 -6567 6585 5 6543 6525 6519 6555 6 + 6531 6525 6519 6555 6 6525 6519 6555 6558 7 + 6525 6519 6555 6561 8 6525 6519 -6555 6561 9 + 6525 6519 -6555 6561 10 6525 6519 -6555 6561 5 + 6519 6555 6561 6567 1 6513 6519 6525 6531 6 + 6513 6519 6525 6543 6 6513 6519 6555 6558 7 + 6513 6519 6555 6561 14 6513 6519 -6555 6561 15 + 6513 6519 -6555 6561 16 6513 6519 -6555 6561 5 + 6588 6585 6591 6597 1 6585 6591 6597 6603 12 + 6585 6591 -6597 6603 13 6585 6591 -6597 6603 10 + 6585 6591 -6597 6603 5 6585 6591 6597 6642 2 + 6585 6591 -6597 6642 3 6585 6591 -6597 6642 4 + 6585 6591 -6597 6642 5 6573 6567 6585 6588 7 + 6573 6567 6585 6591 8 6573 6567 -6585 6591 9 + 6573 6567 -6585 6591 10 6573 6567 -6585 6591 5 + 6567 6585 6591 6597 1 6561 6567 6585 6588 7 + 6561 6567 6585 6591 14 6561 6567 -6585 6591 15 + 6561 6567 -6585 6591 16 6561 6567 -6585 6591 5 + 6645 6642 6648 6654 1 6642 6648 6654 6660 12 + 6642 6648 -6654 6660 13 6642 6648 -6654 6660 10 + 6642 6648 -6654 6660 5 6642 6648 6654 6684 2 + 6642 6648 -6654 6684 3 6642 6648 -6654 6684 4 + 6642 6648 -6654 6684 5 6612 6603 6597 6642 6 + 6603 6597 6642 6645 7 6603 6597 6642 6648 8 + 6603 6597 -6642 6648 9 6603 6597 -6642 6648 10 + 6603 6597 -6642 6648 5 6597 6603 6612 6618 18 + 6597 6603 -6612 6618 19 6597 6603 -6612 6618 20 + 6597 6603 6612 6630 18 6597 6603 -6612 6630 19 + 6597 6603 -6612 6630 20 6597 6642 6648 6654 1 + 6591 6597 6603 6612 6 6591 6597 6642 6645 7 + 6591 6597 6642 6648 14 6591 6597 -6642 6648 15 + 6591 6597 -6642 6648 16 6591 6597 -6642 6648 5 + 6687 6684 6690 6696 1 6684 6690 6696 6702 12 + 6684 6690 -6696 6702 13 6684 6690 -6696 6702 10 + 6684 6690 -6696 6702 5 6684 6690 6696 6747 2 + 6684 6690 -6696 6747 3 6684 6690 -6696 6747 4 + 6684 6690 -6696 6747 5 6678 6660 6654 6684 6 + 6666 6660 6654 6684 6 6660 6654 6684 6687 7 + 6660 6654 6684 6690 8 6660 6654 -6684 6690 9 + 6660 6654 -6684 6690 10 6660 6654 -6684 6690 5 + 6654 6684 6690 6696 1 6648 6654 6660 6666 6 + 6648 6654 6660 6678 6 6648 6654 6684 6687 7 + 6648 6654 6684 6690 14 6648 6654 -6684 6690 15 + 6648 6654 -6684 6690 16 6648 6654 -6684 6690 5 + 6750 6747 6753 6759 1 6747 6753 6759 6765 12 + 6747 6753 -6759 6765 13 6747 6753 -6759 6765 10 + 6747 6753 -6759 6765 5 6747 6753 6759 6804 2 + 6747 6753 -6759 6804 3 6747 6753 -6759 6804 4 + 6747 6753 -6759 6804 5 6729 6726 6735 6741 17 + 6720 6714 6711 6741 17 6720 6726 -6735 6741 17 + 6714 6711 6741 6735 17 6714 6720 6726 6729 17 + 6714 6720 -6726 6735 17 6711 6702 6696 6747 6 + 6711 6714 6720 6726 17 6711 6741 -6735 6726 17 + 6702 6696 6747 6750 7 6702 6696 6747 6753 8 + 6702 6696 -6747 6753 9 6702 6696 -6747 6753 10 + 6702 6696 -6747 6753 5 6702 6711 6714 6720 17 + 6702 6711 6741 6735 17 6696 6702 6711 6714 7 + 6696 6702 6711 6741 7 6696 6747 6753 6759 1 + 6690 6696 6702 6711 6 6690 6696 6747 6750 7 + 6690 6696 6747 6753 14 6690 6696 -6747 6753 15 + 6690 6696 -6747 6753 16 6690 6696 -6747 6753 5 + 6807 6804 6810 6816 1 6804 6810 6816 6825 2 + 6804 6810 -6816 6825 3 6804 6810 -6816 6825 4 + 6804 6810 -6816 6825 5 6783 6765 6759 6804 6 + 6771 6765 6759 6804 6 6771 6765 6783 6792 18 + 6771 6765 -6783 6792 19 6771 6765 -6783 6792 20 + 6765 6759 6804 6807 7 6765 6759 6804 6810 8 + 6765 6759 -6804 6810 9 6765 6759 -6804 6810 10 + 6765 6759 -6804 6810 5 6759 6765 6783 6792 18 + 6759 6765 -6783 6792 19 6759 6765 -6783 6792 20 + 6759 6804 6810 6816 1 6753 6759 6765 6771 6 + 6753 6759 6765 6783 6 6753 6759 6804 6807 7 + 6753 6759 6804 6810 14 6753 6759 -6804 6810 15 + 6753 6759 -6804 6810 16 6753 6759 -6804 6810 5 + 6828 6825 6831 6837 1 6825 6831 6837 6843 12 + 6825 6831 -6837 6843 13 6825 6831 -6837 6843 10 + 6825 6831 -6837 6843 5 6825 6831 6837 6855 2 + 6825 6831 -6837 6855 3 6825 6831 -6837 6855 4 + 6825 6831 -6837 6855 5 6816 6825 6831 6837 1 + 6810 6816 6825 6828 7 6810 6816 6825 6831 14 + 6810 6816 -6825 6831 15 6810 6816 -6825 6831 16 + 6810 6816 -6825 6831 5 6858 6855 6861 6867 1 + 6855 6861 6867 6873 12 6855 6861 -6867 6873 13 + 6855 6861 -6867 6873 10 6855 6861 -6867 6873 5 + 6855 6861 6867 6900 2 6855 6861 -6867 6900 3 + 6855 6861 -6867 6900 4 6855 6861 -6867 6900 5 + 6843 6837 6855 6858 7 6843 6837 6855 6861 8 + 6843 6837 -6855 6861 9 6843 6837 -6855 6861 10 + 6843 6837 -6855 6861 5 6837 6855 6861 6867 1 + 6831 6837 6855 6858 7 6831 6837 6855 6861 14 + 6831 6837 -6855 6861 15 6831 6837 -6855 6861 16 + 6831 6837 -6855 6861 5 6903 6900 6906 6912 1 + 6900 6906 6912 6918 12 6900 6906 -6912 6918 13 + 6900 6906 -6912 6918 10 6900 6906 -6912 6918 5 + 6900 6906 6912 6966 2 6900 6906 -6912 6966 3 + 6900 6906 -6912 6966 4 6900 6906 -6912 6966 5 + 6882 6873 6867 6900 6 6873 6867 6900 6903 7 + 6873 6867 6900 6906 8 6873 6867 -6900 6906 9 + 6873 6867 -6900 6906 10 6873 6867 -6900 6906 5 + 6873 6882 6891 6894 7 6873 6882 6891 6897 7 + 6867 6873 6882 6891 6 6867 6900 6906 6912 1 + 6861 6867 6873 6882 6 6861 6867 6900 6903 7 + 6861 6867 6900 6906 14 6861 6867 -6900 6906 15 + 6861 6867 -6900 6906 16 6861 6867 -6900 6906 5 + 6969 6966 6972 6978 1 6966 6972 6978 6984 12 + 6966 6972 -6978 6984 13 6966 6972 -6978 6984 10 + 6966 6972 -6978 6984 5 6966 6972 6978 6996 2 + 6966 6972 -6978 6996 3 6966 6972 -6978 6996 4 + 6966 6972 -6978 6996 5 6927 6918 6912 6966 6 + 6927 6936 6945 6954 6 6918 6912 6966 6969 7 + 6918 6912 6966 6972 8 6918 6912 -6966 6972 9 + 6918 6912 -6966 6972 10 6918 6912 -6966 6972 5 + 6918 6927 6936 6945 18 6918 6927 -6936 6945 19 + 6918 6927 -6936 6945 20 6912 6918 6927 6936 18 + 6912 6918 -6927 6936 19 6912 6918 -6927 6936 20 + 6912 6966 6972 6978 1 6906 6912 6918 6927 6 + 6906 6912 6966 6969 7 6906 6912 6966 6972 14 + 6906 6912 -6966 6972 15 6906 6912 -6966 6972 16 + 6906 6912 -6966 6972 5 6999 6996 7002 7008 1 + 6996 7002 7008 7014 12 6996 7002 -7008 7014 13 + 6996 7002 -7008 7014 10 6996 7002 -7008 7014 5 + 6996 7002 7008 7047 2 6996 7002 -7008 7047 3 + 6996 7002 -7008 7047 4 6996 7002 -7008 7047 5 + 6984 6978 6996 6999 7 6984 6978 6996 7002 8 + 6984 6978 -6996 7002 9 6984 6978 -6996 7002 10 + 6984 6978 -6996 7002 5 6978 6996 7002 7008 1 + 6972 6978 6996 6999 7 6972 6978 6996 7002 14 + 6972 6978 -6996 7002 15 6972 6978 -6996 7002 16 + 6972 6978 -6996 7002 5 7050 7047 7053 7056 1 + 7050 7047 7053 7083 1 7047 7053 7056 7065 12 + 7047 7053 -7056 7065 13 7047 7053 -7056 7065 10 + 7047 7053 -7056 7065 5 7047 7053 7083 7074 12 + 7047 7053 -7083 7074 13 7047 7053 -7083 7074 10 + 7047 7053 -7083 7074 5 7047 7053 7083 7089 2 + 7047 7053 -7083 7089 3 7047 7053 -7083 7089 4 + 7047 7053 -7083 7089 5 7023 7014 7008 7047 6 + 7014 7008 7047 7050 7 7014 7008 7047 7053 8 + 7014 7008 -7047 7053 9 7014 7008 -7047 7053 10 + 7014 7008 -7047 7053 5 7014 7023 7032 7035 11 + 7008 7014 7023 7032 6 7008 7047 7053 7056 1 + 7008 7047 7053 7083 1 7002 7008 7014 7023 6 + 7002 7008 7047 7050 7 7002 7008 7047 7053 14 + 7002 7008 -7047 7053 15 7002 7008 -7047 7053 16 + 7002 7008 -7047 7053 5 7092 7089 7095 7101 1 + 7089 7095 7101 7107 12 7089 7095 -7101 7107 13 + 7089 7095 -7101 7107 10 7089 7095 -7101 7107 5 + 7089 7095 7101 7122 2 7089 7095 -7101 7122 3 + 7089 7095 -7101 7122 4 7089 7095 -7101 7122 5 + 7083 7089 7095 7101 1 7074 7083 7089 7092 7 + 7074 7083 7089 7095 8 7074 7083 -7089 7095 9 + 7074 7083 -7089 7095 10 7074 7083 -7089 7095 5 + 7065 7056 -7053 7083 7 7065 7074 7083 7089 6 + 7056 7053 -7083 7074 7 7056 7053 7083 7089 7 + 7056 7065 -7074 7083 18 7056 7065 -7074 7083 19 + 7056 7065 -7074 7083 20 7053 7056 -7065 7074 6 + 7053 7083 -7074 7065 6 7053 7083 7089 7092 7 + 7053 7083 7089 7095 14 7053 7083 -7089 7095 15 + 7053 7083 -7089 7095 16 7053 7083 -7089 7095 5 + 7125 7122 7128 7134 1 7122 7128 7134 7140 12 + 7122 7128 -7134 7140 13 7122 7128 -7134 7140 10 + 7122 7128 -7134 7140 5 7122 7128 7134 7185 2 + 7122 7128 -7134 7185 3 7122 7128 -7134 7185 4 + 7122 7128 -7134 7185 5 7116 7107 7101 7122 6 + 7107 7101 7122 7125 7 7107 7101 7122 7128 8 + 7107 7101 -7122 7128 9 7107 7101 -7122 7128 10 + 7107 7101 -7122 7128 5 7101 7122 7128 7134 1 + 7095 7101 7107 7116 6 7095 7101 7122 7125 7 + 7095 7101 7122 7128 14 7095 7101 -7122 7128 15 + 7095 7101 -7122 7128 16 7095 7101 -7122 7128 5 + 7188 7185 7191 7197 1 7185 7191 7197 7203 12 + 7185 7191 -7197 7203 13 7185 7191 -7197 7203 10 + 7185 7191 -7197 7203 5 7185 7191 7197 7227 2 + 7185 7191 -7197 7227 3 7185 7191 -7197 7227 4 + 7185 7191 -7197 7227 5 7167 7164 7173 7179 17 + 7158 7152 7149 7179 17 7158 7164 -7173 7179 17 + 7152 7149 7179 7173 17 7152 7158 7164 7167 17 + 7152 7158 -7164 7173 17 7149 7140 7134 7185 6 + 7149 7152 7158 7164 17 7149 7179 -7173 7164 17 + 7140 7134 7185 7188 7 7140 7134 7185 7191 8 + 7140 7134 -7185 7191 9 7140 7134 -7185 7191 10 + 7140 7134 -7185 7191 5 7140 7149 7152 7158 17 + 7140 7149 7179 7173 17 7134 7140 7149 7152 7 + 7134 7140 7149 7179 7 7134 7185 7191 7197 1 + 7128 7134 7140 7149 6 7128 7134 7185 7188 7 + 7128 7134 7185 7191 14 7128 7134 -7185 7191 15 + 7128 7134 -7185 7191 16 7128 7134 -7185 7191 5 + 7230 7227 7233 7239 1 7227 7233 7239 7245 12 + 7227 7233 -7239 7245 13 7227 7233 -7239 7245 10 + 7227 7233 -7239 7245 5 7227 7233 7239 7269 2 + 7227 7233 -7239 7269 3 7227 7233 -7239 7269 4 + 7227 7233 -7239 7269 5 7212 7203 7197 7227 6 + 7203 7197 7227 7230 7 7203 7197 7227 7233 8 + 7203 7197 -7227 7233 9 7203 7197 -7227 7233 10 + 7203 7197 -7227 7233 5 7197 7203 7212 7215 7 + 7197 7203 7212 7218 8 7197 7203 -7212 7218 9 + 7197 7203 -7212 7218 10 7197 7203 -7212 7218 5 + 7197 7227 7233 7239 1 7191 7197 7203 7212 6 + 7191 7197 7227 7230 7 7191 7197 7227 7233 14 + 7191 7197 -7227 7233 15 7191 7197 -7227 7233 16 + 7191 7197 -7227 7233 5 7272 7269 7275 7281 1 + 7269 7275 7281 7287 12 7269 7275 -7281 7287 13 + 7269 7275 -7281 7287 10 7269 7275 -7281 7287 5 + 7269 7275 7281 7320 2 7269 7275 -7281 7320 3 + 7269 7275 -7281 7320 4 7269 7275 -7281 7320 5 + 7263 7245 7239 7269 6 7251 7245 7239 7269 6 + 7245 7239 7269 7272 7 7245 7239 7269 7275 8 + 7245 7239 -7269 7275 9 7245 7239 -7269 7275 10 + 7245 7239 -7269 7275 5 7239 7269 7275 7281 1 + 7233 7239 7245 7251 6 7233 7239 7245 7263 6 + 7233 7239 7269 7272 7 7233 7239 7269 7275 14 + 7233 7239 -7269 7275 15 7233 7239 -7269 7275 16 + 7233 7239 -7269 7275 5 7323 7320 7326 7332 1 + 7320 7326 7332 7341 2 7320 7326 -7332 7341 3 + 7320 7326 -7332 7341 4 7320 7326 -7332 7341 5 + 7296 7287 7281 7320 6 7287 7281 7320 7323 7 + 7287 7281 7320 7326 8 7287 7281 -7320 7326 9 + 7287 7281 -7320 7326 10 7287 7281 -7320 7326 5 + 7287 7296 7305 7308 11 7281 7287 7296 7305 6 + 7281 7320 7326 7332 1 7275 7281 7287 7296 6 + 7275 7281 7320 7323 7 7275 7281 7320 7326 14 + 7275 7281 -7320 7326 15 7275 7281 -7320 7326 16 + 7275 7281 -7320 7326 5 7344 7341 7347 7353 1 + 7341 7347 7353 7359 12 7341 7347 -7353 7359 13 + 7341 7347 -7353 7359 10 7341 7347 -7353 7359 5 + 7341 7347 7353 7389 2 7341 7347 -7353 7389 3 + 7341 7347 -7353 7389 4 7341 7347 -7353 7389 5 + 7332 7341 7347 7353 1 7326 7332 7341 7344 7 + 7326 7332 7341 7347 14 7326 7332 -7341 7347 15 + 7326 7332 -7341 7347 16 7326 7332 -7341 7347 5 + 7392 7389 7395 7401 1 7389 7395 7401 7407 12 + 7389 7395 -7401 7407 13 7389 7395 -7401 7407 10 + 7389 7395 -7401 7407 5 7389 7395 7401 7419 2 + 7389 7395 -7401 7419 3 7389 7395 -7401 7419 4 + 7389 7395 -7401 7419 5 7377 7359 7353 7389 6 + 7365 7359 7353 7389 6 7359 7353 7389 7392 7 + 7359 7353 7389 7395 8 7359 7353 -7389 7395 9 + 7359 7353 -7389 7395 10 7359 7353 -7389 7395 5 + 7353 7389 7395 7401 1 7347 7353 7359 7365 6 + 7347 7353 7359 7377 6 7347 7353 7389 7392 7 + 7347 7353 7389 7395 14 7347 7353 -7389 7395 15 + 7347 7353 -7389 7395 16 7347 7353 -7389 7395 5 + 7422 7419 7425 7431 1 7419 7425 7431 7437 12 + 7419 7425 -7431 7437 13 7419 7425 -7431 7437 10 + 7419 7425 -7431 7437 5 7419 7425 7431 7485 2 + 7419 7425 -7431 7485 3 7419 7425 -7431 7485 4 + 7419 7425 -7431 7485 5 7407 7401 7419 7422 7 + 7407 7401 7419 7425 8 7407 7401 -7419 7425 9 + 7407 7401 -7419 7425 10 7407 7401 -7419 7425 5 + 7401 7419 7425 7431 1 7395 7401 7419 7422 7 + 7395 7401 7419 7425 14 7395 7401 -7419 7425 15 + 7395 7401 -7419 7425 16 7395 7401 -7419 7425 5 + 7488 7485 7491 7497 1 7485 7491 7497 7503 12 + 7485 7491 -7497 7503 13 7485 7491 -7497 7503 10 + 7485 7491 -7497 7503 5 7485 7491 7497 7515 2 + 7485 7491 -7497 7515 3 7485 7491 -7497 7515 4 + 7485 7491 -7497 7515 5 7446 7437 7431 7485 6 + 7446 7455 7464 7473 6 7437 7431 7485 7488 7 + 7437 7431 7485 7491 8 7437 7431 -7485 7491 9 + 7437 7431 -7485 7491 10 7437 7431 -7485 7491 5 + 7437 7446 7455 7464 18 7437 7446 -7455 7464 19 + 7437 7446 -7455 7464 20 7431 7437 7446 7455 18 + 7431 7437 -7446 7455 19 7431 7437 -7446 7455 20 + 7431 7485 7491 7497 1 7425 7431 7437 7446 6 + 7425 7431 7485 7488 7 7425 7431 7485 7491 14 + 7425 7431 -7485 7491 15 7425 7431 -7485 7491 16 + 7425 7431 -7485 7491 5 7518 7515 7521 7527 1 + 7515 7521 7527 7533 12 7515 7521 -7527 7533 13 + 7515 7521 -7527 7533 10 7515 7521 -7527 7533 5 + 7515 7521 7527 7548 2 7515 7521 -7527 7548 3 + 7515 7521 -7527 7548 4 7515 7521 -7527 7548 5 + 7503 7497 7515 7518 7 7503 7497 7515 7521 8 + 7503 7497 -7515 7521 9 7503 7497 -7515 7521 10 + 7503 7497 -7515 7521 5 7497 7515 7521 7527 1 + 7491 7497 7515 7518 7 7491 7497 7515 7521 14 + 7491 7497 -7515 7521 15 7491 7497 -7515 7521 16 + 7491 7497 -7515 7521 5 7551 7548 7554 7560 1 + 7548 7554 7560 7566 12 7548 7554 -7560 7566 13 + 7548 7554 -7560 7566 10 7548 7554 -7560 7566 5 + 7548 7554 7560 7605 2 7548 7554 -7560 7605 3 + 7548 7554 -7560 7605 4 7548 7554 -7560 7605 5 + 7542 7533 7527 7548 6 7533 7527 7548 7551 7 + 7533 7527 7548 7554 8 7533 7527 -7548 7554 9 + 7533 7527 -7548 7554 10 7533 7527 -7548 7554 5 + 7527 7548 7554 7560 1 7521 7527 7533 7542 6 + 7521 7527 7548 7551 7 7521 7527 7548 7554 14 + 7521 7527 -7548 7554 15 7521 7527 -7548 7554 16 + 7521 7527 -7548 7554 5 7608 7605 7611 7617 1 + 7605 7611 7617 7623 12 7605 7611 -7617 7623 13 + 7605 7611 -7617 7623 10 7605 7611 -7617 7623 5 + 7605 7611 7617 7650 2 7605 7611 -7617 7650 3 + 7605 7611 -7617 7650 4 7605 7611 -7617 7650 5 + 7575 7566 7560 7605 6 7566 7560 7605 7608 7 + 7566 7560 7605 7611 8 7566 7560 -7605 7611 9 + 7566 7560 -7605 7611 10 7566 7560 -7605 7611 5 + 7560 7566 7575 7581 18 7560 7566 -7575 7581 19 + 7560 7566 -7575 7581 20 7560 7566 7575 7593 18 + 7560 7566 -7575 7593 19 7560 7566 -7575 7593 20 + 7560 7605 7611 7617 1 7554 7560 7566 7575 6 + 7554 7560 7605 7608 7 7554 7560 7605 7611 14 + 7554 7560 -7605 7611 15 7554 7560 -7605 7611 16 + 7554 7560 -7605 7611 5 7653 7650 7656 7662 1 + 7650 7656 7662 7668 12 7650 7656 -7662 7668 13 + 7650 7656 -7662 7668 10 7650 7656 -7662 7668 5 + 7650 7656 7662 7680 2 7650 7656 -7662 7680 3 + 7650 7656 -7662 7680 4 7650 7656 -7662 7680 5 + 7632 7623 7617 7650 6 7623 7617 7650 7653 7 + 7623 7617 7650 7656 8 7623 7617 -7650 7656 9 + 7623 7617 -7650 7656 10 7623 7617 -7650 7656 5 + 7623 7632 7641 7644 7 7623 7632 7641 7647 7 + 7617 7623 7632 7641 6 7617 7650 7656 7662 1 + 7611 7617 7623 7632 6 7611 7617 7650 7653 7 + 7611 7617 7650 7656 14 7611 7617 -7650 7656 15 + 7611 7617 -7650 7656 16 7611 7617 -7650 7656 5 + 7683 7680 7686 7692 1 7680 7686 7692 7698 12 + 7680 7686 -7692 7698 13 7680 7686 -7692 7698 10 + 7680 7686 -7692 7698 5 7680 7686 7692 7722 2 + 7680 7686 -7692 7722 3 7680 7686 -7692 7722 4 + 7680 7686 -7692 7722 5 7668 7662 7680 7683 7 + 7668 7662 7680 7686 8 7668 7662 -7680 7686 9 + 7668 7662 -7680 7686 10 7668 7662 -7680 7686 5 + 7662 7680 7686 7692 1 7656 7662 7680 7683 7 + 7656 7662 7680 7686 14 7656 7662 -7680 7686 15 + 7656 7662 -7680 7686 16 7656 7662 -7680 7686 5 + 7725 7722 7728 7734 1 7722 7728 7734 7740 12 + 7722 7728 -7734 7740 13 7722 7728 -7734 7740 10 + 7722 7728 -7734 7740 5 7722 7728 7734 7770 2 + 7722 7728 -7734 7770 3 7722 7728 -7734 7770 4 + 7722 7728 -7734 7770 5 7716 7698 7692 7722 6 + 7704 7698 7692 7722 6 7698 7692 7722 7725 7 + 7698 7692 7722 7728 8 7698 7692 -7722 7728 9 + 7698 7692 -7722 7728 10 7698 7692 -7722 7728 5 + 7692 7722 7728 7734 1 7686 7692 7698 7704 6 + 7686 7692 7698 7716 6 7686 7692 7722 7725 7 + 7686 7692 7722 7728 14 7686 7692 -7722 7728 15 + 7686 7692 -7722 7728 16 7686 7692 -7722 7728 5 + 7773 7770 7776 7782 1 7770 7776 7782 7788 12 + 7770 7776 -7782 7788 13 7770 7776 -7782 7788 10 + 7770 7776 -7782 7788 5 7770 7776 7782 7842 2 + 7770 7776 -7782 7842 3 7770 7776 -7782 7842 4 + 7770 7776 -7782 7842 5 7758 7740 7734 7770 6 + 7746 7740 7734 7770 6 7740 7734 7770 7773 7 + 7740 7734 7770 7776 8 7740 7734 -7770 7776 9 + 7740 7734 -7770 7776 10 7740 7734 -7770 7776 5 + 7734 7770 7776 7782 1 7728 7734 7740 7746 6 + 7728 7734 7740 7758 6 7728 7734 7770 7773 7 + 7728 7734 7770 7776 14 7728 7734 -7770 7776 15 + 7728 7734 -7770 7776 16 7728 7734 -7770 7776 5 + 7845 7842 7848 7854 1 7842 7848 7854 7860 12 + 7842 7848 -7854 7860 13 7842 7848 -7854 7860 10 + 7842 7848 -7854 7860 5 7842 7848 7854 7905 2 + 7842 7848 -7854 7905 3 7842 7848 -7854 7905 4 + 7842 7848 -7854 7905 5 7806 7815 7821 7824 21 + 7806 7815 7821 7833 21 7797 7788 7782 7842 6 + 7797 7806 7815 7821 26 7788 7782 7842 7845 7 + 7788 7782 7842 7848 8 7788 7782 -7842 7848 9 + 7788 7782 -7842 7848 10 7788 7782 -7842 7848 5 + 7788 7797 7806 7815 6 7782 7788 7797 7806 18 + 7782 7788 -7797 7806 19 7782 7788 -7797 7806 20 + 7782 7842 7848 7854 1 7776 7782 7788 7797 6 + 7776 7782 7842 7845 7 7776 7782 7842 7848 14 + 7776 7782 -7842 7848 15 7776 7782 -7842 7848 16 + 7776 7782 -7842 7848 5 7908 7905 7911 7917 1 + 7905 7911 7917 7923 12 7905 7911 -7917 7923 13 + 7905 7911 -7917 7923 10 7905 7911 -7917 7923 5 + 7905 7911 7917 7947 2 7905 7911 -7917 7947 3 + 7905 7911 -7917 7947 4 7905 7911 -7917 7947 5 + 7887 7884 7893 7899 17 7878 7872 7869 7899 17 + 7878 7884 -7893 7899 17 7872 7869 7899 7893 17 + 7872 7878 7884 7887 17 7872 7878 -7884 7893 17 + 7869 7860 7854 7905 6 7869 7872 7878 7884 17 + 7869 7899 -7893 7884 17 7860 7854 7905 7908 7 + 7860 7854 7905 7911 8 7860 7854 -7905 7911 9 + 7860 7854 -7905 7911 10 7860 7854 -7905 7911 5 + 7860 7869 7872 7878 17 7860 7869 7899 7893 17 + 7854 7860 7869 7872 7 7854 7860 7869 7899 7 + 7854 7905 7911 7917 1 7848 7854 7860 7869 6 + 7848 7854 7905 7908 7 7848 7854 7905 7911 14 + 7848 7854 -7905 7911 15 7848 7854 -7905 7911 16 + 7848 7854 -7905 7911 5 7950 7947 7953 7959 1 + 7947 7953 7959 7965 12 7947 7953 -7959 7965 13 + 7947 7953 -7959 7965 10 7947 7953 -7959 7965 5 + 7947 7953 7959 7977 2 7947 7953 -7959 7977 3 + 7947 7953 -7959 7977 4 7947 7953 -7959 7977 5 + 7941 7923 7917 7947 6 7929 7923 7917 7947 6 + 7923 7917 7947 7950 7 7923 7917 7947 7953 8 + 7923 7917 -7947 7953 9 7923 7917 -7947 7953 10 + 7923 7917 -7947 7953 5 7917 7947 7953 7959 1 + 7911 7917 7923 7929 6 7911 7917 7923 7941 6 + 7911 7917 7947 7950 7 7911 7917 7947 7953 14 + 7911 7917 -7947 7953 15 7911 7917 -7947 7953 16 + 7911 7917 -7947 7953 5 7980 7977 7983 7989 1 + 7977 7983 7989 7995 12 7977 7983 -7989 7995 13 + 7977 7983 -7989 7995 10 7977 7983 -7989 7995 5 + 7977 7983 7989 8034 2 7977 7983 -7989 8034 3 + 7977 7983 -7989 8034 4 7977 7983 -7989 8034 5 + 7965 7959 7977 7980 7 7965 7959 7977 7983 8 + 7965 7959 -7977 7983 9 7965 7959 -7977 7983 10 + 7965 7959 -7977 7983 5 7959 7977 7983 7989 1 + 7953 7959 7977 7980 7 7953 7959 7977 7983 14 + 7953 7959 -7977 7983 15 7953 7959 -7977 7983 16 + 7953 7959 -7977 7983 5 8037 8034 8040 8046 1 + 8034 8040 8046 8052 12 8034 8040 -8046 8052 13 + 8034 8040 -8046 8052 10 8034 8040 -8046 8052 5 + 8034 8040 8046 8064 2 8034 8040 -8046 8064 3 + 8034 8040 -8046 8064 4 8034 8040 -8046 8064 5 + 8004 7995 7989 8034 6 7995 7989 8034 8037 7 + 7995 7989 8034 8040 8 7995 7989 -8034 8040 9 + 7995 7989 -8034 8040 10 7995 7989 -8034 8040 5 + 7989 7995 8004 8010 18 7989 7995 -8004 8010 19 + 7989 7995 -8004 8010 20 7989 7995 8004 8022 18 + 7989 7995 -8004 8022 19 7989 7995 -8004 8022 20 + 7989 8034 8040 8046 1 7983 7989 7995 8004 6 + 7983 7989 8034 8037 7 7983 7989 8034 8040 14 + 7983 7989 -8034 8040 15 7983 7989 -8034 8040 16 + 7983 7989 -8034 8040 5 8067 8064 8070 8076 1 + 8064 8070 8076 8082 12 8064 8070 -8076 8082 13 + 8064 8070 -8076 8082 10 8064 8070 -8076 8082 5 + 8064 8070 8076 8121 2 8064 8070 -8076 8121 3 + 8064 8070 -8076 8121 4 8064 8070 -8076 8121 5 + 8052 8046 8064 8067 7 8052 8046 8064 8070 8 + 8052 8046 -8064 8070 9 8052 8046 -8064 8070 10 + 8052 8046 -8064 8070 5 8046 8064 8070 8076 1 + 8040 8046 8064 8067 7 8040 8046 8064 8070 14 + 8040 8046 -8064 8070 15 8040 8046 -8064 8070 16 + 8040 8046 -8064 8070 5 8124 8121 8127 8133 1 + 8121 8127 8133 8142 2 8121 8127 -8133 8142 3 + 8121 8127 -8133 8142 4 8121 8127 -8133 8142 5 + 8091 8082 8076 8121 6 8082 8076 8121 8124 7 + 8082 8076 8121 8127 8 8082 8076 -8121 8127 9 + 8082 8076 -8121 8127 10 8082 8076 -8121 8127 5 + 8076 8082 8091 8097 18 8076 8082 -8091 8097 19 + 8076 8082 -8091 8097 20 8076 8082 8091 8109 18 + 8076 8082 -8091 8109 19 8076 8082 -8091 8109 20 + 8076 8121 8127 8133 1 8070 8076 8082 8091 6 + 8070 8076 8121 8124 7 8070 8076 8121 8127 14 + 8070 8076 -8121 8127 15 8070 8076 -8121 8127 16 + 8070 8076 -8121 8127 5 8145 8142 8148 8154 1 + 8142 8148 8154 8160 12 8142 8148 -8154 8160 13 + 8142 8148 -8154 8160 10 8142 8148 -8154 8160 5 + 8142 8148 8154 8187 2 8142 8148 -8154 8187 3 + 8142 8148 -8154 8187 4 8142 8148 -8154 8187 5 + 8133 8142 8148 8154 1 8127 8133 8142 8145 7 + 8127 8133 8142 8148 14 8127 8133 -8142 8148 15 + 8127 8133 -8142 8148 16 8127 8133 -8142 8148 5 + 8190 8187 8193 8199 1 8187 8193 8199 8205 12 + 8187 8193 -8199 8205 13 8187 8193 -8199 8205 10 + 8187 8193 -8199 8205 5 8187 8193 8199 8223 2 + 8187 8193 -8199 8223 3 8187 8193 -8199 8223 4 + 8187 8193 -8199 8223 5 8169 8160 8154 8187 6 + 8160 8154 8187 8190 7 8160 8154 8187 8193 8 + 8160 8154 -8187 8193 9 8160 8154 -8187 8193 10 + 8160 8154 -8187 8193 5 8160 8169 8178 8181 7 + 8160 8169 8178 8184 7 8154 8160 8169 8178 6 + 8154 8187 8193 8199 1 8148 8154 8160 8169 6 + 8148 8154 8187 8190 7 8148 8154 8187 8193 14 + 8148 8154 -8187 8193 15 8148 8154 -8187 8193 16 + 8148 8154 -8187 8193 5 8226 8223 8229 8235 1 + 8223 8229 8235 8244 2 8223 8229 -8235 8244 3 + 8223 8229 -8235 8244 4 8223 8229 -8235 8244 5 + 8214 8205 8199 8223 6 8205 8199 8223 8226 7 + 8205 8199 8223 8229 8 8205 8199 -8223 8229 9 + 8205 8199 -8223 8229 10 8205 8199 -8223 8229 5 + 8199 8205 8214 8217 7 8199 8205 8214 8220 7 + 8199 8223 8229 8235 1 8193 8199 8205 8214 6 + 8193 8199 8223 8226 7 8193 8199 8223 8229 14 + 8193 8199 -8223 8229 15 8193 8199 -8223 8229 16 + 8193 8199 -8223 8229 5 8247 8244 8250 8256 1 + 8244 8250 8256 8262 12 8244 8250 -8256 8262 13 + 8244 8250 -8256 8262 10 8244 8250 -8256 8262 5 + 8244 8250 8256 8301 2 8244 8250 -8256 8301 3 + 8244 8250 -8256 8301 4 8244 8250 -8256 8301 5 + 8235 8244 8250 8256 1 8229 8235 8244 8247 7 + 8229 8235 8244 8250 14 8229 8235 -8244 8250 15 + 8229 8235 -8244 8250 16 8229 8235 -8244 8250 5 + 8304 8301 8307 8313 1 8301 8307 8313 8319 12 + 8301 8307 -8313 8319 13 8301 8307 -8313 8319 10 + 8301 8307 -8313 8319 5 8301 8307 8313 8367 2 + 8301 8307 -8313 8367 3 8301 8307 -8313 8367 4 + 8301 8307 -8313 8367 5 8280 8262 8256 8301 6 + 8268 8262 8256 8301 6 8268 8262 8280 8289 18 + 8268 8262 -8280 8289 19 8268 8262 -8280 8289 20 + 8262 8256 8301 8304 7 8262 8256 8301 8307 8 + 8262 8256 -8301 8307 9 8262 8256 -8301 8307 10 + 8262 8256 -8301 8307 5 8256 8262 8280 8289 18 + 8256 8262 -8280 8289 19 8256 8262 -8280 8289 20 + 8256 8301 8307 8313 1 8250 8256 8262 8268 6 + 8250 8256 8262 8280 6 8250 8256 8301 8304 7 + 8250 8256 8301 8307 14 8250 8256 -8301 8307 15 + 8250 8256 -8301 8307 16 8250 8256 -8301 8307 5 + 8370 8367 8373 8379 1 8367 8373 8379 8385 12 + 8367 8373 -8379 8385 13 8367 8373 -8379 8385 10 + 8367 8373 -8379 8385 5 8367 8373 8379 8415 2 + 8367 8373 -8379 8415 3 8367 8373 -8379 8415 4 + 8367 8373 -8379 8415 5 8328 8319 8313 8367 6 + 8328 8337 8346 8355 6 8319 8313 8367 8370 7 + 8319 8313 8367 8373 8 8319 8313 -8367 8373 9 + 8319 8313 -8367 8373 10 8319 8313 -8367 8373 5 + 8319 8328 8337 8346 18 8319 8328 -8337 8346 19 + 8319 8328 -8337 8346 20 8313 8319 8328 8337 18 + 8313 8319 -8328 8337 19 8313 8319 -8328 8337 20 + 8313 8367 8373 8379 1 8307 8313 8319 8328 6 + 8307 8313 8367 8370 7 8307 8313 8367 8373 14 + 8307 8313 -8367 8373 15 8307 8313 -8367 8373 16 + 8307 8313 -8367 8373 5 8418 8415 8421 8427 1 + 8415 8421 8427 8433 12 8415 8421 -8427 8433 13 + 8415 8421 -8427 8433 10 8415 8421 -8427 8433 5 + 8415 8421 8427 8457 2 8415 8421 -8427 8457 3 + 8415 8421 -8427 8457 4 8415 8421 -8427 8457 5 + 8403 8385 8379 8415 6 8391 8385 8379 8415 6 + 8385 8379 8415 8418 7 8385 8379 8415 8421 8 + 8385 8379 -8415 8421 9 8385 8379 -8415 8421 10 + 8385 8379 -8415 8421 5 8379 8415 8421 8427 1 + 8373 8379 8385 8391 6 8373 8379 8385 8403 6 + 8373 8379 8415 8418 7 8373 8379 8415 8421 14 + 8373 8379 -8415 8421 15 8373 8379 -8415 8421 16 + 8373 8379 -8415 8421 5 8460 8457 8463 8469 1 + 8457 8463 8469 8475 12 8457 8463 -8469 8475 13 + 8457 8463 -8469 8475 10 8457 8463 -8469 8475 5 + 8457 8463 8469 8487 2 8457 8463 -8469 8487 3 + 8457 8463 -8469 8487 4 8457 8463 -8469 8487 5 + 8442 8433 8427 8457 6 8433 8427 8457 8460 7 + 8433 8427 8457 8463 8 8433 8427 -8457 8463 9 + 8433 8427 -8457 8463 10 8433 8427 -8457 8463 5 + 8427 8433 8442 8445 7 8427 8433 8442 8448 8 + 8427 8433 -8442 8448 9 8427 8433 -8442 8448 10 + 8427 8433 -8442 8448 5 8427 8457 8463 8469 1 + 8421 8427 8433 8442 6 8421 8427 8457 8460 7 + 8421 8427 8457 8463 14 8421 8427 -8457 8463 15 + 8421 8427 -8457 8463 16 8421 8427 -8457 8463 5 + 8490 8487 8493 8499 1 8487 8493 8499 8505 12 + 8487 8493 -8499 8505 13 8487 8493 -8499 8505 10 + 8487 8493 -8499 8505 5 8487 8493 8499 8535 2 + 8487 8493 -8499 8535 3 8487 8493 -8499 8535 4 + 8487 8493 -8499 8535 5 8475 8469 8487 8490 7 + 8475 8469 8487 8493 8 8475 8469 -8487 8493 9 + 8475 8469 -8487 8493 10 8475 8469 -8487 8493 5 + 8469 8487 8493 8499 1 8463 8469 8487 8490 7 + 8463 8469 8487 8493 14 8463 8469 -8487 8493 15 + 8463 8469 -8487 8493 16 8463 8469 -8487 8493 5 + 8538 8535 8541 8547 1 8535 8541 8547 8553 12 + 8535 8541 -8547 8553 13 8535 8541 -8547 8553 10 + 8535 8541 -8547 8553 5 8535 8541 8547 8568 2 + 8535 8541 -8547 8568 3 8535 8541 -8547 8568 4 + 8535 8541 -8547 8568 5 8523 8505 8499 8535 6 + 8511 8505 8499 8535 6 8505 8499 8535 8538 7 + 8505 8499 8535 8541 8 8505 8499 -8535 8541 9 + 8505 8499 -8535 8541 10 8505 8499 -8535 8541 5 + 8499 8535 8541 8547 1 8493 8499 8505 8511 6 + 8493 8499 8505 8523 6 8493 8499 8535 8538 7 + 8493 8499 8535 8541 14 8493 8499 -8535 8541 15 + 8493 8499 -8535 8541 16 8493 8499 -8535 8541 5 + 8571 8568 8574 8580 1 8568 8574 8580 8586 12 + 8568 8574 -8580 8586 13 8568 8574 -8580 8586 10 + 8568 8574 -8580 8586 5 8568 8574 8580 8598 2 + 8568 8574 -8580 8598 3 8568 8574 -8580 8598 4 + 8568 8574 -8580 8598 5 8562 8553 8547 8568 6 + 8553 8547 8568 8571 7 8553 8547 8568 8574 8 + 8553 8547 -8568 8574 9 8553 8547 -8568 8574 10 + 8553 8547 -8568 8574 5 8547 8568 8574 8580 1 + 8541 8547 8553 8562 6 8541 8547 8568 8571 7 + 8541 8547 8568 8574 14 8541 8547 -8568 8574 15 + 8541 8547 -8568 8574 16 8541 8547 -8568 8574 5 + 8601 8598 8604 8610 1 8598 8604 8610 8619 2 + 8598 8604 -8610 8619 3 8598 8604 -8610 8619 4 + 8598 8604 -8610 8619 5 8586 8580 8598 8601 7 + 8586 8580 8598 8604 8 8586 8580 -8598 8604 9 + 8586 8580 -8598 8604 10 8586 8580 -8598 8604 5 + 8580 8598 8604 8610 1 8574 8580 8598 8601 7 + 8574 8580 8598 8604 14 8574 8580 -8598 8604 15 + 8574 8580 -8598 8604 16 8574 8580 -8598 8604 5 + 8622 8619 8625 8628 1 8622 8619 8625 8655 1 + 8619 8625 8628 8637 12 8619 8625 -8628 8637 13 + 8619 8625 -8628 8637 10 8619 8625 -8628 8637 5 + 8619 8625 8655 8646 12 8619 8625 -8655 8646 13 + 8619 8625 -8655 8646 10 8619 8625 -8655 8646 5 + 8619 8625 8655 8661 2 8619 8625 -8655 8661 3 + 8619 8625 -8655 8661 4 8619 8625 -8655 8661 5 + 8610 8619 8625 8628 1 8610 8619 8625 8655 1 + 8604 8610 8619 8622 7 8604 8610 8619 8625 14 + 8604 8610 -8619 8625 15 8604 8610 -8619 8625 16 + 8604 8610 -8619 8625 5 8664 8661 8667 8673 1 + 8661 8667 8673 8679 12 8661 8667 -8673 8679 13 + 8661 8667 -8673 8679 10 8661 8667 -8673 8679 5 + 8661 8667 8673 8718 2 8661 8667 -8673 8718 3 + 8661 8667 -8673 8718 4 8661 8667 -8673 8718 5 + 8655 8661 8667 8673 1 8646 8655 8661 8664 7 + 8646 8655 8661 8667 8 8646 8655 -8661 8667 9 + 8646 8655 -8661 8667 10 8646 8655 -8661 8667 5 + 8637 8628 -8625 8655 7 8637 8646 8655 8661 6 + 8628 8625 -8655 8646 7 8628 8625 8655 8661 7 + 8628 8637 -8646 8655 18 8628 8637 -8646 8655 19 + 8628 8637 -8646 8655 20 8625 8628 -8637 8646 6 + 8625 8655 -8646 8637 6 8625 8655 8661 8664 7 + 8625 8655 8661 8667 14 8625 8655 -8661 8667 15 + 8625 8655 -8661 8667 16 8625 8655 -8661 8667 5 + 8721 8718 8724 8730 1 8718 8724 8730 8736 12 + 8718 8724 -8730 8736 13 8718 8724 -8730 8736 10 + 8718 8724 -8730 8736 5 8718 8724 8730 8784 2 + 8718 8724 -8730 8784 3 8718 8724 -8730 8784 4 + 8718 8724 -8730 8784 5 8697 8679 8673 8718 6 + 8685 8679 8673 8718 6 8685 8679 8697 8706 18 + 8685 8679 -8697 8706 19 8685 8679 -8697 8706 20 + 8679 8673 8718 8721 7 8679 8673 8718 8724 8 + 8679 8673 -8718 8724 9 8679 8673 -8718 8724 10 + 8679 8673 -8718 8724 5 8673 8679 8697 8706 18 + 8673 8679 -8697 8706 19 8673 8679 -8697 8706 20 + 8673 8718 8724 8730 1 8667 8673 8679 8685 6 + 8667 8673 8679 8697 6 8667 8673 8718 8721 7 + 8667 8673 8718 8724 14 8667 8673 -8718 8724 15 + 8667 8673 -8718 8724 16 8667 8673 -8718 8724 5 + 8787 8784 8790 8796 1 8784 8790 8796 8802 12 + 8784 8790 -8796 8802 13 8784 8790 -8796 8802 10 + 8784 8790 -8796 8802 5 8784 8790 8796 8826 2 + 8784 8790 -8796 8826 3 8784 8790 -8796 8826 4 + 8784 8790 -8796 8826 5 8745 8736 8730 8784 6 + 8745 8754 8763 8772 6 8736 8730 8784 8787 7 + 8736 8730 8784 8790 8 8736 8730 -8784 8790 9 + 8736 8730 -8784 8790 10 8736 8730 -8784 8790 5 + 8736 8745 8754 8763 18 8736 8745 -8754 8763 19 + 8736 8745 -8754 8763 20 8730 8736 8745 8754 18 + 8730 8736 -8745 8754 19 8730 8736 -8745 8754 20 + 8730 8784 8790 8796 1 8724 8730 8736 8745 6 + 8724 8730 8784 8787 7 8724 8730 8784 8790 14 + 8724 8730 -8784 8790 15 8724 8730 -8784 8790 16 + 8724 8730 -8784 8790 5 8829 8826 8832 8838 1 + 8826 8832 8838 8844 12 8826 8832 -8838 8844 13 + 8826 8832 -8838 8844 10 8826 8832 -8838 8844 5 + 8826 8832 8838 8883 2 8826 8832 -8838 8883 3 + 8826 8832 -8838 8883 4 8826 8832 -8838 8883 5 + 8820 8802 8796 8826 6 8808 8802 8796 8826 6 + 8802 8796 8826 8829 7 8802 8796 8826 8832 8 + 8802 8796 -8826 8832 9 8802 8796 -8826 8832 10 + 8802 8796 -8826 8832 5 8796 8826 8832 8838 1 + 8790 8796 8802 8808 6 8790 8796 8802 8820 6 + 8790 8796 8826 8829 7 8790 8796 8826 8832 14 + 8790 8796 -8826 8832 15 8790 8796 -8826 8832 16 + 8790 8796 -8826 8832 5 8886 8883 8889 8895 1 + 8883 8889 8895 8901 12 8883 8889 -8895 8901 13 + 8883 8889 -8895 8901 10 8883 8889 -8895 8901 5 + 8883 8889 8895 8913 2 8883 8889 -8895 8913 3 + 8883 8889 -8895 8913 4 8883 8889 -8895 8913 5 + 8853 8844 8838 8883 6 8844 8838 8883 8886 7 + 8844 8838 8883 8889 8 8844 8838 -8883 8889 9 + 8844 8838 -8883 8889 10 8844 8838 -8883 8889 5 + 8838 8844 8853 8859 18 8838 8844 -8853 8859 19 + 8838 8844 -8853 8859 20 8838 8844 8853 8871 18 + 8838 8844 -8853 8871 19 8838 8844 -8853 8871 20 + 8838 8883 8889 8895 1 8832 8838 8844 8853 6 + 8832 8838 8883 8886 7 8832 8838 8883 8889 14 + 8832 8838 -8883 8889 15 8832 8838 -8883 8889 16 + 8832 8838 -8883 8889 5 8916 8913 8919 8925 1 + 8913 8919 8925 8931 12 8913 8919 -8925 8931 13 + 8913 8919 -8925 8931 10 8913 8919 -8925 8931 5 + 8913 8919 8925 8943 2 8913 8919 -8925 8943 3 + 8913 8919 -8925 8943 4 8913 8919 -8925 8943 5 + 8901 8895 8913 8916 7 8901 8895 8913 8919 8 + 8901 8895 -8913 8919 9 8901 8895 -8913 8919 10 + 8901 8895 -8913 8919 5 8895 8913 8919 8925 1 + 8889 8895 8913 8916 7 8889 8895 8913 8919 14 + 8889 8895 -8913 8919 15 8889 8895 -8913 8919 16 + 8889 8895 -8913 8919 5 8946 8943 8949 8955 1 + 8943 8949 8955 8961 12 8943 8949 -8955 8961 13 + 8943 8949 -8955 8961 10 8943 8949 -8955 8961 5 + 8943 8949 8955 8976 2 8943 8949 -8955 8976 3 + 8943 8949 -8955 8976 4 8943 8949 -8955 8976 5 + 8931 8925 8943 8946 7 8931 8925 8943 8949 8 + 8931 8925 -8943 8949 9 8931 8925 -8943 8949 10 + 8931 8925 -8943 8949 5 8925 8943 8949 8955 1 + 8919 8925 8943 8946 7 8919 8925 8943 8949 14 + 8919 8925 -8943 8949 15 8919 8925 -8943 8949 16 + 8919 8925 -8943 8949 5 8979 8976 8982 8988 1 + 8976 8982 8988 8997 2 8976 8982 -8988 8997 3 + 8976 8982 -8988 8997 4 8976 8982 -8988 8997 5 + 8970 8961 8955 8976 6 8961 8955 8976 8979 7 + 8961 8955 8976 8982 8 8961 8955 -8976 8982 9 + 8961 8955 -8976 8982 10 8961 8955 -8976 8982 5 + 8955 8976 8982 8988 1 8949 8955 8961 8970 6 + 8949 8955 8976 8979 7 8949 8955 8976 8982 14 + 8949 8955 -8976 8982 15 8949 8955 -8976 8982 16 + 8949 8955 -8976 8982 5 9000 8997 9003 9009 1 + 8997 9003 9009 9015 12 8997 9003 -9009 9015 13 + 8997 9003 -9009 9015 10 8997 9003 -9009 9015 5 + 8997 9003 9009 9054 2 8997 9003 -9009 9054 3 + 8997 9003 -9009 9054 4 8997 9003 -9009 9054 5 + 8988 8997 9003 9009 1 8982 8988 8997 9000 7 + 8982 8988 8997 9003 14 8982 8988 -8997 9003 15 + 8982 8988 -8997 9003 16 8982 8988 -8997 9003 5 + 9057 9054 9060 9066 1 9054 9060 9066 9072 12 + 9054 9060 -9066 9072 13 9054 9060 -9066 9072 10 + 9054 9060 -9066 9072 5 9054 9060 9066 9087 2 + 9054 9060 -9066 9087 3 9054 9060 -9066 9087 4 + 9054 9060 -9066 9087 5 9033 9015 9009 9054 6 + 9021 9015 9009 9054 6 9021 9015 9033 9042 18 + 9021 9015 -9033 9042 19 9021 9015 -9033 9042 20 + 9015 9009 9054 9057 7 9015 9009 9054 9060 8 + 9015 9009 -9054 9060 9 9015 9009 -9054 9060 10 + 9015 9009 -9054 9060 5 9009 9015 9033 9042 18 + 9009 9015 -9033 9042 19 9009 9015 -9033 9042 20 + 9009 9054 9060 9066 1 9003 9009 9015 9021 6 + 9003 9009 9015 9033 6 9003 9009 9054 9057 7 + 9003 9009 9054 9060 14 9003 9009 -9054 9060 15 + 9003 9009 -9054 9060 16 9003 9009 -9054 9060 5 + 9090 9087 9093 9099 1 9087 9093 9099 9105 12 + 9087 9093 -9099 9105 13 9087 9093 -9099 9105 10 + 9087 9093 -9099 9105 5 9087 9093 9099 9129 2 + 9087 9093 -9099 9129 3 9087 9093 -9099 9129 4 + 9087 9093 -9099 9129 5 9081 9072 9066 9087 6 + 9072 9066 9087 9090 7 9072 9066 9087 9093 8 + 9072 9066 -9087 9093 9 9072 9066 -9087 9093 10 + 9072 9066 -9087 9093 5 9066 9087 9093 9099 1 + 9060 9066 9072 9081 6 9060 9066 9087 9090 7 + 9060 9066 9087 9093 14 9060 9066 -9087 9093 15 + 9060 9066 -9087 9093 16 9060 9066 -9087 9093 5 + 9132 9129 9135 9141 1 9129 9135 9141 9147 12 + 9129 9135 -9141 9147 13 9129 9135 -9141 9147 10 + 9129 9135 -9141 9147 5 9129 9135 9141 9189 2 + 9129 9135 -9141 9189 3 9129 9135 -9141 9189 4 + 9129 9135 -9141 9189 5 9114 9105 9099 9129 6 + 9105 9099 9129 9132 7 9105 9099 9129 9135 8 + 9105 9099 -9129 9135 9 9105 9099 -9129 9135 10 + 9105 9099 -9129 9135 5 9099 9105 9114 9117 7 + 9099 9105 9114 9120 8 9099 9105 -9114 9120 9 + 9099 9105 -9114 9120 10 9099 9105 -9114 9120 5 + 9099 9129 9135 9141 1 9093 9099 9105 9114 6 + 9093 9099 9129 9132 7 9093 9099 9129 9135 14 + 9093 9099 -9129 9135 15 9093 9099 -9129 9135 16 + 9093 9099 -9129 9135 5 9192 9189 9195 9201 1 + 9189 9195 9201 9207 12 9189 9195 -9201 9207 13 + 9189 9195 -9201 9207 10 9189 9195 -9201 9207 5 + 9189 9195 9201 9255 2 9189 9195 -9201 9255 3 + 9189 9195 -9201 9255 4 9189 9195 -9201 9255 5 + 9165 9159 9156 9183 17 9165 9171 -9177 9183 17 + 9159 9156 9183 9177 17 9159 9165 -9171 9177 17 + 9156 9147 9141 9189 6 9156 9159 9165 9171 17 + 9156 9183 -9177 9171 17 9147 9141 9189 9192 7 + 9147 9141 9189 9195 8 9147 9141 -9189 9195 9 + 9147 9141 -9189 9195 10 9147 9141 -9189 9195 5 + 9147 9156 9159 9165 17 9147 9156 9183 9177 17 + 9141 9147 9156 9159 7 9141 9147 9156 9183 7 + 9141 9189 9195 9201 1 9135 9141 9147 9156 6 + 9135 9141 9189 9192 7 9135 9141 9189 9195 14 + 9135 9141 -9189 9195 15 9135 9141 -9189 9195 16 + 9135 9141 -9189 9195 5 9258 9255 9261 9267 1 + 9255 9261 9267 9273 12 9255 9261 -9267 9273 13 + 9255 9261 -9267 9273 10 9255 9261 -9267 9273 5 + 9255 9261 9267 9321 2 9255 9261 -9267 9321 3 + 9255 9261 -9267 9321 4 9255 9261 -9267 9321 5 + 9216 9207 9201 9255 6 9216 9225 9234 9243 6 + 9207 9201 9255 9258 7 9207 9201 9255 9261 8 + 9207 9201 -9255 9261 9 9207 9201 -9255 9261 10 + 9207 9201 -9255 9261 5 9207 9216 9225 9234 18 + 9207 9216 -9225 9234 19 9207 9216 -9225 9234 20 + 9201 9207 9216 9225 18 9201 9207 -9216 9225 19 + 9201 9207 -9216 9225 20 9201 9255 9261 9267 1 + 9195 9201 9207 9216 6 9195 9201 9255 9258 7 + 9195 9201 9255 9261 14 9195 9201 -9255 9261 15 + 9195 9201 -9255 9261 16 9195 9201 -9255 9261 5 + 9324 9321 9327 9333 1 9321 9327 9333 9339 12 + 9321 9327 -9333 9339 13 9321 9327 -9333 9339 10 + 9321 9327 -9333 9339 5 9321 9327 9333 9372 2 + 9321 9327 -9333 9372 3 9321 9327 -9333 9372 4 + 9321 9327 -9333 9372 5 9282 9273 9267 9321 6 + 9282 9291 9300 9309 6 9273 9267 9321 9324 7 + 9273 9267 9321 9327 8 9273 9267 -9321 9327 9 + 9273 9267 -9321 9327 10 9273 9267 -9321 9327 5 + 9273 9282 9291 9300 18 9273 9282 -9291 9300 19 + 9273 9282 -9291 9300 20 9267 9273 9282 9291 18 + 9267 9273 -9282 9291 19 9267 9273 -9282 9291 20 + 9267 9321 9327 9333 1 9261 9267 9273 9282 6 + 9261 9267 9321 9324 7 9261 9267 9321 9327 14 + 9261 9267 -9321 9327 15 9261 9267 -9321 9327 16 + 9261 9267 -9321 9327 5 9375 9372 9378 9384 1 + 9372 9378 9384 9390 12 9372 9378 -9384 9390 13 + 9372 9378 -9384 9390 10 9372 9378 -9384 9390 5 + 9372 9378 9384 9429 2 9372 9378 -9384 9429 3 + 9372 9378 -9384 9429 4 9372 9378 -9384 9429 5 + 9348 9339 9333 9372 6 9339 9333 9372 9375 7 + 9339 9333 9372 9378 8 9339 9333 -9372 9378 9 + 9339 9333 -9372 9378 10 9339 9333 -9372 9378 5 + 9339 9348 9357 9360 11 9333 9339 9348 9357 6 + 9333 9372 9378 9384 1 9327 9333 9339 9348 6 + 9327 9333 9372 9375 7 9327 9333 9372 9378 14 + 9327 9333 -9372 9378 15 9327 9333 -9372 9378 16 + 9327 9333 -9372 9378 5 9432 9429 9435 9441 1 + 9429 9435 9441 9447 12 9429 9435 -9441 9447 13 + 9429 9435 -9441 9447 10 9429 9435 -9441 9447 5 + 9429 9435 9441 9465 2 9429 9435 -9441 9465 3 + 9429 9435 -9441 9465 4 9429 9435 -9441 9465 5 + 9399 9390 9384 9429 6 9390 9384 9429 9432 7 + 9390 9384 9429 9435 8 9390 9384 -9429 9435 9 + 9390 9384 -9429 9435 10 9390 9384 -9429 9435 5 + 9384 9390 9399 9405 18 9384 9390 -9399 9405 19 + 9384 9390 -9399 9405 20 9384 9390 9399 9417 18 + 9384 9390 -9399 9417 19 9384 9390 -9399 9417 20 + 9384 9429 9435 9441 1 9378 9384 9390 9399 6 + 9378 9384 9429 9432 7 9378 9384 9429 9435 14 + 9378 9384 -9429 9435 15 9378 9384 -9429 9435 16 + 9378 9384 -9429 9435 5 9468 9465 9471 9477 1 + 9465 9471 9477 9483 12 9465 9471 -9477 9483 13 + 9465 9471 -9477 9483 10 9465 9471 -9477 9483 5 + 9465 9471 9477 9528 2 9465 9471 -9477 9528 3 + 9465 9471 -9477 9528 4 9465 9471 -9477 9528 5 + 9456 9447 9441 9465 6 9447 9441 9465 9468 7 + 9447 9441 9465 9471 8 9447 9441 -9465 9471 9 + 9447 9441 -9465 9471 10 9447 9441 -9465 9471 5 + 9441 9447 9456 9459 7 9441 9447 9456 9462 7 + 9441 9465 9471 9477 1 9435 9441 9447 9456 6 + 9435 9441 9465 9468 7 9435 9441 9465 9471 14 + 9435 9441 -9465 9471 15 9435 9441 -9465 9471 16 + 9435 9441 -9465 9471 5 9531 9528 9534 9540 1 + 9528 9534 9540 9546 12 9528 9534 -9540 9546 13 + 9528 9534 -9540 9546 10 9528 9534 -9540 9546 5 + 9528 9534 9540 9570 2 9528 9534 -9540 9570 3 + 9528 9534 -9540 9570 4 9528 9534 -9540 9570 5 + 9510 9507 9516 9522 17 9501 9495 9492 9522 17 + 9501 9507 -9516 9522 17 9495 9492 9522 9516 17 + 9495 9501 9507 9510 17 9495 9501 -9507 9516 17 + 9492 9483 9477 9528 6 9492 9495 9501 9507 17 + 9492 9522 -9516 9507 17 9483 9477 9528 9531 7 + 9483 9477 9528 9534 8 9483 9477 -9528 9534 9 + 9483 9477 -9528 9534 10 9483 9477 -9528 9534 5 + 9483 9492 9495 9501 17 9483 9492 9522 9516 17 + 9477 9483 9492 9495 7 9477 9483 9492 9522 7 + 9477 9528 9534 9540 1 9471 9477 9483 9492 6 + 9471 9477 9528 9531 7 9471 9477 9528 9534 14 + 9471 9477 -9528 9534 15 9471 9477 -9528 9534 16 + 9471 9477 -9528 9534 5 9573 9570 9576 9582 1 + 9570 9576 9582 9588 12 9570 9576 -9582 9588 13 + 9570 9576 -9582 9588 10 9570 9576 -9582 9588 5 + 9570 9576 9582 9600 2 9570 9576 -9582 9600 3 + 9570 9576 -9582 9600 4 9570 9576 -9582 9600 5 + 9555 9546 9540 9570 6 9546 9540 9570 9573 7 + 9546 9540 9570 9576 8 9546 9540 -9570 9576 9 + 9546 9540 -9570 9576 10 9546 9540 -9570 9576 5 + 9540 9546 9555 9558 7 9540 9546 9555 9561 8 + 9540 9546 -9555 9561 9 9540 9546 -9555 9561 10 + 9540 9546 -9555 9561 5 9540 9570 9576 9582 1 + 9534 9540 9546 9555 6 9534 9540 9570 9573 7 + 9534 9540 9570 9576 14 9534 9540 -9570 9576 15 + 9534 9540 -9570 9576 16 9534 9540 -9570 9576 5 + 9603 9600 9606 9612 1 9600 9606 9612 9618 12 + 9600 9606 -9612 9618 13 9600 9606 -9612 9618 10 + 9600 9606 -9612 9618 5 9600 9606 9612 9651 2 + 9600 9606 -9612 9651 3 9600 9606 -9612 9651 4 + 9600 9606 -9612 9651 5 9588 9582 9600 9603 7 + 9588 9582 9600 9606 8 9588 9582 -9600 9606 9 + 9588 9582 -9600 9606 10 9588 9582 -9600 9606 5 + 9582 9600 9606 9612 1 9576 9582 9600 9603 7 + 9576 9582 9600 9606 14 9576 9582 -9600 9606 15 + 9576 9582 -9600 9606 16 9576 9582 -9600 9606 5 + 9654 9651 9657 9663 1 9651 9657 9663 9669 12 + 9651 9657 -9663 9669 13 9651 9657 -9663 9669 10 + 9651 9657 -9663 9669 5 9651 9657 9663 9699 2 + 9651 9657 -9663 9699 3 9651 9657 -9663 9699 4 + 9651 9657 -9663 9699 5 9627 9618 9612 9651 6 + 9618 9612 9651 9654 7 9618 9612 9651 9657 8 + 9618 9612 -9651 9657 9 9618 9612 -9651 9657 10 + 9618 9612 -9651 9657 5 9618 9627 9636 9639 11 + 9612 9618 9627 9636 6 9612 9651 9657 9663 1 + 9606 9612 9618 9627 6 9606 9612 9651 9654 7 + 9606 9612 9651 9657 14 9606 9612 -9651 9657 15 + 9606 9612 -9651 9657 16 9606 9612 -9651 9657 5 + 9702 9699 9705 9711 1 9699 9705 9711 9717 12 + 9699 9705 -9711 9717 13 9699 9705 -9711 9717 10 + 9699 9705 -9711 9717 5 9699 9705 9711 9732 2 + 9699 9705 -9711 9732 3 9699 9705 -9711 9732 4 + 9699 9705 -9711 9732 5 9687 9669 9663 9699 6 + 9675 9669 9663 9699 6 9669 9663 9699 9702 7 + 9669 9663 9699 9705 8 9669 9663 -9699 9705 9 + 9669 9663 -9699 9705 10 9669 9663 -9699 9705 5 + 9663 9699 9705 9711 1 9657 9663 9669 9675 6 + 9657 9663 9669 9687 6 9657 9663 9699 9702 7 + 9657 9663 9699 9705 14 9657 9663 -9699 9705 15 + 9657 9663 -9699 9705 16 9657 9663 -9699 9705 5 + 9735 9732 9738 9741 1 9735 9732 9738 9768 1 + 9732 9738 9741 9750 12 9732 9738 -9741 9750 13 + 9732 9738 -9741 9750 10 9732 9738 -9741 9750 5 + 9732 9738 9768 9759 12 9732 9738 -9768 9759 13 + 9732 9738 -9768 9759 10 9732 9738 -9768 9759 5 + 9732 9738 9768 9774 2 9732 9738 -9768 9774 3 + 9732 9738 -9768 9774 4 9732 9738 -9768 9774 5 + 9726 9717 9711 9732 6 9717 9711 9732 9735 7 + 9717 9711 9732 9738 8 9717 9711 -9732 9738 9 + 9717 9711 -9732 9738 10 9717 9711 -9732 9738 5 + 9711 9732 9738 9741 1 9711 9732 9738 9768 1 + 9705 9711 9717 9726 6 9705 9711 9732 9735 7 + 9705 9711 9732 9738 14 9705 9711 -9732 9738 15 + 9705 9711 -9732 9738 16 9705 9711 -9732 9738 5 + 9777 9774 9780 9786 1 9774 9780 9786 9792 12 + 9774 9780 -9786 9792 13 9774 9780 -9786 9792 10 + 9774 9780 -9786 9792 5 9774 9780 9786 9831 2 + 9774 9780 -9786 9831 3 9774 9780 -9786 9831 4 + 9774 9780 -9786 9831 5 9768 9774 9780 9786 1 + 9759 9768 9774 9777 7 9759 9768 9774 9780 8 + 9759 9768 -9774 9780 9 9759 9768 -9774 9780 10 + 9759 9768 -9774 9780 5 9750 9741 -9738 9768 7 + 9750 9759 9768 9774 6 9741 9738 -9768 9759 7 + 9741 9738 9768 9774 7 9741 9750 -9759 9768 18 + 9741 9750 -9759 9768 19 9741 9750 -9759 9768 20 + 9738 9741 -9750 9759 6 9738 9768 -9759 9750 6 + 9738 9768 9774 9777 7 9738 9768 9774 9780 14 + 9738 9768 -9774 9780 15 9738 9768 -9774 9780 16 + 9738 9768 -9774 9780 5 9834 9831 9837 9843 1 + 9831 9837 9843 9849 12 9831 9837 -9843 9849 13 + 9831 9837 -9843 9849 10 9831 9837 -9843 9849 5 + 9831 9837 9843 9897 2 9831 9837 -9843 9897 3 + 9831 9837 -9843 9897 4 9831 9837 -9843 9897 5 + 9801 9792 9786 9831 6 9792 9786 9831 9834 7 + 9792 9786 9831 9837 8 9792 9786 -9831 9837 9 + 9792 9786 -9831 9837 10 9792 9786 -9831 9837 5 + 9786 9792 9801 9807 18 9786 9792 -9801 9807 19 + 9786 9792 -9801 9807 20 9786 9792 9801 9819 18 + 9786 9792 -9801 9819 19 9786 9792 -9801 9819 20 + 9786 9831 9837 9843 1 9780 9786 9792 9801 6 + 9780 9786 9831 9834 7 9780 9786 9831 9837 14 + 9780 9786 -9831 9837 15 9780 9786 -9831 9837 16 + 9780 9786 -9831 9837 5 9900 9897 9903 9909 1 + 9897 9903 9909 9915 12 9897 9903 -9909 9915 13 + 9897 9903 -9909 9915 10 9897 9903 -9909 9915 5 + 9897 9903 9909 9963 2 9897 9903 -9909 9963 3 + 9897 9903 -9909 9963 4 9897 9903 -9909 9963 5 + 9858 9849 9843 9897 6 9858 9867 9876 9885 6 + 9849 9843 9897 9900 7 9849 9843 9897 9903 8 + 9849 9843 -9897 9903 9 9849 9843 -9897 9903 10 + 9849 9843 -9897 9903 5 9849 9858 9867 9876 18 + 9849 9858 -9867 9876 19 9849 9858 -9867 9876 20 + 9843 9849 9858 9867 18 9843 9849 -9858 9867 19 + 9843 9849 -9858 9867 20 9843 9897 9903 9909 1 + 9837 9843 9849 9858 6 9837 9843 9897 9900 7 + 9837 9843 9897 9903 14 9837 9843 -9897 9903 15 + 9837 9843 -9897 9903 16 9837 9843 -9897 9903 5 + 9966 9963 9969 9975 1 9963 9969 9975 9981 12 + 9963 9969 -9975 9981 13 9963 9969 -9975 9981 10 + 9963 9969 -9975 9981 5 9963 9969 9975 10005 2 + 9963 9969 -9975 10005 3 9963 9969 -9975 10005 4 + 9963 9969 -9975 10005 5 9924 9915 9909 9963 6 + 9924 9933 9942 9951 6 9915 9909 9963 9966 7 + 9915 9909 9963 9969 8 9915 9909 -9963 9969 9 + 9915 9909 -9963 9969 10 9915 9909 -9963 9969 5 + 9915 9924 9933 9942 18 9915 9924 -9933 9942 19 + 9915 9924 -9933 9942 20 9909 9915 9924 9933 18 + 9909 9915 -9924 9933 19 9909 9915 -9924 9933 20 + 9909 9963 9969 9975 1 9903 9909 9915 9924 6 + 9903 9909 9963 9966 7 9903 9909 9963 9969 14 + 9903 9909 -9963 9969 15 9903 9909 -9963 9969 16 + 9903 9909 -9963 9969 5 10008 10005 10011 10017 1 + 10005 10011 10017 10023 12 10005 10011 -10017 10023 13 + 10005 10011 -10017 10023 10 10005 10011 -10017 10023 5 + 10005 10011 10017 10053 2 10005 10011 -10017 10053 3 + 10005 10011 -10017 10053 4 10005 10011 -10017 10053 5 + 9990 9981 9975 10005 6 9981 9975 10005 10008 7 + 9981 9975 10005 10011 8 9981 9975 -10005 10011 9 + 9981 9975 -10005 10011 10 9981 9975 -10005 10011 5 + 9975 9981 9990 9993 7 9975 9981 9990 9996 8 + 9975 9981 -9990 9996 9 9975 9981 -9990 9996 10 + 9975 9981 -9990 9996 5 9975 10005 10011 10017 1 + 9969 9975 9981 9990 6 9969 9975 10005 10008 7 + 9969 9975 10005 10011 14 9969 9975 -10005 10011 15 + 9969 9975 -10005 10011 16 9969 9975 -10005 10011 5 + 10056 10053 10059 10065 1 10053 10059 10065 10071 12 + 10053 10059 -10065 10071 13 10053 10059 -10065 10071 10 + 10053 10059 -10065 10071 5 10053 10059 10065 10089 2 + 10053 10059 -10065 10089 3 10053 10059 -10065 10089 4 + 10053 10059 -10065 10089 5 10041 10023 10017 10053 6 + 10029 10023 10017 10053 6 10023 10017 10053 10056 7 + 10023 10017 10053 10059 8 10023 10017 -10053 10059 9 + 10023 10017 -10053 10059 10 10023 10017 -10053 10059 5 + 10017 10053 10059 10065 1 10011 10017 10023 10029 6 + 10011 10017 10023 10041 6 10011 10017 10053 10056 7 + 10011 10017 10053 10059 14 10011 10017 -10053 10059 15 + 10011 10017 -10053 10059 16 10011 10017 -10053 10059 5 + 10092 10089 10095 10101 1 10089 10095 10101 10107 12 + 10089 10095 -10101 10107 13 10089 10095 -10101 10107 10 + 10089 10095 -10101 10107 5 10089 10095 10101 10146 2 + 10089 10095 -10101 10146 3 10089 10095 -10101 10146 4 + 10089 10095 -10101 10146 5 10080 10071 10065 10089 6 + 10071 10065 10089 10092 7 10071 10065 10089 10095 8 + 10071 10065 -10089 10095 9 10071 10065 -10089 10095 10 + 10071 10065 -10089 10095 5 10065 10071 10080 10083 7 + 10065 10071 10080 10086 7 10065 10089 10095 10101 1 + 10059 10065 10071 10080 6 10059 10065 10089 10092 7 + 10059 10065 10089 10095 14 10059 10065 -10089 10095 15 + 10059 10065 -10089 10095 16 10059 10065 -10089 10095 5 + 10149 10146 10152 10158 1 10146 10152 10158 10164 12 + 10146 10152 -10158 10164 13 10146 10152 -10158 10164 10 + 10146 10152 -10158 10164 5 10146 10152 10158 10197 2 + 10146 10152 -10158 10197 3 10146 10152 -10158 10197 4 + 10146 10152 -10158 10197 5 10125 10107 10101 10146 6 + 10113 10107 10101 10146 6 10113 10107 10125 10134 18 + 10113 10107 -10125 10134 19 10113 10107 -10125 10134 20 + 10107 10101 10146 10149 7 10107 10101 10146 10152 8 + 10107 10101 -10146 10152 9 10107 10101 -10146 10152 10 + 10107 10101 -10146 10152 5 10101 10107 10125 10134 18 + 10101 10107 -10125 10134 19 10101 10107 -10125 10134 20 + 10101 10146 10152 10158 1 10095 10101 10107 10113 6 + 10095 10101 10107 10125 6 10095 10101 10146 10149 7 + 10095 10101 10146 10152 14 10095 10101 -10146 10152 15 + 10095 10101 -10146 10152 16 10095 10101 -10146 10152 5 + 10200 10197 10203 10209 1 10197 10203 10209 10215 12 + 10197 10203 -10209 10215 13 10197 10203 -10209 10215 10 + 10197 10203 -10209 10215 5 10197 10203 10209 10242 2 + 10197 10203 -10209 10242 3 10197 10203 -10209 10242 4 + 10197 10203 -10209 10242 5 10173 10164 10158 10197 6 + 10164 10158 10197 10200 7 10164 10158 10197 10203 8 + 10164 10158 -10197 10203 9 10164 10158 -10197 10203 10 + 10164 10158 -10197 10203 5 10164 10173 10182 10185 11 + 10158 10164 10173 10182 6 10158 10197 10203 10209 1 + 10152 10158 10164 10173 6 10152 10158 10197 10200 7 + 10152 10158 10197 10203 14 10152 10158 -10197 10203 15 + 10152 10158 -10197 10203 16 10152 10158 -10197 10203 5 + 10245 10242 10248 10254 1 10242 10248 10254 10260 12 + 10242 10248 -10254 10260 13 10242 10248 -10254 10260 10 + 10242 10248 -10254 10260 5 10242 10248 10254 10290 2 + 10242 10248 -10254 10290 3 10242 10248 -10254 10290 4 + 10242 10248 -10254 10290 5 10224 10215 10209 10242 6 + 10215 10209 10242 10245 7 10215 10209 10242 10248 8 + 10215 10209 -10242 10248 9 10215 10209 -10242 10248 10 + 10215 10209 -10242 10248 5 10215 10224 10233 10236 7 + 10215 10224 10233 10239 7 10209 10215 10224 10233 6 + 10209 10242 10248 10254 1 10203 10209 10215 10224 6 + 10203 10209 10242 10245 7 10203 10209 10242 10248 14 + 10203 10209 -10242 10248 15 10203 10209 -10242 10248 16 + 10203 10209 -10242 10248 5 10293 10290 10296 10302 1 + 10290 10296 10302 10311 2 10290 10296 -10302 10311 3 + 10290 10296 -10302 10311 4 10290 10296 -10302 10311 5 + 10278 10260 10254 10290 6 10266 10260 10254 10290 6 + 10260 10254 10290 10293 7 10260 10254 10290 10296 8 + 10260 10254 -10290 10296 9 10260 10254 -10290 10296 10 + 10260 10254 -10290 10296 5 10254 10290 10296 10302 1 + 10248 10254 10260 10266 6 10248 10254 10260 10278 6 + 10248 10254 10290 10293 7 10248 10254 10290 10296 14 + 10248 10254 -10290 10296 15 10248 10254 -10290 10296 16 + 10248 10254 -10290 10296 5 10314 10311 10317 10323 1 + 10311 10317 10323 10329 12 10311 10317 -10323 10329 13 + 10311 10317 -10323 10329 10 10311 10317 -10323 10329 5 + 10311 10317 10323 10353 2 10311 10317 -10323 10353 3 + 10311 10317 -10323 10353 4 10311 10317 -10323 10353 5 + 10302 10311 10317 10323 1 10296 10302 10311 10314 7 + 10296 10302 10311 10317 14 10296 10302 -10311 10317 15 + 10296 10302 -10311 10317 16 10296 10302 -10311 10317 5 + 10356 10353 10359 10365 1 10353 10359 10365 10371 12 + 10353 10359 -10365 10371 13 10353 10359 -10365 10371 10 + 10353 10359 -10365 10371 5 10353 10359 10365 10395 2 + 10353 10359 -10365 10395 3 10353 10359 -10365 10395 4 + 10353 10359 -10365 10395 5 10338 10329 10323 10353 6 + 10329 10323 10353 10356 7 10329 10323 10353 10359 8 + 10329 10323 -10353 10359 9 10329 10323 -10353 10359 10 + 10329 10323 -10353 10359 5 10323 10329 10338 10341 7 + 10323 10329 10338 10344 8 10323 10329 -10338 10344 9 + 10323 10329 -10338 10344 10 10323 10329 -10338 10344 5 + 10323 10353 10359 10365 1 10317 10323 10329 10338 6 + 10317 10323 10353 10356 7 10317 10323 10353 10359 14 + 10317 10323 -10353 10359 15 10317 10323 -10353 10359 16 + 10317 10323 -10353 10359 5 10398 10395 10401 10407 1 + 10395 10401 10407 10413 12 10395 10401 -10407 10413 13 + 10395 10401 -10407 10413 10 10395 10401 -10407 10413 5 + 10395 10401 10407 10443 2 10395 10401 -10407 10443 3 + 10395 10401 -10407 10443 4 10395 10401 -10407 10443 5 + 10389 10371 10365 10395 6 10377 10371 10365 10395 6 + 10371 10365 10395 10398 7 10371 10365 10395 10401 8 + 10371 10365 -10395 10401 9 10371 10365 -10395 10401 10 + 10371 10365 -10395 10401 5 10365 10395 10401 10407 1 + 10359 10365 10371 10377 6 10359 10365 10371 10389 6 + 10359 10365 10395 10398 7 10359 10365 10395 10401 14 + 10359 10365 -10395 10401 15 10359 10365 -10395 10401 16 + 10359 10365 -10395 10401 5 10446 10443 10449 10455 1 + 10443 10449 10455 10461 12 10443 10449 -10455 10461 13 + 10443 10449 -10455 10461 10 10443 10449 -10455 10461 5 + 10443 10449 10455 10473 2 10443 10449 -10455 10473 3 + 10443 10449 -10455 10473 4 10443 10449 -10455 10473 5 + 10431 10413 10407 10443 6 10419 10413 10407 10443 6 + 10413 10407 10443 10446 7 10413 10407 10443 10449 8 + 10413 10407 -10443 10449 9 10413 10407 -10443 10449 10 + 10413 10407 -10443 10449 5 10407 10443 10449 10455 1 + 10401 10407 10413 10419 6 10401 10407 10413 10431 6 + 10401 10407 10443 10446 7 10401 10407 10443 10449 14 + 10401 10407 -10443 10449 15 10401 10407 -10443 10449 16 + 10401 10407 -10443 10449 5 10476 10473 10479 10485 1 + 10473 10479 10485 10491 12 10473 10479 -10485 10491 13 + 10473 10479 -10485 10491 10 10473 10479 -10485 10491 5 + 10473 10479 10485 10533 2 10473 10479 -10485 10533 3 + 10473 10479 -10485 10533 4 10473 10479 -10485 10533 5 + 10461 10455 10473 10476 7 10461 10455 10473 10479 8 + 10461 10455 -10473 10479 9 10461 10455 -10473 10479 10 + 10461 10455 -10473 10479 5 10455 10473 10479 10485 1 + 10449 10455 10473 10476 7 10449 10455 10473 10479 14 + 10449 10455 -10473 10479 15 10449 10455 -10473 10479 16 + 10449 10455 -10473 10479 5 10536 10533 10539 10545 1 + 10533 10539 10545 10551 12 10533 10539 -10545 10551 13 + 10533 10539 -10545 10551 10 10533 10539 -10545 10551 5 + 10533 10539 10545 10590 2 10533 10539 -10545 10590 3 + 10533 10539 -10545 10590 4 10533 10539 -10545 10590 5 + 10509 10503 10500 10527 17 10509 10515 -10521 10527 17 + 10503 10500 10527 10521 17 10503 10509 -10515 10521 17 + 10500 10491 10485 10533 6 10500 10503 10509 10515 17 + 10500 10527 -10521 10515 17 10491 10485 10533 10536 7 + 10491 10485 10533 10539 8 10491 10485 -10533 10539 9 + 10491 10485 -10533 10539 10 10491 10485 -10533 10539 5 + 10491 10500 10503 10509 17 10491 10500 10527 10521 17 + 10485 10491 10500 10503 7 10485 10491 10500 10527 7 + 10485 10533 10539 10545 1 10479 10485 10491 10500 6 + 10479 10485 10533 10536 7 10479 10485 10533 10539 14 + 10479 10485 -10533 10539 15 10479 10485 -10533 10539 16 + 10479 10485 -10533 10539 5 10593 10590 10596 10602 1 + 10590 10596 10602 10608 12 10590 10596 -10602 10608 13 + 10590 10596 -10602 10608 10 10590 10596 -10602 10608 5 + 10590 10596 10602 10623 2 10590 10596 -10602 10623 3 + 10590 10596 -10602 10623 4 10590 10596 -10602 10623 5 + 10560 10551 10545 10590 6 10551 10545 10590 10593 7 + 10551 10545 10590 10596 8 10551 10545 -10590 10596 9 + 10551 10545 -10590 10596 10 10551 10545 -10590 10596 5 + 10545 10551 10560 10566 18 10545 10551 -10560 10566 19 + 10545 10551 -10560 10566 20 10545 10551 10560 10578 18 + 10545 10551 -10560 10578 19 10545 10551 -10560 10578 20 + 10545 10590 10596 10602 1 10539 10545 10551 10560 6 + 10539 10545 10590 10593 7 10539 10545 10590 10596 14 + 10539 10545 -10590 10596 15 10539 10545 -10590 10596 16 + 10539 10545 -10590 10596 5 10626 10623 10629 10635 1 + 10623 10629 10635 10641 12 10623 10629 -10635 10641 13 + 10623 10629 -10635 10641 10 10623 10629 -10635 10641 5 + 10623 10629 10635 10656 2 10623 10629 -10635 10656 3 + 10623 10629 -10635 10656 4 10623 10629 -10635 10656 5 + 10617 10608 10602 10623 6 10608 10602 10623 10626 7 + 10608 10602 10623 10629 8 10608 10602 -10623 10629 9 + 10608 10602 -10623 10629 10 10608 10602 -10623 10629 5 + 10602 10623 10629 10635 1 10596 10602 10608 10617 6 + 10596 10602 10623 10626 7 10596 10602 10623 10629 14 + 10596 10602 -10623 10629 15 10596 10602 -10623 10629 16 + 10596 10602 -10623 10629 5 10659 10656 10662 10668 1 + 10656 10662 10668 10674 12 10656 10662 -10668 10674 13 + 10656 10662 -10668 10674 10 10656 10662 -10668 10674 5 + 10656 10662 10668 10692 2 10656 10662 -10668 10692 3 + 10656 10662 -10668 10692 4 10656 10662 -10668 10692 5 + 10650 10641 10635 10656 6 10641 10635 10656 10659 7 + 10641 10635 10656 10662 8 10641 10635 -10656 10662 9 + 10641 10635 -10656 10662 10 10641 10635 -10656 10662 5 + 10635 10656 10662 10668 1 10629 10635 10641 10650 6 + 10629 10635 10656 10659 7 10629 10635 10656 10662 14 + 10629 10635 -10656 10662 15 10629 10635 -10656 10662 16 + 10629 10635 -10656 10662 5 10695 10692 10698 10704 1 + 10692 10698 10704 10710 12 10692 10698 -10704 10710 13 + 10692 10698 -10704 10710 10 10692 10698 -10704 10710 5 + 10692 10698 10704 10743 2 10692 10698 -10704 10743 3 + 10692 10698 -10704 10743 4 10692 10698 -10704 10743 5 + 10683 10674 10668 10692 6 10674 10668 10692 10695 7 + 10674 10668 10692 10698 8 10674 10668 -10692 10698 9 + 10674 10668 -10692 10698 10 10674 10668 -10692 10698 5 + 10668 10674 10683 10686 7 10668 10674 10683 10689 7 + 10668 10692 10698 10704 1 10662 10668 10674 10683 6 + 10662 10668 10692 10695 7 10662 10668 10692 10698 14 + 10662 10668 -10692 10698 15 10662 10668 -10692 10698 16 + 10662 10668 -10692 10698 5 10746 10743 10749 10755 1 + 10743 10749 10755 10761 12 10743 10749 -10755 10761 13 + 10743 10749 -10755 10761 10 10743 10749 -10755 10761 5 + 10743 10749 10755 10773 2 10743 10749 -10755 10773 3 + 10743 10749 -10755 10773 4 10743 10749 -10755 10773 5 + 10719 10710 10704 10743 6 10710 10704 10743 10746 7 + 10710 10704 10743 10749 8 10710 10704 -10743 10749 9 + 10710 10704 -10743 10749 10 10710 10704 -10743 10749 5 + 10710 10719 10728 10731 11 10704 10710 10719 10728 6 + 10704 10743 10749 10755 1 10698 10704 10710 10719 6 + 10698 10704 10743 10746 7 10698 10704 10743 10749 14 + 10698 10704 -10743 10749 15 10698 10704 -10743 10749 16 + 10698 10704 -10743 10749 5 10776 10773 10779 10785 1 + 10773 10779 10785 10791 12 10773 10779 -10785 10791 13 + 10773 10779 -10785 10791 10 10773 10779 -10785 10791 5 + 10773 10779 10785 10815 2 10773 10779 -10785 10815 3 + 10773 10779 -10785 10815 4 10773 10779 -10785 10815 5 + 10761 10755 10773 10776 7 10761 10755 10773 10779 8 + 10761 10755 -10773 10779 9 10761 10755 -10773 10779 10 + 10761 10755 -10773 10779 5 10755 10773 10779 10785 1 + 10749 10755 10773 10776 7 10749 10755 10773 10779 14 + 10749 10755 -10773 10779 15 10749 10755 -10773 10779 16 + 10749 10755 -10773 10779 5 10818 10815 10821 10827 1 + 10815 10821 10827 10836 2 10815 10821 -10827 10836 3 + 10815 10821 -10827 10836 4 10815 10821 -10827 10836 5 + 10809 10791 10785 10815 6 10797 10791 10785 10815 6 + 10791 10785 10815 10818 7 10791 10785 10815 10821 8 + 10791 10785 -10815 10821 9 10791 10785 -10815 10821 10 + 10791 10785 -10815 10821 5 10785 10815 10821 10827 1 + 10779 10785 10791 10797 6 10779 10785 10791 10809 6 + 10779 10785 10815 10818 7 10779 10785 10815 10821 14 + 10779 10785 -10815 10821 15 10779 10785 -10815 10821 16 + 10779 10785 -10815 10821 5 10839 10836 10842 10848 1 + 10836 10842 10848 10854 12 10836 10842 -10848 10854 13 + 10836 10842 -10848 10854 10 10836 10842 -10848 10854 5 + 10836 10842 10848 10893 2 10836 10842 -10848 10893 3 + 10836 10842 -10848 10893 4 10836 10842 -10848 10893 5 + 10827 10836 10842 10848 1 10821 10827 10836 10839 7 + 10821 10827 10836 10842 14 10821 10827 -10836 10842 15 + 10821 10827 -10836 10842 16 10821 10827 -10836 10842 5 + 10896 10893 10899 10905 1 10893 10899 10905 10911 12 + 10893 10899 -10905 10911 13 10893 10899 -10905 10911 10 + 10893 10899 -10905 10911 5 10893 10899 10905 10935 2 + 10893 10899 -10905 10935 3 10893 10899 -10905 10935 4 + 10893 10899 -10905 10935 5 10872 10854 10848 10893 6 + 10860 10854 10848 10893 6 10860 10854 10872 10881 18 + 10860 10854 -10872 10881 19 10860 10854 -10872 10881 20 + 10854 10848 10893 10896 7 10854 10848 10893 10899 8 + 10854 10848 -10893 10899 9 10854 10848 -10893 10899 10 + 10854 10848 -10893 10899 5 10848 10854 10872 10881 18 + 10848 10854 -10872 10881 19 10848 10854 -10872 10881 20 + 10848 10893 10899 10905 1 10842 10848 10854 10860 6 + 10842 10848 10854 10872 6 10842 10848 10893 10896 7 + 10842 10848 10893 10899 14 10842 10848 -10893 10899 15 + 10842 10848 -10893 10899 16 10842 10848 -10893 10899 5 + 10938 10935 10941 10947 1 10935 10941 10947 10956 2 + 10935 10941 -10947 10956 3 10935 10941 -10947 10956 4 + 10935 10941 -10947 10956 5 10929 10911 10905 10935 6 + 10917 10911 10905 10935 6 10911 10905 10935 10938 7 + 10911 10905 10935 10941 8 10911 10905 -10935 10941 9 + 10911 10905 -10935 10941 10 10911 10905 -10935 10941 5 + 10905 10935 10941 10947 1 10899 10905 10911 10917 6 + 10899 10905 10911 10929 6 10899 10905 10935 10938 7 + 10899 10905 10935 10941 14 10899 10905 -10935 10941 15 + 10899 10905 -10935 10941 16 10899 10905 -10935 10941 5 + 10959 10956 10962 10968 1 10956 10962 10968 10974 12 + 10956 10962 -10968 10974 13 10956 10962 -10968 10974 10 + 10956 10962 -10968 10974 5 10956 10962 10968 11001 2 + 10956 10962 -10968 11001 3 10956 10962 -10968 11001 4 + 10956 10962 -10968 11001 5 10947 10956 10962 10968 1 + 10941 10947 10956 10959 7 10941 10947 10956 10962 14 + 10941 10947 -10956 10962 15 10941 10947 -10956 10962 16 + 10941 10947 -10956 10962 5 11004 11001 11007 11013 1 + 11001 11007 11013 11019 12 11001 11007 -11013 11019 13 + 11001 11007 -11013 11019 10 11001 11007 -11013 11019 5 + 11001 11007 11013 11049 2 11001 11007 -11013 11049 3 + 11001 11007 -11013 11049 4 11001 11007 -11013 11049 5 + 10983 10974 10968 11001 6 10974 10968 11001 11004 7 + 10974 10968 11001 11007 8 10974 10968 -11001 11007 9 + 10974 10968 -11001 11007 10 10974 10968 -11001 11007 5 + 10974 10983 10992 10995 7 10974 10983 10992 10998 7 + 10968 10974 10983 10992 6 10968 11001 11007 11013 1 + 10962 10968 10974 10983 6 10962 10968 11001 11004 7 + 10962 10968 11001 11007 14 10962 10968 -11001 11007 15 + 10962 10968 -11001 11007 16 10962 10968 -11001 11007 5 + 11052 11049 11055 11061 1 11049 11055 11061 11067 12 + 11049 11055 -11061 11067 13 11049 11055 -11061 11067 10 + 11049 11055 -11061 11067 5 11049 11055 11061 11097 2 + 11049 11055 -11061 11097 3 11049 11055 -11061 11097 4 + 11049 11055 -11061 11097 5 11037 11019 11013 11049 6 + 11025 11019 11013 11049 6 11019 11013 11049 11052 7 + 11019 11013 11049 11055 8 11019 11013 -11049 11055 9 + 11019 11013 -11049 11055 10 11019 11013 -11049 11055 5 + 11013 11049 11055 11061 1 11007 11013 11019 11025 6 + 11007 11013 11019 11037 6 11007 11013 11049 11052 7 + 11007 11013 11049 11055 14 11007 11013 -11049 11055 15 + 11007 11013 -11049 11055 16 11007 11013 -11049 11055 5 + 11100 11097 11103 11109 1 11097 11103 11109 11115 12 + 11097 11103 -11109 11115 13 11097 11103 -11109 11115 10 + 11097 11103 -11109 11115 5 11097 11103 11109 11148 2 + 11097 11103 -11109 11148 3 11097 11103 -11109 11148 4 + 11097 11103 -11109 11148 5 11085 11067 11061 11097 6 + 11073 11067 11061 11097 6 11067 11061 11097 11100 7 + 11067 11061 11097 11103 8 11067 11061 -11097 11103 9 + 11067 11061 -11097 11103 10 11067 11061 -11097 11103 5 + 11061 11097 11103 11109 1 11055 11061 11067 11073 6 + 11055 11061 11067 11085 6 11055 11061 11097 11100 7 + 11055 11061 11097 11103 14 11055 11061 -11097 11103 15 + 11055 11061 -11097 11103 16 11055 11061 -11097 11103 5 + 11151 11148 11154 11160 1 11148 11154 11160 11166 12 + 11148 11154 -11160 11166 13 11148 11154 -11160 11166 10 + 11148 11154 -11160 11166 5 11148 11154 11160 11196 2 + 11148 11154 -11160 11196 3 11148 11154 -11160 11196 4 + 11148 11154 -11160 11196 5 11130 11127 -11124 11142 21 + 11127 11124 -11142 11136 22 11127 11130 -11136 11142 23 + 11124 11115 11109 11148 6 11124 11127 -11130 11136 24 + 11124 11142 -11136 11130 25 11115 11109 11148 11151 7 + 11115 11109 11148 11154 8 11115 11109 -11148 11154 9 + 11115 11109 -11148 11154 10 11115 11109 -11148 11154 5 + 11115 11124 11127 11130 21 11115 11124 11142 11136 22 + 11109 11115 11124 11127 7 11109 11115 11124 11142 7 + 11109 11148 11154 11160 1 11103 11109 11115 11124 6 + 11103 11109 11148 11151 7 11103 11109 11148 11154 14 + 11103 11109 -11148 11154 15 11103 11109 -11148 11154 16 + 11103 11109 -11148 11154 5 11199 11196 11202 11208 1 + 11196 11202 11208 11214 12 11196 11202 -11208 11214 13 + 11196 11202 -11208 11214 10 11196 11202 -11208 11214 5 + 11196 11202 11208 11232 2 11196 11202 -11208 11232 3 + 11196 11202 -11208 11232 4 11196 11202 -11208 11232 5 + 11184 11166 11160 11196 6 11172 11166 11160 11196 6 + 11166 11160 11196 11199 7 11166 11160 11196 11202 8 + 11166 11160 -11196 11202 9 11166 11160 -11196 11202 10 + 11166 11160 -11196 11202 5 11160 11196 11202 11208 1 + 11154 11160 11166 11172 6 11154 11160 11166 11184 6 + 11154 11160 11196 11199 7 11154 11160 11196 11202 14 + 11154 11160 -11196 11202 15 11154 11160 -11196 11202 16 + 11154 11160 -11196 11202 5 11235 11232 11238 11244 1 + 11232 11238 11244 11250 12 11232 11238 -11244 11250 13 + 11232 11238 -11244 11250 10 11232 11238 -11244 11250 5 + 11232 11238 11244 11262 2 11232 11238 -11244 11262 3 + 11232 11238 -11244 11262 4 11232 11238 -11244 11262 5 + 11223 11214 11208 11232 6 11214 11208 11232 11235 7 + 11214 11208 11232 11238 8 11214 11208 -11232 11238 9 + 11214 11208 -11232 11238 10 11214 11208 -11232 11238 5 + 11208 11214 11223 11226 7 11208 11214 11223 11229 7 + 11208 11232 11238 11244 1 11202 11208 11214 11223 6 + 11202 11208 11232 11235 7 11202 11208 11232 11238 14 + 11202 11208 -11232 11238 15 11202 11208 -11232 11238 16 + 11202 11208 -11232 11238 5 11265 11262 11268 11274 1 + 11262 11268 11274 11283 2 11262 11268 -11274 11283 3 + 11262 11268 -11274 11283 4 11262 11268 -11274 11283 5 + 11250 11244 11262 11265 7 11250 11244 11262 11268 8 + 11250 11244 -11262 11268 9 11250 11244 -11262 11268 10 + 11250 11244 -11262 11268 5 11244 11262 11268 11274 1 + 11238 11244 11262 11265 7 11238 11244 11262 11268 14 + 11238 11244 -11262 11268 15 11238 11244 -11262 11268 16 + 11238 11244 -11262 11268 5 11286 11283 11289 11295 1 + 11283 11289 11295 11301 12 11283 11289 -11295 11301 13 + 11283 11289 -11295 11301 10 11283 11289 -11295 11301 5 + 11283 11289 11295 11346 2 11283 11289 -11295 11346 3 + 11283 11289 -11295 11346 4 11283 11289 -11295 11346 5 + 11274 11283 11289 11295 1 11268 11274 11283 11286 7 + 11268 11274 11283 11289 14 11268 11274 -11283 11289 15 + 11268 11274 -11283 11289 16 11268 11274 -11283 11289 5 + 11349 11346 11352 11358 1 11346 11352 11358 11364 12 + 11346 11352 -11358 11364 13 11346 11352 -11358 11364 10 + 11346 11352 -11358 11364 5 11346 11352 11358 11397 2 + 11346 11352 -11358 11397 3 11346 11352 -11358 11397 4 + 11346 11352 -11358 11397 5 11328 11325 11334 11340 17 + 11319 11313 11310 11340 17 11319 11325 -11334 11340 17 + 11313 11310 11340 11334 17 11313 11319 11325 11328 17 + 11313 11319 -11325 11334 17 11310 11301 11295 11346 6 + 11310 11313 11319 11325 17 11310 11340 -11334 11325 17 + 11301 11295 11346 11349 7 11301 11295 11346 11352 8 + 11301 11295 -11346 11352 9 11301 11295 -11346 11352 10 + 11301 11295 -11346 11352 5 11301 11310 11313 11319 17 + 11301 11310 11340 11334 17 11295 11301 11310 11313 7 + 11295 11301 11310 11340 7 11295 11346 11352 11358 1 + 11289 11295 11301 11310 6 11289 11295 11346 11349 7 + 11289 11295 11346 11352 14 11289 11295 -11346 11352 15 + 11289 11295 -11346 11352 16 11289 11295 -11346 11352 5 + 11400 11397 11403 11409 1 11397 11403 11409 11415 12 + 11397 11403 -11409 11415 13 11397 11403 -11409 11415 10 + 11397 11403 -11409 11415 5 11397 11403 11409 11430 2 + 11397 11403 -11409 11430 3 11397 11403 -11409 11430 4 + 11397 11403 -11409 11430 5 11379 11376 -11373 11391 21 + 11376 11373 -11391 11385 22 11376 11379 -11385 11391 23 + 11373 11364 11358 11397 6 11373 11376 -11379 11385 24 + 11373 11391 -11385 11379 25 11364 11358 11397 11400 7 + 11364 11358 11397 11403 8 11364 11358 -11397 11403 9 + 11364 11358 -11397 11403 10 11364 11358 -11397 11403 5 + 11364 11373 11376 11379 21 11364 11373 11391 11385 22 + 11358 11364 11373 11376 7 11358 11364 11373 11391 7 + 11358 11397 11403 11409 1 11352 11358 11364 11373 6 + 11352 11358 11397 11400 7 11352 11358 11397 11403 14 + 11352 11358 -11397 11403 15 11352 11358 -11397 11403 16 + 11352 11358 -11397 11403 5 11433 11430 11436 11442 1 + 11430 11436 11442 11448 12 11430 11436 -11442 11448 13 + 11430 11436 -11442 11448 10 11430 11436 -11442 11448 5 + 11430 11436 11442 11478 2 11430 11436 -11442 11478 3 + 11430 11436 -11442 11478 4 11430 11436 -11442 11478 5 + 11424 11415 11409 11430 6 11415 11409 11430 11433 7 + 11415 11409 11430 11436 8 11415 11409 -11430 11436 9 + 11415 11409 -11430 11436 10 11415 11409 -11430 11436 5 + 11409 11430 11436 11442 1 11403 11409 11415 11424 6 + 11403 11409 11430 11433 7 11403 11409 11430 11436 14 + 11403 11409 -11430 11436 15 11403 11409 -11430 11436 16 + 11403 11409 -11430 11436 5 11481 11478 11484 11490 1 + 11478 11484 11490 11496 12 11478 11484 -11490 11496 13 + 11478 11484 -11490 11496 10 11478 11484 -11490 11496 5 + 11478 11484 11490 11511 2 11478 11484 -11490 11511 3 + 11478 11484 -11490 11511 4 11478 11484 -11490 11511 5 + 11466 11448 11442 11478 6 11454 11448 11442 11478 6 + 11448 11442 11478 11481 7 11448 11442 11478 11484 8 + 11448 11442 -11478 11484 9 11448 11442 -11478 11484 10 + 11448 11442 -11478 11484 5 11442 11478 11484 11490 1 + 11436 11442 11448 11454 6 11436 11442 11448 11466 6 + 11436 11442 11478 11481 7 11436 11442 11478 11484 14 + 11436 11442 -11478 11484 15 11436 11442 -11478 11484 16 + 11436 11442 -11478 11484 5 11514 11511 11517 11523 1 + 11511 11517 11523 11529 12 11511 11517 -11523 11529 13 + 11511 11517 -11523 11529 10 11511 11517 -11523 11529 5 + 11511 11517 11523 11562 2 11511 11517 -11523 11562 3 + 11511 11517 -11523 11562 4 11511 11517 -11523 11562 5 + 11505 11496 11490 11511 6 11496 11490 11511 11514 7 + 11496 11490 11511 11517 8 11496 11490 -11511 11517 9 + 11496 11490 -11511 11517 10 11496 11490 -11511 11517 5 + 11490 11511 11517 11523 1 11484 11490 11496 11505 6 + 11484 11490 11511 11514 7 11484 11490 11511 11517 14 + 11484 11490 -11511 11517 15 11484 11490 -11511 11517 16 + 11484 11490 -11511 11517 5 11565 11562 11568 11574 1 + 11562 11568 11574 11583 2 11562 11568 -11574 11583 3 + 11562 11568 -11574 11583 4 11562 11568 -11574 11583 5 + 11538 11529 11523 11562 6 11529 11523 11562 11565 7 + 11529 11523 11562 11568 8 11529 11523 -11562 11568 9 + 11529 11523 -11562 11568 10 11529 11523 -11562 11568 5 + 11529 11538 11547 11550 11 11523 11529 11538 11547 6 + 11523 11562 11568 11574 1 11517 11523 11529 11538 6 + 11517 11523 11562 11565 7 11517 11523 11562 11568 14 + 11517 11523 -11562 11568 15 11517 11523 -11562 11568 16 + 11517 11523 -11562 11568 5 11586 11583 11589 11595 1 + 11583 11589 11595 11601 12 11583 11589 -11595 11601 13 + 11583 11589 -11595 11601 10 11583 11589 -11595 11601 5 + 11583 11589 11595 11625 2 11583 11589 -11595 11625 3 + 11583 11589 -11595 11625 4 11583 11589 -11595 11625 5 + 11574 11583 11589 11595 1 11568 11574 11583 11586 7 + 11568 11574 11583 11589 14 11568 11574 -11583 11589 15 + 11568 11574 -11583 11589 16 11568 11574 -11583 11589 5 + 11628 11625 11631 11637 1 11625 11631 11637 11643 12 + 11625 11631 -11637 11643 13 11625 11631 -11637 11643 10 + 11625 11631 -11637 11643 5 11625 11631 11637 11673 2 + 11625 11631 -11637 11673 3 11625 11631 -11637 11673 4 + 11625 11631 -11637 11673 5 11610 11601 11595 11625 6 + 11601 11595 11625 11628 7 11601 11595 11625 11631 8 + 11601 11595 -11625 11631 9 11601 11595 -11625 11631 10 + 11601 11595 -11625 11631 5 11595 11601 11610 11613 7 + 11595 11601 11610 11616 8 11595 11601 -11610 11616 9 + 11595 11601 -11610 11616 10 11595 11601 -11610 11616 5 + 11595 11625 11631 11637 1 11589 11595 11601 11610 6 + 11589 11595 11625 11628 7 11589 11595 11625 11631 14 + 11589 11595 -11625 11631 15 11589 11595 -11625 11631 16 + 11589 11595 -11625 11631 5 11676 11673 11679 11685 1 + 11673 11679 11685 11691 12 11673 11679 -11685 11691 13 + 11673 11679 -11685 11691 10 11673 11679 -11685 11691 5 + 11673 11679 11685 11730 2 11673 11679 -11685 11730 3 + 11673 11679 -11685 11730 4 11673 11679 -11685 11730 5 + 11661 11643 11637 11673 6 11649 11643 11637 11673 6 + 11643 11637 11673 11676 7 11643 11637 11673 11679 8 + 11643 11637 -11673 11679 9 11643 11637 -11673 11679 10 + 11643 11637 -11673 11679 5 11637 11673 11679 11685 1 + 11631 11637 11643 11649 6 11631 11637 11643 11661 6 + 11631 11637 11673 11676 7 11631 11637 11673 11679 14 + 11631 11637 -11673 11679 15 11631 11637 -11673 11679 16 + 11631 11637 -11673 11679 5 11733 11730 11736 11742 1 + 11730 11736 11742 11748 12 11730 11736 -11742 11748 13 + 11730 11736 -11742 11748 10 11730 11736 -11742 11748 5 + 11730 11736 11742 11787 2 11730 11736 -11742 11787 3 + 11730 11736 -11742 11787 4 11730 11736 -11742 11787 5 + 11700 11691 11685 11730 6 11691 11685 11730 11733 7 + 11691 11685 11730 11736 8 11691 11685 -11730 11736 9 + 11691 11685 -11730 11736 10 11691 11685 -11730 11736 5 + 11685 11691 11700 11706 18 11685 11691 -11700 11706 19 + 11685 11691 -11700 11706 20 11685 11691 11700 11718 18 + 11685 11691 -11700 11718 19 11685 11691 -11700 11718 20 + 11685 11730 11736 11742 1 11679 11685 11691 11700 6 + 11679 11685 11730 11733 7 11679 11685 11730 11736 14 + 11679 11685 -11730 11736 15 11679 11685 -11730 11736 16 + 11679 11685 -11730 11736 5 11790 11787 11793 11799 1 + 11787 11793 11799 11805 12 11787 11793 -11799 11805 13 + 11787 11793 -11799 11805 10 11787 11793 -11799 11805 5 + 11787 11793 11799 11832 2 11787 11793 -11799 11832 3 + 11787 11793 -11799 11832 4 11787 11793 -11799 11832 5 + 11757 11748 11742 11787 6 11748 11742 11787 11790 7 + 11748 11742 11787 11793 8 11748 11742 -11787 11793 9 + 11748 11742 -11787 11793 10 11748 11742 -11787 11793 5 + 11742 11748 11757 11763 18 11742 11748 -11757 11763 19 + 11742 11748 -11757 11763 20 11742 11748 11757 11775 18 + 11742 11748 -11757 11775 19 11742 11748 -11757 11775 20 + 11742 11787 11793 11799 1 11736 11742 11748 11757 6 + 11736 11742 11787 11790 7 11736 11742 11787 11793 14 + 11736 11742 -11787 11793 15 11736 11742 -11787 11793 16 + 11736 11742 -11787 11793 5 11835 11832 11838 11844 1 + 11832 11838 11844 11850 12 11832 11838 -11844 11850 13 + 11832 11838 -11844 11850 10 11832 11838 -11844 11850 5 + 11832 11838 11844 11883 2 11832 11838 -11844 11883 3 + 11832 11838 -11844 11883 4 11832 11838 -11844 11883 5 + 11814 11805 11799 11832 6 11805 11799 11832 11835 7 + 11805 11799 11832 11838 8 11805 11799 -11832 11838 9 + 11805 11799 -11832 11838 10 11805 11799 -11832 11838 5 + 11805 11814 11823 11826 7 11805 11814 11823 11829 7 + 11799 11805 11814 11823 6 11799 11832 11838 11844 1 + 11793 11799 11805 11814 6 11793 11799 11832 11835 7 + 11793 11799 11832 11838 14 11793 11799 -11832 11838 15 + 11793 11799 -11832 11838 16 11793 11799 -11832 11838 5 + 11886 11883 11889 11895 1 11883 11889 11895 11901 12 + 11883 11889 -11895 11901 13 11883 11889 -11895 11901 10 + 11883 11889 -11895 11901 5 11883 11889 11895 11934 2 + 11883 11889 -11895 11934 3 11883 11889 -11895 11934 4 + 11883 11889 -11895 11934 5 11865 11862 -11859 11877 21 + 11862 11859 -11877 11871 22 11862 11865 -11871 11877 23 + 11859 11850 11844 11883 6 11859 11862 -11865 11871 24 + 11859 11877 -11871 11865 25 11850 11844 11883 11886 7 + 11850 11844 11883 11889 8 11850 11844 -11883 11889 9 + 11850 11844 -11883 11889 10 11850 11844 -11883 11889 5 + 11850 11859 11862 11865 21 11850 11859 11877 11871 22 + 11844 11850 11859 11862 7 11844 11850 11859 11877 7 + 11844 11883 11889 11895 1 11838 11844 11850 11859 6 + 11838 11844 11883 11886 7 11838 11844 11883 11889 14 + 11838 11844 -11883 11889 15 11838 11844 -11883 11889 16 + 11838 11844 -11883 11889 5 11937 11934 11940 11946 1 + 11934 11940 11946 11952 12 11934 11940 -11946 11952 13 + 11934 11940 -11946 11952 10 11934 11940 -11946 11952 5 + 11934 11940 11946 11985 2 11934 11940 -11946 11985 3 + 11934 11940 -11946 11985 4 11934 11940 -11946 11985 5 + 11916 11913 -11910 11928 21 11913 11910 -11928 11922 22 + 11913 11916 -11922 11928 23 11910 11901 11895 11934 6 + 11910 11913 -11916 11922 24 11910 11928 -11922 11916 25 + 11901 11895 11934 11937 7 11901 11895 11934 11940 8 + 11901 11895 -11934 11940 9 11901 11895 -11934 11940 10 + 11901 11895 -11934 11940 5 11901 11910 11913 11916 21 + 11901 11910 11928 11922 22 11895 11901 11910 11913 7 + 11895 11901 11910 11928 7 11895 11934 11940 11946 1 + 11889 11895 11901 11910 6 11889 11895 11934 11937 7 + 11889 11895 11934 11940 14 11889 11895 -11934 11940 15 + 11889 11895 -11934 11940 16 11889 11895 -11934 11940 5 + 11988 11985 11991 11997 1 11985 11991 11997 12003 12 + 11985 11991 -11997 12003 13 11985 11991 -11997 12003 10 + 11985 11991 -11997 12003 5 11985 11991 11997 12036 2 + 11985 11991 -11997 12036 3 11985 11991 -11997 12036 4 + 11985 11991 -11997 12036 5 11967 11964 -11961 11979 21 + 11964 11961 -11979 11973 22 11964 11967 -11973 11979 23 + 11961 11952 11946 11985 6 11961 11964 -11967 11973 24 + 11961 11979 -11973 11967 25 11952 11946 11985 11988 7 + 11952 11946 11985 11991 8 11952 11946 -11985 11991 9 + 11952 11946 -11985 11991 10 11952 11946 -11985 11991 5 + 11952 11961 11964 11967 21 11952 11961 11979 11973 22 + 11946 11952 11961 11964 7 11946 11952 11961 11979 7 + 11946 11985 11991 11997 1 11940 11946 11952 11961 6 + 11940 11946 11985 11988 7 11940 11946 11985 11991 14 + 11940 11946 -11985 11991 15 11940 11946 -11985 11991 16 + 11940 11946 -11985 11991 5 12039 12036 12042 12048 1 + 12036 12042 12048 12054 12 12036 12042 -12048 12054 13 + 12036 12042 -12048 12054 10 12036 12042 -12048 12054 5 + 12036 12042 12048 12087 2 12036 12042 -12048 12087 3 + 12036 12042 -12048 12087 4 12036 12042 -12048 12087 5 + 12018 12015 -12012 12030 21 12015 12012 -12030 12024 22 + 12015 12018 -12024 12030 23 12012 12003 11997 12036 6 + 12012 12015 -12018 12024 24 12012 12030 -12024 12018 25 + 12003 11997 12036 12039 7 12003 11997 12036 12042 8 + 12003 11997 -12036 12042 9 12003 11997 -12036 12042 10 + 12003 11997 -12036 12042 5 12003 12012 12015 12018 21 + 12003 12012 12030 12024 22 11997 12003 12012 12015 7 + 11997 12003 12012 12030 7 11997 12036 12042 12048 1 + 11991 11997 12003 12012 6 11991 11997 12036 12039 7 + 11991 11997 12036 12042 14 11991 11997 -12036 12042 15 + 11991 11997 -12036 12042 16 11991 11997 -12036 12042 5 + 12090 12087 12093 12099 1 12087 12093 12099 12105 12 + 12087 12093 -12099 12105 13 12087 12093 -12099 12105 10 + 12087 12093 -12099 12105 5 12087 12093 12099 12138 2 + 12087 12093 -12099 12138 3 12087 12093 -12099 12138 4 + 12087 12093 -12099 12138 5 12069 12066 -12063 12081 21 + 12066 12063 -12081 12075 22 12066 12069 -12075 12081 23 + 12063 12054 12048 12087 6 12063 12066 -12069 12075 24 + 12063 12081 -12075 12069 25 12054 12048 12087 12090 7 + 12054 12048 12087 12093 8 12054 12048 -12087 12093 9 + 12054 12048 -12087 12093 10 12054 12048 -12087 12093 5 + 12054 12063 12066 12069 21 12054 12063 12081 12075 22 + 12048 12054 12063 12066 7 12048 12054 12063 12081 7 + 12048 12087 12093 12099 1 12042 12048 12054 12063 6 + 12042 12048 12087 12090 7 12042 12048 12087 12093 14 + 12042 12048 -12087 12093 15 12042 12048 -12087 12093 16 + 12042 12048 -12087 12093 5 12120 12117 -12114 12132 21 + 12117 12114 -12132 12126 22 12117 12120 -12126 12132 23 + 12114 12105 12099 12138 6 12114 12117 -12120 12126 24 + 12114 12132 -12126 12120 25 12105 12099 12138 12141 7 + 12105 12099 12138 12144 7 12105 12114 12117 12120 21 + 12105 12114 12132 12126 22 12099 12105 12114 12117 7 + 12099 12105 12114 12132 7 12093 12099 12105 12114 6 + 12093 12099 12138 12141 7 12093 12099 12138 12144 7 + 12 57 -51 -54 32 63 78 -72 -75 32 + 84 138 -132 -135 32 102 126 -99 -90 33 + 144 195 -189 -192 32 201 225 -219 -222 32 + 231 246 -240 -243 32 252 312 -306 -309 32 + 318 378 -372 -375 32 384 435 -429 -432 32 + 441 492 -486 -489 32 498 549 -543 -546 32 + 555 591 -585 -588 32 597 612 -606 -609 32 + 618 669 -663 -666 32 675 726 -720 -723 32 + 732 759 -753 -756 32 765 801 -795 -798 32 + 771 786 -780 -783 32 807 867 -861 -864 32 + 873 900 -894 -897 32 906 957 -951 -954 32 + 963 987 -981 -984 32 993 1050 -1044 -1047 32 + 1017 1032 -1023 -1026 33 1011 1038 -1008 -999 33 + 1056 1071 -1065 -1068 32 1077 1128 -1122 -1125 32 + 1134 1158 -1152 -1155 32 1164 1224 -1218 -1221 32 + 1230 1254 -1248 -1251 32 1260 1305 -1299 -1302 32 + 1311 1356 -1350 -1353 32 1317 1344 -1326 -1329 33 + 1362 1428 -1422 -1425 32 1395 1404 -1401 -1413 32 + 1434 1473 -1467 -1470 32 1449 1461 -1458 -1464 32 + 1479 1494 -1488 -1491 32 1500 1524 -1518 -1521 32 + 1530 1569 -1563 -1566 32 1545 1557 -1554 -1560 32 + 1575 1626 -1620 -1623 32 1632 1656 -1650 -1653 32 + 1662 1716 -1710 -1713 32 1680 1704 -1677 -1668 33 + 1722 1758 -1752 -1755 32 1764 1821 -1815 -1818 32 + 1788 1803 -1794 -1797 33 1782 1809 -1779 -1770 33 + 1827 1869 -1863 -1866 32 1875 1890 -1884 -1887 32 + 1896 1941 -1935 -1938 32 1911 1926 -1920 -1923 32 + 1947 2001 -1995 -1998 32 1965 1989 -1962 -1953 33 + 2007 2067 -2061 -2064 32 2073 2103 -2097 -2100 32 + 2079 2091 -2088 -2094 32 2109 2175 -2169 -2172 32 + 2142 2151 -2148 -2160 32 2181 2223 -2217 -2220 32 + 2229 2268 -2262 -2265 32 2244 2256 -2253 -2259 32 + 2274 2334 -2328 -2331 32 2340 2391 -2385 -2388 32 + 2397 2424 -2418 -2421 32 2430 2454 -2448 -2451 32 + 2460 2499 -2493 -2496 32 2475 2487 -2484 -2490 32 + 2505 2559 -2553 -2556 32 2523 2547 -2520 -2511 33 + 2565 2601 -2595 -2598 32 2571 2586 -2580 -2583 32 + 2631 2643 -2637 -2640 32 2595 2604 -2601 -2631 34 + 2649 2673 -2667 -2670 32 2679 2703 -2697 -2700 32 + 2709 2751 -2745 -2748 32 2757 2808 -2802 -2805 32 + 2838 2850 -2844 -2847 32 2802 2811 -2808 -2838 34 + 2856 2883 -2877 -2880 32 2889 2919 -2913 -2916 32 + 2895 2907 -2904 -2910 32 2925 2967 -2961 -2964 32 + 2973 3024 -3018 -3021 32 3030 3057 -3051 -3054 32 + 3063 3093 -3087 -3090 32 3069 3081 -3078 -3084 32 + 3099 3144 -3138 -3141 32 3114 3129 -3123 -3126 32 + 3150 3189 -3183 -3186 32 3165 3177 -3174 -3180 32 + 3195 3246 -3240 -3243 32 3252 3312 -3306 -3309 32 + 3318 3348 -3342 -3345 32 3324 3336 -3333 -3339 32 + 3354 3405 -3399 -3402 32 3411 3465 -3459 -3462 32 + 3429 3453 -3426 -3417 33 3471 3513 -3507 -3510 32 + 3519 3558 -3552 -3555 32 3534 3546 -3543 -3549 32 + 3564 3615 -3609 -3612 32 3621 3636 -3630 -3633 32 + 3642 3702 -3696 -3699 32 3708 3750 -3744 -3747 32 + 3756 3822 -3816 -3819 32 3813 3762 -3771 -3774 33 + 3828 3858 -3852 -3855 32 3834 3846 -3843 -3849 32 + 3864 3879 -3873 -3876 32 3885 3936 -3930 -3933 32 + 3942 3972 -3966 -3969 32 3948 3960 -3957 -3963 32 + 3978 4002 -3996 -3999 32 4008 4059 -4053 -4056 32 + 4065 4107 -4101 -4104 32 4113 4158 -4152 -4155 32 + 4119 4146 -4128 -4131 33 4164 4191 -4185 -4188 32 + 4197 4248 -4242 -4245 32 4254 4278 -4272 -4275 32 + 4284 4338 -4332 -4335 32 4302 4326 -4299 -4290 33 + 4344 4368 -4362 -4365 32 4398 4410 -4404 -4407 32 + 4362 4371 -4368 -4398 34 4416 4482 -4476 -4479 32 + 4449 4458 -4455 -4467 32 4488 4518 -4512 -4515 32 + 4494 4506 -4503 -4509 32 4524 4569 -4563 -4566 32 + 4539 4554 -4548 -4551 32 4575 4626 -4620 -4623 32 + 4632 4671 -4665 -4668 32 4647 4659 -4656 -4662 32 + 4677 4692 -4686 -4689 32 4698 4734 -4728 -4731 32 + 4704 4719 -4713 -4716 32 4740 4794 -4788 -4791 32 + 4758 4782 -4755 -4746 33 4800 4851 -4845 -4848 32 + 4857 4887 -4881 -4884 32 4863 4875 -4872 -4878 32 + 4893 4920 -4914 -4917 32 4926 4968 -4962 -4965 32 + 4974 5010 -5004 -5007 32 5016 5082 -5076 -5079 32 + 5049 5058 -5055 -5067 32 5088 5127 -5121 -5124 32 + 5103 5115 -5112 -5118 32 5133 5148 -5142 -5145 32 + 5154 5208 -5202 -5205 32 5172 5196 -5169 -5160 33 + 5214 5241 -5235 -5238 32 5247 5298 -5292 -5295 32 + 5304 5328 -5322 -5325 32 5334 5379 -5373 -5376 32 + 5340 5367 -5349 -5352 33 5385 5415 -5409 -5412 32 + 5391 5403 -5400 -5406 32 5421 5472 -5466 -5469 32 + 5478 5505 -5499 -5502 32 5511 5535 -5529 -5532 32 + 5541 5598 -5592 -5595 32 5565 5580 -5571 -5574 33 + 5559 5586 -5556 -5547 33 5604 5631 -5625 -5628 32 + 5637 5691 -5685 -5688 32 5655 5679 -5652 -5643 33 + 5697 5721 -5715 -5718 32 5727 5751 -5745 -5748 32 + 5757 5808 -5802 -5805 32 5814 5838 -5832 -5835 32 + 5844 5904 -5898 -5901 32 5910 5949 -5943 -5946 32 + 5925 5937 -5934 -5940 32 5955 5970 -5964 -5967 32 + 5976 6042 -6036 -6039 32 6009 6018 -6015 -6027 32 + 6048 6075 -6069 -6072 32 6081 6126 -6120 -6123 32 + 6132 6177 -6171 -6174 32 6183 6243 -6237 -6240 32 + 6249 6285 -6279 -6282 32 6255 6270 -6264 -6267 32 + 6291 6357 -6351 -6354 32 6324 6333 -6330 -6342 32 + 6363 6399 -6393 -6396 32 6369 6384 -6378 -6381 32 + 6405 6429 -6423 -6426 32 6435 6462 -6456 -6459 32 + 6468 6513 -6507 -6510 32 6519 6561 -6555 -6558 32 + 6567 6591 -6585 -6588 32 6597 6648 -6642 -6645 32 + 6654 6690 -6684 -6687 32 6696 6753 -6747 -6750 32 + 6720 6735 -6726 -6729 33 6714 6741 -6711 -6702 33 + 6759 6810 -6804 -6807 32 6816 6831 -6825 -6828 32 + 6837 6861 -6855 -6858 32 6867 6906 -6900 -6903 32 + 6882 6894 -6891 -6897 32 6912 6972 -6966 -6969 32 + 6978 7002 -6996 -6999 32 7008 7053 -7047 -7050 32 + 7083 7095 -7089 -7092 32 7047 7056 -7053 -7083 34 + 7101 7128 -7122 -7125 32 7134 7191 -7185 -7188 32 + 7158 7173 -7164 -7167 33 7152 7179 -7149 -7140 33 + 7197 7233 -7227 -7230 32 7203 7218 -7212 -7215 32 + 7239 7275 -7269 -7272 32 7281 7326 -7320 -7323 32 + 7332 7347 -7341 -7344 32 7353 7395 -7389 -7392 32 + 7401 7425 -7419 -7422 32 7431 7491 -7485 -7488 32 + 7497 7521 -7515 -7518 32 7527 7554 -7548 -7551 32 + 7560 7611 -7605 -7608 32 7617 7656 -7650 -7653 32 + 7632 7644 -7641 -7647 32 7662 7686 -7680 -7683 32 + 7692 7728 -7722 -7725 32 7734 7776 -7770 -7773 32 + 7782 7848 -7842 -7845 32 7815 7824 -7821 -7833 32 + 7854 7911 -7905 -7908 32 7878 7893 -7884 -7887 33 + 7872 7899 -7869 -7860 33 7917 7953 -7947 -7950 32 + 7959 7983 -7977 -7980 32 7989 8040 -8034 -8037 32 + 8046 8070 -8064 -8067 32 8076 8127 -8121 -8124 32 + 8133 8148 -8142 -8145 32 8154 8193 -8187 -8190 32 + 8169 8181 -8178 -8184 32 8199 8229 -8223 -8226 32 + 8205 8217 -8214 -8220 32 8235 8250 -8244 -8247 32 + 8256 8307 -8301 -8304 32 8313 8373 -8367 -8370 32 + 8379 8421 -8415 -8418 32 8427 8463 -8457 -8460 32 + 8433 8448 -8442 -8445 32 8469 8493 -8487 -8490 32 + 8499 8541 -8535 -8538 32 8547 8574 -8568 -8571 32 + 8580 8604 -8598 -8601 32 8610 8625 -8619 -8622 32 + 8655 8667 -8661 -8664 32 8619 8628 -8625 -8655 34 + 8673 8724 -8718 -8721 32 8730 8790 -8784 -8787 32 + 8796 8832 -8826 -8829 32 8838 8889 -8883 -8886 32 + 8895 8919 -8913 -8916 32 8925 8949 -8943 -8946 32 + 8955 8982 -8976 -8979 32 8988 9003 -8997 -9000 32 + 9009 9060 -9054 -9057 32 9066 9093 -9087 -9090 32 + 9099 9135 -9129 -9132 32 9105 9120 -9114 -9117 32 + 9141 9195 -9189 -9192 32 9159 9183 -9156 -9147 33 + 9201 9261 -9255 -9258 32 9267 9327 -9321 -9324 32 + 9333 9378 -9372 -9375 32 9384 9435 -9429 -9432 32 + 9441 9471 -9465 -9468 32 9447 9459 -9456 -9462 32 + 9477 9534 -9528 -9531 32 9501 9516 -9507 -9510 33 + 9495 9522 -9492 -9483 33 9540 9576 -9570 -9573 32 + 9546 9561 -9555 -9558 32 9582 9606 -9600 -9603 32 + 9612 9657 -9651 -9654 32 9663 9705 -9699 -9702 32 + 9711 9738 -9732 -9735 32 9768 9780 -9774 -9777 32 + 9732 9741 -9738 -9768 34 9786 9837 -9831 -9834 32 + 9843 9903 -9897 -9900 32 9909 9969 -9963 -9966 32 + 9975 10011 -10005 -10008 32 9981 9996 -9990 -9993 32 + 10017 10059 -10053 -10056 32 10065 10095 -10089 -10092 32 + 10071 10083 -10080 -10086 32 10101 10152 -10146 -10149 32 + 10158 10203 -10197 -10200 32 10209 10248 -10242 -10245 32 + 10224 10236 -10233 -10239 32 10254 10296 -10290 -10293 32 + 10302 10317 -10311 -10314 32 10323 10359 -10353 -10356 32 + 10329 10344 -10338 -10341 32 10365 10401 -10395 -10398 32 + 10407 10449 -10443 -10446 32 10455 10479 -10473 -10476 32 + 10485 10539 -10533 -10536 32 10503 10527 -10500 -10491 33 + 10545 10596 -10590 -10593 32 10602 10629 -10623 -10626 32 + 10635 10662 -10656 -10659 32 10668 10698 -10692 -10695 32 + 10674 10686 -10683 -10689 32 10704 10749 -10743 -10746 32 + 10755 10779 -10773 -10776 32 10785 10821 -10815 -10818 32 + 10827 10842 -10836 -10839 32 10848 10899 -10893 -10896 32 + 10905 10941 -10935 -10938 32 10947 10962 -10956 -10959 32 + 10968 11007 -11001 -11004 32 10983 10995 -10992 -10998 32 + 11013 11055 -11049 -11052 32 11061 11103 -11097 -11100 32 + 11109 11154 -11148 -11151 32 11115 11142 -11124 -11127 33 + 11160 11202 -11196 -11199 32 11208 11238 -11232 -11235 32 + 11214 11226 -11223 -11229 32 11244 11268 -11262 -11265 32 + 11274 11289 -11283 -11286 32 11295 11352 -11346 -11349 32 + 11319 11334 -11325 -11328 33 11313 11340 -11310 -11301 33 + 11358 11403 -11397 -11400 32 11364 11391 -11373 -11376 33 + 11409 11436 -11430 -11433 32 11442 11484 -11478 -11481 32 + 11490 11517 -11511 -11514 32 11523 11568 -11562 -11565 32 + 11574 11589 -11583 -11586 32 11595 11631 -11625 -11628 32 + 11601 11616 -11610 -11613 32 11637 11679 -11673 -11676 32 + 11685 11736 -11730 -11733 32 11742 11793 -11787 -11790 32 + 11799 11838 -11832 -11835 32 11814 11826 -11823 -11829 32 + 11844 11889 -11883 -11886 32 11850 11877 -11859 -11862 33 + 11895 11940 -11934 -11937 32 11901 11928 -11910 -11913 33 + 11946 11991 -11985 -11988 32 11952 11979 -11961 -11964 33 + 11997 12042 -12036 -12039 32 12003 12030 -12012 -12015 33 + 12048 12093 -12087 -12090 32 12054 12081 -12063 -12066 33 + 12099 12141 -12138 -12144 32 12105 12132 -12114 -12117 33 + 12267 12261 12258 12270 35 12264 12261 12258 12270 36 + 12261 12258 12270 12273 27 12258 12255 12252 12276 37 + 12258 12270 -12273 12276 38 12255 12252 12276 12273 37 + 12255 12258 12261 12267 39 12255 12258 -12261 12267 35 + 12255 12258 12261 12264 36 12255 12258 -12270 12273 38 + 12252 12276 12273 12270 40 12252 12255 12258 12261 34 + 12252 12255 -12258 12270 40 12249 12252 12276 12273 34 + 12249 12252 12255 12258 34 12246 12243 12249 12252 6 + 12243 12249 12252 12276 7 12243 12249 12252 12255 7 + 12240 12237 12243 12249 6 12240 12237 12243 12246 41 + 12240 12237 -12243 12246 42 12237 12231 -12234 12249 43 + 12237 12231 -12234 12249 44 12237 12243 12249 12252 6 + 12234 12231 -12237 12243 6 12234 12231 12237 12240 41 + 12234 12231 -12237 12240 42 12234 12249 -12243 12237 6 + 12234 12249 12243 12246 41 12234 12249 -12243 12246 42 + 12234 12249 12252 12276 7 12234 12249 12252 12255 7 + 12231 12234 -12249 12243 43 12231 12234 -12249 12243 44 + 12231 12234 12249 12252 45 12231 12237 -12243 12249 18 + 12231 12237 -12243 12249 19 12231 12237 -12243 12249 20 + 12231 12237 12243 12246 6 12228 12231 12234 12249 43 + 12228 12231 -12234 12249 44 12228 12231 12237 12243 18 + 12228 12231 -12237 12243 19 12228 12231 -12237 12243 20 + 12228 12231 12237 12240 6 12225 12228 12231 12234 41 + 12225 12228 -12231 12234 42 12225 12228 12231 12237 6 + 12222 12216 12225 12228 46 12219 12216 12225 12228 46 + 12216 12225 12228 12231 45 12213 12216 12225 12228 47 + 12213 12216 -12225 12228 46 12201 12195 12192 12210 28 + 12201 12204 -12207 12210 48 12198 12195 12192 12210 28 + 12198 12195 12201 12204 49 12195 12192 12210 12207 50 + 12195 12201 -12204 12207 48 12192 12210 12207 12204 51 + 12192 12195 -12201 12204 49 12189 12186 -12183 12210 52 + 12189 12192 12210 12207 50 12189 12192 12195 12201 28 + 12189 12192 12195 12198 28 12186 12183 -12210 12192 53 + 12186 12183 12210 12207 53 12186 12189 -12192 12210 54 + 12186 12189 12192 12195 54 12183 12186 -12189 12192 55 + 12183 12210 -12192 12189 50 12183 12210 12192 12195 50 + 12183 12210 12207 12204 51 12180 12183 12186 12189 52 + 12180 12183 12210 12192 53 12180 12183 12210 12207 53 + 12177 12174 12180 12183 6 12174 12180 12183 12186 7 + 12174 12180 12183 12210 7 12171 12168 12174 12180 6 + 12171 12168 12174 12177 41 12171 12168 -12174 12177 42 + 12168 12162 -12165 12180 43 12168 12162 -12165 12180 44 + 12168 12174 12180 12183 6 12165 12162 -12168 12174 6 + 12165 12162 12168 12171 41 12165 12162 -12168 12171 42 + 12165 12180 -12174 12168 6 12165 12180 12174 12177 41 + 12165 12180 -12174 12177 42 12165 12180 12183 12186 56 + 12165 12180 -12183 12186 7 12165 12180 12183 12210 7 + 12162 12168 -12174 12180 18 12162 12168 -12174 12180 19 + 12162 12168 -12174 12180 20 12162 12168 12174 12177 6 + 12162 12165 -12180 12174 43 12162 12165 -12180 12174 44 + 12162 12165 12180 12183 57 12162 12165 -12180 12183 44 + 12159 12156 12147 12213 47 12159 12156 -12147 12213 46 + 12159 12162 12168 12174 18 12159 12162 -12168 12174 19 + 12159 12162 -12168 12174 20 12159 12162 12168 12171 6 + 12159 12162 12165 12180 43 12159 12162 -12165 12180 44 + 12156 12147 12213 12216 46 12156 12159 12162 12168 6 + 12156 12159 12162 12165 41 12156 12159 -12162 12165 42 + 12153 12147 12213 12216 46 12153 12147 12156 12159 46 + 12150 12147 12213 12216 46 12150 12147 12156 12159 46 + 12147 12213 12216 12225 46 12147 12213 12216 12219 46 + 12147 12213 12216 12222 46 12147 12156 12159 12162 45 + 12192 12198 -12195 -12201 33 12210 12186 -12183 -12180 34 + 12396 12381 12384 12399 17 12396 12393 12390 12402 17 + 12390 12387 12384 12399 17 12387 12384 12381 12396 17 + 12387 12390 -12393 12396 17 12384 12381 12396 12393 17 + 12384 12387 -12390 12393 17 12384 12387 12390 12402 17 + 12381 12384 12387 12390 17 12381 12396 -12393 12390 17 + 12375 12357 12360 12378 17 12375 12381 12384 12387 17 + 12375 12381 12384 12399 17 12375 12381 12396 12393 17 + 12372 12357 12360 12378 17 12372 12357 12375 12381 58 + 12372 12369 12366 12405 17 12369 12372 12357 12375 17 + 12366 12363 12360 12378 17 12363 12360 12357 12372 17 + 12363 12360 12357 12375 17 12363 12366 -12369 12372 17 + 12360 12357 12372 12369 17 12360 12357 12375 12381 58 + 12360 12363 -12366 12369 17 12360 12363 12366 12405 17 + 12357 12360 12363 12366 17 12357 12372 -12369 12366 17 + 12357 12375 12381 12384 58 12357 12375 12381 12396 58 + 12387 12393 -12390 -12402 33 12381 12387 -12384 -12399 33 + 12384 12396 -12381 -12375 33 12363 12369 -12366 -12405 33 + 12357 12363 -12360 -12378 33 12360 12372 -12357 -12375 33 +%FLAG EXCLUDED_ATOMS_LIST +%FORMAT(10I8) + 2 3 4 5 6 7 8 9 10 18 + 19 20 3 4 5 6 7 18 4 5 + 6 7 18 5 6 7 18 6 7 8 + 9 10 11 12 13 18 19 20 21 22 + 7 8 9 10 18 19 20 8 9 10 + 11 12 13 14 18 19 20 9 10 11 + 12 13 18 10 11 12 13 18 11 12 + 13 14 15 16 17 18 12 13 14 13 + 14 14 15 16 17 15 16 17 16 17 + 17 0 19 20 21 22 23 24 25 20 + 21 22 21 22 23 24 25 26 27 22 + 23 24 25 23 24 25 26 27 28 29 + 24 25 26 27 25 26 27 26 27 28 + 29 30 31 45 27 28 29 28 29 30 + 31 32 33 34 45 46 47 29 30 31 + 45 30 31 32 33 34 35 43 45 46 + 47 48 49 31 32 33 34 45 46 47 + 32 33 34 35 36 37 41 43 44 45 + 46 47 33 34 35 43 45 34 35 43 + 45 35 36 37 38 39 41 42 43 44 + 45 36 37 38 39 40 41 43 44 37 + 38 39 43 38 39 40 41 42 43 39 + 40 41 40 41 42 43 44 41 42 43 + 42 43 44 43 44 44 0 46 47 48 + 49 50 51 64 47 48 49 48 49 50 + 51 52 53 54 64 65 66 49 50 51 + 64 50 51 52 53 54 55 56 60 64 + 65 66 67 68 51 52 53 54 64 65 + 66 52 53 54 55 56 57 58 59 60 + 61 62 63 64 65 66 53 54 55 56 + 60 64 54 55 56 60 64 55 56 57 + 58 59 60 61 62 63 64 56 57 58 + 59 60 61 62 63 57 58 59 60 61 + 62 63 58 59 60 59 60 60 61 62 + 63 62 63 63 0 65 66 67 68 69 + 70 74 66 67 68 67 68 69 70 71 + 72 73 74 75 76 68 69 70 74 69 + 70 71 72 73 74 75 76 77 78 70 + 71 72 73 74 75 76 71 72 73 74 + 75 76 72 73 74 73 74 74 75 76 + 77 78 79 80 81 76 77 78 77 78 + 79 80 81 82 83 78 79 80 81 79 + 80 81 82 83 84 85 80 81 82 83 + 81 82 83 82 83 84 85 86 87 103 + 83 84 85 84 85 86 87 88 89 90 + 103 104 105 85 86 87 103 86 87 88 + 89 90 91 92 93 103 104 105 106 107 + 87 88 89 90 103 104 105 88 89 90 + 91 92 93 94 95 96 103 104 105 89 + 90 91 92 93 103 90 91 92 93 103 + 91 92 93 94 95 96 97 98 99 103 + 92 93 94 95 96 93 94 95 96 94 + 95 96 97 98 99 100 101 102 95 96 + 97 98 99 96 97 98 99 97 98 99 + 100 101 102 98 99 100 101 102 99 100 + 101 102 100 101 102 101 102 102 0 104 + 105 106 107 108 109 125 105 106 107 106 + 107 108 109 110 111 112 125 126 127 107 + 108 109 125 108 109 110 111 112 113 114 + 115 125 126 127 128 129 109 110 111 112 + 125 126 127 110 111 112 113 114 115 116 + 117 118 125 126 127 111 112 113 114 115 + 125 112 113 114 115 125 113 114 115 116 + 117 118 119 120 121 125 114 115 116 117 + 118 115 116 117 118 116 117 118 119 120 + 121 122 123 124 117 118 119 120 121 118 + 119 120 121 119 120 121 122 123 124 120 + 121 122 123 124 121 122 123 124 122 123 + 124 123 124 124 0 126 127 128 129 130 + 131 144 127 128 129 128 129 130 131 132 + 133 137 144 145 146 129 130 131 144 130 + 131 132 133 134 135 136 137 138 139 140 + 144 145 146 147 148 131 132 133 137 144 + 145 146 132 133 134 135 136 137 138 139 + 140 141 142 143 144 145 146 133 134 135 + 136 137 138 139 140 144 134 135 136 137 + 138 139 140 144 135 136 137 136 137 137 + 138 139 140 141 142 143 144 139 140 141 + 142 143 140 141 142 143 141 142 143 142 + 143 143 0 145 146 147 148 149 150 163 + 146 147 148 147 148 149 150 151 152 153 + 163 164 165 148 149 150 163 149 150 151 + 152 153 154 155 159 163 164 165 166 167 + 150 151 152 153 163 164 165 151 152 153 + 154 155 156 157 158 159 160 161 162 163 + 164 165 152 153 154 155 159 163 153 154 + 155 159 163 154 155 156 157 158 159 160 + 161 162 163 155 156 157 158 159 160 161 + 162 156 157 158 159 160 161 162 157 158 + 159 158 159 159 160 161 162 161 162 162 + 0 164 165 166 167 168 169 182 165 166 + 167 166 167 168 169 170 171 175 182 183 + 184 167 168 169 182 168 169 170 171 172 + 173 174 175 176 177 178 182 183 184 185 + 186 169 170 171 175 182 183 184 170 171 + 172 173 174 175 176 177 178 179 180 181 + 182 183 184 171 172 173 174 175 176 177 + 178 182 172 173 174 175 176 177 178 182 + 173 174 175 174 175 175 176 177 178 179 + 180 181 182 177 178 179 180 181 178 179 + 180 181 179 180 181 180 181 181 0 183 + 184 185 186 187 188 196 184 185 186 185 + 186 187 188 189 190 194 196 197 198 186 + 187 188 196 187 188 189 190 191 192 193 + 194 195 196 197 198 199 200 188 189 190 + 194 196 197 198 189 190 191 192 193 194 + 195 196 197 198 190 191 192 193 194 195 + 196 191 192 193 194 195 196 192 193 194 + 193 194 194 195 196 0 197 198 199 200 + 201 202 203 198 199 200 199 200 201 202 + 203 204 205 200 201 202 203 201 202 203 + 204 205 206 207 202 203 204 205 203 204 + 205 204 205 206 207 208 209 222 205 206 + 207 206 207 208 209 210 211 212 222 223 + 224 207 208 209 222 208 209 210 211 212 + 213 214 218 222 223 224 225 226 209 210 + 211 212 222 223 224 210 211 212 213 214 + 215 216 217 218 219 220 221 222 223 224 + 211 212 213 214 218 222 212 213 214 218 + 222 213 214 215 216 217 218 219 220 221 + 222 214 215 216 217 218 219 220 221 215 + 216 217 218 219 220 221 216 217 218 217 + 218 218 219 220 221 220 221 221 0 223 + 224 225 226 227 228 241 224 225 226 225 + 226 227 228 229 230 231 241 242 243 226 + 227 228 241 227 228 229 230 231 232 233 + 237 241 242 243 244 245 228 229 230 231 + 241 242 243 229 230 231 232 233 234 235 + 236 237 238 239 240 241 242 243 230 231 + 232 233 237 241 231 232 233 237 241 232 + 233 234 235 236 237 238 239 240 241 233 + 234 235 236 237 238 239 240 234 235 236 + 237 238 239 240 235 236 237 236 237 237 + 238 239 240 239 240 240 0 242 243 244 + 245 246 247 252 243 244 245 244 245 246 + 247 248 249 250 252 253 254 245 246 247 + 252 246 247 248 249 250 251 252 253 254 + 255 256 247 248 249 250 252 253 254 248 + 249 250 251 252 253 254 249 250 251 252 + 250 251 252 251 252 0 253 254 255 256 + 257 258 266 254 255 256 255 256 257 258 + 259 260 261 266 267 268 256 257 258 266 + 257 258 259 260 261 262 263 266 267 268 + 269 270 258 259 260 261 266 267 268 259 + 260 261 262 263 264 265 266 267 268 260 + 261 262 263 266 261 262 263 266 262 263 + 264 265 266 263 264 265 264 265 265 0 + 267 268 269 270 271 272 288 268 269 270 + 269 270 271 272 273 274 275 288 289 290 + 270 271 272 288 271 272 273 274 275 276 + 277 278 288 289 290 291 292 272 273 274 + 275 288 289 290 273 274 275 276 277 278 + 279 280 281 288 289 290 274 275 276 277 + 278 288 275 276 277 278 288 276 277 278 + 279 280 281 282 283 284 288 277 278 279 + 280 281 278 279 280 281 279 280 281 282 + 283 284 285 286 287 280 281 282 283 284 + 281 282 283 284 282 283 284 285 286 287 + 283 284 285 286 287 284 285 286 287 285 + 286 287 286 287 287 0 289 290 291 292 + 293 294 299 290 291 292 291 292 293 294 + 295 296 297 299 300 301 292 293 294 299 + 293 294 295 296 297 298 299 300 301 302 + 303 294 295 296 297 299 300 301 295 296 + 297 298 299 300 301 296 297 298 299 297 + 298 299 298 299 0 300 301 302 303 304 + 305 318 301 302 303 302 303 304 305 306 + 307 311 318 319 320 303 304 305 318 304 + 305 306 307 308 309 310 311 312 313 314 + 318 319 320 321 322 305 306 307 311 318 + 319 320 306 307 308 309 310 311 312 313 + 314 315 316 317 318 319 320 307 308 309 + 310 311 312 313 314 318 308 309 310 311 + 312 313 314 318 309 310 311 310 311 311 + 312 313 314 315 316 317 318 313 314 315 + 316 317 314 315 316 317 315 316 317 316 + 317 317 0 319 320 321 322 323 324 328 + 320 321 322 321 322 323 324 325 326 327 + 328 329 330 322 323 324 328 323 324 325 + 326 327 328 329 330 331 332 324 325 326 + 327 328 329 330 325 326 327 328 329 330 + 326 327 328 327 328 328 329 330 331 332 + 333 334 349 330 331 332 331 332 333 334 + 335 336 337 349 350 351 332 333 334 349 + 333 334 335 336 337 338 347 349 350 351 + 352 353 334 335 336 337 349 350 351 335 + 336 337 338 339 340 345 347 348 349 350 + 351 336 337 338 347 349 337 338 347 349 + 338 339 340 341 342 345 346 347 348 349 + 339 340 341 342 343 345 347 348 340 341 + 342 347 341 342 343 344 345 346 347 342 + 343 345 343 344 345 346 347 348 344 345 + 346 347 345 346 347 348 347 348 348 0 + 350 351 352 353 354 355 356 351 352 353 + 352 353 354 355 356 357 358 353 354 355 + 356 354 355 356 357 358 359 360 355 356 + 357 358 356 357 358 357 358 359 360 361 + 362 375 358 359 360 359 360 361 362 363 + 364 368 375 376 377 360 361 362 375 361 + 362 363 364 365 366 367 368 369 370 371 + 375 376 377 378 379 362 363 364 368 375 + 376 377 363 364 365 366 367 368 369 370 + 371 372 373 374 375 376 377 364 365 366 + 367 368 369 370 371 375 365 366 367 368 + 369 370 371 375 366 367 368 367 368 368 + 369 370 371 372 373 374 375 370 371 372 + 373 374 371 372 373 374 372 373 374 373 + 374 374 0 376 377 378 379 380 381 385 + 377 378 379 378 379 380 381 382 383 384 + 385 386 387 379 380 381 385 380 381 382 + 383 384 385 386 387 388 389 381 382 383 + 384 385 386 387 382 383 384 385 386 387 + 383 384 385 384 385 385 386 387 388 389 + 390 391 407 387 388 389 388 389 390 391 + 392 393 394 407 408 409 389 390 391 407 + 390 391 392 393 394 395 396 397 407 408 + 409 410 411 391 392 393 394 407 408 409 + 392 393 394 395 396 397 398 399 400 407 + 408 409 393 394 395 396 397 407 394 395 + 396 397 407 395 396 397 398 399 400 401 + 402 403 407 396 397 398 399 400 397 398 + 399 400 398 399 400 401 402 403 404 405 + 406 399 400 401 402 403 400 401 402 403 + 401 402 403 404 405 406 402 403 404 405 + 406 403 404 405 406 404 405 406 405 406 + 406 0 408 409 410 411 412 413 417 409 + 410 411 410 411 412 413 414 415 416 417 + 418 419 411 412 413 417 412 413 414 415 + 416 417 418 419 420 421 413 414 415 416 + 417 418 419 414 415 416 417 418 419 415 + 416 417 416 417 417 418 419 420 421 422 + 423 434 419 420 421 420 421 422 423 424 + 425 426 434 435 436 421 422 423 434 422 + 423 424 425 426 427 428 429 434 435 436 + 437 438 423 424 425 426 434 435 436 424 + 425 426 427 428 429 430 434 435 436 425 + 426 427 428 429 434 426 427 428 429 434 + 427 428 429 430 431 432 433 434 428 429 + 430 429 430 430 431 432 433 431 432 433 + 432 433 433 0 435 436 437 438 439 440 + 451 436 437 438 437 438 439 440 441 442 + 443 451 452 453 438 439 440 451 439 440 + 441 442 443 444 449 451 452 453 454 455 + 440 441 442 443 451 452 453 441 442 443 + 444 445 447 449 450 451 452 453 442 443 + 444 449 451 443 444 449 451 444 445 446 + 447 448 449 450 451 445 446 447 448 449 + 450 446 447 448 449 450 447 448 449 448 + 449 450 449 450 450 0 452 453 454 455 + 456 457 475 453 454 455 454 455 456 457 + 458 459 460 475 476 477 455 456 457 475 + 456 457 458 459 460 461 462 463 475 476 + 477 478 479 457 458 459 460 475 476 477 + 458 459 460 461 462 463 464 465 466 475 + 476 477 459 460 461 462 463 475 460 461 + 462 463 475 461 462 463 464 465 466 467 + 468 475 462 463 464 465 466 463 464 465 + 466 464 465 466 467 468 469 472 465 466 + 467 468 466 467 468 467 468 469 470 471 + 472 473 474 468 469 472 469 470 471 472 + 473 474 470 471 472 473 474 471 472 472 + 473 474 474 0 476 477 478 479 480 481 + 490 477 478 479 478 479 480 481 482 483 + 484 490 491 492 479 480 481 490 480 481 + 482 483 484 485 486 487 490 491 492 493 + 494 481 482 483 484 490 491 492 482 483 + 484 485 486 487 488 489 490 491 492 483 + 484 485 486 487 490 484 485 486 487 490 + 485 486 487 488 489 490 486 487 488 489 + 487 488 489 488 489 489 0 491 492 493 + 494 495 496 497 492 493 494 493 494 495 + 496 497 498 499 494 495 496 497 495 496 + 497 498 499 500 501 496 497 498 499 497 + 498 499 498 499 500 501 502 503 507 499 + 500 501 500 501 502 503 504 505 506 507 + 508 509 501 502 503 507 502 503 504 505 + 506 507 508 509 510 511 503 504 505 506 + 507 508 509 504 505 506 507 508 509 505 + 506 507 506 507 507 508 509 510 511 512 + 513 522 509 510 511 510 511 512 513 514 + 515 516 522 523 524 511 512 513 522 512 + 513 514 515 516 517 518 519 522 523 524 + 525 526 513 514 515 516 522 523 524 514 + 515 516 517 518 519 520 521 522 523 524 + 515 516 517 518 519 522 516 517 518 519 + 522 517 518 519 520 521 522 518 519 520 + 521 519 520 521 520 521 521 0 523 524 + 525 526 527 528 541 524 525 526 525 526 + 527 528 529 530 531 541 542 543 526 527 + 528 541 527 528 529 530 531 532 533 537 + 541 542 543 544 545 528 529 530 531 541 + 542 543 529 530 531 532 533 534 535 536 + 537 538 539 540 541 542 543 530 531 532 + 533 537 541 531 532 533 537 541 532 533 + 534 535 536 537 538 539 540 541 533 534 + 535 536 537 538 539 540 534 535 536 537 + 538 539 540 535 536 537 536 537 537 538 + 539 540 539 540 540 0 542 543 544 545 + 546 547 551 543 544 545 544 545 546 547 + 548 549 550 551 552 553 545 546 547 551 + 546 547 548 549 550 551 552 553 554 555 + 547 548 549 550 551 552 553 548 549 550 + 551 552 553 549 550 551 550 551 551 552 + 553 554 555 556 557 571 553 554 555 554 + 555 556 557 558 559 560 571 572 573 555 + 556 557 571 556 557 558 559 560 561 569 + 571 572 573 574 575 557 558 559 560 571 + 572 573 558 559 560 561 562 563 567 569 + 570 571 572 573 559 560 561 569 571 560 + 561 569 571 561 562 563 564 565 567 568 + 569 570 571 562 563 564 565 566 567 569 + 570 563 564 565 569 564 565 566 567 568 + 569 565 566 567 566 567 568 569 570 567 + 568 569 568 569 570 569 570 570 0 572 + 573 574 575 576 577 585 573 574 575 574 + 575 576 577 578 579 583 585 586 587 575 + 576 577 585 576 577 578 579 580 581 582 + 583 584 585 586 587 588 589 577 578 579 + 583 585 586 587 578 579 580 581 582 583 + 584 585 586 587 579 580 581 582 583 584 + 585 580 581 582 583 584 585 581 582 583 + 582 583 583 584 585 0 586 587 588 589 + 590 591 606 587 588 589 588 589 590 591 + 592 593 594 606 607 608 589 590 591 606 + 590 591 592 593 594 595 604 606 607 608 + 609 610 591 592 593 594 606 607 608 592 + 593 594 595 596 597 602 604 605 606 607 + 608 593 594 595 604 606 594 595 604 606 + 595 596 597 598 599 602 603 604 605 606 + 596 597 598 599 600 602 604 605 597 598 + 599 604 598 599 600 601 602 603 604 599 + 600 602 600 601 602 603 604 605 601 602 + 603 604 602 603 604 605 604 605 605 0 + 607 608 609 610 611 612 622 608 609 610 + 609 610 611 612 613 614 618 622 623 624 + 610 611 612 622 611 612 613 614 615 616 + 617 618 619 620 621 622 623 624 625 626 + 612 613 614 618 622 623 624 613 614 615 + 616 617 618 619 620 621 622 623 624 614 + 615 616 617 618 619 620 621 622 615 616 + 617 618 619 620 621 622 616 617 618 617 + 618 618 619 620 621 622 620 621 621 0 + 623 624 625 626 627 628 629 624 625 626 + 625 626 627 628 629 630 631 626 627 628 + 629 627 628 629 630 631 632 633 628 629 + 630 631 629 630 631 630 631 632 633 634 + 635 646 631 632 633 632 633 634 635 636 + 637 638 646 647 648 633 634 635 646 634 + 635 636 637 638 639 640 641 646 647 648 + 649 650 635 636 637 638 646 647 648 636 + 637 638 639 640 641 642 643 646 647 648 + 637 638 639 640 641 646 638 639 640 641 + 646 639 640 641 642 643 644 645 646 640 + 641 642 643 641 642 643 642 643 644 645 + 643 644 645 644 645 645 0 647 648 649 + 650 651 652 666 648 649 650 649 650 651 + 652 653 654 655 666 667 668 650 651 652 + 666 651 652 653 654 655 656 664 666 667 + 668 669 670 652 653 654 655 666 667 668 + 653 654 655 656 657 658 662 664 665 666 + 667 668 654 655 656 664 666 655 656 664 + 666 656 657 658 659 660 662 663 664 665 + 666 657 658 659 660 661 662 664 665 658 + 659 660 664 659 660 661 662 663 664 660 + 661 662 661 662 663 664 665 662 663 664 + 663 664 665 664 665 665 0 667 668 669 + 670 671 672 688 668 669 670 669 670 671 + 672 673 674 675 688 689 690 670 671 672 + 688 671 672 673 674 675 676 677 678 688 + 689 690 691 692 672 673 674 675 688 689 + 690 673 674 675 676 677 678 679 680 681 + 688 689 690 674 675 676 677 678 688 675 + 676 677 678 688 676 677 678 679 680 681 + 682 683 684 688 677 678 679 680 681 678 + 679 680 681 679 680 681 682 683 684 685 + 686 687 680 681 682 683 684 681 682 683 + 684 682 683 684 685 686 687 683 684 685 + 686 687 684 685 686 687 685 686 687 686 + 687 687 0 689 690 691 692 693 694 700 + 690 691 692 691 692 693 694 695 696 697 + 700 701 702 692 693 694 700 693 694 695 + 696 697 698 699 700 701 702 703 704 694 + 695 696 697 700 701 702 695 696 697 698 + 699 700 701 702 696 697 698 699 700 697 + 698 699 700 698 699 700 699 0 701 702 + 703 704 705 706 724 702 703 704 703 704 + 705 706 707 708 709 724 725 726 704 705 + 706 724 705 706 707 708 709 710 711 712 + 724 725 726 727 728 706 707 708 709 724 + 725 726 707 708 709 710 711 712 713 714 + 715 724 725 726 708 709 710 711 712 724 + 709 710 711 712 724 710 711 712 713 714 + 715 716 717 724 711 712 713 714 715 712 + 713 714 715 713 714 715 716 717 718 721 + 714 715 716 717 715 716 717 716 717 718 + 719 720 721 722 723 717 718 721 718 719 + 720 721 722 723 719 720 721 722 723 720 + 721 721 722 723 723 0 725 726 727 728 + 729 730 740 726 727 728 727 728 729 730 + 731 732 736 740 741 742 728 729 730 740 + 729 730 731 732 733 734 735 736 737 738 + 739 740 741 742 743 744 730 731 732 736 + 740 741 742 731 732 733 734 735 736 737 + 738 739 740 741 742 732 733 734 735 736 + 737 738 739 740 733 734 735 736 737 738 + 739 740 734 735 736 735 736 736 737 738 + 739 740 738 739 739 0 741 742 743 744 + 745 746 755 742 743 744 743 744 745 746 + 747 748 749 755 756 757 744 745 746 755 + 745 746 747 748 749 750 751 752 755 756 + 757 758 759 746 747 748 749 755 756 757 + 747 748 749 750 751 752 753 754 755 756 + 757 748 749 750 751 752 755 749 750 751 + 752 755 750 751 752 753 754 755 751 752 + 753 754 752 753 754 753 754 754 0 756 + 757 758 759 760 761 777 757 758 759 758 + 759 760 761 762 763 764 777 778 779 759 + 760 761 777 760 761 762 763 764 765 766 + 767 777 778 779 780 781 761 762 763 764 + 777 778 779 762 763 764 765 766 767 768 + 769 770 777 778 779 763 764 765 766 767 + 777 764 765 766 767 777 765 766 767 768 + 769 770 771 772 773 777 766 767 768 769 + 770 767 768 769 770 768 769 770 771 772 + 773 774 775 776 769 770 771 772 773 770 + 771 772 773 771 772 773 774 775 776 772 + 773 774 775 776 773 774 775 776 774 775 + 776 775 776 776 0 778 779 780 781 782 + 783 796 779 780 781 780 781 782 783 784 + 785 786 796 797 798 781 782 783 796 782 + 783 784 785 786 787 788 792 796 797 798 + 799 800 783 784 785 786 796 797 798 784 + 785 786 787 788 789 790 791 792 793 794 + 795 796 797 798 785 786 787 788 792 796 + 786 787 788 792 796 787 788 789 790 791 + 792 793 794 795 796 788 789 790 791 792 + 793 794 795 789 790 791 792 793 794 795 + 790 791 792 791 792 792 793 794 795 794 + 795 795 0 797 798 799 800 801 802 807 + 798 799 800 799 800 801 802 803 804 805 + 807 808 809 800 801 802 807 801 802 803 + 804 805 806 807 808 809 810 811 802 803 + 804 805 807 808 809 803 804 805 806 807 + 808 809 804 805 806 807 805 806 807 806 + 807 0 808 809 810 811 812 813 817 809 + 810 811 810 811 812 813 814 815 816 817 + 818 819 811 812 813 817 812 813 814 815 + 816 817 818 819 820 821 813 814 815 816 + 817 818 819 814 815 816 817 818 819 815 + 816 817 816 817 817 818 819 820 821 822 + 823 832 819 820 821 820 821 822 823 824 + 825 826 832 833 834 821 822 823 832 822 + 823 824 825 826 827 828 829 832 833 834 + 835 836 823 824 825 826 832 833 834 824 + 825 826 827 828 829 830 831 832 833 834 + 825 826 827 828 829 832 826 827 828 829 + 832 827 828 829 830 831 832 828 829 830 + 831 829 830 831 830 831 831 0 833 834 + 835 836 837 838 852 834 835 836 835 836 + 837 838 839 840 841 852 853 854 836 837 + 838 852 837 838 839 840 841 842 850 852 + 853 854 855 856 838 839 840 841 852 853 + 854 839 840 841 842 843 844 848 850 851 + 852 853 854 840 841 842 850 852 841 842 + 850 852 842 843 844 845 846 848 849 850 + 851 852 843 844 845 846 847 848 850 851 + 844 845 846 850 845 846 847 848 849 850 + 846 847 848 847 848 849 850 851 848 849 + 850 849 850 851 850 851 851 0 853 854 + 855 856 857 858 866 854 855 856 855 856 + 857 858 859 860 861 866 867 868 856 857 + 858 866 857 858 859 860 861 862 863 866 + 867 868 869 878 858 859 860 861 866 867 + 868 859 860 861 862 863 864 865 866 867 + 868 860 861 862 863 866 861 862 863 866 + 862 863 864 865 866 863 864 865 864 865 + 865 0 867 868 869 870 871 872 875 878 + 879 880 868 869 878 869 870 871 872 873 + 874 875 876 877 878 879 880 881 882 870 + 871 872 873 874 875 876 877 878 879 880 + 871 872 873 874 875 878 872 873 874 875 + 878 873 874 875 876 877 878 879 880 874 + 875 876 877 878 875 876 877 878 876 877 + 878 879 880 881 882 877 878 879 880 878 + 879 880 879 880 881 882 883 884 880 881 + 882 881 882 883 884 885 886 890 882 883 + 884 883 884 885 886 887 888 889 890 891 + 892 884 885 886 890 885 886 887 888 889 + 890 891 892 893 894 886 887 888 889 890 + 891 892 887 888 889 890 891 892 888 889 + 890 889 890 890 891 892 893 894 895 896 + 900 892 893 894 893 894 895 896 897 898 + 899 900 901 902 894 895 896 900 895 896 + 897 898 899 900 901 902 903 904 896 897 + 898 899 900 901 902 897 898 899 900 901 + 902 898 899 900 899 900 900 901 902 903 + 904 905 906 916 902 903 904 903 904 905 + 906 907 908 912 916 917 918 904 905 906 + 916 905 906 907 908 909 910 911 912 913 + 914 915 916 917 918 919 920 906 907 908 + 912 916 917 918 907 908 909 910 911 912 + 913 914 915 916 917 918 908 909 910 911 + 912 913 914 915 916 909 910 911 912 913 + 914 915 916 910 911 912 911 912 912 913 + 914 915 916 914 915 915 0 917 918 919 + 920 921 922 935 918 919 920 919 920 921 + 922 923 924 925 935 936 937 920 921 922 + 935 921 922 923 924 925 926 927 931 935 + 936 937 938 947 922 923 924 925 935 936 + 937 923 924 925 926 927 928 929 930 931 + 932 933 934 935 936 937 924 925 926 927 + 931 935 925 926 927 931 935 926 927 928 + 929 930 931 932 933 934 935 927 928 929 + 930 931 932 933 934 928 929 930 931 932 + 933 934 929 930 931 930 931 931 932 933 + 934 933 934 934 0 936 937 938 939 940 + 941 944 947 948 949 937 938 947 938 939 + 940 941 942 943 944 945 946 947 948 949 + 950 951 939 940 941 942 943 944 945 946 + 947 948 949 940 941 942 943 944 947 941 + 942 943 944 947 942 943 944 945 946 947 + 948 949 943 944 945 946 947 944 945 946 + 947 945 946 947 948 949 950 951 946 947 + 948 949 947 948 949 948 949 950 951 952 + 953 949 950 951 950 951 952 953 954 955 + 960 951 952 953 952 953 954 955 956 957 + 958 960 961 962 953 954 955 960 954 955 + 956 957 958 959 960 961 962 963 964 955 + 956 957 958 960 961 962 956 957 958 959 + 960 961 962 957 958 959 960 958 959 960 + 959 960 0 961 962 963 964 965 966 972 + 962 963 964 963 964 965 966 967 968 969 + 972 973 974 964 965 966 972 965 966 967 + 968 969 970 971 972 973 974 975 976 966 + 967 968 969 972 973 974 967 968 969 970 + 971 972 973 974 968 969 970 971 972 969 + 970 971 972 970 971 972 971 0 973 974 + 975 976 977 978 988 974 975 976 975 976 + 977 978 979 980 984 988 989 990 976 977 + 978 988 977 978 979 980 981 982 983 984 + 985 986 987 988 989 990 991 992 978 979 + 980 984 988 989 990 979 980 981 982 983 + 984 985 986 987 988 989 990 980 981 982 + 983 984 985 986 987 988 981 982 983 984 + 985 986 987 988 982 983 984 983 984 984 + 985 986 987 988 986 987 987 0 989 990 + 991 992 993 994 1007 990 991 992 991 992 + 993 994 995 996 1000 1007 1008 1009 992 993 + 994 1007 993 994 995 996 997 998 999 1000 + 1001 1002 1003 1007 1008 1009 1010 1011 994 995 + 996 1000 1007 1008 1009 995 996 997 998 999 + 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 + 996 997 998 999 1000 1001 1002 1003 1007 997 + 998 999 1000 1001 1002 1003 1007 998 999 1000 + 999 1000 1000 1001 1002 1003 1004 1005 1006 1007 + 1002 1003 1004 1005 1006 1003 1004 1005 1006 1004 + 1005 1006 1005 1006 1006 0 1008 1009 1010 1011 + 1012 1013 1018 1009 1010 1011 1010 1011 1012 1013 + 1014 1015 1016 1018 1019 1020 1011 1012 1013 1018 + 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 + 1022 1013 1014 1015 1016 1018 1019 1020 1014 1015 + 1016 1017 1018 1019 1020 1015 1016 1017 1018 1016 + 1017 1018 1017 1018 0 1019 1020 1021 1022 1023 + 1024 1030 1020 1021 1022 1021 1022 1023 1024 1025 + 1026 1027 1030 1031 1032 1022 1023 1024 1030 1023 + 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 + 1034 1024 1025 1026 1027 1030 1031 1032 1025 1026 + 1027 1028 1029 1030 1031 1032 1026 1027 1028 1029 + 1030 1027 1028 1029 1030 1028 1029 1030 1029 0 + 1031 1032 1033 1034 1035 1036 1047 1032 1033 1034 + 1033 1034 1035 1036 1037 1038 1039 1047 1048 1049 + 1034 1035 1036 1047 1035 1036 1037 1038 1039 1040 + 1041 1042 1047 1048 1049 1050 1051 1036 1037 1038 + 1039 1047 1048 1049 1037 1038 1039 1040 1041 1042 + 1043 1044 1047 1048 1049 1038 1039 1040 1041 1042 + 1047 1039 1040 1041 1042 1047 1040 1041 1042 1043 + 1044 1045 1046 1047 1041 1042 1043 1044 1042 1043 + 1044 1043 1044 1045 1046 1044 1045 1046 1045 1046 + 1046 0 1048 1049 1050 1051 1052 1053 1062 1049 + 1050 1051 1050 1051 1052 1053 1054 1055 1056 1062 + 1063 1064 1051 1052 1053 1062 1052 1053 1054 1055 + 1056 1057 1058 1059 1062 1063 1064 1065 1066 1053 + 1054 1055 1056 1062 1063 1064 1054 1055 1056 1057 + 1058 1059 1060 1061 1062 1063 1064 1055 1056 1057 + 1058 1059 1062 1056 1057 1058 1059 1062 1057 1058 + 1059 1060 1061 1062 1058 1059 1060 1061 1059 1060 + 1061 1060 1061 1061 0 1063 1064 1065 1066 1067 + 1068 1081 1064 1065 1066 1065 1066 1067 1068 1069 + 1070 1074 1081 1082 1083 1066 1067 1068 1081 1067 + 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 + 1081 1082 1083 1084 1085 1068 1069 1070 1074 1081 + 1082 1083 1069 1070 1071 1072 1073 1074 1075 1076 + 1077 1078 1079 1080 1081 1082 1083 1070 1071 1072 + 1073 1074 1075 1076 1077 1081 1071 1072 1073 1074 + 1075 1076 1077 1081 1072 1073 1074 1073 1074 1074 + 1075 1076 1077 1078 1079 1080 1081 1076 1077 1078 + 1079 1080 1077 1078 1079 1080 1078 1079 1080 1079 + 1080 1080 0 1082 1083 1084 1085 1086 1087 1103 + 1083 1084 1085 1084 1085 1086 1087 1088 1089 1090 + 1103 1104 1105 1085 1086 1087 1103 1086 1087 1088 + 1089 1090 1091 1092 1093 1103 1104 1105 1106 1107 + 1087 1088 1089 1090 1103 1104 1105 1088 1089 1090 + 1091 1092 1093 1094 1095 1096 1103 1104 1105 1089 + 1090 1091 1092 1093 1103 1090 1091 1092 1093 1103 + 1091 1092 1093 1094 1095 1096 1097 1098 1099 1103 + 1092 1093 1094 1095 1096 1093 1094 1095 1096 1094 + 1095 1096 1097 1098 1099 1100 1101 1102 1095 1096 + 1097 1098 1099 1096 1097 1098 1099 1097 1098 1099 + 1100 1101 1102 1098 1099 1100 1101 1102 1099 1100 + 1101 1102 1100 1101 1102 1101 1102 1102 0 1104 + 1105 1106 1107 1108 1109 1115 1105 1106 1107 1106 + 1107 1108 1109 1110 1111 1112 1115 1116 1117 1107 + 1108 1109 1115 1108 1109 1110 1111 1112 1113 1114 + 1115 1116 1117 1118 1119 1109 1110 1111 1112 1115 + 1116 1117 1110 1111 1112 1113 1114 1115 1116 1117 + 1111 1112 1113 1114 1115 1112 1113 1114 1115 1113 + 1114 1115 1114 0 1116 1117 1118 1119 1120 1121 + 1134 1117 1118 1119 1118 1119 1120 1121 1122 1123 + 1124 1134 1135 1136 1119 1120 1121 1134 1120 1121 + 1122 1123 1124 1125 1126 1130 1134 1135 1136 1137 + 1138 1121 1122 1123 1124 1134 1135 1136 1122 1123 + 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 + 1134 1135 1136 1123 1124 1125 1126 1130 1134 1124 + 1125 1126 1130 1134 1125 1126 1127 1128 1129 1130 + 1131 1132 1133 1134 1126 1127 1128 1129 1130 1131 + 1132 1133 1127 1128 1129 1130 1131 1132 1133 1128 + 1129 1130 1129 1130 1130 1131 1132 1133 1132 1133 + 1133 0 1135 1136 1137 1138 1139 1140 1154 1136 + 1137 1138 1137 1138 1139 1140 1141 1142 1143 1154 + 1155 1156 1138 1139 1140 1154 1139 1140 1141 1142 + 1143 1144 1152 1154 1155 1156 1157 1158 1140 1141 + 1142 1143 1154 1155 1156 1141 1142 1143 1144 1145 + 1146 1150 1152 1153 1154 1155 1156 1142 1143 1144 + 1152 1154 1143 1144 1152 1154 1144 1145 1146 1147 + 1148 1150 1151 1152 1153 1154 1145 1146 1147 1148 + 1149 1150 1152 1153 1146 1147 1148 1152 1147 1148 + 1149 1150 1151 1152 1148 1149 1150 1149 1150 1151 + 1152 1153 1150 1151 1152 1151 1152 1153 1152 1153 + 1153 0 1155 1156 1157 1158 1159 1160 1170 1156 + 1157 1158 1157 1158 1159 1160 1161 1162 1166 1170 + 1171 1172 1158 1159 1160 1170 1159 1160 1161 1162 + 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 + 1173 1174 1160 1161 1162 1166 1170 1171 1172 1161 + 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 + 1172 1162 1163 1164 1165 1166 1167 1168 1169 1170 + 1163 1164 1165 1166 1167 1168 1169 1170 1164 1165 + 1166 1165 1166 1166 1167 1168 1169 1170 1168 1169 + 1169 0 1171 1172 1173 1174 1175 1176 1185 1172 + 1173 1174 1173 1174 1175 1176 1177 1178 1179 1185 + 1186 1187 1174 1175 1176 1185 1175 1176 1177 1178 + 1179 1180 1181 1182 1185 1186 1187 1188 1189 1176 + 1177 1178 1179 1185 1186 1187 1177 1178 1179 1180 + 1181 1182 1183 1184 1185 1186 1187 1178 1179 1180 + 1181 1182 1185 1179 1180 1181 1182 1185 1180 1181 + 1182 1183 1184 1185 1181 1182 1183 1184 1182 1183 + 1184 1183 1184 1184 0 1186 1187 1188 1189 1190 + 1191 1204 1187 1188 1189 1188 1189 1190 1191 1192 + 1193 1194 1204 1205 1206 1189 1190 1191 1204 1190 + 1191 1192 1193 1194 1195 1196 1200 1204 1205 1206 + 1207 1208 1191 1192 1193 1194 1204 1205 1206 1192 + 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 + 1203 1204 1205 1206 1193 1194 1195 1196 1200 1204 + 1194 1195 1196 1200 1204 1195 1196 1197 1198 1199 + 1200 1201 1202 1203 1204 1196 1197 1198 1199 1200 + 1201 1202 1203 1197 1198 1199 1200 1201 1202 1203 + 1198 1199 1200 1199 1200 1200 1201 1202 1203 1202 + 1203 1203 0 1205 1206 1207 1208 1209 1210 1211 + 1206 1207 1208 1207 1208 1209 1210 1211 1212 1213 + 1208 1209 1210 1211 1209 1210 1211 1212 1213 1214 + 1215 1210 1211 1212 1213 1211 1212 1213 1212 1213 + 1214 1215 1216 1217 1233 1213 1214 1215 1214 1215 + 1216 1217 1218 1219 1220 1233 1234 1235 1215 1216 + 1217 1233 1216 1217 1218 1219 1220 1221 1222 1223 + 1233 1234 1235 1236 1237 1217 1218 1219 1220 1233 + 1234 1235 1218 1219 1220 1221 1222 1223 1224 1225 + 1226 1233 1234 1235 1219 1220 1221 1222 1223 1233 + 1220 1221 1222 1223 1233 1221 1222 1223 1224 1225 + 1226 1227 1228 1229 1233 1222 1223 1224 1225 1226 + 1223 1224 1225 1226 1224 1225 1226 1227 1228 1229 + 1230 1231 1232 1225 1226 1227 1228 1229 1226 1227 + 1228 1229 1227 1228 1229 1230 1231 1232 1228 1229 + 1230 1231 1232 1229 1230 1231 1232 1230 1231 1232 + 1231 1232 1232 0 1234 1235 1236 1237 1238 1239 + 1249 1235 1236 1237 1236 1237 1238 1239 1240 1241 + 1245 1249 1250 1251 1237 1238 1239 1249 1238 1239 + 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 + 1250 1251 1252 1253 1239 1240 1241 1245 1249 1250 + 1251 1240 1241 1242 1243 1244 1245 1246 1247 1248 + 1249 1250 1251 1241 1242 1243 1244 1245 1246 1247 + 1248 1249 1242 1243 1244 1245 1246 1247 1248 1249 + 1243 1244 1245 1244 1245 1245 1246 1247 1248 1249 + 1247 1248 1248 0 1250 1251 1252 1253 1254 1255 + 1273 1251 1252 1253 1252 1253 1254 1255 1256 1257 + 1258 1273 1274 1275 1253 1254 1255 1273 1254 1255 + 1256 1257 1258 1259 1272 1273 1274 1275 1276 1277 + 1255 1256 1257 1258 1273 1274 1275 1256 1257 1258 + 1259 1260 1261 1263 1270 1272 1273 1274 1275 1257 + 1258 1259 1272 1273 1258 1259 1272 1273 1259 1260 + 1261 1262 1263 1264 1268 1270 1271 1272 1273 1260 + 1261 1262 1263 1264 1270 1272 1261 1262 1263 1272 + 1262 1263 1264 1265 1266 1270 1272 1263 1264 1272 + 1264 1265 1266 1267 1268 1270 1271 1272 1265 1266 + 1267 1268 1269 1270 1272 1266 1267 1268 1272 1267 + 1268 1269 1270 1271 1272 1268 1269 1270 1269 1270 + 1271 1272 1270 1271 1272 1271 1272 1272 0 1274 + 1275 1276 1277 1278 1279 1285 1275 1276 1277 1276 + 1277 1278 1279 1280 1281 1282 1285 1286 1287 1277 + 1278 1279 1285 1278 1279 1280 1281 1282 1283 1284 + 1285 1286 1287 1288 1289 1279 1280 1281 1282 1285 + 1286 1287 1280 1281 1282 1283 1284 1285 1286 1287 + 1281 1282 1283 1284 1285 1282 1283 1284 1285 1283 + 1284 1285 1284 0 1286 1287 1288 1289 1290 1291 + 1292 1287 1288 1289 1288 1289 1290 1291 1292 1293 + 1294 1289 1290 1291 1292 1290 1291 1292 1293 1294 + 1295 1296 1291 1292 1293 1294 1292 1293 1294 1293 + 1294 1295 1296 1297 1298 1311 1294 1295 1296 1295 + 1296 1297 1298 1299 1300 1301 1311 1312 1313 1296 + 1297 1298 1311 1297 1298 1299 1300 1301 1302 1303 + 1307 1311 1312 1313 1314 1315 1298 1299 1300 1301 + 1311 1312 1313 1299 1300 1301 1302 1303 1304 1305 + 1306 1307 1308 1309 1310 1311 1312 1313 1300 1301 + 1302 1303 1307 1311 1301 1302 1303 1307 1311 1302 + 1303 1304 1305 1306 1307 1308 1309 1310 1311 1303 + 1304 1305 1306 1307 1308 1309 1310 1304 1305 1306 + 1307 1308 1309 1310 1305 1306 1307 1306 1307 1307 + 1308 1309 1310 1309 1310 1310 0 1312 1313 1314 + 1315 1316 1317 1323 1313 1314 1315 1314 1315 1316 + 1317 1318 1319 1320 1323 1324 1325 1315 1316 1317 + 1323 1316 1317 1318 1319 1320 1321 1322 1323 1324 + 1325 1326 1327 1317 1318 1319 1320 1323 1324 1325 + 1318 1319 1320 1321 1322 1323 1324 1325 1319 1320 + 1321 1322 1323 1320 1321 1322 1323 1321 1322 1323 + 1322 0 1324 1325 1326 1327 1328 1329 1333 1325 + 1326 1327 1326 1327 1328 1329 1330 1331 1332 1333 + 1334 1335 1327 1328 1329 1333 1328 1329 1330 1331 + 1332 1333 1334 1335 1336 1337 1329 1330 1331 1332 + 1333 1334 1335 1330 1331 1332 1333 1334 1335 1331 + 1332 1333 1332 1333 1333 1334 1335 1336 1337 1338 + 1339 1352 1335 1336 1337 1336 1337 1338 1339 1340 + 1341 1345 1352 1353 1354 1337 1338 1339 1352 1338 + 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 + 1352 1353 1354 1355 1356 1339 1340 1341 1345 1352 + 1353 1354 1340 1341 1342 1343 1344 1345 1346 1347 + 1348 1349 1350 1351 1352 1353 1354 1341 1342 1343 + 1344 1345 1346 1347 1348 1352 1342 1343 1344 1345 + 1346 1347 1348 1352 1343 1344 1345 1344 1345 1345 + 1346 1347 1348 1349 1350 1351 1352 1347 1348 1349 + 1350 1351 1348 1349 1350 1351 1349 1350 1351 1350 + 1351 1351 0 1353 1354 1355 1356 1357 1358 1368 + 1354 1355 1356 1355 1356 1357 1358 1359 1360 1364 + 1368 1369 1370 1356 1357 1358 1368 1357 1358 1359 + 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 + 1370 1371 1372 1358 1359 1360 1364 1368 1369 1370 + 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 + 1369 1370 1360 1361 1362 1363 1364 1365 1366 1367 + 1368 1361 1362 1363 1364 1365 1366 1367 1368 1362 + 1363 1364 1363 1364 1364 1365 1366 1367 1368 1366 + 1367 1367 0 1369 1370 1371 1372 1373 1374 1385 + 1370 1371 1372 1371 1372 1373 1374 1375 1376 1377 + 1385 1386 1387 1372 1373 1374 1385 1373 1374 1375 + 1376 1377 1378 1383 1385 1386 1387 1388 1389 1374 + 1375 1376 1377 1385 1386 1387 1375 1376 1377 1378 + 1379 1381 1383 1384 1385 1386 1387 1376 1377 1378 + 1383 1385 1377 1378 1383 1385 1378 1379 1380 1381 + 1382 1383 1384 1385 1379 1380 1381 1382 1383 1384 + 1380 1381 1382 1383 1384 1381 1382 1383 1382 1383 + 1384 1383 1384 1384 0 1386 1387 1388 1389 1390 + 1391 1396 1387 1388 1389 1388 1389 1390 1391 1392 + 1393 1394 1396 1397 1398 1389 1390 1391 1396 1390 + 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 + 1391 1392 1393 1394 1396 1397 1398 1392 1393 1394 + 1395 1396 1397 1398 1393 1394 1395 1396 1394 1395 + 1396 1395 1396 0 1397 1398 1399 1400 1401 1402 + 1415 1398 1399 1400 1399 1400 1401 1402 1403 1404 + 1408 1415 1416 1417 1400 1401 1402 1415 1401 1402 + 1403 1404 1405 1406 1407 1408 1409 1410 1411 1415 + 1416 1417 1418 1419 1402 1403 1404 1408 1415 1416 + 1417 1403 1404 1405 1406 1407 1408 1409 1410 1411 + 1412 1413 1414 1415 1416 1417 1404 1405 1406 1407 + 1408 1409 1410 1411 1415 1405 1406 1407 1408 1409 + 1410 1411 1415 1406 1407 1408 1407 1408 1408 1409 + 1410 1411 1412 1413 1414 1415 1410 1411 1412 1413 + 1414 1411 1412 1413 1414 1412 1413 1414 1413 1414 + 1414 0 1416 1417 1418 1419 1420 1421 1425 1417 + 1418 1419 1418 1419 1420 1421 1422 1423 1424 1425 + 1426 1427 1419 1420 1421 1425 1420 1421 1422 1423 + 1424 1425 1426 1427 1428 1429 1421 1422 1423 1424 + 1425 1426 1427 1422 1423 1424 1425 1426 1427 1423 + 1424 1425 1424 1425 1425 1426 1427 1428 1429 1430 + 1431 1445 1427 1428 1429 1428 1429 1430 1431 1432 + 1433 1434 1445 1446 1447 1429 1430 1431 1445 1430 + 1431 1432 1433 1434 1435 1443 1445 1446 1447 1448 + 1449 1431 1432 1433 1434 1445 1446 1447 1432 1433 + 1434 1435 1436 1437 1441 1443 1444 1445 1446 1447 + 1433 1434 1435 1443 1445 1434 1435 1443 1445 1435 + 1436 1437 1438 1439 1441 1442 1443 1444 1445 1436 + 1437 1438 1439 1440 1441 1443 1444 1437 1438 1439 + 1443 1438 1439 1440 1441 1442 1443 1439 1440 1441 + 1440 1441 1442 1443 1444 1441 1442 1443 1442 1443 + 1444 1443 1444 1444 0 1446 1447 1448 1449 1450 + 1451 1455 1447 1448 1449 1448 1449 1450 1451 1452 + 1453 1454 1455 1456 1457 1449 1450 1451 1455 1450 + 1451 1452 1453 1454 1455 1456 1457 1458 1467 1451 + 1452 1453 1454 1455 1456 1457 1452 1453 1454 1455 + 1456 1457 1453 1454 1455 1454 1455 1455 1456 1457 + 1458 1459 1460 1461 1464 1467 1468 1469 1457 1458 + 1467 1458 1459 1460 1461 1462 1463 1464 1465 1466 + 1467 1468 1469 1470 1471 1459 1460 1461 1462 1463 + 1464 1465 1466 1467 1468 1469 1460 1461 1462 1463 + 1464 1467 1461 1462 1463 1464 1467 1462 1463 1464 + 1465 1466 1467 1468 1469 1463 1464 1465 1466 1467 + 1464 1465 1466 1467 1465 1466 1467 1468 1469 1470 + 1471 1466 1467 1468 1469 1467 1468 1469 1468 1469 + 1470 1471 1472 1473 1469 1470 1471 1470 1471 1472 + 1473 1474 1475 1493 1471 1472 1473 1472 1473 1474 + 1475 1476 1477 1478 1493 1494 1495 1473 1474 1475 + 1493 1474 1475 1476 1477 1478 1479 1480 1481 1493 + 1494 1495 1496 1497 1475 1476 1477 1478 1493 1494 + 1495 1476 1477 1478 1479 1480 1481 1482 1483 1484 + 1493 1494 1495 1477 1478 1479 1480 1481 1493 1478 + 1479 1480 1481 1493 1479 1480 1481 1482 1483 1484 + 1485 1486 1493 1480 1481 1482 1483 1484 1481 1482 + 1483 1484 1482 1483 1484 1485 1486 1487 1490 1483 + 1484 1485 1486 1484 1485 1486 1485 1486 1487 1488 + 1489 1490 1491 1492 1486 1487 1490 1487 1488 1489 + 1490 1491 1492 1488 1489 1490 1491 1492 1489 1490 + 1490 1491 1492 1492 0 1494 1495 1496 1497 1498 + 1499 1505 1495 1496 1497 1496 1497 1498 1499 1500 + 1501 1502 1505 1506 1507 1497 1498 1499 1505 1498 + 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 + 1509 1499 1500 1501 1502 1505 1506 1507 1500 1501 + 1502 1503 1504 1505 1506 1507 1501 1502 1503 1504 + 1505 1502 1503 1504 1505 1503 1504 1505 1504 0 + 1506 1507 1508 1509 1510 1511 1522 1507 1508 1509 + 1508 1509 1510 1511 1512 1513 1514 1522 1523 1524 + 1509 1510 1511 1522 1510 1511 1512 1513 1514 1515 + 1516 1517 1522 1523 1524 1525 1526 1511 1512 1513 + 1514 1522 1523 1524 1512 1513 1514 1515 1516 1517 + 1518 1519 1522 1523 1524 1513 1514 1515 1516 1517 + 1522 1514 1515 1516 1517 1522 1515 1516 1517 1518 + 1519 1520 1521 1522 1516 1517 1518 1519 1517 1518 + 1519 1518 1519 1520 1521 1519 1520 1521 1520 1521 + 1521 0 1523 1524 1525 1526 1527 1528 1541 1524 + 1525 1526 1525 1526 1527 1528 1529 1530 1531 1541 + 1542 1543 1526 1527 1528 1541 1527 1528 1529 1530 + 1531 1532 1533 1537 1541 1542 1543 1544 1545 1528 + 1529 1530 1531 1541 1542 1543 1529 1530 1531 1532 + 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 + 1543 1530 1531 1532 1533 1537 1541 1531 1532 1533 + 1537 1541 1532 1533 1534 1535 1536 1537 1538 1539 + 1540 1541 1533 1534 1535 1536 1537 1538 1539 1540 + 1534 1535 1536 1537 1538 1539 1540 1535 1536 1537 + 1536 1537 1537 1538 1539 1540 1539 1540 1540 0 + 1542 1543 1544 1545 1546 1547 1556 1543 1544 1545 + 1544 1545 1546 1547 1548 1549 1550 1556 1557 1558 + 1545 1546 1547 1556 1546 1547 1548 1549 1550 1551 + 1552 1553 1556 1557 1558 1559 1560 1547 1548 1549 + 1550 1556 1557 1558 1548 1549 1550 1551 1552 1553 + 1554 1555 1556 1557 1558 1549 1550 1551 1552 1553 + 1556 1550 1551 1552 1553 1556 1551 1552 1553 1554 + 1555 1556 1552 1553 1554 1555 1553 1554 1555 1554 + 1555 1555 0 1557 1558 1559 1560 1561 1562 1563 + 1558 1559 1560 1559 1560 1561 1562 1563 1564 1565 + 1560 1561 1562 1563 1561 1562 1563 1564 1565 1566 + 1567 1562 1563 1564 1565 1563 1564 1565 1564 1565 + 1566 1567 1568 1569 1577 1565 1566 1567 1566 1567 + 1568 1569 1570 1571 1572 1577 1578 1579 1567 1568 + 1569 1577 1568 1569 1570 1571 1572 1573 1574 1577 + 1578 1579 1580 1581 1569 1570 1571 1572 1577 1578 + 1579 1570 1571 1572 1573 1574 1575 1576 1577 1578 + 1579 1571 1572 1573 1574 1577 1572 1573 1574 1577 + 1573 1574 1575 1576 1577 1574 1575 1576 1575 1576 + 1576 0 1578 1579 1580 1581 1582 1583 1597 1579 + 1580 1581 1580 1581 1582 1583 1584 1585 1586 1597 + 1598 1599 1581 1582 1583 1597 1582 1583 1584 1585 + 1586 1587 1595 1597 1598 1599 1600 1601 1583 1584 + 1585 1586 1597 1598 1599 1584 1585 1586 1587 1588 + 1589 1593 1595 1596 1597 1598 1599 1585 1586 1587 + 1595 1597 1586 1587 1595 1597 1587 1588 1589 1590 + 1591 1593 1594 1595 1596 1597 1588 1589 1590 1591 + 1592 1593 1595 1596 1589 1590 1591 1595 1590 1591 + 1592 1593 1594 1595 1591 1592 1593 1592 1593 1594 + 1595 1596 1593 1594 1595 1594 1595 1596 1595 1596 + 1596 0 1598 1599 1600 1601 1602 1603 1616 1599 + 1600 1601 1600 1601 1602 1603 1604 1605 1609 1616 + 1617 1618 1601 1602 1603 1616 1602 1603 1604 1605 + 1606 1607 1608 1609 1610 1611 1612 1616 1617 1618 + 1619 1620 1603 1604 1605 1609 1616 1617 1618 1604 + 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 + 1615 1616 1617 1618 1605 1606 1607 1608 1609 1610 + 1611 1612 1616 1606 1607 1608 1609 1610 1611 1612 + 1616 1607 1608 1609 1608 1609 1609 1610 1611 1612 + 1613 1614 1615 1616 1611 1612 1613 1614 1615 1612 + 1613 1614 1615 1613 1614 1615 1614 1615 1615 0 + 1617 1618 1619 1620 1621 1622 1628 1618 1619 1620 + 1619 1620 1621 1622 1623 1624 1625 1628 1629 1630 + 1620 1621 1622 1628 1621 1622 1623 1624 1625 1626 + 1627 1628 1629 1630 1631 1632 1622 1623 1624 1625 + 1628 1629 1630 1623 1624 1625 1626 1627 1628 1629 + 1630 1624 1625 1626 1627 1628 1625 1626 1627 1628 + 1626 1627 1628 1627 0 1629 1630 1631 1632 1633 + 1634 1639 1630 1631 1632 1631 1632 1633 1634 1635 + 1636 1637 1639 1640 1641 1632 1633 1634 1639 1633 + 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 + 1634 1635 1636 1637 1639 1640 1641 1635 1636 1637 + 1638 1639 1640 1641 1636 1637 1638 1639 1637 1638 + 1639 1638 1639 0 1640 1641 1642 1643 1644 1645 + 1655 1641 1642 1643 1642 1643 1644 1645 1646 1647 + 1651 1655 1656 1657 1643 1644 1645 1655 1644 1645 + 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 + 1656 1657 1658 1659 1645 1646 1647 1651 1655 1656 + 1657 1646 1647 1648 1649 1650 1651 1652 1653 1654 + 1655 1656 1657 1647 1648 1649 1650 1651 1652 1653 + 1654 1655 1648 1649 1650 1651 1652 1653 1654 1655 + 1649 1650 1651 1650 1651 1651 1652 1653 1654 1655 + 1653 1654 1654 0 1656 1657 1658 1659 1660 1661 + 1669 1657 1658 1659 1658 1659 1660 1661 1662 1663 + 1667 1669 1670 1671 1659 1660 1661 1669 1660 1661 + 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 + 1672 1673 1661 1662 1663 1667 1669 1670 1671 1662 + 1663 1664 1665 1666 1667 1668 1669 1670 1671 1663 + 1664 1665 1666 1667 1668 1669 1664 1665 1666 1667 + 1668 1669 1665 1666 1667 1666 1667 1667 1668 1669 + 0 1670 1671 1672 1673 1674 1675 1693 1671 1672 + 1673 1672 1673 1674 1675 1676 1677 1678 1693 1694 + 1695 1673 1674 1675 1693 1674 1675 1676 1677 1678 + 1679 1680 1681 1693 1694 1695 1696 1697 1675 1676 + 1677 1678 1693 1694 1695 1676 1677 1678 1679 1680 + 1681 1682 1683 1684 1693 1694 1695 1677 1678 1679 + 1680 1681 1693 1678 1679 1680 1681 1693 1679 1680 + 1681 1682 1683 1684 1685 1686 1693 1680 1681 1682 + 1683 1684 1681 1682 1683 1684 1682 1683 1684 1685 + 1686 1687 1690 1683 1684 1685 1686 1684 1685 1686 + 1685 1686 1687 1688 1689 1690 1691 1692 1686 1687 + 1690 1687 1688 1689 1690 1691 1692 1688 1689 1690 + 1691 1692 1689 1690 1690 1691 1692 1692 0 1694 + 1695 1696 1697 1698 1699 1708 1695 1696 1697 1696 + 1697 1698 1699 1700 1701 1702 1708 1709 1710 1697 + 1698 1699 1708 1698 1699 1700 1701 1702 1703 1704 + 1705 1708 1709 1710 1711 1712 1699 1700 1701 1702 + 1708 1709 1710 1700 1701 1702 1703 1704 1705 1706 + 1707 1708 1709 1710 1701 1702 1703 1704 1705 1708 + 1702 1703 1704 1705 1708 1703 1704 1705 1706 1707 + 1708 1704 1705 1706 1707 1705 1706 1707 1706 1707 + 1707 0 1709 1710 1711 1712 1713 1714 1715 1710 + 1711 1712 1711 1712 1713 1714 1715 1716 1717 1712 + 1713 1714 1715 1713 1714 1715 1716 1717 1718 1719 + 1714 1715 1716 1717 1715 1716 1717 1716 1717 1718 + 1719 1720 1721 1735 1717 1718 1719 1718 1719 1720 + 1721 1722 1723 1724 1735 1736 1737 1719 1720 1721 + 1735 1720 1721 1722 1723 1724 1725 1733 1735 1736 + 1737 1738 1739 1721 1722 1723 1724 1735 1736 1737 + 1722 1723 1724 1725 1726 1727 1731 1733 1734 1735 + 1736 1737 1723 1724 1725 1733 1735 1724 1725 1733 + 1735 1725 1726 1727 1728 1729 1731 1732 1733 1734 + 1735 1726 1727 1728 1729 1730 1731 1733 1734 1727 + 1728 1729 1733 1728 1729 1730 1731 1732 1733 1729 + 1730 1731 1730 1731 1732 1733 1734 1731 1732 1733 + 1732 1733 1734 1733 1734 1734 0 1736 1737 1738 + 1739 1740 1741 1746 1737 1738 1739 1738 1739 1740 + 1741 1742 1743 1744 1746 1747 1748 1739 1740 1741 + 1746 1740 1741 1742 1743 1744 1745 1746 1747 1748 + 1749 1750 1741 1742 1743 1744 1746 1747 1748 1742 + 1743 1744 1745 1746 1747 1748 1743 1744 1745 1746 + 1744 1745 1746 1745 1746 0 1747 1748 1749 1750 + 1751 1752 1765 1748 1749 1750 1749 1750 1751 1752 + 1753 1754 1758 1765 1766 1767 1750 1751 1752 1765 + 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 + 1761 1765 1766 1767 1768 1769 1752 1753 1754 1758 + 1765 1766 1767 1753 1754 1755 1756 1757 1758 1759 + 1760 1761 1762 1763 1764 1765 1766 1767 1754 1755 + 1756 1757 1758 1759 1760 1761 1765 1755 1756 1757 + 1758 1759 1760 1761 1765 1756 1757 1758 1757 1758 + 1758 1759 1760 1761 1762 1763 1764 1765 1760 1761 + 1762 1763 1764 1761 1762 1763 1764 1762 1763 1764 + 1763 1764 1764 0 1766 1767 1768 1769 1770 1771 + 1775 1767 1768 1769 1768 1769 1770 1771 1772 1773 + 1774 1775 1776 1777 1769 1770 1771 1775 1770 1771 + 1772 1773 1774 1775 1776 1777 1778 1779 1771 1772 + 1773 1774 1775 1776 1777 1772 1773 1774 1775 1776 + 1777 1773 1774 1775 1774 1775 1775 1776 1777 1778 + 1779 1780 1781 1792 1777 1778 1779 1778 1779 1780 + 1781 1782 1783 1784 1792 1793 1794 1779 1780 1781 + 1792 1780 1781 1782 1783 1784 1785 1790 1792 1793 + 1794 1795 1796 1781 1782 1783 1784 1792 1793 1794 + 1782 1783 1784 1785 1786 1788 1790 1791 1792 1793 + 1794 1783 1784 1785 1790 1792 1784 1785 1790 1792 + 1785 1786 1787 1788 1789 1790 1791 1792 1786 1787 + 1788 1789 1790 1791 1787 1788 1789 1790 1791 1788 + 1789 1790 1789 1790 1791 1790 1791 1791 0 1793 + 1794 1795 1796 1797 1798 1804 1794 1795 1796 1795 + 1796 1797 1798 1799 1800 1801 1804 1805 1806 1796 + 1797 1798 1804 1797 1798 1799 1800 1801 1802 1803 + 1804 1805 1806 1807 1808 1798 1799 1800 1801 1804 + 1805 1806 1799 1800 1801 1802 1803 1804 1805 1806 + 1800 1801 1802 1803 1804 1801 1802 1803 1804 1802 + 1803 1804 1803 0 1805 1806 1807 1808 1809 1810 + 1823 1806 1807 1808 1807 1808 1809 1810 1811 1812 + 1816 1823 1824 1825 1808 1809 1810 1823 1809 1810 + 1811 1812 1813 1814 1815 1816 1817 1818 1819 1823 + 1824 1825 1826 1827 1810 1811 1812 1816 1823 1824 + 1825 1811 1812 1813 1814 1815 1816 1817 1818 1819 + 1820 1821 1822 1823 1824 1825 1812 1813 1814 1815 + 1816 1817 1818 1819 1823 1813 1814 1815 1816 1817 + 1818 1819 1823 1814 1815 1816 1815 1816 1816 1817 + 1818 1819 1820 1821 1822 1823 1818 1819 1820 1821 + 1822 1819 1820 1821 1822 1820 1821 1822 1821 1822 + 1822 0 1824 1825 1826 1827 1828 1829 1834 1825 + 1826 1827 1826 1827 1828 1829 1830 1831 1832 1834 + 1835 1836 1827 1828 1829 1834 1828 1829 1830 1831 + 1832 1833 1834 1835 1836 1837 1838 1829 1830 1831 + 1832 1834 1835 1836 1830 1831 1832 1833 1834 1835 + 1836 1831 1832 1833 1834 1832 1833 1834 1833 1834 + 0 1835 1836 1837 1838 1839 1840 1844 1836 1837 + 1838 1837 1838 1839 1840 1841 1842 1843 1844 1845 + 1846 1838 1839 1840 1844 1839 1840 1841 1842 1843 + 1844 1845 1846 1847 1848 1840 1841 1842 1843 1844 + 1845 1846 1841 1842 1843 1844 1845 1846 1842 1843 + 1844 1843 1844 1844 1845 1846 1847 1848 1849 1850 + 1865 1846 1847 1848 1847 1848 1849 1850 1851 1852 + 1853 1865 1866 1867 1848 1849 1850 1865 1849 1850 + 1851 1852 1853 1854 1863 1865 1866 1867 1868 1869 + 1850 1851 1852 1853 1865 1866 1867 1851 1852 1853 + 1854 1855 1856 1861 1863 1864 1865 1866 1867 1852 + 1853 1854 1863 1865 1853 1854 1863 1865 1854 1855 + 1856 1857 1858 1861 1862 1863 1864 1865 1855 1856 + 1857 1858 1859 1861 1863 1864 1856 1857 1858 1863 + 1857 1858 1859 1860 1861 1862 1863 1858 1859 1861 + 1859 1860 1861 1862 1863 1864 1860 1861 1862 1863 + 1861 1862 1863 1864 1863 1864 1864 0 1866 1867 + 1868 1869 1870 1871 1876 1867 1868 1869 1868 1869 + 1870 1871 1872 1873 1874 1876 1877 1878 1869 1870 + 1871 1876 1870 1871 1872 1873 1874 1875 1876 1877 + 1878 1879 1880 1871 1872 1873 1874 1876 1877 1878 + 1872 1873 1874 1875 1876 1877 1878 1873 1874 1875 + 1876 1874 1875 1876 1875 1876 0 1877 1878 1879 + 1880 1881 1882 1896 1878 1879 1880 1879 1880 1881 + 1882 1883 1884 1885 1896 1897 1898 1880 1881 1882 + 1896 1881 1882 1883 1884 1885 1886 1894 1896 1897 + 1898 1899 1900 1882 1883 1884 1885 1896 1897 1898 + 1883 1884 1885 1886 1887 1888 1892 1894 1895 1896 + 1897 1898 1884 1885 1886 1894 1896 1885 1886 1894 + 1896 1886 1887 1888 1889 1890 1892 1893 1894 1895 + 1896 1887 1888 1889 1890 1891 1892 1894 1895 1888 + 1889 1890 1894 1889 1890 1891 1892 1893 1894 1890 + 1891 1892 1891 1892 1893 1894 1895 1892 1893 1894 + 1893 1894 1895 1894 1895 1895 0 1897 1898 1899 + 1900 1901 1902 1906 1898 1899 1900 1899 1900 1901 + 1902 1903 1904 1905 1906 1907 1908 1900 1901 1902 + 1906 1901 1902 1903 1904 1905 1906 1907 1908 1909 + 1910 1902 1903 1904 1905 1906 1907 1908 1903 1904 + 1905 1906 1907 1908 1904 1905 1906 1905 1906 1906 + 1907 1908 1909 1910 1911 1912 1916 1908 1909 1910 + 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 + 1910 1911 1912 1916 1911 1912 1913 1914 1915 1916 + 1917 1918 1919 1920 1912 1913 1914 1915 1916 1917 + 1918 1913 1914 1915 1916 1917 1918 1914 1915 1916 + 1915 1916 1916 1917 1918 1919 1920 1921 1922 1935 + 1918 1919 1920 1919 1920 1921 1922 1923 1924 1925 + 1935 1936 1937 1920 1921 1922 1935 1921 1922 1923 + 1924 1925 1926 1927 1931 1935 1936 1937 1938 1939 + 1922 1923 1924 1925 1935 1936 1937 1923 1924 1925 + 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 + 1936 1937 1924 1925 1926 1927 1931 1935 1925 1926 + 1927 1931 1935 1926 1927 1928 1929 1930 1931 1932 + 1933 1934 1935 1927 1928 1929 1930 1931 1932 1933 + 1934 1928 1929 1930 1931 1932 1933 1934 1929 1930 + 1931 1930 1931 1931 1932 1933 1934 1933 1934 1934 + 0 1936 1937 1938 1939 1940 1941 1945 1937 1938 + 1939 1938 1939 1940 1941 1942 1943 1944 1945 1946 + 1947 1939 1940 1941 1945 1940 1941 1942 1943 1944 + 1945 1946 1947 1948 1949 1941 1942 1943 1944 1945 + 1946 1947 1942 1943 1944 1945 1946 1947 1943 1944 + 1945 1944 1945 1945 1946 1947 1948 1949 1950 1951 + 1967 1947 1948 1949 1948 1949 1950 1951 1952 1953 + 1954 1967 1968 1969 1949 1950 1951 1967 1950 1951 + 1952 1953 1954 1955 1956 1957 1967 1968 1969 1970 + 1971 1951 1952 1953 1954 1967 1968 1969 1952 1953 + 1954 1955 1956 1957 1958 1959 1960 1967 1968 1969 + 1953 1954 1955 1956 1957 1967 1954 1955 1956 1957 + 1967 1955 1956 1957 1958 1959 1960 1961 1962 1963 + 1967 1956 1957 1958 1959 1960 1957 1958 1959 1960 + 1958 1959 1960 1961 1962 1963 1964 1965 1966 1959 + 1960 1961 1962 1963 1960 1961 1962 1963 1961 1962 + 1963 1964 1965 1966 1962 1963 1964 1965 1966 1963 + 1964 1965 1966 1964 1965 1966 1965 1966 1966 0 + 1968 1969 1970 1971 1972 1973 1982 1969 1970 1971 + 1970 1971 1972 1973 1974 1975 1976 1982 1983 1984 + 1971 1972 1973 1982 1972 1973 1974 1975 1976 1977 + 1978 1979 1982 1983 1984 1985 1986 1973 1974 1975 + 1976 1982 1983 1984 1974 1975 1976 1977 1978 1979 + 1980 1981 1982 1983 1984 1975 1976 1977 1978 1979 + 1982 1976 1977 1978 1979 1982 1977 1978 1979 1980 + 1981 1982 1978 1979 1980 1981 1979 1980 1981 1980 + 1981 1981 0 1983 1984 1985 1986 1987 1988 1989 + 1984 1985 1986 1985 1986 1987 1988 1989 1990 1991 + 1986 1987 1988 1989 1987 1988 1989 1990 1991 1992 + 1993 1988 1989 1990 1991 1989 1990 1991 1990 1991 + 1992 1993 1994 1995 2013 1991 1992 1993 1992 1993 + 1994 1995 1996 1997 1998 2013 2014 2015 1993 1994 + 1995 2013 1994 1995 1996 1997 1998 1999 2000 2001 + 2013 2014 2015 2016 2017 1995 1996 1997 1998 2013 + 2014 2015 1996 1997 1998 1999 2000 2001 2002 2003 + 2004 2013 2014 2015 1997 1998 1999 2000 2001 2013 + 1998 1999 2000 2001 2013 1999 2000 2001 2002 2003 + 2004 2005 2006 2013 2000 2001 2002 2003 2004 2001 + 2002 2003 2004 2002 2003 2004 2005 2006 2007 2010 + 2003 2004 2005 2006 2004 2005 2006 2005 2006 2007 + 2008 2009 2010 2011 2012 2006 2007 2010 2007 2008 + 2009 2010 2011 2012 2008 2009 2010 2011 2012 2009 + 2010 2010 2011 2012 2012 0 2014 2015 2016 2017 + 2018 2019 2024 2015 2016 2017 2016 2017 2018 2019 + 2020 2021 2022 2024 2025 2026 2017 2018 2019 2024 + 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 + 2028 2019 2020 2021 2022 2024 2025 2026 2020 2021 + 2022 2023 2024 2025 2026 2021 2022 2023 2024 2022 + 2023 2024 2023 2024 0 2025 2026 2027 2028 2029 + 2030 2041 2026 2027 2028 2027 2028 2029 2030 2031 + 2032 2033 2041 2042 2043 2028 2029 2030 2041 2029 + 2030 2031 2032 2033 2034 2035 2036 2041 2042 2043 + 2044 2045 2030 2031 2032 2033 2041 2042 2043 2031 + 2032 2033 2034 2035 2036 2037 2041 2042 2043 2032 + 2033 2034 2035 2036 2041 2033 2034 2035 2036 2041 + 2034 2035 2036 2037 2038 2039 2040 2041 2035 2036 + 2037 2036 2037 2037 2038 2039 2040 2038 2039 2040 + 2039 2040 2040 0 2042 2043 2044 2045 2046 2047 + 2058 2043 2044 2045 2044 2045 2046 2047 2048 2049 + 2050 2058 2059 2060 2045 2046 2047 2058 2046 2047 + 2048 2049 2050 2051 2052 2053 2058 2059 2060 2061 + 2062 2047 2048 2049 2050 2058 2059 2060 2048 2049 + 2050 2051 2052 2053 2054 2058 2059 2060 2049 2050 + 2051 2052 2053 2058 2050 2051 2052 2053 2058 2051 + 2052 2053 2054 2055 2056 2057 2058 2052 2053 2054 + 2053 2054 2054 2055 2056 2057 2055 2056 2057 2056 + 2057 2057 0 2059 2060 2061 2062 2063 2064 2080 + 2060 2061 2062 2061 2062 2063 2064 2065 2066 2067 + 2080 2081 2082 2062 2063 2064 2080 2063 2064 2065 + 2066 2067 2068 2069 2070 2080 2081 2082 2083 2084 + 2064 2065 2066 2067 2080 2081 2082 2065 2066 2067 + 2068 2069 2070 2071 2072 2073 2080 2081 2082 2066 + 2067 2068 2069 2070 2080 2067 2068 2069 2070 2080 + 2068 2069 2070 2071 2072 2073 2074 2075 2076 2080 + 2069 2070 2071 2072 2073 2070 2071 2072 2073 2071 + 2072 2073 2074 2075 2076 2077 2078 2079 2072 2073 + 2074 2075 2076 2073 2074 2075 2076 2074 2075 2076 + 2077 2078 2079 2075 2076 2077 2078 2079 2076 2077 + 2078 2079 2077 2078 2079 2078 2079 2079 0 2081 + 2082 2083 2084 2085 2086 2094 2082 2083 2084 2083 + 2084 2085 2086 2087 2088 2089 2094 2095 2096 2084 + 2085 2086 2094 2085 2086 2087 2088 2089 2090 2091 + 2094 2095 2096 2097 2098 2086 2087 2088 2089 2094 + 2095 2096 2087 2088 2089 2090 2091 2092 2093 2094 + 2095 2096 2088 2089 2090 2091 2094 2089 2090 2091 + 2094 2090 2091 2092 2093 2094 2091 2092 2093 2092 + 2093 2093 0 2095 2096 2097 2098 2099 2100 2118 + 2096 2097 2098 2097 2098 2099 2100 2101 2102 2103 + 2118 2119 2120 2098 2099 2100 2118 2099 2100 2101 + 2102 2103 2104 2105 2106 2118 2119 2120 2121 2122 + 2100 2101 2102 2103 2118 2119 2120 2101 2102 2103 + 2104 2105 2106 2107 2108 2109 2118 2119 2120 2102 + 2103 2104 2105 2106 2118 2103 2104 2105 2106 2118 + 2104 2105 2106 2107 2108 2109 2110 2111 2118 2105 + 2106 2107 2108 2109 2106 2107 2108 2109 2107 2108 + 2109 2110 2111 2112 2115 2108 2109 2110 2111 2109 + 2110 2111 2110 2111 2112 2113 2114 2115 2116 2117 + 2111 2112 2115 2112 2113 2114 2115 2116 2117 2113 + 2114 2115 2116 2117 2114 2115 2115 2116 2117 2117 + 0 2119 2120 2121 2122 2123 2124 2132 2120 2121 + 2122 2121 2122 2123 2124 2125 2126 2127 2132 2133 + 2134 2122 2123 2124 2132 2123 2124 2125 2126 2127 + 2128 2129 2132 2133 2134 2135 2136 2124 2125 2126 + 2127 2132 2133 2134 2125 2126 2127 2128 2129 2130 + 2131 2132 2133 2134 2126 2127 2128 2129 2132 2127 + 2128 2129 2132 2128 2129 2130 2131 2132 2129 2130 + 2131 2130 2131 2131 0 2133 2134 2135 2136 2137 + 2138 2142 2134 2135 2136 2135 2136 2137 2138 2139 + 2140 2141 2142 2143 2144 2136 2137 2138 2142 2137 + 2138 2139 2140 2141 2142 2143 2144 2145 2146 2138 + 2139 2140 2141 2142 2143 2144 2139 2140 2141 2142 + 2143 2144 2140 2141 2142 2141 2142 2142 2143 2144 + 2145 2146 2147 2148 2153 2144 2145 2146 2145 2146 + 2147 2148 2149 2150 2151 2153 2154 2155 2146 2147 + 2148 2153 2147 2148 2149 2150 2151 2152 2153 2154 + 2155 2156 2157 2148 2149 2150 2151 2153 2154 2155 + 2149 2150 2151 2152 2153 2154 2155 2150 2151 2152 + 2153 2151 2152 2153 2152 2153 0 2154 2155 2156 + 2157 2158 2159 2170 2155 2156 2157 2156 2157 2158 + 2159 2160 2161 2162 2170 2171 2172 2157 2158 2159 + 2170 2158 2159 2160 2161 2162 2163 2164 2165 2170 + 2171 2172 2173 2174 2159 2160 2161 2162 2170 2171 + 2172 2160 2161 2162 2163 2164 2165 2166 2170 2171 + 2172 2161 2162 2163 2164 2165 2170 2162 2163 2164 + 2165 2170 2163 2164 2165 2166 2167 2168 2169 2170 + 2164 2165 2166 2165 2166 2166 2167 2168 2169 2167 + 2168 2169 2168 2169 2169 0 2171 2172 2173 2174 + 2175 2176 2186 2172 2173 2174 2173 2174 2175 2176 + 2177 2178 2182 2186 2187 2188 2174 2175 2176 2186 + 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 + 2185 2186 2187 2188 2189 2190 2176 2177 2178 2182 + 2186 2187 2188 2177 2178 2179 2180 2181 2182 2183 + 2184 2185 2186 2187 2188 2178 2179 2180 2181 2182 + 2183 2184 2185 2186 2179 2180 2181 2182 2183 2184 + 2185 2186 2180 2181 2182 2181 2182 2182 2183 2184 + 2185 2186 2184 2185 2185 0 2187 2188 2189 2190 + 2191 2192 2196 2188 2189 2190 2189 2190 2191 2192 + 2193 2194 2195 2196 2197 2198 2190 2191 2192 2196 + 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 + 2192 2193 2194 2195 2196 2197 2198 2193 2194 2195 + 2196 2197 2198 2194 2195 2196 2195 2196 2196 2197 + 2198 2199 2200 2201 2202 2215 2198 2199 2200 2199 + 2200 2201 2202 2203 2204 2205 2215 2216 2217 2200 + 2201 2202 2215 2201 2202 2203 2204 2205 2206 2207 + 2211 2215 2216 2217 2218 2219 2202 2203 2204 2205 + 2215 2216 2217 2203 2204 2205 2206 2207 2208 2209 + 2210 2211 2212 2213 2214 2215 2216 2217 2204 2205 + 2206 2207 2211 2215 2205 2206 2207 2211 2215 2206 + 2207 2208 2209 2210 2211 2212 2213 2214 2215 2207 + 2208 2209 2210 2211 2212 2213 2214 2208 2209 2210 + 2211 2212 2213 2214 2209 2210 2211 2210 2211 2211 + 2212 2213 2214 2213 2214 2214 0 2216 2217 2218 + 2219 2220 2221 2229 2217 2218 2219 2218 2219 2220 + 2221 2222 2223 2227 2229 2230 2231 2219 2220 2221 + 2229 2220 2221 2222 2223 2224 2225 2226 2227 2228 + 2229 2230 2231 2232 2233 2221 2222 2223 2227 2229 + 2230 2231 2222 2223 2224 2225 2226 2227 2228 2229 + 2230 2231 2223 2224 2225 2226 2227 2228 2229 2224 + 2225 2226 2227 2228 2229 2225 2226 2227 2226 2227 + 2227 2228 2229 0 2230 2231 2232 2233 2234 2235 + 2250 2231 2232 2233 2232 2233 2234 2235 2236 2237 + 2238 2250 2251 2252 2233 2234 2235 2250 2234 2235 + 2236 2237 2238 2239 2248 2250 2251 2252 2253 2254 + 2235 2236 2237 2238 2250 2251 2252 2236 2237 2238 + 2239 2240 2241 2246 2248 2249 2250 2251 2252 2237 + 2238 2239 2248 2250 2238 2239 2248 2250 2239 2240 + 2241 2242 2243 2246 2247 2248 2249 2250 2240 2241 + 2242 2243 2244 2246 2248 2249 2241 2242 2243 2248 + 2242 2243 2244 2245 2246 2247 2248 2243 2244 2246 + 2244 2245 2246 2247 2248 2249 2245 2246 2247 2248 + 2246 2247 2248 2249 2248 2249 2249 0 2251 2252 + 2253 2254 2255 2256 2269 2252 2253 2254 2253 2254 + 2255 2256 2257 2258 2262 2269 2270 2271 2254 2255 + 2256 2269 2255 2256 2257 2258 2259 2260 2261 2262 + 2263 2264 2265 2269 2270 2271 2272 2273 2256 2257 + 2258 2262 2269 2270 2271 2257 2258 2259 2260 2261 + 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 + 2258 2259 2260 2261 2262 2263 2264 2265 2269 2259 + 2260 2261 2262 2263 2264 2265 2269 2260 2261 2262 + 2261 2262 2262 2263 2264 2265 2266 2267 2268 2269 + 2264 2265 2266 2267 2268 2265 2266 2267 2268 2266 + 2267 2268 2267 2268 2268 0 2270 2271 2272 2273 + 2274 2275 2276 2271 2272 2273 2272 2273 2274 2275 + 2276 2277 2278 2273 2274 2275 2276 2274 2275 2276 + 2277 2278 2279 2280 2275 2276 2277 2278 2276 2277 + 2278 2277 2278 2279 2280 2281 2282 2286 2278 2279 + 2280 2279 2280 2281 2282 2283 2284 2285 2286 2287 + 2288 2280 2281 2282 2286 2281 2282 2283 2284 2285 + 2286 2287 2288 2289 2290 2282 2283 2284 2285 2286 + 2287 2288 2283 2284 2285 2286 2287 2288 2284 2285 + 2286 2285 2286 2286 2287 2288 2289 2290 2291 2292 + 2301 2288 2289 2290 2289 2290 2291 2292 2293 2294 + 2295 2301 2302 2303 2290 2291 2292 2301 2291 2292 + 2293 2294 2295 2296 2297 2298 2301 2302 2303 2304 + 2305 2292 2293 2294 2295 2301 2302 2303 2293 2294 + 2295 2296 2297 2298 2299 2300 2301 2302 2303 2294 + 2295 2296 2297 2298 2301 2295 2296 2297 2298 2301 + 2296 2297 2298 2299 2300 2301 2297 2298 2299 2300 + 2298 2299 2300 2299 2300 2300 0 2302 2303 2304 + 2305 2306 2307 2323 2303 2304 2305 2304 2305 2306 + 2307 2308 2309 2310 2323 2324 2325 2305 2306 2307 + 2323 2306 2307 2308 2309 2310 2311 2312 2313 2323 + 2324 2325 2326 2327 2307 2308 2309 2310 2323 2324 + 2325 2308 2309 2310 2311 2312 2313 2314 2315 2316 + 2323 2324 2325 2309 2310 2311 2312 2313 2323 2310 + 2311 2312 2313 2323 2311 2312 2313 2314 2315 2316 + 2317 2318 2319 2323 2312 2313 2314 2315 2316 2313 + 2314 2315 2316 2314 2315 2316 2317 2318 2319 2320 + 2321 2322 2315 2316 2317 2318 2319 2316 2317 2318 + 2319 2317 2318 2319 2320 2321 2322 2318 2319 2320 + 2321 2322 2319 2320 2321 2322 2320 2321 2322 2321 + 2322 2322 0 2324 2325 2326 2327 2328 2329 2333 + 2325 2326 2327 2326 2327 2328 2329 2330 2331 2332 + 2333 2334 2335 2327 2328 2329 2333 2328 2329 2330 + 2331 2332 2333 2334 2335 2336 2337 2329 2330 2331 + 2332 2333 2334 2335 2330 2331 2332 2333 2334 2335 + 2331 2332 2333 2332 2333 2333 2334 2335 2336 2337 + 2338 2339 2350 2335 2336 2337 2336 2337 2338 2339 + 2340 2341 2342 2350 2351 2352 2337 2338 2339 2350 + 2338 2339 2340 2341 2342 2343 2344 2345 2350 2351 + 2352 2353 2362 2339 2340 2341 2342 2350 2351 2352 + 2340 2341 2342 2343 2344 2345 2346 2350 2351 2352 + 2341 2342 2343 2344 2345 2350 2342 2343 2344 2345 + 2350 2343 2344 2345 2346 2347 2348 2349 2350 2344 + 2345 2346 2345 2346 2346 2347 2348 2349 2347 2348 + 2349 2348 2349 2349 0 2351 2352 2353 2354 2355 + 2356 2359 2362 2363 2364 2352 2353 2362 2353 2354 + 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 + 2365 2366 2354 2355 2356 2357 2358 2359 2360 2361 + 2362 2363 2364 2355 2356 2357 2358 2359 2362 2356 + 2357 2358 2359 2362 2357 2358 2359 2360 2361 2362 + 2363 2364 2358 2359 2360 2361 2362 2359 2360 2361 + 2362 2360 2361 2362 2363 2364 2365 2366 2361 2362 + 2363 2364 2362 2363 2364 2363 2364 2365 2366 2367 + 2368 2364 2365 2366 2365 2366 2367 2368 2369 2370 + 2375 2366 2367 2368 2367 2368 2369 2370 2371 2372 + 2373 2375 2376 2377 2368 2369 2370 2375 2369 2370 + 2371 2372 2373 2374 2375 2376 2377 2378 2379 2370 + 2371 2372 2373 2375 2376 2377 2371 2372 2373 2374 + 2375 2376 2377 2372 2373 2374 2375 2373 2374 2375 + 2374 2375 0 2376 2377 2378 2379 2380 2381 2396 + 2377 2378 2379 2378 2379 2380 2381 2382 2383 2384 + 2396 2397 2398 2379 2380 2381 2396 2380 2381 2382 + 2383 2384 2385 2394 2396 2397 2398 2399 2400 2381 + 2382 2383 2384 2396 2397 2398 2382 2383 2384 2385 + 2386 2387 2392 2394 2395 2396 2397 2398 2383 2384 + 2385 2394 2396 2384 2385 2394 2396 2385 2386 2387 + 2388 2389 2392 2393 2394 2395 2396 2386 2387 2388 + 2389 2390 2392 2394 2395 2387 2388 2389 2394 2388 + 2389 2390 2391 2392 2393 2394 2389 2390 2392 2390 + 2391 2392 2393 2394 2395 2391 2392 2393 2394 2392 + 2393 2394 2395 2394 2395 2395 0 2397 2398 2399 + 2400 2401 2402 2410 2398 2399 2400 2399 2400 2401 + 2402 2403 2404 2405 2410 2411 2412 2400 2401 2402 + 2410 2401 2402 2403 2404 2405 2406 2407 2410 2411 + 2412 2413 2414 2402 2403 2404 2405 2410 2411 2412 + 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 + 2404 2405 2406 2407 2410 2405 2406 2407 2410 2406 + 2407 2408 2409 2410 2407 2408 2409 2408 2409 2409 + 0 2411 2412 2413 2414 2415 2416 2424 2412 2413 + 2414 2413 2414 2415 2416 2417 2418 2422 2424 2425 + 2426 2414 2415 2416 2424 2415 2416 2417 2418 2419 + 2420 2421 2422 2423 2424 2425 2426 2427 2428 2416 + 2417 2418 2422 2424 2425 2426 2417 2418 2419 2420 + 2421 2422 2423 2424 2425 2426 2418 2419 2420 2421 + 2422 2423 2424 2419 2420 2421 2422 2423 2424 2420 + 2421 2422 2421 2422 2422 2423 2424 0 2425 2426 + 2427 2428 2429 2430 2441 2426 2427 2428 2427 2428 + 2429 2430 2431 2432 2433 2441 2442 2443 2428 2429 + 2430 2441 2429 2430 2431 2432 2433 2434 2435 2436 + 2441 2442 2443 2444 2445 2430 2431 2432 2433 2441 + 2442 2443 2431 2432 2433 2434 2435 2436 2437 2441 + 2442 2443 2432 2433 2434 2435 2436 2441 2433 2434 + 2435 2436 2441 2434 2435 2436 2437 2438 2439 2440 + 2441 2435 2436 2437 2436 2437 2437 2438 2439 2440 + 2438 2439 2440 2439 2440 2440 0 2442 2443 2444 + 2445 2446 2447 2448 2443 2444 2445 2444 2445 2446 + 2447 2448 2449 2450 2445 2446 2447 2448 2446 2447 + 2448 2449 2450 2451 2452 2447 2448 2449 2450 2448 + 2449 2450 2449 2450 2451 2452 2453 2454 2464 2450 + 2451 2452 2451 2452 2453 2454 2455 2456 2460 2464 + 2465 2466 2452 2453 2454 2464 2453 2454 2455 2456 + 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 + 2467 2468 2454 2455 2456 2460 2464 2465 2466 2455 + 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 + 2466 2456 2457 2458 2459 2460 2461 2462 2463 2464 + 2457 2458 2459 2460 2461 2462 2463 2464 2458 2459 + 2460 2459 2460 2460 2461 2462 2463 2464 2462 2463 + 2463 0 2465 2466 2467 2468 2469 2470 2474 2466 + 2467 2468 2467 2468 2469 2470 2471 2472 2473 2474 + 2475 2476 2468 2469 2470 2474 2469 2470 2471 2472 + 2473 2474 2475 2476 2477 2478 2470 2471 2472 2473 + 2474 2475 2476 2471 2472 2473 2474 2475 2476 2472 + 2473 2474 2473 2474 2474 2475 2476 2477 2478 2479 + 2480 2496 2476 2477 2478 2477 2478 2479 2480 2481 + 2482 2483 2496 2497 2498 2478 2479 2480 2496 2479 + 2480 2481 2482 2483 2484 2485 2486 2496 2497 2498 + 2499 2500 2480 2481 2482 2483 2496 2497 2498 2481 + 2482 2483 2484 2485 2486 2487 2488 2489 2496 2497 + 2498 2482 2483 2484 2485 2486 2496 2483 2484 2485 + 2486 2496 2484 2485 2486 2487 2488 2489 2490 2491 + 2492 2496 2485 2486 2487 2488 2489 2486 2487 2488 + 2489 2487 2488 2489 2490 2491 2492 2493 2494 2495 + 2488 2489 2490 2491 2492 2489 2490 2491 2492 2490 + 2491 2492 2493 2494 2495 2491 2492 2493 2494 2495 + 2492 2493 2494 2495 2493 2494 2495 2494 2495 2495 + 0 2497 2498 2499 2500 2501 2502 2506 2498 2499 + 2500 2499 2500 2501 2502 2503 2504 2505 2506 2507 + 2508 2500 2501 2502 2506 2501 2502 2503 2504 2505 + 2506 2507 2508 2509 2510 2502 2503 2504 2505 2506 + 2507 2508 2503 2504 2505 2506 2507 2508 2504 2505 + 2506 2505 2506 2506 2507 2508 2509 2510 2511 2512 + 2517 2508 2509 2510 2509 2510 2511 2512 2513 2514 + 2515 2517 2518 2519 2510 2511 2512 2517 2511 2512 + 2513 2514 2515 2516 2517 2518 2519 2520 2521 2512 + 2513 2514 2515 2517 2518 2519 2513 2514 2515 2516 + 2517 2518 2519 2514 2515 2516 2517 2515 2516 2517 + 2516 2517 0 2518 2519 2520 2521 2522 2523 2536 + 2519 2520 2521 2520 2521 2522 2523 2524 2525 2526 + 2536 2537 2538 2521 2522 2523 2536 2522 2523 2524 + 2525 2526 2527 2528 2532 2536 2537 2538 2539 2540 + 2523 2524 2525 2526 2536 2537 2538 2524 2525 2526 + 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 + 2537 2538 2525 2526 2527 2528 2532 2536 2526 2527 + 2528 2532 2536 2527 2528 2529 2530 2531 2532 2533 + 2534 2535 2536 2528 2529 2530 2531 2532 2533 2534 + 2535 2529 2530 2531 2532 2533 2534 2535 2530 2531 + 2532 2531 2532 2532 2533 2534 2535 2534 2535 2535 + 0 2537 2538 2539 2540 2541 2542 2551 2538 2539 + 2540 2539 2540 2541 2542 2543 2544 2545 2551 2552 + 2553 2540 2541 2542 2551 2541 2542 2543 2544 2545 + 2546 2547 2548 2551 2552 2553 2554 2555 2542 2543 + 2544 2545 2551 2552 2553 2543 2544 2545 2546 2547 + 2548 2549 2550 2551 2552 2553 2544 2545 2546 2547 + 2548 2551 2545 2546 2547 2548 2551 2546 2547 2548 + 2549 2550 2551 2547 2548 2549 2550 2548 2549 2550 + 2549 2550 2550 0 2552 2553 2554 2555 2556 2557 + 2561 2553 2554 2555 2554 2555 2556 2557 2558 2559 + 2560 2561 2562 2563 2555 2556 2557 2561 2556 2557 + 2558 2559 2560 2561 2562 2563 2564 2565 2557 2558 + 2559 2560 2561 2562 2563 2558 2559 2560 2561 2562 + 2563 2559 2560 2561 2560 2561 2561 2562 2563 2564 + 2565 2566 2567 2575 2563 2564 2565 2564 2565 2566 + 2567 2568 2569 2573 2575 2576 2577 2565 2566 2567 + 2575 2566 2567 2568 2569 2570 2571 2572 2573 2574 + 2575 2576 2577 2578 2579 2567 2568 2569 2573 2575 + 2576 2577 2568 2569 2570 2571 2572 2573 2574 2575 + 2576 2577 2569 2570 2571 2572 2573 2574 2575 2570 + 2571 2572 2573 2574 2575 2571 2572 2573 2572 2573 + 2573 2574 2575 0 2576 2577 2578 2579 2580 2581 + 2591 2577 2578 2579 2578 2579 2580 2581 2582 2583 + 2587 2591 2592 2593 2579 2580 2581 2591 2580 2581 + 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 + 2592 2593 2594 2595 2581 2582 2583 2587 2591 2592 + 2593 2582 2583 2584 2585 2586 2587 2588 2589 2590 + 2591 2592 2593 2583 2584 2585 2586 2587 2588 2589 + 2590 2591 2584 2585 2586 2587 2588 2589 2590 2591 + 2585 2586 2587 2586 2587 2587 2588 2589 2590 2591 + 2589 2590 2590 0 2592 2593 2594 2595 2596 2597 + 2615 2593 2594 2595 2594 2595 2596 2597 2598 2599 + 2600 2615 2616 2617 2595 2596 2597 2615 2596 2597 + 2598 2599 2600 2601 2602 2603 2615 2616 2617 2618 + 2619 2597 2598 2599 2600 2615 2616 2617 2598 2599 + 2600 2601 2602 2603 2604 2605 2606 2615 2616 2617 + 2599 2600 2601 2602 2603 2615 2600 2601 2602 2603 + 2615 2601 2602 2603 2604 2605 2606 2607 2608 2615 + 2602 2603 2604 2605 2606 2603 2604 2605 2606 2604 + 2605 2606 2607 2608 2609 2612 2605 2606 2607 2608 + 2606 2607 2608 2607 2608 2609 2610 2611 2612 2613 + 2614 2608 2609 2612 2609 2610 2611 2612 2613 2614 + 2610 2611 2612 2613 2614 2611 2612 2612 2613 2614 + 2614 0 2616 2617 2618 2619 2620 2621 2636 2617 + 2618 2619 2618 2619 2620 2621 2622 2623 2624 2636 + 2637 2638 2619 2620 2621 2636 2620 2621 2622 2623 + 2624 2625 2634 2636 2637 2638 2639 2640 2621 2622 + 2623 2624 2636 2637 2638 2622 2623 2624 2625 2626 + 2627 2632 2634 2635 2636 2637 2638 2623 2624 2625 + 2634 2636 2624 2625 2634 2636 2625 2626 2627 2628 + 2629 2632 2633 2634 2635 2636 2626 2627 2628 2629 + 2630 2632 2634 2635 2627 2628 2629 2634 2628 2629 + 2630 2631 2632 2633 2634 2629 2630 2632 2630 2631 + 2632 2633 2634 2635 2631 2632 2633 2634 2632 2633 + 2634 2635 2634 2635 2635 0 2637 2638 2639 2640 + 2641 2642 2650 2638 2639 2640 2639 2640 2641 2642 + 2643 2644 2648 2650 2651 2652 2640 2641 2642 2650 + 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 + 2651 2652 2653 2654 2642 2643 2644 2648 2650 2651 + 2652 2643 2644 2645 2646 2647 2648 2649 2650 2651 + 2652 2644 2645 2646 2647 2648 2649 2650 2645 2646 + 2647 2648 2649 2650 2646 2647 2648 2647 2648 2648 + 2649 2650 0 2651 2652 2653 2654 2655 2656 2660 + 2652 2653 2654 2653 2654 2655 2656 2657 2658 2659 + 2660 2661 2662 2654 2655 2656 2660 2655 2656 2657 + 2658 2659 2660 2661 2662 2663 2664 2656 2657 2658 + 2659 2660 2661 2662 2657 2658 2659 2660 2661 2662 + 2658 2659 2660 2659 2660 2660 2661 2662 2663 2664 + 2665 2666 2679 2662 2663 2664 2663 2664 2665 2666 + 2667 2668 2669 2679 2680 2681 2664 2665 2666 2679 + 2665 2666 2667 2668 2669 2670 2671 2675 2679 2680 + 2681 2682 2683 2666 2667 2668 2669 2679 2680 2681 + 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 + 2677 2678 2679 2680 2681 2668 2669 2670 2671 2675 + 2679 2669 2670 2671 2675 2679 2670 2671 2672 2673 + 2674 2675 2676 2677 2678 2679 2671 2672 2673 2674 + 2675 2676 2677 2678 2672 2673 2674 2675 2676 2677 + 2678 2673 2674 2675 2674 2675 2675 2676 2677 2678 + 2677 2678 2678 0 2680 2681 2682 2683 2684 2685 + 2689 2681 2682 2683 2682 2683 2684 2685 2686 2687 + 2688 2689 2690 2691 2683 2684 2685 2689 2684 2685 + 2686 2687 2688 2689 2690 2691 2692 2693 2685 2686 + 2687 2688 2689 2690 2691 2686 2687 2688 2689 2690 + 2691 2687 2688 2689 2688 2689 2689 2690 2691 2692 + 2693 2694 2695 2708 2691 2692 2693 2692 2693 2694 + 2695 2696 2697 2698 2708 2709 2710 2693 2694 2695 + 2708 2694 2695 2696 2697 2698 2699 2700 2704 2708 + 2709 2710 2711 2712 2695 2696 2697 2698 2708 2709 + 2710 2696 2697 2698 2699 2700 2701 2702 2703 2704 + 2705 2706 2707 2708 2709 2710 2697 2698 2699 2700 + 2704 2708 2698 2699 2700 2704 2708 2699 2700 2701 + 2702 2703 2704 2705 2706 2707 2708 2700 2701 2702 + 2703 2704 2705 2706 2707 2701 2702 2703 2704 2705 + 2706 2707 2702 2703 2704 2703 2704 2704 2705 2706 + 2707 2706 2707 2707 0 2709 2710 2711 2712 2713 + 2714 2715 2710 2711 2712 2711 2712 2713 2714 2715 + 2716 2717 2712 2713 2714 2715 2713 2714 2715 2716 + 2717 2718 2719 2714 2715 2716 2717 2715 2716 2717 + 2716 2717 2718 2719 2720 2721 2730 2717 2718 2719 + 2718 2719 2720 2721 2722 2723 2724 2730 2731 2732 + 2719 2720 2721 2730 2720 2721 2722 2723 2724 2725 + 2726 2727 2730 2731 2732 2733 2734 2721 2722 2723 + 2724 2730 2731 2732 2722 2723 2724 2725 2726 2727 + 2728 2729 2730 2731 2732 2723 2724 2725 2726 2727 + 2730 2724 2725 2726 2727 2730 2725 2726 2727 2728 + 2729 2730 2726 2727 2728 2729 2727 2728 2729 2728 + 2729 2729 0 2731 2732 2733 2734 2735 2736 2742 + 2732 2733 2734 2733 2734 2735 2736 2737 2738 2739 + 2742 2743 2744 2734 2735 2736 2742 2735 2736 2737 + 2738 2739 2740 2741 2742 2743 2744 2745 2746 2736 + 2737 2738 2739 2742 2743 2744 2737 2738 2739 2740 + 2741 2742 2743 2744 2738 2739 2740 2741 2742 2739 + 2740 2741 2742 2740 2741 2742 2741 0 2743 2744 + 2745 2746 2747 2748 2749 2744 2745 2746 2745 2746 + 2747 2748 2749 2750 2751 2746 2747 2748 2749 2747 + 2748 2749 2750 2751 2752 2753 2748 2749 2750 2751 + 2749 2750 2751 2750 2751 2752 2753 2754 2755 2768 + 2751 2752 2753 2752 2753 2754 2755 2756 2757 2761 + 2768 2769 2770 2753 2754 2755 2768 2754 2755 2756 + 2757 2758 2759 2760 2761 2762 2763 2764 2768 2769 + 2770 2771 2772 2755 2756 2757 2761 2768 2769 2770 + 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 + 2766 2767 2768 2769 2770 2757 2758 2759 2760 2761 + 2762 2763 2764 2768 2758 2759 2760 2761 2762 2763 + 2764 2768 2759 2760 2761 2760 2761 2761 2762 2763 + 2764 2765 2766 2767 2768 2763 2764 2765 2766 2767 + 2764 2765 2766 2767 2765 2766 2767 2766 2767 2767 + 0 2769 2770 2771 2772 2773 2774 2790 2770 2771 + 2772 2771 2772 2773 2774 2775 2776 2777 2790 2791 + 2792 2772 2773 2774 2790 2773 2774 2775 2776 2777 + 2778 2779 2780 2790 2791 2792 2793 2794 2774 2775 + 2776 2777 2790 2791 2792 2775 2776 2777 2778 2779 + 2780 2781 2782 2783 2790 2791 2792 2776 2777 2778 + 2779 2780 2790 2777 2778 2779 2780 2790 2778 2779 + 2780 2781 2782 2783 2784 2785 2786 2790 2779 2780 + 2781 2782 2783 2780 2781 2782 2783 2781 2782 2783 + 2784 2785 2786 2787 2788 2789 2782 2783 2784 2785 + 2786 2783 2784 2785 2786 2784 2785 2786 2787 2788 + 2789 2785 2786 2787 2788 2789 2786 2787 2788 2789 + 2787 2788 2789 2788 2789 2789 0 2791 2792 2793 + 2794 2795 2796 2806 2792 2793 2794 2793 2794 2795 + 2796 2797 2798 2802 2806 2807 2808 2794 2795 2796 + 2806 2795 2796 2797 2798 2799 2800 2801 2802 2803 + 2804 2805 2806 2807 2808 2809 2810 2796 2797 2798 + 2802 2806 2807 2808 2797 2798 2799 2800 2801 2802 + 2803 2804 2805 2806 2807 2808 2798 2799 2800 2801 + 2802 2803 2804 2805 2806 2799 2800 2801 2802 2803 + 2804 2805 2806 2800 2801 2802 2801 2802 2802 2803 + 2804 2805 2806 2804 2805 2805 0 2807 2808 2809 + 2810 2811 2812 2820 2808 2809 2810 2809 2810 2811 + 2812 2813 2814 2815 2820 2821 2822 2810 2811 2812 + 2820 2811 2812 2813 2814 2815 2816 2817 2820 2821 + 2822 2823 2824 2812 2813 2814 2815 2820 2821 2822 + 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 + 2814 2815 2816 2817 2820 2815 2816 2817 2820 2816 + 2817 2818 2819 2820 2817 2818 2819 2818 2819 2819 + 0 2821 2822 2823 2824 2825 2826 2830 2822 2823 + 2824 2823 2824 2825 2826 2827 2828 2829 2830 2831 + 2832 2824 2825 2826 2830 2825 2826 2827 2828 2829 + 2830 2831 2832 2833 2834 2826 2827 2828 2829 2830 + 2831 2832 2827 2828 2829 2830 2831 2832 2828 2829 + 2830 2829 2830 2830 2831 2832 2833 2834 2835 2836 + 2846 2832 2833 2834 2833 2834 2835 2836 2837 2838 + 2842 2846 2847 2848 2834 2835 2836 2846 2835 2836 + 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 + 2847 2848 2849 2850 2836 2837 2838 2842 2846 2847 + 2848 2837 2838 2839 2840 2841 2842 2843 2844 2845 + 2846 2847 2848 2838 2839 2840 2841 2842 2843 2844 + 2845 2846 2839 2840 2841 2842 2843 2844 2845 2846 + 2840 2841 2842 2841 2842 2842 2843 2844 2845 2846 + 2844 2845 2845 0 2847 2848 2849 2850 2851 2852 + 2857 2848 2849 2850 2849 2850 2851 2852 2853 2854 + 2855 2857 2858 2859 2850 2851 2852 2857 2851 2852 + 2853 2854 2855 2856 2857 2858 2859 2860 2861 2852 + 2853 2854 2855 2857 2858 2859 2853 2854 2855 2856 + 2857 2858 2859 2854 2855 2856 2857 2855 2856 2857 + 2856 2857 0 2858 2859 2860 2861 2862 2863 2867 + 2859 2860 2861 2860 2861 2862 2863 2864 2865 2866 + 2867 2868 2869 2861 2862 2863 2867 2862 2863 2864 + 2865 2866 2867 2868 2869 2870 2871 2863 2864 2865 + 2866 2867 2868 2869 2864 2865 2866 2867 2868 2869 + 2865 2866 2867 2866 2867 2867 2868 2869 2870 2871 + 2872 2873 2874 2869 2870 2871 2870 2871 2872 2873 + 2874 2875 2876 2871 2872 2873 2874 2872 2873 2874 + 2875 2876 2877 2886 2873 2874 2875 2876 2874 2875 + 2876 2875 2876 2877 2878 2879 2880 2883 2886 2887 + 2888 2876 2877 2886 2877 2878 2879 2880 2881 2882 + 2883 2884 2885 2886 2887 2888 2889 2890 2878 2879 + 2880 2881 2882 2883 2884 2885 2886 2887 2888 2879 + 2880 2881 2882 2883 2886 2880 2881 2882 2883 2886 + 2881 2882 2883 2884 2885 2886 2887 2888 2882 2883 + 2884 2885 2886 2883 2884 2885 2886 2884 2885 2886 + 2887 2888 2889 2890 2885 2886 2887 2888 2886 2887 + 2888 2887 2888 2889 2890 2891 2892 2888 2889 2890 + 2889 2890 2891 2892 2893 2894 2907 2890 2891 2892 + 2891 2892 2893 2894 2895 2896 2900 2907 2908 2909 + 2892 2893 2894 2907 2893 2894 2895 2896 2897 2898 + 2899 2900 2901 2902 2903 2907 2908 2909 2910 2911 + 2894 2895 2896 2900 2907 2908 2909 2895 2896 2897 + 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 + 2908 2909 2896 2897 2898 2899 2900 2901 2902 2903 + 2907 2897 2898 2899 2900 2901 2902 2903 2907 2898 + 2899 2900 2899 2900 2900 2901 2902 2903 2904 2905 + 2906 2907 2902 2903 2904 2905 2906 2903 2904 2905 + 2906 2904 2905 2906 2905 2906 2906 0 2908 2909 + 2910 2911 2912 2913 2929 2909 2910 2911 2910 2911 + 2912 2913 2914 2915 2916 2929 2930 2931 2911 2912 + 2913 2929 2912 2913 2914 2915 2916 2917 2918 2919 + 2929 2930 2931 2932 2933 2913 2914 2915 2916 2929 + 2930 2931 2914 2915 2916 2917 2918 2919 2920 2921 + 2922 2929 2930 2931 2915 2916 2917 2918 2919 2929 + 2916 2917 2918 2919 2929 2917 2918 2919 2920 2921 + 2922 2923 2924 2925 2929 2918 2919 2920 2921 2922 + 2919 2920 2921 2922 2920 2921 2922 2923 2924 2925 + 2926 2927 2928 2921 2922 2923 2924 2925 2922 2923 + 2924 2925 2923 2924 2925 2926 2927 2928 2924 2925 + 2926 2927 2928 2925 2926 2927 2928 2926 2927 2928 + 2927 2928 2928 0 2930 2931 2932 2933 2934 2935 + 2943 2931 2932 2933 2932 2933 2934 2935 2936 2937 + 2941 2943 2944 2945 2933 2934 2935 2943 2934 2935 + 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 + 2946 2947 2935 2936 2937 2941 2943 2944 2945 2936 + 2937 2938 2939 2940 2941 2942 2943 2944 2945 2937 + 2938 2939 2940 2941 2942 2943 2938 2939 2940 2941 + 2942 2943 2939 2940 2941 2940 2941 2941 2942 2943 + 0 2944 2945 2946 2947 2948 2949 2962 2945 2946 + 2947 2946 2947 2948 2949 2950 2951 2952 2962 2963 + 2964 2947 2948 2949 2962 2948 2949 2950 2951 2952 + 2953 2954 2958 2962 2963 2964 2965 2966 2949 2950 + 2951 2952 2962 2963 2964 2950 2951 2952 2953 2954 + 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 + 2951 2952 2953 2954 2958 2962 2952 2953 2954 2958 + 2962 2953 2954 2955 2956 2957 2958 2959 2960 2961 + 2962 2954 2955 2956 2957 2958 2959 2960 2961 2955 + 2956 2957 2958 2959 2960 2961 2956 2957 2958 2957 + 2958 2958 2959 2960 2961 2960 2961 2961 0 2963 + 2964 2965 2966 2967 2968 2972 2964 2965 2966 2965 + 2966 2967 2968 2969 2970 2971 2972 2973 2974 2966 + 2967 2968 2972 2967 2968 2969 2970 2971 2972 2973 + 2974 2975 2976 2968 2969 2970 2971 2972 2973 2974 + 2969 2970 2971 2972 2973 2974 2970 2971 2972 2971 + 2972 2972 2973 2974 2975 2976 2977 2978 2982 2974 + 2975 2976 2975 2976 2977 2978 2979 2980 2981 2982 + 2983 2984 2976 2977 2978 2982 2977 2978 2979 2980 + 2981 2982 2983 2984 2985 2986 2978 2979 2980 2981 + 2982 2983 2984 2979 2980 2981 2982 2983 2984 2980 + 2981 2982 2981 2982 2982 2983 2984 2985 2986 2987 + 2988 2993 2984 2985 2986 2985 2986 2987 2988 2989 + 2990 2991 2993 2994 2995 2986 2987 2988 2993 2987 + 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 + 2988 2989 2990 2991 2993 2994 2995 2989 2990 2991 + 2992 2993 2994 2995 2990 2991 2992 2993 2991 2992 + 2993 2992 2993 0 2994 2995 2996 2997 2998 2999 + 3000 2995 2996 2997 2996 2997 2998 2999 3000 3001 + 3002 2997 2998 2999 3000 2998 2999 3000 3001 3002 + 3003 3004 2999 3000 3001 3002 3000 3001 3002 3001 + 3002 3003 3004 3005 3006 3019 3002 3003 3004 3003 + 3004 3005 3006 3007 3008 3012 3019 3020 3021 3004 + 3005 3006 3019 3005 3006 3007 3008 3009 3010 3011 + 3012 3013 3014 3015 3019 3020 3021 3022 3023 3006 + 3007 3008 3012 3019 3020 3021 3007 3008 3009 3010 + 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 + 3021 3008 3009 3010 3011 3012 3013 3014 3015 3019 + 3009 3010 3011 3012 3013 3014 3015 3019 3010 3011 + 3012 3011 3012 3012 3013 3014 3015 3016 3017 3018 + 3019 3014 3015 3016 3017 3018 3015 3016 3017 3018 + 3016 3017 3018 3017 3018 3018 0 3020 3021 3022 + 3023 3024 3025 3030 3021 3022 3023 3022 3023 3024 + 3025 3026 3027 3028 3030 3031 3032 3023 3024 3025 + 3030 3024 3025 3026 3027 3028 3029 3030 3031 3032 + 3033 3034 3025 3026 3027 3028 3030 3031 3032 3026 + 3027 3028 3029 3030 3031 3032 3027 3028 3029 3030 + 3028 3029 3030 3029 3030 0 3031 3032 3033 3034 + 3035 3036 3044 3032 3033 3034 3033 3034 3035 3036 + 3037 3038 3039 3044 3045 3046 3034 3035 3036 3044 + 3035 3036 3037 3038 3039 3040 3041 3044 3045 3046 + 3047 3048 3036 3037 3038 3039 3044 3045 3046 3037 + 3038 3039 3040 3041 3042 3043 3044 3045 3046 3038 + 3039 3040 3041 3044 3039 3040 3041 3044 3040 3041 + 3042 3043 3044 3041 3042 3043 3042 3043 3043 0 + 3045 3046 3047 3048 3049 3050 3064 3046 3047 3048 + 3047 3048 3049 3050 3051 3052 3053 3064 3065 3066 + 3048 3049 3050 3064 3049 3050 3051 3052 3053 3054 + 3062 3064 3065 3066 3067 3068 3050 3051 3052 3053 + 3064 3065 3066 3051 3052 3053 3054 3055 3056 3060 + 3062 3063 3064 3065 3066 3052 3053 3054 3062 3064 + 3053 3054 3062 3064 3054 3055 3056 3057 3058 3060 + 3061 3062 3063 3064 3055 3056 3057 3058 3059 3060 + 3062 3063 3056 3057 3058 3062 3057 3058 3059 3060 + 3061 3062 3058 3059 3060 3059 3060 3061 3062 3063 + 3060 3061 3062 3061 3062 3063 3062 3063 3063 0 + 3065 3066 3067 3068 3069 3070 3086 3066 3067 3068 + 3067 3068 3069 3070 3071 3072 3073 3086 3087 3088 + 3068 3069 3070 3086 3069 3070 3071 3072 3073 3074 + 3075 3076 3086 3087 3088 3089 3090 3070 3071 3072 + 3073 3086 3087 3088 3071 3072 3073 3074 3075 3076 + 3077 3078 3079 3086 3087 3088 3072 3073 3074 3075 + 3076 3086 3073 3074 3075 3076 3086 3074 3075 3076 + 3077 3078 3079 3080 3081 3082 3086 3075 3076 3077 + 3078 3079 3076 3077 3078 3079 3077 3078 3079 3080 + 3081 3082 3083 3084 3085 3078 3079 3080 3081 3082 + 3079 3080 3081 3082 3080 3081 3082 3083 3084 3085 + 3081 3082 3083 3084 3085 3082 3083 3084 3085 3083 + 3084 3085 3084 3085 3085 0 3087 3088 3089 3090 + 3091 3092 3108 3088 3089 3090 3089 3090 3091 3092 + 3093 3094 3095 3108 3109 3110 3090 3091 3092 3108 + 3091 3092 3093 3094 3095 3096 3097 3098 3108 3109 + 3110 3111 3112 3092 3093 3094 3095 3108 3109 3110 + 3093 3094 3095 3096 3097 3098 3099 3100 3101 3108 + 3109 3110 3094 3095 3096 3097 3098 3108 3095 3096 + 3097 3098 3108 3096 3097 3098 3099 3100 3101 3102 + 3103 3104 3108 3097 3098 3099 3100 3101 3098 3099 + 3100 3101 3099 3100 3101 3102 3103 3104 3105 3106 + 3107 3100 3101 3102 3103 3104 3101 3102 3103 3104 + 3102 3103 3104 3105 3106 3107 3103 3104 3105 3106 + 3107 3104 3105 3106 3107 3105 3106 3107 3106 3107 + 3107 0 3109 3110 3111 3112 3113 3114 3125 3110 + 3111 3112 3111 3112 3113 3114 3115 3116 3117 3125 + 3126 3127 3112 3113 3114 3125 3113 3114 3115 3116 + 3117 3118 3119 3120 3125 3126 3127 3128 3129 3114 + 3115 3116 3117 3125 3126 3127 3115 3116 3117 3118 + 3119 3120 3121 3125 3126 3127 3116 3117 3118 3119 + 3120 3125 3117 3118 3119 3120 3125 3118 3119 3120 + 3121 3122 3123 3124 3125 3119 3120 3121 3120 3121 + 3121 3122 3123 3124 3122 3123 3124 3123 3124 3124 + 0 3126 3127 3128 3129 3130 3131 3144 3127 3128 + 3129 3128 3129 3130 3131 3132 3133 3134 3144 3145 + 3146 3129 3130 3131 3144 3130 3131 3132 3133 3134 + 3135 3136 3140 3144 3145 3146 3147 3148 3131 3132 + 3133 3134 3144 3145 3146 3132 3133 3134 3135 3136 + 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 + 3133 3134 3135 3136 3140 3144 3134 3135 3136 3140 + 3144 3135 3136 3137 3138 3139 3140 3141 3142 3143 + 3144 3136 3137 3138 3139 3140 3141 3142 3143 3137 + 3138 3139 3140 3141 3142 3143 3138 3139 3140 3139 + 3140 3140 3141 3142 3143 3142 3143 3143 0 3145 + 3146 3147 3148 3149 3150 3156 3146 3147 3148 3147 + 3148 3149 3150 3151 3152 3153 3156 3157 3158 3148 + 3149 3150 3156 3149 3150 3151 3152 3153 3154 3155 + 3156 3157 3158 3159 3160 3150 3151 3152 3153 3156 + 3157 3158 3151 3152 3153 3154 3155 3156 3157 3158 + 3152 3153 3154 3155 3156 3153 3154 3155 3156 3154 + 3155 3156 3155 0 3157 3158 3159 3160 3161 3162 + 3177 3158 3159 3160 3159 3160 3161 3162 3163 3164 + 3165 3177 3178 3179 3160 3161 3162 3177 3161 3162 + 3163 3164 3165 3166 3175 3177 3178 3179 3180 3181 + 3162 3163 3164 3165 3177 3178 3179 3163 3164 3165 + 3166 3167 3168 3173 3175 3176 3177 3178 3179 3164 + 3165 3166 3175 3177 3165 3166 3175 3177 3166 3167 + 3168 3169 3170 3173 3174 3175 3176 3177 3167 3168 + 3169 3170 3171 3173 3175 3176 3168 3169 3170 3175 + 3169 3170 3171 3172 3173 3174 3175 3170 3171 3173 + 3171 3172 3173 3174 3175 3176 3172 3173 3174 3175 + 3173 3174 3175 3176 3175 3176 3176 0 3178 3179 + 3180 3181 3182 3183 3191 3179 3180 3181 3180 3181 + 3182 3183 3184 3185 3186 3191 3192 3193 3181 3182 + 3183 3191 3182 3183 3184 3185 3186 3187 3188 3191 + 3192 3193 3194 3195 3183 3184 3185 3186 3191 3192 + 3193 3184 3185 3186 3187 3188 3189 3190 3191 3192 + 3193 3185 3186 3187 3188 3191 3186 3187 3188 3191 + 3187 3188 3189 3190 3191 3188 3189 3190 3189 3190 + 3190 0 3192 3193 3194 3195 3196 3197 3201 3193 + 3194 3195 3194 3195 3196 3197 3198 3199 3200 3201 + 3202 3203 3195 3196 3197 3201 3196 3197 3198 3199 + 3200 3201 3202 3203 3204 3205 3197 3198 3199 3200 + 3201 3202 3203 3198 3199 3200 3201 3202 3203 3199 + 3200 3201 3200 3201 3201 3202 3203 3204 3205 3206 + 3207 3218 3203 3204 3205 3204 3205 3206 3207 3208 + 3209 3210 3218 3219 3220 3205 3206 3207 3218 3206 + 3207 3208 3209 3210 3211 3212 3213 3218 3219 3220 + 3221 3222 3207 3208 3209 3210 3218 3219 3220 3208 + 3209 3210 3211 3212 3213 3214 3218 3219 3220 3209 + 3210 3211 3212 3213 3218 3210 3211 3212 3213 3218 + 3211 3212 3213 3214 3215 3216 3217 3218 3212 3213 + 3214 3213 3214 3214 3215 3216 3217 3215 3216 3217 + 3216 3217 3217 0 3219 3220 3221 3222 3223 3224 + 3234 3220 3221 3222 3221 3222 3223 3224 3225 3226 + 3230 3234 3235 3236 3222 3223 3224 3234 3223 3224 + 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 + 3235 3236 3237 3238 3224 3225 3226 3230 3234 3235 + 3236 3225 3226 3227 3228 3229 3230 3231 3232 3233 + 3234 3235 3236 3226 3227 3228 3229 3230 3231 3232 + 3233 3234 3227 3228 3229 3230 3231 3232 3233 3234 + 3228 3229 3230 3229 3230 3230 3231 3232 3233 3234 + 3232 3233 3233 0 3235 3236 3237 3238 3239 3240 + 3245 3236 3237 3238 3237 3238 3239 3240 3241 3242 + 3243 3245 3246 3247 3238 3239 3240 3245 3239 3240 + 3241 3242 3243 3244 3245 3246 3247 3248 3257 3240 + 3241 3242 3243 3245 3246 3247 3241 3242 3243 3244 + 3245 3246 3247 3242 3243 3244 3245 3243 3244 3245 + 3244 3245 0 3246 3247 3248 3249 3250 3251 3254 + 3257 3258 3259 3247 3248 3257 3248 3249 3250 3251 + 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 + 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 + 3259 3250 3251 3252 3253 3254 3257 3251 3252 3253 + 3254 3257 3252 3253 3254 3255 3256 3257 3258 3259 + 3253 3254 3255 3256 3257 3254 3255 3256 3257 3255 + 3256 3257 3258 3259 3260 3261 3256 3257 3258 3259 + 3257 3258 3259 3258 3259 3260 3261 3262 3263 3259 + 3260 3261 3260 3261 3262 3263 3264 3265 3278 3261 + 3262 3263 3262 3263 3264 3265 3266 3267 3268 3278 + 3279 3280 3263 3264 3265 3278 3264 3265 3266 3267 + 3268 3269 3270 3274 3278 3279 3280 3281 3282 3265 + 3266 3267 3268 3278 3279 3280 3266 3267 3268 3269 + 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 + 3280 3267 3268 3269 3270 3274 3278 3268 3269 3270 + 3274 3278 3269 3270 3271 3272 3273 3274 3275 3276 + 3277 3278 3270 3271 3272 3273 3274 3275 3276 3277 + 3271 3272 3273 3274 3275 3276 3277 3272 3273 3274 + 3273 3274 3274 3275 3276 3277 3276 3277 3277 0 + 3279 3280 3281 3282 3283 3284 3300 3280 3281 3282 + 3281 3282 3283 3284 3285 3286 3287 3300 3301 3302 + 3282 3283 3284 3300 3283 3284 3285 3286 3287 3288 + 3289 3290 3300 3301 3302 3303 3304 3284 3285 3286 + 3287 3300 3301 3302 3285 3286 3287 3288 3289 3290 + 3291 3292 3293 3300 3301 3302 3286 3287 3288 3289 + 3290 3300 3287 3288 3289 3290 3300 3288 3289 3290 + 3291 3292 3293 3294 3295 3296 3300 3289 3290 3291 + 3292 3293 3290 3291 3292 3293 3291 3292 3293 3294 + 3295 3296 3297 3298 3299 3292 3293 3294 3295 3296 + 3293 3294 3295 3296 3294 3295 3296 3297 3298 3299 + 3295 3296 3297 3298 3299 3296 3297 3298 3299 3297 + 3298 3299 3298 3299 3299 0 3301 3302 3303 3304 + 3305 3306 3322 3302 3303 3304 3303 3304 3305 3306 + 3307 3308 3309 3322 3323 3324 3304 3305 3306 3322 + 3305 3306 3307 3308 3309 3310 3311 3312 3322 3323 + 3324 3325 3326 3306 3307 3308 3309 3322 3323 3324 + 3307 3308 3309 3310 3311 3312 3313 3314 3315 3322 + 3323 3324 3308 3309 3310 3311 3312 3322 3309 3310 + 3311 3312 3322 3310 3311 3312 3313 3314 3315 3316 + 3317 3318 3322 3311 3312 3313 3314 3315 3312 3313 + 3314 3315 3313 3314 3315 3316 3317 3318 3319 3320 + 3321 3314 3315 3316 3317 3318 3315 3316 3317 3318 + 3316 3317 3318 3319 3320 3321 3317 3318 3319 3320 + 3321 3318 3319 3320 3321 3319 3320 3321 3320 3321 + 3321 0 3323 3324 3325 3326 3327 3328 3336 3324 + 3325 3326 3325 3326 3327 3328 3329 3330 3331 3336 + 3337 3338 3326 3327 3328 3336 3327 3328 3329 3330 + 3331 3332 3333 3336 3337 3338 3339 3340 3328 3329 + 3330 3331 3336 3337 3338 3329 3330 3331 3332 3333 + 3334 3335 3336 3337 3338 3330 3331 3332 3333 3336 + 3331 3332 3333 3336 3332 3333 3334 3335 3336 3333 + 3334 3335 3334 3335 3335 0 3337 3338 3339 3340 + 3341 3342 3352 3338 3339 3340 3339 3340 3341 3342 + 3343 3344 3348 3352 3353 3354 3340 3341 3342 3352 + 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 + 3351 3352 3353 3354 3355 3356 3342 3343 3344 3348 + 3352 3353 3354 3343 3344 3345 3346 3347 3348 3349 + 3350 3351 3352 3353 3354 3344 3345 3346 3347 3348 + 3349 3350 3351 3352 3345 3346 3347 3348 3349 3350 + 3351 3352 3346 3347 3348 3347 3348 3348 3349 3350 + 3351 3352 3350 3351 3351 0 3353 3354 3355 3356 + 3357 3358 3364 3354 3355 3356 3355 3356 3357 3358 + 3359 3360 3361 3364 3365 3366 3356 3357 3358 3364 + 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 + 3367 3368 3358 3359 3360 3361 3364 3365 3366 3359 + 3360 3361 3362 3363 3364 3365 3366 3360 3361 3362 + 3363 3364 3361 3362 3363 3364 3362 3363 3364 3363 + 0 3365 3366 3367 3368 3369 3370 3383 3366 3367 + 3368 3367 3368 3369 3370 3371 3372 3376 3383 3384 + 3385 3368 3369 3370 3383 3369 3370 3371 3372 3373 + 3374 3375 3376 3377 3378 3379 3383 3384 3385 3386 + 3387 3370 3371 3372 3376 3383 3384 3385 3371 3372 + 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 + 3383 3384 3385 3372 3373 3374 3375 3376 3377 3378 + 3379 3383 3373 3374 3375 3376 3377 3378 3379 3383 + 3374 3375 3376 3375 3376 3376 3377 3378 3379 3380 + 3381 3382 3383 3378 3379 3380 3381 3382 3379 3380 + 3381 3382 3380 3381 3382 3381 3382 3382 0 3384 + 3385 3386 3387 3388 3389 3400 3385 3386 3387 3386 + 3387 3388 3389 3390 3391 3392 3400 3401 3402 3387 + 3388 3389 3400 3388 3389 3390 3391 3392 3393 3394 + 3395 3400 3401 3402 3403 3404 3389 3390 3391 3392 + 3400 3401 3402 3390 3391 3392 3393 3394 3395 3396 + 3400 3401 3402 3391 3392 3393 3394 3395 3400 3392 + 3393 3394 3395 3400 3393 3394 3395 3396 3397 3398 + 3399 3400 3394 3395 3396 3395 3396 3396 3397 3398 + 3399 3397 3398 3399 3398 3399 3399 0 3401 3402 + 3403 3404 3405 3406 3415 3402 3403 3404 3403 3404 + 3405 3406 3407 3408 3409 3415 3416 3417 3404 3405 + 3406 3415 3405 3406 3407 3408 3409 3410 3411 3412 + 3415 3416 3417 3418 3419 3406 3407 3408 3409 3415 + 3416 3417 3407 3408 3409 3410 3411 3412 3413 3414 + 3415 3416 3417 3408 3409 3410 3411 3412 3415 3409 + 3410 3411 3412 3415 3410 3411 3412 3413 3414 3415 + 3411 3412 3413 3414 3412 3413 3414 3413 3414 3414 + 0 3416 3417 3418 3419 3420 3421 3431 3417 3418 + 3419 3418 3419 3420 3421 3422 3423 3427 3431 3432 + 3433 3419 3420 3421 3431 3420 3421 3422 3423 3424 + 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 + 3435 3421 3422 3423 3427 3431 3432 3433 3422 3423 + 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 + 3423 3424 3425 3426 3427 3428 3429 3430 3431 3424 + 3425 3426 3427 3428 3429 3430 3431 3425 3426 3427 + 3426 3427 3427 3428 3429 3430 3431 3429 3430 3430 + 0 3432 3433 3434 3435 3436 3437 3438 3433 3434 + 3435 3434 3435 3436 3437 3438 3439 3440 3435 3436 + 3437 3438 3436 3437 3438 3439 3440 3441 3442 3437 + 3438 3439 3440 3438 3439 3440 3439 3440 3441 3442 + 3443 3444 3452 3440 3441 3442 3441 3442 3443 3444 + 3445 3446 3447 3452 3453 3454 3442 3443 3444 3452 + 3443 3444 3445 3446 3447 3448 3449 3452 3453 3454 + 3455 3456 3444 3445 3446 3447 3452 3453 3454 3445 + 3446 3447 3448 3449 3450 3451 3452 3453 3454 3446 + 3447 3448 3449 3452 3447 3448 3449 3452 3448 3449 + 3450 3451 3452 3449 3450 3451 3450 3451 3451 0 + 3453 3454 3455 3456 3457 3458 3466 3454 3455 3456 + 3455 3456 3457 3458 3459 3460 3464 3466 3467 3468 + 3456 3457 3458 3466 3457 3458 3459 3460 3461 3462 + 3463 3464 3465 3466 3467 3468 3469 3470 3458 3459 + 3460 3464 3466 3467 3468 3459 3460 3461 3462 3463 + 3464 3465 3466 3467 3468 3460 3461 3462 3463 3464 + 3465 3466 3461 3462 3463 3464 3465 3466 3462 3463 + 3464 3463 3464 3464 3465 3466 0 3467 3468 3469 + 3470 3471 3472 3482 3468 3469 3470 3469 3470 3471 + 3472 3473 3474 3478 3482 3483 3484 3470 3471 3472 + 3482 3471 3472 3473 3474 3475 3476 3477 3478 3479 + 3480 3481 3482 3483 3484 3485 3486 3472 3473 3474 + 3478 3482 3483 3484 3473 3474 3475 3476 3477 3478 + 3479 3480 3481 3482 3483 3484 3474 3475 3476 3477 + 3478 3479 3480 3481 3482 3475 3476 3477 3478 3479 + 3480 3481 3482 3476 3477 3478 3477 3478 3478 3479 + 3480 3481 3482 3480 3481 3481 0 3483 3484 3485 + 3486 3487 3488 3492 3484 3485 3486 3485 3486 3487 + 3488 3489 3490 3491 3492 3493 3494 3486 3487 3488 + 3492 3487 3488 3489 3490 3491 3492 3493 3494 3495 + 3496 3488 3489 3490 3491 3492 3493 3494 3489 3490 + 3491 3492 3493 3494 3490 3491 3492 3491 3492 3492 + 3493 3494 3495 3496 3497 3498 3512 3494 3495 3496 + 3495 3496 3497 3498 3499 3500 3501 3512 3513 3514 + 3496 3497 3498 3512 3497 3498 3499 3500 3501 3502 + 3510 3512 3513 3514 3515 3516 3498 3499 3500 3501 + 3512 3513 3514 3499 3500 3501 3502 3503 3504 3508 + 3510 3511 3512 3513 3514 3500 3501 3502 3510 3512 + 3501 3502 3510 3512 3502 3503 3504 3505 3506 3508 + 3509 3510 3511 3512 3503 3504 3505 3506 3507 3508 + 3510 3511 3504 3505 3506 3510 3505 3506 3507 3508 + 3509 3510 3506 3507 3508 3507 3508 3509 3510 3511 + 3508 3509 3510 3509 3510 3511 3510 3511 3511 0 + 3513 3514 3515 3516 3517 3518 3531 3514 3515 3516 + 3515 3516 3517 3518 3519 3520 3521 3531 3532 3533 + 3516 3517 3518 3531 3517 3518 3519 3520 3521 3522 + 3523 3527 3531 3532 3533 3534 3535 3518 3519 3520 + 3521 3531 3532 3533 3519 3520 3521 3522 3523 3524 + 3525 3526 3527 3528 3529 3530 3531 3532 3533 3520 + 3521 3522 3523 3527 3531 3521 3522 3523 3527 3531 + 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 + 3523 3524 3525 3526 3527 3528 3529 3530 3524 3525 + 3526 3527 3528 3529 3530 3525 3526 3527 3526 3527 + 3527 3528 3529 3530 3529 3530 3530 0 3532 3533 + 3534 3535 3536 3537 3542 3533 3534 3535 3534 3535 + 3536 3537 3538 3539 3540 3542 3543 3544 3535 3536 + 3537 3542 3536 3537 3538 3539 3540 3541 3542 3543 + 3544 3545 3546 3537 3538 3539 3540 3542 3543 3544 + 3538 3539 3540 3541 3542 3543 3544 3539 3540 3541 + 3542 3540 3541 3542 3541 3542 0 3543 3544 3545 + 3546 3547 3548 3553 3544 3545 3546 3545 3546 3547 + 3548 3549 3550 3551 3553 3554 3555 3546 3547 3548 + 3553 3547 3548 3549 3550 3551 3552 3553 3554 3555 + 3556 3557 3548 3549 3550 3551 3553 3554 3555 3549 + 3550 3551 3552 3553 3554 3555 3550 3551 3552 3553 + 3551 3552 3553 3552 3553 0 3554 3555 3556 3557 + 3558 3559 3565 3555 3556 3557 3556 3557 3558 3559 + 3560 3561 3562 3565 3566 3567 3557 3558 3559 3565 + 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 + 3568 3569 3559 3560 3561 3562 3565 3566 3567 3560 + 3561 3562 3563 3564 3565 3566 3567 3561 3562 3563 + 3564 3565 3562 3563 3564 3565 3563 3564 3565 3564 + 0 3566 3567 3568 3569 3570 3571 3582 3567 3568 + 3569 3568 3569 3570 3571 3572 3573 3574 3582 3583 + 3584 3569 3570 3571 3582 3570 3571 3572 3573 3574 + 3575 3576 3577 3582 3583 3584 3585 3586 3571 3572 + 3573 3574 3582 3583 3584 3572 3573 3574 3575 3576 + 3577 3578 3582 3583 3584 3573 3574 3575 3576 3577 + 3582 3574 3575 3576 3577 3582 3575 3576 3577 3578 + 3579 3580 3581 3582 3576 3577 3578 3577 3578 3578 + 3579 3580 3581 3579 3580 3581 3580 3581 3581 0 + 3583 3584 3585 3586 3587 3588 3592 3584 3585 3586 + 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 + 3586 3587 3588 3592 3587 3588 3589 3590 3591 3592 + 3593 3594 3595 3596 3588 3589 3590 3591 3592 3593 + 3594 3589 3590 3591 3592 3593 3594 3590 3591 3592 + 3591 3592 3592 3593 3594 3595 3596 3597 3598 3606 + 3594 3595 3596 3595 3596 3597 3598 3599 3600 3604 + 3606 3607 3608 3596 3597 3598 3606 3597 3598 3599 + 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 + 3610 3598 3599 3600 3604 3606 3607 3608 3599 3600 + 3601 3602 3603 3604 3605 3606 3607 3608 3600 3601 + 3602 3603 3604 3605 3606 3601 3602 3603 3604 3605 + 3606 3602 3603 3604 3603 3604 3604 3605 3606 0 + 3607 3608 3609 3610 3611 3612 3613 3608 3609 3610 + 3609 3610 3611 3612 3613 3614 3615 3610 3611 3612 + 3613 3611 3612 3613 3614 3615 3616 3617 3612 3613 + 3614 3615 3613 3614 3615 3614 3615 3616 3617 3618 + 3619 3632 3615 3616 3617 3616 3617 3618 3619 3620 + 3621 3625 3632 3633 3634 3617 3618 3619 3632 3618 + 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 + 3632 3633 3634 3635 3636 3619 3620 3621 3625 3632 + 3633 3634 3620 3621 3622 3623 3624 3625 3626 3627 + 3628 3629 3630 3631 3632 3633 3634 3621 3622 3623 + 3624 3625 3626 3627 3628 3632 3622 3623 3624 3625 + 3626 3627 3628 3632 3623 3624 3625 3624 3625 3625 + 3626 3627 3628 3629 3630 3631 3632 3627 3628 3629 + 3630 3631 3628 3629 3630 3631 3629 3630 3631 3630 + 3631 3631 0 3633 3634 3635 3636 3637 3638 3646 + 3634 3635 3636 3635 3636 3637 3638 3639 3640 3644 + 3646 3647 3648 3636 3637 3638 3646 3637 3638 3639 + 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 + 3650 3638 3639 3640 3644 3646 3647 3648 3639 3640 + 3641 3642 3643 3644 3645 3646 3647 3648 3640 3641 + 3642 3643 3644 3645 3646 3641 3642 3643 3644 3645 + 3646 3642 3643 3644 3643 3644 3644 3645 3646 0 + 3647 3648 3649 3650 3651 3652 3653 3648 3649 3650 + 3649 3650 3651 3652 3653 3654 3655 3650 3651 3652 + 3653 3651 3652 3653 3654 3655 3656 3657 3652 3653 + 3654 3655 3653 3654 3655 3654 3655 3656 3657 3658 + 3659 3668 3655 3656 3657 3656 3657 3658 3659 3660 + 3661 3662 3668 3669 3670 3657 3658 3659 3668 3658 + 3659 3660 3661 3662 3663 3664 3665 3668 3669 3670 + 3671 3672 3659 3660 3661 3662 3668 3669 3670 3660 + 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 + 3661 3662 3663 3664 3665 3668 3662 3663 3664 3665 + 3668 3663 3664 3665 3666 3667 3668 3664 3665 3666 + 3667 3665 3666 3667 3666 3667 3667 0 3669 3670 + 3671 3672 3673 3674 3684 3670 3671 3672 3671 3672 + 3673 3674 3675 3676 3680 3684 3685 3686 3672 3673 + 3674 3684 3673 3674 3675 3676 3677 3678 3679 3680 + 3681 3682 3683 3684 3685 3686 3687 3688 3674 3675 + 3676 3680 3684 3685 3686 3675 3676 3677 3678 3679 + 3680 3681 3682 3683 3684 3685 3686 3676 3677 3678 + 3679 3680 3681 3682 3683 3684 3677 3678 3679 3680 + 3681 3682 3683 3684 3678 3679 3680 3679 3680 3680 + 3681 3682 3683 3684 3682 3683 3683 0 3685 3686 + 3687 3688 3689 3690 3700 3686 3687 3688 3687 3688 + 3689 3690 3691 3692 3696 3700 3701 3702 3688 3689 + 3690 3700 3689 3690 3691 3692 3693 3694 3695 3696 + 3697 3698 3699 3700 3701 3702 3703 3704 3690 3691 + 3692 3696 3700 3701 3702 3691 3692 3693 3694 3695 + 3696 3697 3698 3699 3700 3701 3702 3692 3693 3694 + 3695 3696 3697 3698 3699 3700 3693 3694 3695 3696 + 3697 3698 3699 3700 3694 3695 3696 3695 3696 3696 + 3697 3698 3699 3700 3698 3699 3699 0 3701 3702 + 3703 3704 3705 3706 3717 3702 3703 3704 3703 3704 + 3705 3706 3707 3708 3709 3717 3718 3719 3704 3705 + 3706 3717 3705 3706 3707 3708 3709 3710 3715 3717 + 3718 3719 3720 3721 3706 3707 3708 3709 3717 3718 + 3719 3707 3708 3709 3710 3711 3713 3715 3716 3717 + 3718 3719 3708 3709 3710 3715 3717 3709 3710 3715 + 3717 3710 3711 3712 3713 3714 3715 3716 3717 3711 + 3712 3713 3714 3715 3716 3712 3713 3714 3715 3716 + 3713 3714 3715 3714 3715 3716 3715 3716 3716 0 + 3718 3719 3720 3721 3722 3723 3733 3719 3720 3721 + 3720 3721 3722 3723 3724 3725 3729 3733 3734 3735 + 3721 3722 3723 3733 3722 3723 3724 3725 3726 3727 + 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 + 3723 3724 3725 3729 3733 3734 3735 3724 3725 3726 + 3727 3728 3729 3730 3731 3732 3733 3734 3735 3725 + 3726 3727 3728 3729 3730 3731 3732 3733 3726 3727 + 3728 3729 3730 3731 3732 3733 3727 3728 3729 3728 + 3729 3729 3730 3731 3732 3733 3731 3732 3732 0 + 3734 3735 3736 3737 3738 3739 3745 3735 3736 3737 + 3736 3737 3738 3739 3740 3741 3742 3745 3746 3747 + 3737 3738 3739 3745 3738 3739 3740 3741 3742 3743 + 3744 3745 3746 3747 3748 3749 3739 3740 3741 3742 + 3745 3746 3747 3740 3741 3742 3743 3744 3745 3746 + 3747 3741 3742 3743 3744 3745 3742 3743 3744 3745 + 3743 3744 3745 3744 0 3746 3747 3748 3749 3750 + 3751 3755 3747 3748 3749 3748 3749 3750 3751 3752 + 3753 3754 3755 3756 3757 3749 3750 3751 3755 3750 + 3751 3752 3753 3754 3755 3756 3757 3758 3759 3751 + 3752 3753 3754 3755 3756 3757 3752 3753 3754 3755 + 3756 3757 3753 3754 3755 3754 3755 3755 3756 3757 + 3758 3759 3760 3761 3762 3757 3758 3759 3758 3759 + 3760 3761 3762 3763 3764 3759 3760 3761 3762 3760 + 3761 3762 3763 3764 3765 3766 3761 3762 3763 3764 + 3762 3763 3764 3763 3764 3765 3766 3767 3768 3783 + 3764 3765 3766 3765 3766 3767 3768 3769 3770 3771 + 3783 3784 3785 3766 3767 3768 3783 3767 3768 3769 + 3770 3771 3772 3781 3783 3784 3785 3786 3787 3768 + 3769 3770 3771 3783 3784 3785 3769 3770 3771 3772 + 3773 3774 3779 3781 3782 3783 3784 3785 3770 3771 + 3772 3781 3783 3771 3772 3781 3783 3772 3773 3774 + 3775 3776 3779 3780 3781 3782 3783 3773 3774 3775 + 3776 3777 3779 3781 3782 3774 3775 3776 3781 3775 + 3776 3777 3778 3779 3780 3781 3776 3777 3779 3777 + 3778 3779 3780 3781 3782 3778 3779 3780 3781 3779 + 3780 3781 3782 3781 3782 3782 0 3784 3785 3786 + 3787 3788 3789 3800 3785 3786 3787 3786 3787 3788 + 3789 3790 3791 3792 3800 3801 3802 3787 3788 3789 + 3800 3788 3789 3790 3791 3792 3793 3798 3800 3801 + 3802 3803 3804 3789 3790 3791 3792 3800 3801 3802 + 3790 3791 3792 3793 3794 3796 3798 3799 3800 3801 + 3802 3791 3792 3793 3798 3800 3792 3793 3798 3800 + 3793 3794 3795 3796 3797 3798 3799 3800 3794 3795 + 3796 3797 3798 3799 3795 3796 3797 3798 3799 3796 + 3797 3798 3797 3798 3799 3798 3799 3799 0 3801 + 3802 3803 3804 3805 3806 3811 3802 3803 3804 3803 + 3804 3805 3806 3807 3808 3809 3811 3812 3813 3804 + 3805 3806 3811 3805 3806 3807 3808 3809 3810 3811 + 3812 3813 3814 3815 3806 3807 3808 3809 3811 3812 + 3813 3807 3808 3809 3810 3811 3812 3813 3808 3809 + 3810 3811 3809 3810 3811 3810 3811 0 3812 3813 + 3814 3815 3816 3817 3827 3813 3814 3815 3814 3815 + 3816 3817 3818 3819 3823 3827 3828 3829 3815 3816 + 3817 3827 3816 3817 3818 3819 3820 3821 3822 3823 + 3824 3825 3826 3827 3828 3829 3830 3831 3817 3818 + 3819 3823 3827 3828 3829 3818 3819 3820 3821 3822 + 3823 3824 3825 3826 3827 3828 3829 3819 3820 3821 + 3822 3823 3824 3825 3826 3827 3820 3821 3822 3823 + 3824 3825 3826 3827 3821 3822 3823 3822 3823 3823 + 3824 3825 3826 3827 3825 3826 3826 0 3828 3829 + 3830 3831 3832 3833 3838 3829 3830 3831 3830 3831 + 3832 3833 3834 3835 3836 3838 3839 3840 3831 3832 + 3833 3838 3832 3833 3834 3835 3836 3837 3838 3839 + 3840 3841 3842 3833 3834 3835 3836 3838 3839 3840 + 3834 3835 3836 3837 3838 3839 3840 3835 3836 3837 + 3838 3836 3837 3838 3837 3838 0 3839 3840 3841 + 3842 3843 3844 3855 3840 3841 3842 3841 3842 3843 + 3844 3845 3846 3847 3855 3856 3857 3842 3843 3844 + 3855 3843 3844 3845 3846 3847 3848 3849 3850 3855 + 3856 3857 3858 3859 3844 3845 3846 3847 3855 3856 + 3857 3845 3846 3847 3848 3849 3850 3851 3855 3856 + 3857 3846 3847 3848 3849 3850 3855 3847 3848 3849 + 3850 3855 3848 3849 3850 3851 3852 3853 3854 3855 + 3849 3850 3851 3850 3851 3851 3852 3853 3854 3852 + 3853 3854 3853 3854 3854 0 3856 3857 3858 3859 + 3860 3861 3862 3857 3858 3859 3858 3859 3860 3861 + 3862 3863 3864 3859 3860 3861 3862 3860 3861 3862 + 3863 3864 3865 3866 3861 3862 3863 3864 3862 3863 + 3864 3863 3864 3865 3866 3867 3868 3876 3864 3865 + 3866 3865 3866 3867 3868 3869 3870 3871 3876 3877 + 3878 3866 3867 3868 3876 3867 3868 3869 3870 3871 + 3872 3873 3876 3877 3878 3879 3880 3868 3869 3870 + 3871 3876 3877 3878 3869 3870 3871 3872 3873 3874 + 3875 3876 3877 3878 3870 3871 3872 3873 3876 3871 + 3872 3873 3876 3872 3873 3874 3875 3876 3873 3874 + 3875 3874 3875 3875 0 3877 3878 3879 3880 3881 + 3882 3892 3878 3879 3880 3879 3880 3881 3882 3883 + 3884 3888 3892 3893 3894 3880 3881 3882 3892 3881 + 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 + 3892 3893 3894 3895 3896 3882 3883 3884 3888 3892 + 3893 3894 3883 3884 3885 3886 3887 3888 3889 3890 + 3891 3892 3893 3894 3884 3885 3886 3887 3888 3889 + 3890 3891 3892 3885 3886 3887 3888 3889 3890 3891 + 3892 3886 3887 3888 3887 3888 3888 3889 3890 3891 + 3892 3890 3891 3891 0 3893 3894 3895 3896 3897 + 3898 3911 3894 3895 3896 3895 3896 3897 3898 3899 + 3900 3901 3911 3912 3913 3896 3897 3898 3911 3897 + 3898 3899 3900 3901 3902 3903 3907 3911 3912 3913 + 3914 3915 3898 3899 3900 3901 3911 3912 3913 3899 + 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 + 3910 3911 3912 3913 3900 3901 3902 3903 3907 3911 + 3901 3902 3903 3907 3911 3902 3903 3904 3905 3906 + 3907 3908 3909 3910 3911 3903 3904 3905 3906 3907 + 3908 3909 3910 3904 3905 3906 3907 3908 3909 3910 + 3905 3906 3907 3906 3907 3907 3908 3909 3910 3909 + 3910 3910 0 3912 3913 3914 3915 3916 3917 3930 + 3913 3914 3915 3914 3915 3916 3917 3918 3919 3920 + 3930 3931 3932 3915 3916 3917 3930 3916 3917 3918 + 3919 3920 3921 3922 3926 3930 3931 3932 3933 3934 + 3917 3918 3919 3920 3930 3931 3932 3918 3919 3920 + 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 + 3931 3932 3919 3920 3921 3922 3926 3930 3920 3921 + 3922 3926 3930 3921 3922 3923 3924 3925 3926 3927 + 3928 3929 3930 3922 3923 3924 3925 3926 3927 3928 + 3929 3923 3924 3925 3926 3927 3928 3929 3924 3925 + 3926 3925 3926 3926 3927 3928 3929 3928 3929 3929 + 0 3931 3932 3933 3934 3935 3936 3945 3932 3933 + 3934 3933 3934 3935 3936 3937 3938 3939 3945 3946 + 3947 3934 3935 3936 3945 3935 3936 3937 3938 3939 + 3940 3941 3942 3945 3946 3947 3948 3949 3936 3937 + 3938 3939 3945 3946 3947 3937 3938 3939 3940 3941 + 3942 3943 3944 3945 3946 3947 3938 3939 3940 3941 + 3942 3945 3939 3940 3941 3942 3945 3940 3941 3942 + 3943 3944 3945 3941 3942 3943 3944 3942 3943 3944 + 3943 3944 3944 0 3946 3947 3948 3949 3950 3951 + 3962 3947 3948 3949 3948 3949 3950 3951 3952 3953 + 3954 3962 3963 3964 3949 3950 3951 3962 3950 3951 + 3952 3953 3954 3955 3960 3962 3963 3964 3965 3966 + 3951 3952 3953 3954 3962 3963 3964 3952 3953 3954 + 3955 3956 3958 3960 3961 3962 3963 3964 3953 3954 + 3955 3960 3962 3954 3955 3960 3962 3955 3956 3957 + 3958 3959 3960 3961 3962 3956 3957 3958 3959 3960 + 3961 3957 3958 3959 3960 3961 3958 3959 3960 3959 + 3960 3961 3960 3961 3961 0 3963 3964 3965 3966 + 3967 3968 3979 3964 3965 3966 3965 3966 3967 3968 + 3969 3970 3971 3979 3980 3981 3966 3967 3968 3979 + 3967 3968 3969 3970 3971 3972 3977 3979 3980 3981 + 3982 3983 3968 3969 3970 3971 3979 3980 3981 3969 + 3970 3971 3972 3973 3975 3977 3978 3979 3980 3981 + 3970 3971 3972 3977 3979 3971 3972 3977 3979 3972 + 3973 3974 3975 3976 3977 3978 3979 3973 3974 3975 + 3976 3977 3978 3974 3975 3976 3977 3978 3975 3976 + 3977 3976 3977 3978 3977 3978 3978 0 3980 3981 + 3982 3983 3984 3985 3996 3981 3982 3983 3982 3983 + 3984 3985 3986 3987 3988 3996 3997 3998 3983 3984 + 3985 3996 3984 3985 3986 3987 3988 3989 3994 3996 + 3997 3998 3999 4000 3985 3986 3987 3988 3996 3997 + 3998 3986 3987 3988 3989 3990 3992 3994 3995 3996 + 3997 3998 3987 3988 3989 3994 3996 3988 3989 3994 + 3996 3989 3990 3991 3992 3993 3994 3995 3996 3990 + 3991 3992 3993 3994 3995 3991 3992 3993 3994 3995 + 3992 3993 3994 3993 3994 3995 3994 3995 3995 0 + 3997 3998 3999 4000 4001 4002 4013 3998 3999 4000 + 3999 4000 4001 4002 4003 4004 4005 4013 4014 4015 + 4000 4001 4002 4013 4001 4002 4003 4004 4005 4006 + 4011 4013 4014 4015 4016 4017 4002 4003 4004 4005 + 4013 4014 4015 4003 4004 4005 4006 4007 4009 4011 + 4012 4013 4014 4015 4004 4005 4006 4011 4013 4005 + 4006 4011 4013 4006 4007 4008 4009 4010 4011 4012 + 4013 4007 4008 4009 4010 4011 4012 4008 4009 4010 + 4011 4012 4009 4010 4011 4010 4011 4012 4011 4012 + 4012 0 4014 4015 4016 4017 4018 4019 4030 4015 + 4016 4017 4016 4017 4018 4019 4020 4021 4022 4030 + 4031 4032 4017 4018 4019 4030 4018 4019 4020 4021 + 4022 4023 4028 4030 4031 4032 4033 4034 4019 4020 + 4021 4022 4030 4031 4032 4020 4021 4022 4023 4024 + 4026 4028 4029 4030 4031 4032 4021 4022 4023 4028 + 4030 4022 4023 4028 4030 4023 4024 4025 4026 4027 + 4028 4029 4030 4024 4025 4026 4027 4028 4029 4025 + 4026 4027 4028 4029 4026 4027 4028 4027 4028 4029 + 4028 4029 4029 0 4031 4032 4033 4034 4035 4036 + 4047 4032 4033 4034 4033 4034 4035 4036 4037 4038 + 4039 4047 4048 4049 4034 4035 4036 4047 4035 4036 + 4037 4038 4039 4040 4045 4047 4048 4049 4036 4037 + 4038 4039 4047 4048 4049 4037 4038 4039 4040 4041 + 4043 4045 4046 4047 4048 4049 4038 4039 4040 4045 + 4047 4039 4040 4045 4047 4040 4041 4042 4043 4044 + 4045 4046 4047 4041 4042 4043 4044 4045 4046 4042 + 4043 4044 4045 4046 4043 4044 4045 4044 4045 4046 + 4045 4046 4046 0 4048 4049 4049 0 4051 4052 + 4053 4054 4055 4072 4073 4074 4075 4076 4094 4095 + 4052 4053 4054 4072 4073 4053 4054 4072 4073 4054 + 4055 4056 4057 4072 4073 4094 4095 4096 4055 4056 + 4057 4058 4059 4061 4072 4094 4095 4096 4097 4056 + 4057 4058 4059 4060 4061 4062 4094 4095 4096 4097 + 4098 4099 4101 4057 4058 4059 4060 4061 4062 4063 + 4071 4094 4095 4096 4097 4099 4101 4058 4059 4060 + 4061 4062 4094 4095 4096 4097 4098 4099 4100 4101 + 4059 4060 4061 4096 4097 4098 4099 4060 4061 4062 + 4063 4071 4096 4097 4098 4099 4100 4101 4061 4062 + 4097 4099 4100 4101 4062 4063 4064 4065 4070 4071 + 4096 4097 4099 4100 4101 4102 4063 4064 4065 4066 + 4069 4070 4071 4099 4101 4102 4064 4065 4066 4070 + 4071 4101 4102 4065 4066 4067 4068 4070 4071 4102 + 4066 4067 4068 4069 4070 4071 4102 4103 4104 4067 + 4068 4069 4070 4071 4103 4104 4105 4068 4069 4071 + 4103 4104 4069 4070 4071 4103 4104 4105 4070 4071 + 4105 4071 4105 4101 4102 4105 4073 4074 4075 4076 + 4077 4074 4075 4076 4077 4078 4106 4107 4075 4076 + 4077 4076 4077 4077 4078 4079 4080 4106 4107 4108 + 4078 4079 4080 4081 4082 4084 4106 4107 4108 4109 + 4079 4080 4081 4082 4083 4084 4085 4106 4107 4108 + 4109 4110 4111 4113 4080 4081 4082 4083 4084 4085 + 4086 4093 4106 4107 4108 4109 4111 4113 4081 4082 + 4083 4084 4085 4106 4107 4108 4109 4110 4111 4112 + 4113 4082 4083 4084 4108 4109 4110 4111 4083 4084 + 4085 4086 4093 4108 4109 4110 4111 4112 4113 4084 + 4085 4109 4111 4112 4113 4085 4086 4087 4092 4093 + 4108 4109 4111 4112 4113 4114 4119 4086 4087 4088 + 4091 4092 4093 4111 4113 4114 4118 4119 4087 4088 + 4089 4090 4091 4092 4093 4113 4114 4117 4119 4088 + 4089 4090 4091 4092 4093 4114 4115 4116 4117 4118 + 4089 4090 4091 4092 4114 4115 4116 4117 4090 4091 + 4115 4116 4091 4115 4116 4092 4093 4114 4117 4118 + 4119 4093 4117 4118 4119 4113 4114 4117 4118 4119 + 4095 4096 4096 4097 4098 4099 0 4100 4101 0 + 0 0 4104 0 0 4107 4108 4108 4109 4110 + 4111 0 4112 4113 0 0 0 4116 0 4118 + 4119 0 4121 4122 4123 4124 4125 4126 4127 4128 + 4129 4133 4137 4138 4139 4140 4122 4123 4124 4125 + 4126 4127 4128 4136 4137 4139 4140 4123 4124 4125 + 4126 4127 4136 4137 4138 4140 4124 4125 4127 4136 + 4137 4138 4139 4125 4126 4136 4137 4138 4139 4126 + 4127 4128 4136 4138 4139 4127 4128 4129 4130 4132 + 4133 4134 4139 4143 4137 4140 4129 4130 4131 4132 + 4133 4134 4141 4142 4143 4130 4131 4132 4133 4134 + 4135 4141 4143 4131 4132 4133 4134 4135 4141 4142 + 4132 4133 4134 4135 4141 4142 4143 4133 4135 4141 + 4142 4143 4134 4135 4142 4143 4141 4141 4142 4137 + 4138 0 4139 0 0 0 4143 0 +%FLAG HBOND_ACOEF +%FORMAT(5E16.8) + +%FLAG HBOND_BCOEF +%FORMAT(5E16.8) + +%FLAG HBCUT +%FORMAT(5E16.8) + +%FLAG AMBER_ATOM_TYPE +%FORMAT(20a4) +N3 H H H CT HP CT HC HC CT H1 H1 S CT H1 H1 H1 C O N +H CT H1 H1 C O N H CT H1 CT HC HC CA CA HA CA HA CA HA +CA HA CA HA C O N H CT H1 CT HC HC CT HC CT HC HC HC CT +HC HC HC C O N H CT H1 CT HC HC HC C O N H CT H1 H1 +C O N H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP N3 H +H H C O N H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP +N3 H H H C O N H CT H1 CT HC CT HC HC HC CT HC HC CT +HC HC HC C O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC +HC HC C O N H CT H1 CT HC CT HC HC HC CT HC HC CT HC HC +HC C O N H CT H1 CT H1 CT HC HC HC OH HO C O N H CT +H1 H1 C O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC +HC C O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC +C O N H CT H1 CT H1 H1 OH HO C O N H CT H1 CT HC HC +C O N H H C O N H CT H1 CT HC HC CT HC HC CT HC HC +CT HP HP N3 H H H C O N H CT H1 CT H1 H1 OH HO C O +N H CT H1 CT HC CT HC HC HC CT HC HC CT HC HC HC C O N +H CT H1 CT HC HC HC C O N H CT H1 CT HC HC CA CA HA CA +HA C OH HO CA HA CA HA C O N H CT H1 H1 C O N H CT +H1 CT HC CT HC HC HC CT HC HC CT HC HC HC C O N H CT H1 +CT HC HC HC C O N H CT H1 CT HC HC CT HC HC CT HC HC CT +HP HP N3 H H H C O N H CT H1 CT HC HC HC C O N H +CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 C O N H CT H1 CT +HC HC CC NB CR H5 NA H CW H4 C O N H CT H1 CT HC HC CT +HC HC CT H1 H1 N2 H CA N2 H H N2 H H C O N H CT H1 +CT HC HC CT HC HC C O2 O2 C O N H CT H1 H1 C O N H +CT H1 CT HC HC HC C O N H CT H1 CT HC HC CT HC HC C O2 +O2 C O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC +C O N H CT H1 CT HC HC HC C O N H CT H1 CT HC HC CA +CA HA CA HA CA HA CA HA CA HA C O N H CT H1 CT H1 CT HC +HC HC OH HO C O N H CT H1 CT HC HC CA CA HA CA HA C OH +HO CA HA CA HA C O N H CT H1 CT HC CT HC HC HC CT HC HC +HC C O N H CT H1 H1 C O N H CT H1 CT HC HC CT HC HC +C O N H H C O N H CT H1 CT HC HC CA CA HA CA HA CA +HA CA HA CA HA C O N H CT H1 CT HC HC CT HC HC CT HC HC +CT HP HP N3 H H H C O N H CT H1 CT HC HC C O2 O2 C +O N H CT H1 CT HC HC CT HC HC CT H1 H1 N2 H CA N2 H H +N2 H H C O N H CT H1 CT HC CT HC HC HC CT HC HC HC C +O N H CT H1 CT HC HC CT HC HC C O2 O2 C O N H CT H1 +CT HC HC CT HC HC CT HC HC CT HP HP N3 H H H C O N H +CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O N H CT +H1 CT H1 H1 SH HS C O N H CT H1 CT HC HC HC C O N H +CT H1 CT HC HC CT HC HC C O2 O2 C O N H CT H1 CT HC HC +CA CA HA CA HA CA HA CA HA CA HA C O N H CT H1 CT HC HC +C O N H H C O N CT H1 H1 CT HC HC CT HC HC CT H1 C +O N H CT H1 CT HC HC HC C O N H CT H1 CT HC HC HC C +O N H CT H1 CT HC CT HC HC HC CT HC HC HC C O N H CT +H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O N CT H1 H1 +CT HC HC CT HC HC CT H1 C O N H CT H1 CT H1 H1 SH HS C +O N H CT H1 CT HC HC C O2 O2 C O N H CT H1 CT HC CT +HC HC HC CT HC HC HC C O N H CT H1 CT HC CT HC HC HC CT +HC HC CT HC HC HC C O N H CT H1 CT H1 H1 OH HO C O N +H CT H1 CT HC HC C O2 O2 C O N H CT H1 CT HC HC CT HC +HC C O N H H C O N H CT H1 CT HC HC CT HC HC C O2 +O2 C O N H CT H1 CT HC CT HC HC HC CT HC HC CT HC HC HC +C O N H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP N3 H +H H C O N H CT H1 CT HC HC C O2 O2 C O N H CT H1 +CT HC HC CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT +HC HC CA CA HA CA HA CA HA CA HA CA HA C O N H CT H1 CT +HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC CT HC +HC C O2 O2 C O N H CT H1 CT HC HC CT HC CT HC HC HC CT +HC HC HC C O N H CT H1 H1 C O N H CT H1 CT HC HC CT +HC HC CT HC HC CT HP HP N3 H H H C O N H CT H1 CT HC +CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC C* CW H4 +NA H CN CA HA CA HA CA HA CA HA CB C O N H CT H1 CT HC +HC C O2 O2 C O N H CT H1 H1 C O N H CT H1 CT HC HC +CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC C +O2 O2 C O N H CT H1 CT HC HC HC C O N H CT H1 CT HC +CT HC HC HC CT HC HC CT HC HC HC C O N H CT H1 CT HC CT +HC HC HC CT HC HC HC C O N H CT H1 CT HC HC CC NB CR H5 +NA H CW H4 C O N H CT H1 CT H1 H1 OH HO C O N H CT +H1 CT HC CT HC HC HC CT HC HC CT HC HC HC C O N H CT H1 +CT HC HC HC C O N H CT H1 CT HC HC CA CA HA CA HA CA HA +CA HA CA HA C O N H CT H1 CT HC HC HC C O N CT H1 H1 +CT HC HC CT HC HC CT H1 C O N H CT H1 CT HC HC CT HC HC +CT H1 H1 N2 H CA N2 H H N2 H H C O N H CT H1 CT HC +HC C O2 O2 C O N H CT H1 CT HC HC CT HC HC C O N H +H C O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC +C O N H CT H1 CT HC HC CT HC HC C O2 O2 C O N H CT +H1 H1 C O N H CT H1 CT HC HC C O N H H C O N H +CT H1 CT HC HC CA CA HA CA HA CA HA CA HA CA HA C O N H +CT H1 CT HC CT HC HC HC CT HC HC CT HC HC HC C O N H CT +H1 CT HC HC C O2 O2 C O N H CT H1 CT H1 H1 SH HS C O +N H CT H1 CT HC CT HC HC HC CT HC HC HC C O N H CT H1 +CT H1 CT HC HC HC OH HO C O N H CT H1 CT HC HC CT HC HC +CT H1 H1 N2 H CA N2 H H N2 H H C O N H CT H1 CT HC +HC CT HC HC C O2 O2 C O N H CT H1 H1 C O N H CT H1 +CT HC HC CA CA HA CA HA CA HA CA HA CA HA C O N H CT H1 +CT H1 H1 OH HO C O N H CT H1 CT HC CT HC HC HC CT HC HC +CT HC HC HC C O N H CT H1 CT HC HC HC C O N H CT H1 +CT HC HC CC NB CR H5 NA H CW H4 C O N H CT H1 CT HC HC +C O2 O2 C O N H CT H1 CT HC CT HC HC HC CT HC HC CT HC +HC HC C O N H CT H1 CT H1 H1 OH HO C O N H CT H1 CT +HC HC HC C O N H CT H1 CT HC HC CA CA HA CA HA C OH HO +CA HA CA HA C O N H CT H1 CT H1 H1 OH HO C O N H CT +H1 CT HC HC CA CA HA CA HA CA HA CA HA CA HA C O N H CT +H1 CT HC HC HC C O N H CT H1 CT HC HC HC C O N H CT +H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O N H CT H1 +CT HC HC HC C O N H CT H1 CT HC HC CT HC HC CT HC HC CT +HP HP N3 H H H C O N H CT H1 CT HC HC CT HC HC C O2 +O2 C O N H CT H1 H1 C O N H CT H1 CT HC HC CT HC HC +CT H1 H1 N2 H CA N2 H H N2 H H C O N H CT H1 CT H1 +H1 OH HO C O N H CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 +C O N H CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 C O N +H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP N3 H H H C +O N H CT H1 CT HC HC C O N H H C O N H CT H1 CT +HC HC CT HC HC CT H1 H1 N2 H CA N2 H H N2 H H C O N +H CT H1 CT HC HC C O N H H C O N H CT H1 CT HC HC +HC C O N H CT H1 CT H1 H1 OH HO C O N H CT H1 CT HC +HC CT H1 H1 S CT H1 H1 H1 C O N H CT H1 CT HC CT HC HC +HC CT HC HC HC C O N H CT H1 CT HC HC HC C O N H CT +H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O N H CT H1 +CT H1 CT HC HC HC OH HO C O N H CT H1 CT HC HC CA CA HA +CA HA C OH HO CA HA CA HA C O N H CT H1 CT HC CT HC HC +HC CT HC HC CT HC HC HC C O N H CT H1 H1 C O N H CT +H1 CT HC HC HC C O N H CT H1 CT HC HC CT HC HC C O2 O2 +C O N H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP N3 H +H H C O N H CT H1 CT HC HC HC C O N H CT H1 CT HC +HC CT H1 H1 S CT H1 H1 H1 C O N CT H1 H1 CT HC HC CT HC +HC CT H1 C O N H CT H1 CT H1 H1 OH HO C O N H CT H1 +CT HC HC CA CA HA CA HA C OH HO CA HA CA HA C O N H CT +H1 CT HC HC C O N H H C O N H CT H1 CT H1 CT HC HC +HC OH HO C O N H CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 +C O N H CT H1 H1 C O N H CT H1 CT HC CT HC HC HC CT +HC HC HC C O N H CT H1 CT HC HC HC C O N H CT H1 CT +HC HC CT HC HC CT HC HC CT HP HP N3 H H H C O N H CT +H1 CT HC HC HC C O N H CT H1 CT H1 H1 OH HO C O N H +CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O N H CT +H1 CT HC HC CT HC HC C O2 O2 C O N H CT H1 CT HC HC HC +C O N H CT H1 CT H1 CT HC HC HC OH HO C O N H CT H1 +CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC CT +HC HC CT H1 H1 N2 H CA N2 H H N2 H H C O N H CT H1 +CT HC HC CA CA HA CA HA C OH HO CA HA CA HA C O N H CT +H1 CT H1 CT HC HC HC OH HO C O N H CT H1 CT HC HC HC C +O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O +N H CT H1 CT HC HC HC C O N H CT H1 CT HC HC CT HC CT +HC HC HC CT HC HC HC C O N H CT H1 H1 C O N H CT H1 +CT HC HC CT HC HC C O2 O2 C O N H CT H1 CT HC HC C O2 +O2 C O N H CT H1 H1 C O N H CT H1 CT HC CT HC HC HC +CT HC HC CT HC HC HC C O N H CT H1 CT HC HC CT HC HC CT +HC HC CT HP HP N3 H H H C O N H CT H1 CT HC CT HC HC +HC CT HC HC HC C O N H CT H1 CT HC HC C O N H H C +O N H CT H1 CT HC HC HC C O N H CT H1 CT HC CT HC HC +HC CT HC HC HC C O N H CT H1 CT H1 H1 OH HO C O N H +CT H1 CT HC HC HC C O N H CT H1 H1 C O N CT H1 H1 CT +HC HC CT HC HC CT H1 C O N H CT H1 CT HC CT HC HC HC CT +HC HC CT HC HC HC C O N H CT H1 CT HC HC CT HC HC CT HC +HC CT HP HP N3 H H H C O N H CT H1 CT H1 CT HC HC HC +OH HO C O N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC +HC C O N H CT H1 CT HC HC HC C O N H CT H1 CT HC HC +HC C O N H CT H1 CT H1 H1 OH HO C O N H CT H1 H1 C +O N H CT H1 CT HC CT HC HC HC CT HC HC CT HC HC HC C O +N H CT H1 CT H1 H1 OH HO C O N H CT H1 CT HC HC C O +N H H C O N H CT H1 CT HC HC CA CA HA CA HA CA HA CA +HA CA HA C O N H CT H1 CT HC HC CT HC HC CT HC HC CT HP +HP N3 H H H C O N H CT H1 CT HC HC CT HC HC CT HC HC +CT HP HP N3 H H H C O N H CT H1 CT HC HC CT H1 H1 S +CT H1 H1 H1 C O N H CT H1 CT HC HC CT HC CT HC HC HC CT +HC HC HC C O N H CT H1 CT HC HC C O2 O2 C O N H CT +H1 CT HC HC CA CA HA CA HA C OH HO CA HA CA HA C O N H +CT H1 CT HC HC C O N H H C O N H CT H1 CT HC HC HC +C O N H CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 C O N +H CT H1 CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT +H1 H1 OH HO C O N CT H1 H1 CT HC HC CT HC HC CT H1 C O +N H CT H1 CT HC HC CT HC CT HC HC HC CT HC HC HC C O N +H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP N3 H H H C +O N H CT H1 CT HC HC CT HC HC CT HC HC CT HP HP N3 H H +H C O N H CT H1 CT HC HC C O N H H C O N H CT +H1 CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC +C O2 O2 C O N H CT H1 CT HC CT HC HC HC CT HC HC CT HC +HC HC C O N H CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 C +O N H CT H1 CT HC HC CT HC HC C O2 O2 C O N H CT H1 +CT HC CT HC HC HC CT HC HC HC C O N H CT H1 H1 C O N +H CT H1 CT HC HC C O N H H C O N H CT H1 CT H1 CT +HC HC HC OH HO C O N H CT H1 CT HC CT HC HC HC CT HC HC +HC C O N H CT H1 CT HC HC HC C O N H CT H1 CT HC HC +CA CA HA CA HA CA HA CA HA CA HA C O N H CT H1 CT HC HC +CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT H1 H1 SH +HS C O N H CT H1 CT H1 H1 OH HO C O N H CT H1 CT HC +HC C O2 O2 C O N H CT H1 CT HC HC CT H1 H1 S CT H1 H1 +H1 C O N H CT H1 CT HC HC HC C O N H CT H1 CT H1 CT +HC HC HC OH HO C O N H CT H1 H1 C O N H CT H1 CT HC +CT HC HC HC CT HC HC CT HC HC HC C O N H CT H1 CT H1 CT +HC HC HC OH HO C O N H CT H1 H1 C O N H CT H1 CT HC +HC CT HC HC C O2 O2 C O N H CT H1 CT HC CT HC HC HC CT +HC HC HC C O N H CT H1 CT HC CT HC HC HC CT HC HC HC C +O N H CT H1 CT HC HC CC NB CR H5 NA H CW H4 C O N H +CT H1 CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC +HC C O2 O2 C O N H CT H1 CT HC HC HC C O N H CT H1 +H1 C O N H CT H1 CT HC HC CA CA HA CA HA C OH HO CA HA +CA HA C O N H CT H1 CT HC HC CC NB CR H5 NA H CW H4 C +O N H CT H1 CT H1 H1 SH HS C O N H CT H1 CT HC CT HC +HC HC CT HC HC HC C O N H CT H1 CT H1 H1 OH HO C O N +H CT H1 CT HC HC CT H1 H1 S CT H1 H1 H1 C O N H CT H1 +H1 C O N H CT H1 CT HC HC C O N H H C O N H CT +H1 CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC +CT HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC CT +HC CT HC HC HC CT HC HC HC C O N H CT H1 CT HC HC CT HC +HC C O2 O2 C O N H CT H1 CT HC HC CC NB CR H5 NA H CW +H4 C O N H CT H1 CT HC HC CC NB CR H5 NA H CW H4 C O +N H CT H1 CT HC HC CC NB CR H5 NA H CW H4 C O N H CT +H1 CT HC HC CC NB CR H5 NA H CW H4 C O N H CT H1 CT HC +HC CC NB CR H5 NA H CW H4 C O N H CT H1 CT HC HC CC NB +CR H5 NA H CW H4 C O2 O2 P O2 O2 OS CT CT OS CT OH CT OH +CT N* CK NB CB CA N2 NC CQ NC CB OS P O2 O2 OS CT CT OS CT +OH CT OH CT NF CJ CF CE OE NE CI CF CJ H1 H1 H1 H1 HO H1 HO +H2 H5 H H H5 H1 H1 H1 H1 HO H1 HO H2 HI HE HE HI HI HI ca +ca ca ca ca ca os oh ca ca ca ca ca ca cl cl cl ha ha ha ho +ha ha ha +%FLAG TREE_CHAIN_CLASSIFICATION +%FORMAT(20a4) +BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA M +E M E E M E M E M E 3 E E B B E B E B E +S E S E M E M E M E 3 E E 3 E 3 E E E 3 +E E E M E M E M E 3 E E E M E M E M E E +M E M E M E 3 E E 3 E E 3 E E 3 E E 3 E +E E M E M E M E 3 E E 3 E E 3 E E 3 E E +3 E E E M E M E M E 3 E 3 E E E 3 E E 3 +E E E M E M E M E 3 E E 3 E 3 E E E 3 E +E E M E M E M E 3 E 3 E E E 3 E E 3 E E +E M E M E M E 3 E 3 E E E S E M E M E M +E E M E M E M E 3 E E 3 E 3 E E E 3 E E +E M E M E M E 3 E E 3 E 3 E E E 3 E E E +M E M E M E 3 E E S E M E M E M E 3 E E +B E B E E M E M E M E 3 E E 3 E E 3 E E +3 E E 3 E E E M E M E M E 3 E E S E M E +M E M E 3 E 3 E E E 3 E E 3 E E E M E M +E M E 3 E E E M E M E M E 3 E E B B E B +E B S E S E S E M E M E M E E M E M E M +E 3 E 3 E E E 3 E E 3 E E E M E M E M E +3 E E E M E M E M E 3 E E 3 E E 3 E E 3 +E E 3 E E E M E M E M E 3 E E E M E M E +M E 3 E E 3 E E S 3 E E E M E M E M E 3 +E E B E S E B E B E M E M E M E 3 E E 3 +E E 3 E E B E B B E E B E E M E M E M E +3 E E 3 E E B E E M E M E M E E M E M E +M E 3 E E E M E M E M E 3 E E 3 E E B E +E M E M E M E 3 E E 3 E 3 E E E 3 E E E +M E M E M E 3 E E E M E M E M E 3 E E B +B E B E B E S E S E M E M E M E 3 E 3 E +E E S E M E M E M E 3 E E B B E B E B S +E S E S E M E M E M E 3 E 3 E E E 3 E E +E M E M E M E E M E M E M E 3 E E 3 E E +B E B E E M E M E M E 3 E E B B E B E B +E S E S E M E M E M E 3 E E 3 E E 3 E E +3 E E 3 E E E M E M E M E 3 E E B E E M +E M E M E 3 E E 3 E E 3 E E B E B B E E +B E E M E M E M E 3 E 3 E E E 3 E E E M +E M E M E 3 E E 3 E E B E E M E M E M E +3 E E 3 E E 3 E E 3 E E 3 E E E M E M E +M E 3 E E 3 E 3 E E E 3 E E E M E M E M +E 3 E E S E M E M E M E 3 E E E M E M E +M E 3 E E 3 E E B E E M E M E M E 3 E E +B B E B E B E S E S E M E M E M E 3 E E +B E B E E M E M 3 E E 3 E E B E E M E M +E M E M E 3 E E E M E M E M E 3 E E E M +E M E M E 3 E 3 E E E 3 E E E M E M E M +E 3 E E 3 E 3 E E E 3 E E E M E M 3 E E +3 E E B E E M E M E M E M E 3 E E S E M +E M E M E 3 E E B E E M E M E M E 3 E 3 +E E E 3 E E E M E M E M E 3 E 3 E E E 3 +E E 3 E E E M E M E M E 3 E E S E M E M +E M E 3 E E B E E M E M E M E 3 E E 3 E +E B E B E E M E M E M E 3 E E 3 E E B E +E M E M E M E 3 E 3 E E E 3 E E 3 E E E +M E M E M E 3 E E 3 E E 3 E E 3 E E 3 E +E E M E M E M E 3 E E B E E M E M E M E +3 E E 3 E 3 E E E 3 E E E M E M E M E 3 +E E B B E B E B E S E S E M E M E M E 3 +E 3 E E E 3 E E E M E M E M E 3 E E 3 E +E B E E M E M E M E 3 E E 3 E 3 E E E 3 +E E E M E M E M E E M E M E M E 3 E E 3 +E E 3 E E 3 E E 3 E E E M E M E M E 3 E +3 E E E 3 E E E M E M E M E 3 E E B B E +B E S B E B E B E S E E M E M E M E 3 E +E B E E M E M E M E E M E M E M E 3 E E +3 E 3 E E E 3 E E E M E M E M E 3 E E B +E E M E M E M E 3 E E E M E M E M E 3 E +3 E E E 3 E E 3 E E E M E M E M E 3 E 3 +E E E 3 E E E M E M E M E 3 E E B E S E +B E B E M E M E M E 3 E E S E M E M E M +E 3 E 3 E E E 3 E E 3 E E E M E M E M E +3 E E E M E M E M E 3 E E B B E B E B E +S E S E M E M E M E 3 E E E M E M 3 E E +3 E E B E E M E M E M E M E 3 E E 3 E E +3 E E B E B B E E B E E M E M E M E 3 E +E B E E M E M E M E 3 E E 3 E E B E B E +E M E M E M E 3 E E 3 E 3 E E E 3 E E E +M E M E M E 3 E E 3 E E B E E M E M E M +E E M E M E M E 3 E E B E B E E M E M E +M E 3 E E B B E B E B E S E S E M E M E +M E 3 E 3 E E E 3 E E 3 E E E M E M E M +E 3 E E B E E M E M E M E 3 E E S E M E +M E M E 3 E 3 E E E 3 E E E M E M E M E +3 E 3 E E E S E M E M E M E 3 E E 3 E E +3 E E B E B B E E B E E M E M E M E 3 E +E 3 E E B E E M E M E M E E M E M E M E +3 E E B B E B E B E S E S E M E M E M E +3 E E S E M E M E M E 3 E 3 E E E 3 E E +3 E E E M E M E M E 3 E E E M E M E M E +3 E E B E S E B E B E M E M E M E 3 E E +B E E M E M E M E 3 E 3 E E E 3 E E 3 E +E E M E M E M E 3 E E S E M E M E M E 3 +E E E M E M E M E 3 E E B B E B E B S E +S E S E M E M E M E 3 E E S E M E M E M +E 3 E E B B E B E B E S E S E M E M E M +E 3 E E E M E M E M E 3 E E E M E M E M +E 3 E E 3 E 3 E E E 3 E E E M E M E M E +3 E E E M E M E M E 3 E E 3 E E 3 E E 3 +E E 3 E E E M E M E M E 3 E E 3 E E B E +E M E M E M E E M E M E M E 3 E E 3 E E +3 E E B E B B E E B E E M E M E M E 3 E +E S E M E M E M E 3 E E 3 E E S 3 E E E +M E M E M E 3 E E 3 E E S 3 E E E M E M +E M E 3 E E 3 E E 3 E E 3 E E 3 E E E M +E M E M E 3 E E B E B E E M E M E M E 3 +E E 3 E E 3 E E B E B B E E B E E M E M +E M E 3 E E B E B E E M E M E M E 3 E E +E M E M E M E 3 E E S E M E M E M E 3 E +E 3 E E S 3 E E E M E M E M E 3 E 3 E E +E 3 E E E M E M E M E 3 E E E M E M E M +E 3 E E 3 E 3 E E E 3 E E E M E M E M E +3 E 3 E E E S E M E M E M E 3 E E B B E +B E B S E S E S E M E M E M E 3 E 3 E E +E 3 E E 3 E E E M E M E M E E M E M E M +E 3 E E E M E M E M E 3 E E 3 E E B E E +M E M E M E 3 E E 3 E E 3 E E 3 E E 3 E +E E M E M E M E 3 E E E M E M E M E 3 E +E 3 E E S 3 E E E M E M 3 E E 3 E E B E +E M E M E M E M E 3 E E S E M E M E M E +3 E E B B E B E B S E S E S E M E M E M +E 3 E E B E B E E M E M E M E 3 E 3 E E +E S E M E M E M E 3 E E 3 E E S 3 E E E +M E M E M E E M E M E M E 3 E 3 E E E 3 +E E E M E M E M E 3 E E E M E M E M E 3 +E E 3 E E 3 E E 3 E E 3 E E E M E M E M +E 3 E E E M E M E M E 3 E E S E M E M E +M E 3 E E 3 E 3 E E E 3 E E E M E M E M +E 3 E E 3 E E B E E M E M E M E 3 E E E +M E M E M E 3 E 3 E E E S E M E M E M E +3 E 3 E E E 3 E E E M E M E M E 3 E E 3 +E E 3 E E B E B B E E B E E M E M E M E +3 E E B B E B E B S E S E S E M E M E M +E 3 E 3 E E E S E M E M E M E 3 E E E M +E M E M E 3 E E 3 E 3 E E E 3 E E E M E +M E M E 3 E E E M E M E M E 3 E E 3 E 3 +E E E 3 E E E M E M E M E E M E M E M E +3 E E 3 E E B E E M E M E M E 3 E E B E +E M E M E M E E M E M E M E 3 E 3 E E E +3 E E 3 E E E M E M E M E 3 E E 3 E E 3 +E E 3 E E 3 E E E M E M E M E 3 E 3 E E +E 3 E E E M E M E M E 3 E E B E B E E M +E M E M E 3 E E E M E M E M E 3 E 3 E E +E 3 E E E M E M E M E 3 E E S E M E M E +M E 3 E E E M E M E M E E M E M 3 E E 3 +E E B E E M E M E M E M E 3 E 3 E E E 3 +E E 3 E E E M E M E M E 3 E E 3 E E 3 E +E 3 E E 3 E E E M E M E M E 3 E 3 E E E +S E M E M E M E 3 E E 3 E 3 E E E 3 E E +E M E M E M E 3 E E E M E M E M E 3 E E +E M E M E M E 3 E E S E M E M E M E E M +E M E M E 3 E 3 E E E 3 E E 3 E E E M E +M E M E 3 E E S E M E M E M E 3 E E B E +B E E M E M E M E 3 E E B B E B E B E S +E S E M E M E M E 3 E E 3 E E 3 E E 3 E +E 3 E E E M E M E M E 3 E E 3 E E 3 E E +3 E E 3 E E E M E M E M E 3 E E 3 E E S +3 E E E M E M E M E 3 E E 3 E 3 E E E 3 +E E E M E M E M E 3 E E B E E M E M E M +E 3 E E B B E B E B S E S E S E M E M E +M E 3 E E B E B E E M E M E M E 3 E E E +M E M E M E 3 E E 3 E E S 3 E E E M E M +E M E 3 E 3 E E E 3 E E E M E M E M E 3 +E E S E M E M 3 E E 3 E E B E E M E M E +M E M E 3 E E 3 E 3 E E E 3 E E E M E M +E M E 3 E E 3 E E 3 E E 3 E E 3 E E E M +E M E M E 3 E E 3 E E 3 E E 3 E E 3 E E +E M E M E M E 3 E E B E B E E M E M E M +E 3 E 3 E E E 3 E E E M E M E M E 3 E E +B E E M E M E M E 3 E 3 E E E 3 E E 3 E +E E M E M E M E 3 E E 3 E E S 3 E E E M +E M E M E 3 E E 3 E E B E E M E M E M E +3 E 3 E E E 3 E E E M E M E M E E M E M +E M E 3 E E B E B E E M E M E M E 3 E 3 +E E E S E M E M E M E 3 E 3 E E E 3 E E +E M E M E M E 3 E E E M E M E M E 3 E E +B B E B E B E S E S E M E M E M E 3 E E +3 E 3 E E E 3 E E E M E M E M E 3 E E S +E M E M E M E 3 E E S E M E M E M E 3 E +E B E E M E M E M E 3 E E 3 E E S 3 E E +E M E M E M E 3 E E E M E M E M E 3 E 3 +E E E S E M E M E M E E M E M E M E 3 E +3 E E E 3 E E 3 E E E M E M E M E 3 E 3 +E E E S E M E M E M E E M E M E M E 3 E +E 3 E E B E E M E M E M E 3 E 3 E E E 3 +E E E M E M E M E 3 E 3 E E E 3 E E E M +E M E M E 3 E E B E S E B E B E M E M E +M E 3 E 3 E E E 3 E E E M E M E M E 3 E +E B E E M E M E M E 3 E E E M E M E M E +E M E M E M E 3 E E B B E B E B S E S E +S E M E M E M E 3 E E B E S E B E B E M +E M E M E 3 E E S E M E M E M E 3 E 3 E +E E 3 E E E M E M E M E 3 E E S E M E M +E M E 3 E E 3 E E S 3 E E E M E M E M E +E M E M E M E 3 E E B E B E E M E M E M +E 3 E 3 E E E 3 E E E M E M E M E 3 E E +3 E 3 E E E 3 E E E M E M E M E 3 E E 3 +E 3 E E E 3 E E E M E M E M E 3 E E 3 E +E B E E M E M E M E 3 E E B E S E B E B +E M E M E M E 3 E E B E S E B E B E M E +M E M E 3 E E B E S E B E B E M E M E M +E 3 E E B E S E B E B E M E M E M E 3 E +E B E S E B E B E M E BLA BLA BLA BLA BLA BLA BLA BLA BLA +BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA +BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA +BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA +BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA +BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA +BLA BLA BLA +%FLAG JOIN_ARRAY +%FORMAT(10I8) + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 +%FLAG IROTAT +%FORMAT(10I8) + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 + 0 0 0 +%FLAG SOLVENT_POINTERS +%FORMAT(3I8) + 270 3 4 +%FLAG ATOMS_PER_MOLECULE +%FORMAT(10I8) + 4049 70 24 +%FLAG BOX_DIMENSIONS +%FORMAT(5E16.8) + 1.09471219E+02 8.62058016E+01 8.62058016E+01 8.62058016E+01 +%FLAG RADII +%FORMAT(5E16.8) + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.80000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 + 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.70000000E+00 + 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 8.00000000E-01 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.80000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.80000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 + 1.70000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.80000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.80000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 8.00000000E-01 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.80000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 + 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 8.00000000E-01 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 + 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.80000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.80000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.50000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 + 1.70000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 8.00000000E-01 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.50000000E+00 8.00000000E-01 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.80000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 + 1.70000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.70000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.70000000E+00 + 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 + 1.55000000E+00 1.70000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.30000000E+00 1.70000000E+00 1.55000000E+00 1.70000000E+00 1.30000000E+00 + 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 1.70000000E+00 + 1.50000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 1.30000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.70000000E+00 1.55000000E+00 + 1.70000000E+00 1.30000000E+00 1.55000000E+00 1.30000000E+00 1.70000000E+00 + 1.30000000E+00 1.70000000E+00 1.50000000E+00 1.50000000E+00 1.85000000E+00 + 1.50000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.70000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.70000000E+00 1.50000000E+00 + 1.70000000E+00 1.55000000E+00 1.70000000E+00 1.55000000E+00 1.70000000E+00 + 1.70000000E+00 1.55000000E+00 1.55000000E+00 1.70000000E+00 1.55000000E+00 + 1.70000000E+00 1.50000000E+00 1.85000000E+00 1.50000000E+00 1.50000000E+00 + 1.50000000E+00 1.70000000E+00 1.70000000E+00 1.50000000E+00 1.70000000E+00 + 1.50000000E+00 1.70000000E+00 1.50000000E+00 1.70000000E+00 1.55000000E+00 + 1.70000000E+00 1.70000000E+00 1.70000000E+00 1.50000000E+00 1.55000000E+00 + 1.70000000E+00 1.70000000E+00 1.70000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 8.00000000E-01 1.30000000E+00 8.00000000E-01 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 8.00000000E-01 + 1.30000000E+00 8.00000000E-01 1.30000000E+00 1.50000000E+00 1.30000000E+00 + 1.30000000E+00 1.50000000E+00 1.50000000E+00 1.50000000E+00 1.70000000E+00 + 1.70000000E+00 1.70000000E+00 1.70000000E+00 1.70000000E+00 1.70000000E+00 + 1.50000000E+00 1.50000000E+00 1.70000000E+00 1.70000000E+00 1.70000000E+00 + 1.70000000E+00 1.70000000E+00 1.70000000E+00 1.70000000E+00 1.70000000E+00 + 1.70000000E+00 1.30000000E+00 1.30000000E+00 1.30000000E+00 8.00000000E-01 + 1.30000000E+00 1.30000000E+00 1.30000000E+00 +%FLAG SCREEN +%FORMAT(5E16.8) + 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 9.60000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 9.60000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 9.60000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 9.60000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 9.60000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 9.60000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 9.60000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 9.60000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 9.60000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 7.20000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 + 7.90000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 7.90000000E-01 7.20000000E-01 8.50000000E-01 + 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 + 7.20000000E-01 8.50000000E-01 7.90000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 8.60000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 8.50000000E-01 + 7.20000000E-01 7.90000000E-01 7.20000000E-01 7.90000000E-01 7.20000000E-01 + 7.20000000E-01 7.90000000E-01 7.90000000E-01 7.20000000E-01 7.90000000E-01 + 7.20000000E-01 8.50000000E-01 8.60000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 + 8.50000000E-01 7.20000000E-01 8.50000000E-01 7.20000000E-01 7.90000000E-01 + 7.20000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 7.90000000E-01 + 7.20000000E-01 7.20000000E-01 7.20000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.00000000E-01 8.50000000E-01 + 8.50000000E-01 8.00000000E-01 8.00000000E-01 8.00000000E-01 7.20000000E-01 + 7.20000000E-01 7.20000000E-01 7.20000000E-01 7.20000000E-01 7.20000000E-01 + 8.50000000E-01 8.50000000E-01 7.20000000E-01 7.20000000E-01 7.20000000E-01 + 7.20000000E-01 7.20000000E-01 7.20000000E-01 8.00000000E-01 8.00000000E-01 + 8.00000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 8.50000000E-01 + 8.50000000E-01 8.50000000E-01 8.50000000E-01 From 216465950bb20c5696b46a33ecab89027e954dcc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 11:06:35 -0500 Subject: [PATCH 0162/1492] Actually compare against the correct save topology. --- test/Test_CombineCrd/RunTest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Test_CombineCrd/RunTest.sh b/test/Test_CombineCrd/RunTest.sh index ed8b4e1fd4..cc4673187d 100755 --- a/test/Test_CombineCrd/RunTest.sh +++ b/test/Test_CombineCrd/RunTest.sh @@ -75,7 +75,7 @@ parmwrite out FabI.NDP.TCS.parm7 crdset combinedCrd EOF RunCpptraj "Split coords and recombine test." DoTest E1.dat E2.dat - DoTest ../FtuFabI.NAD.TCL.parm7 FabI.NDP.TCS.parm7 -I %VERSION + DoTest FabI.NDP.TCS.parm7.save FabI.NDP.TCS.parm7 -I %VERSION fi EndTest From fbd6a9619caf54b1d46d1e3398e0ab84395ed68d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 11:15:47 -0500 Subject: [PATCH 0163/1492] Update dependencies --- src/cpptrajdepend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index e465ed3ccb..3cfeb348ca 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -340,7 +340,7 @@ Exec_SplitCoords.o : Exec_SplitCoords.cpp Action.h ActionList.h ActionState.h An Exec_System.o : Exec_System.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_System.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Top.o : Exec_Top.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Top.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h TopInfo.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Traj.o : Exec_Traj.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Traj.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ViewRst.o : Exec_ViewRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ViewRst.h Exec_Zmatrix.o : Exec_Zmatrix.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Zmatrix.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Zmatrix.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ExtendedSimilarity.o : ExtendedSimilarity.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h ExtendedSimilarity.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -464,7 +464,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h UpdateParameters.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h From 1b14e6c2310130984a2e592cb6fd8f3ea280a0f9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 11:16:44 -0500 Subject: [PATCH 0164/1492] Fix up depencies. --- src/Topology.cpp | 1 - src/cpptrajdepend | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 35f5d064b5..ec01226c49 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -7,7 +7,6 @@ #include "AtomType.h" #include "AtomMask.h" #include "CharMask.h" -#include "UpdateParameters.h" const NonbondType Topology::LJ_EMPTY = NonbondType(); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 3cfeb348ca..348356a862 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -464,7 +464,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h UpdateParameters.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h From bd5cc20c945dba3ecd82df6847209d3f1b8f369a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 13:22:12 -0500 Subject: [PATCH 0165/1492] Comment out some unused functions --- src/Topology.cpp | 4 +++- src/Topology.h | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index ec01226c49..9143404cd4 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2287,6 +2287,7 @@ ParameterSet Topology::GetParameters() const { } // ----------------------------------------------------------------------------- +/* // Topology::AddBondArray() void Topology::AddBondArray(BondArray const& barray, BondParmArray const& bp, int atomOffset) { if (bp.empty()) { @@ -2334,7 +2335,7 @@ void Topology::AddDihArray(DihedralArray const& darray, DihedralParmArray const& AddDihedral( DihedralType( dih->A1() + atomOffset, dih->A2() + atomOffset, dih->A3() + atomOffset, dih->A4() + atomOffset, dih->Type() ), dp[dih->Idx()] ); -} +}*/ /** This template can be used when doing Append() on a generic std::vector array * of type T. The array will be appended to a given array of the same type. @@ -2451,6 +2452,7 @@ int Topology::AppendTop(Topology const& NewTop) { addDihedralsWithOffset( dihedrals_, NewTop.Dihedrals(), atomOffset ); addDihedralsWithOffset( dihedralsh_, NewTop.DihedralsH(), atomOffset ); addDihedralsWithOffset( chamber_.SetImpropers(), NewTop.chamber_.Impropers(), atomOffset ); + // TODO CMAP //# for (BondArray::const_iterator bond = NewTop.Bonds().begin(); bond != NewTop.Bonds().end(); ++bond) //# AddBond( bond->A1() + atomOffset, bond->A2() + atomOffset ); //# for (BondArray::const_iterator bond = NewTop.BondsH().begin(); bond != NewTop.BondsH().end(); ++bond) diff --git a/src/Topology.h b/src/Topology.h index 466de2d36d..8444bb58c1 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -288,9 +288,9 @@ class Topology { void StripDihedralParmArray(DihedralArray&, std::vector&, DihedralParmArray&) const; void StripDihedralParmArray(DihedralArray&, std::vector&, DihedralParmArray&, DihedralParmArray const&) const; - inline void AddBondArray(BondArray const&, BondParmArray const&, int); - inline void AddAngleArray(AngleArray const&, AngleParmArray const&, int); - inline void AddDihArray(DihedralArray const&, DihedralParmArray const&, int); +// inline void AddBondArray(BondArray const&, BondParmArray const&, int); +// inline void AddAngleArray(AngleArray const&, AngleParmArray const&, int); +// inline void AddDihArray(DihedralArray const&, DihedralParmArray const&, int); /// Update parameters in this Topology with those from combined sets. int updateParams(ParameterSet&, ParameterSet const&); From 41f970cb539a6c6c924f772f1e68cbe186733b4b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 13:34:51 -0500 Subject: [PATCH 0166/1492] Add noindices to help --- src/Exec_Top.cpp | 5 +++-- src/TopInfo.cpp | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Exec_Top.cpp b/src/Exec_Top.cpp index 89f40e53e1..0f32883631 100644 --- a/src/Exec_Top.cpp +++ b/src/Exec_Top.cpp @@ -10,8 +10,9 @@ void Exec_LoadParm::Help() const { } // ----------------------------------------------------------------------------- void Exec_ParmInfo::Help() const { - mprintf("\t[%s] []\n", DataSetList::TopIdxArgs); - mprintf(" Print information on specfied topology (first by default).\n"); + mprintf("\t[%s] [] [noindices]\n", DataSetList::TopIdxArgs); + mprintf(" Print information on specfied topology (first by default).\n" + " If 'noindices' is specified indices will not be printed for parameters.\n"); } Exec::RetType Exec_ParmInfo::Execute(CpptrajState& State, ArgList& argIn) { diff --git a/src/TopInfo.cpp b/src/TopInfo.cpp index 8a54ebaeb5..d7e7e6172f 100644 --- a/src/TopInfo.cpp +++ b/src/TopInfo.cpp @@ -449,7 +449,10 @@ void TopInfo::PrintBonds(BondArray const& barray, BondParmArray const& bondparm, printBond = false; } if (printBond) { - outfile_->Printf("%*i", nw, nb); + if (printIndices_) + outfile_->Printf("%*i", nw, nb); + else + outfile_->Printf("%*c", nw, ' '); int bidx = batom->Idx(); if ( bidx > -1 ) outfile_->Printf(" %6.2f %6.3f", bondparm[bidx].Rk(), bondparm[bidx].Req()); @@ -534,7 +537,10 @@ void TopInfo::PrintAngles(AngleArray const& aarray, AngleParmArray const& anglep mask1.AtomInCharMask(atom2) || mask1.AtomInCharMask(atom3)); if (printAngle) { - outfile_->Printf("%*i", nw, na); + if (printIndices_) + outfile_->Printf("%*i", nw, na); + else + outfile_->Printf("%*c", nw, ' '); int aidx = aatom->Idx(); if ( aidx > -1 ) outfile_->Printf(" %6.3f %6.2f", angleparm[aidx].Tk(), From 452cfc76ed593879e99575e956ab6e5ab8db2178 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 13:43:32 -0500 Subject: [PATCH 0167/1492] Add noindices/extra keywords to help and manual. --- doc/cpptraj.lyx | 54 +++++++++++++++++++++++++++++++++++++++++------- src/Exec_Top.cpp | 26 +++++++++++++++-------- 2 files changed, 63 insertions(+), 17 deletions(-) diff --git a/doc/cpptraj.lyx b/doc/cpptraj.lyx index 71f72662f6..e78dcabe9c 100644 --- a/doc/cpptraj.lyx +++ b/doc/cpptraj.lyx @@ -14449,7 +14449,11 @@ angleinfo | angles | printangles \end_layout \begin_layout LyX-Code -angleinfo [parm | parmindex <#> | <#>] [] [ ] +angleinfo [parm | parmindex <#> | <#>] +\end_layout + +\begin_layout LyX-Code + [] [ ] [noindices] \end_layout \begin_layout LyX-Code @@ -14498,6 +14502,10 @@ parmindex ] If specified, angles must match all masks. \end_layout +\begin_layout Description +[noindices] Do not print angle indices. +\end_layout + \begin_layout Description [out \begin_inset space ~ @@ -14674,7 +14682,7 @@ bondinfo [parm | parmindex <#> | <#>] \end_layout \begin_layout LyX-Code - [] [] [out ] [nointrares] + [] [] [out ] [nointrares] [noindices] \end_layout \begin_deeper @@ -14727,6 +14735,10 @@ parmindex [nointrares] Do not print intra-residue bonds. \end_layout +\begin_layout Description +[noindices] Do not print bond indices. +\end_layout + \end_deeper \begin_layout Standard Print bond information for atoms in for selected topology (first @@ -15331,12 +15343,15 @@ dihedralinfo | dihedrals | printdihedrals \end_layout \begin_layout LyX-Code -dihedralinfo [parm | parmindex <#> | <#>] [] [ - ] +dihedralinfo [parm | parmindex <#> | <#>] \end_layout \begin_layout LyX-Code - [out ] + [] [ ] [noindices] +\end_layout + +\begin_layout LyX-Code + [out ] [extra] \end_layout \begin_deeper @@ -15385,6 +15400,10 @@ parmindex ] If specified, dihedrals must match all masks. \end_layout +\begin_layout Description +[noindices] Do not print dihedral indices. +\end_layout + \begin_layout Description [out \begin_inset space ~ @@ -15393,6 +15412,10 @@ parmindex ] File to print to (default STDOUT). \end_layout +\begin_layout Description +[extra] Print SCEE/SCNB info as well. +\end_layout + \end_deeper \begin_layout Standard Print dihedral information of atoms in for selected topology (first @@ -15537,8 +15560,11 @@ improperinfo | impropers | printimpropers \end_layout \begin_layout LyX-Code -improperinfo [parm | parmindex <#> | <#>] [] [ - ] +improperinfo [parm | parmindex <#> | <#>] +\end_layout + +\begin_layout LyX-Code + [] [ ] [noindices] \end_layout \begin_layout LyX-Code @@ -15591,6 +15617,10 @@ parmindex ] If specified, impropers must match all masks. \end_layout +\begin_layout Description +[noindices] Do not print improper indices. +\end_layout + \begin_layout Description [out \begin_inset space ~ @@ -16443,7 +16473,11 @@ printub | ubinfo \end_layout \begin_layout LyX-Code -printub [parm | parmindex <#> | <#>] [] [] [out ] +printub [parm | parmindex <#> | <#>] +\end_layout + +\begin_layout LyX-Code + [] [] [out ] [noindices] \end_layout \begin_deeper @@ -16492,6 +16526,10 @@ parmindex ] File to print to (default STDOUT). \end_layout +\begin_layout Description +[noindices] Do not print UB indices. +\end_layout + \end_deeper \begin_layout Standard For specified topology (first by default) either print CHARMM Urey-Bradley diff --git a/src/Exec_Top.cpp b/src/Exec_Top.cpp index 0f32883631..8980eff421 100644 --- a/src/Exec_Top.cpp +++ b/src/Exec_Top.cpp @@ -10,9 +10,8 @@ void Exec_LoadParm::Help() const { } // ----------------------------------------------------------------------------- void Exec_ParmInfo::Help() const { - mprintf("\t[%s] [] [noindices]\n", DataSetList::TopIdxArgs); - mprintf(" Print information on specfied topology (first by default).\n" - " If 'noindices' is specified indices will not be printed for parameters.\n"); + mprintf("\t[%s] []\n", DataSetList::TopIdxArgs); + mprintf(" Print information on specfied topology (first by default).\n"); } Exec::RetType Exec_ParmInfo::Execute(CpptrajState& State, ArgList& argIn) { @@ -55,7 +54,8 @@ static int CommonSetup(TopInfo& info, CpptrajState& State, ArgList& argIn, const // ----------------------------------------------------------------------------- void Exec_BondInfo::Help() const { - mprintf("\t[%s] [] [] [out ] [nointrares]\n", DataSetList::TopIdxArgs); + mprintf("\t[%s]\n" + "\t[] [] [out ] [nointrares] [noindices]\n", DataSetList::TopIdxArgs); mprintf(" For specified topology (first by default) either print bond info for all\n" " atoms in , or print info for bonds with first atom in and\n" " second atom in . If 'nointrares' is specified, only print bonds\n" @@ -71,7 +71,8 @@ Exec::RetType Exec_BondInfo::Execute(CpptrajState& State, ArgList& argIn) { } // ----------------------------------------------------------------------------- void Exec_UBInfo::Help() const { - mprintf("\t[%s] [] [] [out ]\n", DataSetList::TopIdxArgs); + mprintf("\t[%s]\n" + "\t[] [] [out ] [noindices]\n", DataSetList::TopIdxArgs); mprintf(" For specified topology (first by default) either print CHARMM Urey-Bradley\n" " info for all atoms in , or print info for bonds with first atom in\n" " and second atom in .\n"); @@ -87,7 +88,9 @@ Exec::RetType Exec_UBInfo::Execute(CpptrajState& State, ArgList& argIn) { // ----------------------------------------------------------------------------- void Exec_AngleInfo::Help() const { - mprintf("\t[%s] [] [ ]\n\t[out ]\n", DataSetList::TopIdxArgs); + mprintf("\t[%s]\n" + "\t[] [ ] [noindices]\n" + "\t[out ]\n", DataSetList::TopIdxArgs); mprintf(" For specified topology (first by default) either print angle info for all\n" " atoms in , or print info for angles with first atom in ,\n" " second atom in , and third atom in .\n"); @@ -103,10 +106,13 @@ Exec::RetType Exec_AngleInfo::Execute(CpptrajState& State, ArgList& argIn) { } // ----------------------------------------------------------------------------- void Exec_DihedralInfo::Help() const { - mprintf("\t[%s] [] [ ]\n\t[out ] [extra]\n", DataSetList::TopIdxArgs); + mprintf("\t[%s]\n" + "\t[] [ ] [noindices]\n" + "\t[out ] [extra]\n", DataSetList::TopIdxArgs); mprintf(" For specified topology (first by default) either print dihedral info for all\n" " atoms in , or print info for dihedrals with first atom in ,\n" - " second atom in , third atom in , and fourth atom in .\n"); + " second atom in , third atom in , and fourth atom in .\n" + " If 'extra' is specified, print SCEE and SCNB factors as well.\n"); } Exec::RetType Exec_DihedralInfo::Execute(CpptrajState& State, ArgList& argIn) { @@ -128,7 +134,9 @@ Exec::RetType Exec_DihedralInfo::Execute(CpptrajState& State, ArgList& argIn) { // ----------------------------------------------------------------------------- void Exec_ImproperInfo::Help() const { - mprintf("\t[%s] [] [ ]\n\t[out ]\n", DataSetList::TopIdxArgs); + mprintf("\t[%s]\n" + "\t[] [ ] [noindices]\n" + "\t[out ]\n", DataSetList::TopIdxArgs); mprintf(" For specified topology (first by default) either print CHARMM improper info\n" " for all atoms in , or print info for dihedrals with first atom in ,\n" " second atom in , third atom in , and fourth atom in .\n"); From ab7980a4b76f369b304ed445cc5c4a79aa0b8e2e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 13:59:28 -0500 Subject: [PATCH 0168/1492] Add script to find out if test dirs are missing from the test Makefile --- devtools/FindMissingTests.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 devtools/FindMissingTests.sh diff --git a/devtools/FindMissingTests.sh b/devtools/FindMissingTests.sh new file mode 100755 index 0000000000..af79c65774 --- /dev/null +++ b/devtools/FindMissingTests.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ ! -f 'Makefile' ] ; then + echo "Should be executed in directory where main test Makefile is." + exit 1 +fi + +for DIR in `ls -d Test_*` ; do + if [ -d "$DIR" ] ; then + IN_MAKEFILE=`grep $DIR Makefile` + if [ -z "$IN_MAKEFILE" ] ; then + echo "$DIR not in Makefile." + fi + fi +done From 4c705ccfa723e2fdfa191f3cb982e27067f63bd2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 14:03:03 -0500 Subject: [PATCH 0169/1492] Add missing tests --- test/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 5c97316457..f75f161bf1 100644 --- a/test/Makefile +++ b/test/Makefile @@ -539,6 +539,12 @@ test.readoff: test.sequence: @-cd Test_Sequence && ./RunTest.sh $(OPT) +test.refinetrajectory: + @-cd Test_RefineTrajectory && ./RunTest.sh $(OPT) + +test.readamberff: + @-cd Test_ReadAmberFF && ./RunTest.sh $(OPT) + # Every test target should go here. COMPLETETESTS=test.general \ test.strip \ @@ -709,7 +715,9 @@ COMPLETETESTS=test.general \ test.readprep \ test.zmatrix \ test.readoff \ - test.sequence + test.sequence \ + test.refinetrajectory \ + test.readamberff test.all: $(MAKE) test.complete summary From ae38483c761289972627289df7109ba8521fad3c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 13 Dec 2023 14:03:13 -0500 Subject: [PATCH 0170/1492] Convert radians to degrees in output --- src/ParameterSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index ff6dc6c5b7..70438dcd07 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -79,7 +79,7 @@ void ParameterSet::Print(CpptrajFile& Out) const { Out.Printf("Angle parameters:\n"); Out.Printf("\t%6s %6s %6s : %12s %12s\n", "Type1", "Type2", "Type3", "Tk", "Teq"); for (ParmHolder::const_iterator bp = angleParm_.begin(); bp != angleParm_.end(); ++bp) - Out.Printf("\t%6s %6s %6s : %12.4f %12.4f\n", *(bp->first[0]), *(bp->first[1]), *(bp->first[2]), bp->second.Tk(), bp->second.Teq()); + Out.Printf("\t%6s %6s %6s : %12.4f %12.4f\n", *(bp->first[0]), *(bp->first[1]), *(bp->first[2]), bp->second.Tk(), bp->second.Teq()*Constants::RADDEG); } if (!ubParm_.empty()) { Out.Printf("UB parameters:\n"); From a96564e00820ed1c4f277092f41dfc3f86478d2a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 14 Dec 2023 14:18:16 -0500 Subject: [PATCH 0171/1492] Load residue templates. --- src/Exec_Build.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index dee7222833..77d43cd28d 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -36,6 +36,46 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) // Get modifiable topology Topology& topIn = *(coords.TopPtr()); + // Get residue templates. + typedef std::vector Carray; + Carray Templates; + std::string lib = argIn.GetStringKey("lib"); + if (lib.empty()) { + mprintf("\tNo template(s) specified with 'lib'; using any loaded templates.\n"); + DataSetList sets = State.DSL().SelectGroupSets( "*", DataSet::COORDINATES ); // TODO specific set type for units? + for (DataSetList::const_iterator it = sets.begin(); it != sets.end(); ++it) + { + // Should only be a single residue FIXME need new set type + DataSet_Coords const& ds = static_cast( *(*it) ); + if ( ds.Top().Nres() == 1 ) + Templates.push_back( (DataSet_Coords*)(*it) ); + } + } else { + while (!lib.empty()) { + DataSetList sets = State.DSL().SelectGroupSets( lib, DataSet::COORDINATES ); // TODO specific set type for units? + if (sets.empty()) { + mprintf("Warning: No sets corresponding to '%s'\n", lib.c_str()); + } else { + for (DataSetList::const_iterator it = sets.begin(); it != sets.end(); ++it) + { + // Should only be a single residue FIXME need new set type + DataSet_Coords const& ds = static_cast( *(*it) ); + if ( ds.Top().Nres() == 1 ) + Templates.push_back( (DataSet_Coords*)(*it) ); + } + } + lib = argIn.GetStringKey("lib"); + } + } + if (Templates.empty()) + mprintf("Warning: No residue templates loaded.\n"); + else { + mprintf("\t%zu residue templates found:", Templates.size()); + for (std::vector::const_iterator it = Templates.begin(); it != Templates.end(); ++it) + mprintf(" %s", (*it)->legend()); + mprintf("\n"); + } + // Fill in atoms with templates // Generate angles/dihedrals From 68e742b78a8c0980070011ed9eb2183b8eebc945 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 14 Dec 2023 15:12:14 -0500 Subject: [PATCH 0172/1492] Start filling in residues using templates. --- src/Exec_Build.cpp | 41 ++++++++++++++++++++++++++++++++++++++++- src/Exec_Build.h | 7 +++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 77d43cd28d..8bab1477ed 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -3,6 +3,40 @@ #include "DataSet_Parameters.h" #include "Structure/GenerateAngles.h" +DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, + NameType const& rname) +{ + DataSet_Coords* out = 0; + // Assume Coords set aspect is what we need + for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { + if ( rname == NameType( (*it)->Meta().Aspect() ) ) { + out = *it; + break; + } + } + return out; +} + +/** Use given templates to construct a final molecule. */ +int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, + Carray const& Templates, + Topology const& topIn, Frame const& frameIn) +{ + for (int ires = 0; ires != topIn.Nres(); ires++) + { + // Identify a template based on the residue name. + DataSet_Coords* resTemplate = IdTemplateFromName(Templates, topIn.Res(ires).Name()); + if (resTemplate == 0) { + mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + } else { + mprintf("\tTemplate %s being used for residue %s\n", + resTemplate->legend(), topIn.TruncResNameNum(ires).c_str()); + } + } + + return 0; +} + // Exec_Build::Help() void Exec_Build::Help() const { @@ -37,7 +71,6 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) Topology& topIn = *(coords.TopPtr()); // Get residue templates. - typedef std::vector Carray; Carray Templates; std::string lib = argIn.GetStringKey("lib"); if (lib.empty()) { @@ -77,6 +110,12 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) } // Fill in atoms with templates + Topology topOut; + Frame frameOut; + if (FillAtomsWithTemplates(topOut, frameOut, Templates, topIn, frameIn)) { + mprinterr("Error: Could not fill in atoms using templates.\n"); + return CpptrajState::ERR; + } // Generate angles/dihedrals if (Cpptraj::Structure::GenerateAngles(topIn)) { diff --git a/src/Exec_Build.h b/src/Exec_Build.h index 9225f7e3bf..102d1e849f 100644 --- a/src/Exec_Build.h +++ b/src/Exec_Build.h @@ -8,5 +8,12 @@ class Exec_Build : public Exec { void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Build(); } RetType Execute(CpptrajState&, ArgList&); + private: + typedef std::vector Carray; + + /// Identify residue template from residue name + static DataSet_Coords* IdTemplateFromName(Carray const&, NameType const&); + /// Create new topology/frame using templates + static int FillAtomsWithTemplates(Topology&, Frame&, Carray const&, Topology const&, Frame const&); }; #endif From cdb2014a04f656cc965c801d2c4ceb248cb735a0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 14 Dec 2023 15:23:13 -0500 Subject: [PATCH 0173/1492] Find atoms in templates --- src/Exec_Build.cpp | 33 +++++++++++++++++++++++++++++++++ src/Exec_Build.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 8bab1477ed..138658c9ac 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -17,6 +17,30 @@ DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, return out; } +/** Map atoms in residue to template. */ +std::vector Exec_Build::MapAtomsToTemplate(Topology const& topIn, + int rnum, + DataSet_Coords* resTemplate) +{ + std::vector mapOut; + mapOut.reserve( resTemplate->Top().Natom() ); + Residue const& resIn = topIn.Res(rnum); + for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) + { + // Find this atom name in topIn + NameType const& refName = resTemplate->Top()[iref].Name(); + int iat = -1; + for (int itgt = resIn.FirstAtom(); itgt != resIn.LastAtom(); itgt++) { + if ( refName == topIn[itgt].Name() ) { + iat = itgt; + break; + } + } + mapOut.push_back( iat ); + } + return mapOut; +} + /** Use given templates to construct a final molecule. */ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, @@ -31,6 +55,15 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } else { mprintf("\tTemplate %s being used for residue %s\n", resTemplate->legend(), topIn.TruncResNameNum(ires).c_str()); + std::vector map = MapAtomsToTemplate( topIn, ires, resTemplate ); + mprintf("\t Atom map:\n"); + for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { + mprintf("\t\t%6i %6s =>", iref+1, *(resTemplate->Top()[iref].Name())); + if (map[iref] == -1) + mprintf(" No match\n"); + else + mprintf(" %6i %6s\n", map[iref]+1, *(topIn[map[iref]].Name())); + } } } diff --git a/src/Exec_Build.h b/src/Exec_Build.h index 102d1e849f..c96aad7e69 100644 --- a/src/Exec_Build.h +++ b/src/Exec_Build.h @@ -15,5 +15,7 @@ class Exec_Build : public Exec { static DataSet_Coords* IdTemplateFromName(Carray const&, NameType const&); /// Create new topology/frame using templates static int FillAtomsWithTemplates(Topology&, Frame&, Carray const&, Topology const&, Frame const&); + /// Map atoms in topology to template + static std::vector MapAtomsToTemplate(Topology const&, int, DataSet_Coords*); }; #endif From dc02bf5204a4f3860f23b49e4a8ddbd6b3ab9ce2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 14 Dec 2023 16:31:02 -0500 Subject: [PATCH 0174/1492] Start trying to fill in missing atoms. --- src/Exec_Build.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/cpptrajdepend | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 138658c9ac..1a787ed5fe 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "DataSet_Parameters.h" #include "Structure/GenerateAngles.h" +#include "Structure/Zmatrix.h" DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, NameType const& rname) @@ -46,6 +47,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, Topology const& topIn, Frame const& frameIn) { + std::vector XYZ; // FIXME should use frameOut + Cpptraj::Structure::Zmatrix::Barray hasPosition; + int nAtomsMissing = 0; for (int ires = 0; ires != topIn.Nres(); ires++) { // Identify a template based on the residue name. @@ -55,6 +59,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } else { mprintf("\tTemplate %s being used for residue %s\n", resTemplate->legend(), topIn.TruncResNameNum(ires).c_str()); + // Map atoms to template atoms std::vector map = MapAtomsToTemplate( topIn, ires, resTemplate ); mprintf("\t Atom map:\n"); for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { @@ -64,8 +69,48 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, else mprintf(" %6i %6s\n", map[iref]+1, *(topIn[map[iref]].Name())); } + for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { + topOut.AddTopAtom( resTemplate->Top()[iref], topIn.Res(ires) ); + if (map[iref] == -1) { + XYZ.push_back( Vec3(0.0) ); + hasPosition.push_back( false ); + nAtomsMissing++; + } else { + XYZ.push_back( Vec3(frameIn.XYZ(map[iref])) ); + hasPosition.push_back( true ); + } + } + // DEBUG + Frame templateFrame = resTemplate->AllocateFrame(); + resTemplate->GetFrame( 0, templateFrame ); + Cpptraj::Structure::Zmatrix zmatrix; + if (zmatrix.SetFromFrame( templateFrame, resTemplate->Top(), 0 )) { + mprinterr("Error: Could not set up residue template zmatrix.\n"); + return 1; + } + zmatrix.print(); + // If no atoms missing just fill in the residue +/* if (nAtomsMissing == 0) { + for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { + topOut.AddTopAtom( resTemplate->Top()[iref], topIn.Res(ires) ); + XYZ.push_back( Vec3(frameIn.XYZ(map[iref])) ); + } + } else { + mprintf("\tTrying to fill in missing atoms.\n"); + // one or more atoms missing. Try to use Zmatrix to fill it in + + // DEBUG*/ + } } + mprintf("\t%i atoms missing.\n", nAtomsMissing); + for (int iat = 0; iat != topOut.Natom(); iat++) + { + Residue const& res = topOut.Res( topOut[iat].ResNum() ); + mprintf("%6i %6s %6i %6s (%i) %g %g %g\n", + iat+1, *(topOut[iat].Name()), res.OriginalResNum(), *(res.Name()), + (int)hasPosition[iat], XYZ[iat][0], XYZ[iat][1], XYZ[iat][2]); + } return 0; } diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 348356a862..3f959374c5 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -288,7 +288,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From 8ad97a444f0dd574f0ded012d1133b94b4b05a38 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 14 Dec 2023 16:41:51 -0500 Subject: [PATCH 0175/1492] Allow ability to update IC indices according to maps. --- src/Exec_Build.cpp | 1 + src/Structure/InternalCoords.cpp | 8 ++++++++ src/Structure/InternalCoords.h | 3 +++ src/Structure/Zmatrix.cpp | 6 ++++++ src/Structure/Zmatrix.h | 2 ++ 5 files changed, 20 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 1a787ed5fe..7ae235c81b 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -88,6 +88,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } + zmatrix.RemapIcIndices( map ); zmatrix.print(); // If no atoms missing just fill in the residue /* if (nAtomsMissing == 0) { diff --git a/src/Structure/InternalCoords.cpp b/src/Structure/InternalCoords.cpp index 3161f023c7..d923fb22a2 100644 --- a/src/Structure/InternalCoords.cpp +++ b/src/Structure/InternalCoords.cpp @@ -67,3 +67,11 @@ void InternalCoords::printIC(Topology const& top) const { top.AtomMaskName(AtL()).c_str(), val_[0], val_[1], val_[2]); } + +/** Remap internal coords indices. */ +void InternalCoords::RemapIndices(std::vector const& map) { + if (ati_ != NO_ATOM) ati_ = map[AtI()]; + if (idx_[0] != NO_ATOM) idx_[0] = map[AtJ()]; + if (idx_[1] != NO_ATOM) idx_[1] = map[AtK()]; + if (idx_[2] != NO_ATOM) idx_[2] = map[AtL()]; +} diff --git a/src/Structure/InternalCoords.h b/src/Structure/InternalCoords.h index 3be154e9d8..b1ac7140ed 100644 --- a/src/Structure/InternalCoords.h +++ b/src/Structure/InternalCoords.h @@ -1,5 +1,6 @@ #ifndef INC_STRUCTURE_INTERNALCOORDS_H #define INC_STRUCTURE_INTERNALCOORDS_H +#include class Topology; namespace Cpptraj { namespace Structure { @@ -38,6 +39,8 @@ class InternalCoords { static unsigned int sizeInBytes() { return (4*sizeof(int)) + (3*sizeof(double)); } void printIC(Topology const&) const; + /// Remap internal indices according to given map + void RemapIndices(std::vector const&); private: int ati_; ///< Atom I index int idx_[3]; ///< Atom indices for distance, angle, torsion diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 538564c2b9..d64be5f22e 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -120,6 +120,12 @@ void Zmatrix::print(Topology* topIn) const { } } +/** Remap internal coordinate indices according to the given atom map. */ +void Zmatrix::RemapIcIndices(std::vector const& map) { + for (ICarray::iterator it = IC_.begin(); it != IC_.end(); ++it) + it->RemapIndices(map); +} + /** \return True if all Cartesian seeds are set. */ bool Zmatrix::HasCartSeeds() const { bool has_cart_seed = (seedAt0_ != InternalCoords::NO_ATOM && diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index d778e34145..f2342c0a46 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -31,6 +31,8 @@ class Zmatrix { int AddIC(InternalCoords const&); /// Set specified IC void SetIC(unsigned int, InternalCoords const&); + /// Remap IC indices according to given map + void RemapIcIndices(std::vector const&); /// Set seed atoms from frame/top int SetSeedPositions(Frame const&, Topology const&, int, int, int); From df40d389b46390ea7ed8396944b5f11d830b72bc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 18 Dec 2023 09:15:12 -0500 Subject: [PATCH 0176/1492] Add missing file --- test/Test_ReadAmberFF/toyrna.dat | 157 +++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 test/Test_ReadAmberFF/toyrna.dat diff --git a/test/Test_ReadAmberFF/toyrna.dat b/test/Test_ReadAmberFF/toyrna.dat new file mode 100644 index 0000000000..20b19ba4c1 --- /dev/null +++ b/test/Test_ReadAmberFF/toyrna.dat @@ -0,0 +1,157 @@ +toyrna force field +CB 56.00 0.000 backbone C4' +CS 43.00 0.000 sugar C1' +G9 25.00 0.000 sp2 nitrogen in base +G7 25.00 0.000 sp2 nitrogen in base +G6 25.00 0.000 sp2 oxygen in base +G1 25.00 0.000 sp2 nitrogen in base +G2 25.00 0.000 sp2 nitrogen in base +G3 25.00 0.000 sp2 nitrogen in base +A9 26.80 0.000 sp2 nitrogen in base +A7 26.80 0.000 sp2 nitrogen in base +A6 26.80 0.000 sp2 nitrogen in base +A1 26.80 0.000 sp2 nitrogen in base +A3 26.80 0.000 sp2 nitrogen in base +U1 27.75 0.000 sp2 nitrogen in base +U3 27.75 0.000 sp2 nitrogen in base +U4 27.75 0.000 sp2 oxygen in base +U2 27.75 0.000 sp2 oxygen in base +C1 27.50 0.000 sp2 nitrogen in base +C3 27.50 0.000 sp2 nitrogen in base +C4 27.50 0.000 sp2 nitrogen in base +C2 27.50 0.000 sp2 oxygen in base +P 95.00 0.000 phosphate,pol:JACS,112,8543,90,K.J.Miller + + +P -CB 150.0 3.90 +CB-CS 100.0 2.35 +CS-G9 150.0 1.48 +CS-A9 150.0 1.48 +CS-U1 150.0 1.48 +CS-C1 150.0 1.48 +A9-A7 100.0 2.24 +A7-A6 100.0 3.08 +A6-A1 100.0 2.31 +A1-A3 100.0 2.39 +A3-A9 100.0 2.43 +G9-G7 100.0 2.25 +G7-G6 100.0 3.09 +G6-G1 100.0 2.27 +G1-G2 100.0 2.29 +G2-G3 100.0 2.31 +G3-G9 100.0 2.42 +U1-U4 100.0 4.04 +U4-U3 100.0 2.27 +U3-U2 100.0 2.28 +U2-U1 100.0 2.29 +C1-C4 100.0 4.04 +C4-C3 100.0 2.31 +C3-C2 100.0 2.26 +C2-C1 100.0 2.27 + +CS-A9-A7 45. 160.9 +A9-A7-A6 50. 118.9 +A7-A6-A1 50. 85.4 +A6-A1-A3 50. 123.9 +A1-A3-A9 50. 112.1 +A3-A9-A7 50. 99.7 +CS-A9-A3 45. 99.1 +CS-G9-G7 45. 161.2 +G9-G7-G6 50. 117.7 +G7-G6-G1 50. 85.2 +G6-G1-G2 10. 175.1 +G1-G2-G3 50. 62.2 +G2-G3-G9 50. 169.6 +G3-G9-G7 50. 100.3 +CS-G9-G3 45. 97.9 +CS-U1-U4 0. 180.0 +U1-U4-U3 50. 29.5 +U4-U3-U2 0. 180.0 +U3-U2-U1 50. 61.8 +U2-U1-U4 50. 87.3 +CS-U1-U2 45. 90.8 +CS-C1-C4 0. 180.0 +C1-C4-C3 50. 30.0 +C4-C3-C2 0. 180.0 +C3-C2-C1 50. 62.3 +C2-C1-C4 50. 87.7 +CS-C1-C2 45. 89.2 +P -CB-P 22. 97.0 +CB-P -CB 30. 103.0 +P -CB-CS 30. 104.0 +CB-CS-G9 30. 122.5 +CB-CS-A9 30. 122.5 +CB-CS-U1 30. 122.5 +CB-CS-C1 30. 122.5 + +X -CB-CS-X 1 7.50 -165.0 1. +X -P -CB-X 1 0.0 180.0 2. +X -CS-G9-X 1 0.0 180.0 2. +X -CS-A9-X 1 0.0 180.0 2. +X -CS-U1-X 1 0.0 180.0 2. +X -CS-C1-X 1 0.0 180.0 2. +X -A9-A7-X 1 0.0 180.0 2. +X -A7-A6-X 1 0.0 180.0 2. +X -A6-A1-X 1 0.0 180.0 2. +X -A1-A3-X 1 0.0 180.0 2. +X -A3-A9-X 1 0.0 180.0 2. +X -G9-G7-X 1 0.0 180.0 2. +X -G7-G6-X 1 0.0 180.0 2. +X -G6-G1-X 1 0.0 180.0 2. +X -G1-G2-X 1 0.0 180.0 2. +X -G2-G3-X 1 0.0 180.0 2. +X -G3-G9-X 1 0.0 180.0 2. +X -U1-U4-X 1 0.0 180.0 2. +X -U4-U3-X 1 0.0 180.0 2. +X -U3-U2-X 1 0.0 180.0 2. +X -U2-U1-X 1 0.0 180.0 2. +X -C1-C4-X 1 0.0 180.0 2. +X -C4-C3-X 1 0.0 180.0 2. +X -C3-C2-X 1 0.0 180.0 2. +X -C2-C1-X 1 0.0 180.0 2. +CS-C1-C2-C3 1 2.0 180.0 2. +C4-C1-C2-C3 1 2.0 180.0 2. +CS-U1-U2-U3 1 2.0 180.0 2. +U4-U1-U2-U3 1 2.0 180.0 2. +CS-G9-G7-G6 1 2.0 180.0 2. +G9-G7-G6-G1 1 2.0 180.0 2. +CS-A9-A7-A6 1 2.0 180.0 2. +A9-A7-A6-A1 1 2.0 180.0 2. +CB-CS-C1-C2 1 2.0 180.0 2. +CB-CS-U1-U2 1 2.0 180.0 2. +CB-CS-G9-G3 1 2.0 180.0 2. +CB-CS-A9-A3 1 2.0 180.0 2. + + + G6 C4 5.0 3.0 0. + G1 C3 5.0 3.0 0. + G2 C2 5.0 3.0 0. + A6 U4 5.0 3.0 0. + A1 U3 5.0 3.0 0. + G7 C4 5.0 6.0 0. + G3 C2 5.0 5.25 0. + +CB CS +G9 A9 U1 C1 + +MOD4 RE + P 3.0000 0.2000 + CB 2.0000 0.2000 + G7 1.8000 0.2000 + G6 1.8000 0.2000 + G1 1.8000 0.2000 + G2 1.8000 0.2000 + G3 1.8000 0.2000 + A7 1.8000 0.2000 + A6 1.8000 0.2000 + A1 1.8000 0.2000 + A3 1.8000 0.2000 + U4 1.8000 0.2000 + U3 1.8000 0.2000 + U2 1.8000 0.2000 + C4 1.8000 0.2000 + C3 1.8000 0.2000 + C2 1.8000 0.2000 + G9 1.8000 0.3000 + +END From 50d1c4be21f8a95b1d01eb19dc5e489059a0c677 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 18 Dec 2023 09:16:17 -0500 Subject: [PATCH 0177/1492] Add atom hybridization to AtomType --- src/AtomType.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/AtomType.h b/src/AtomType.h index 659e84fc8e..e603f0361b 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -4,14 +4,16 @@ /// Hold parameters for a unique atom type class AtomType { public: + /// Atom hybridization types + enum HybridizationType { SP = 0, SP2, SP3, UNKNOWN_HYBRIDIZATION }; /// CONSTRUCTOR - AtomType() : mass_(0.0), polarizability_(0.0), oidx_(-1) {} + AtomType() : mass_(0.0), polarizability_(0.0), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} /// CONSTRUCTOR - Mass only - AtomType(double m) : mass_(m), oidx_(-1) {} + AtomType(double m) : mass_(m), polarizability_(0.0), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} /// CONSTRUCTOR - Mass, polarizability - AtomType(double m, double p) : mass_(m), polarizability_(p), oidx_(-1) {} + AtomType(double m, double p) : mass_(m), polarizability_(p), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} /// CONSTRUCTOR - Radius, well depth, mass, polarizability - AtomType(double r, double d, double m, double p) : lj_(r, d), mass_(m), oidx_(-1) {} + AtomType(double r, double d, double m, double p) : lj_(r, d), mass_(m), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} /// Set type index void SetTypeIdx(int i) { oidx_ = i; } /// \return default LJ parameters @@ -22,6 +24,8 @@ class AtomType { double Polarizability() const { return polarizability_; } /// \return Original atom type index. Useful when checking for off-diagonal NB parameters. int OriginalIdx() const { return oidx_; } + /// \return Atom hybridization + HybridizationType Hybridization() const { return hybrid_; } /// \return true if mass, polarizability, or LJ params are less than incoming bool operator<(AtomType const& rhs) const { if (FEQ(mass_, rhs.mass_)) { @@ -49,5 +53,6 @@ class AtomType { double mass_; ///< Mass in amu double polarizability_; ///< Atomic polarizability in Ang^3 int oidx_; ///< Original atom type index, for indexing nonbond parameters. + HybridizationType hybrid_; ///< Atom hybridization }; #endif From 05adf6c7b4c97a1426ced596af3fd2b07953359b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 08:56:38 -0500 Subject: [PATCH 0178/1492] Find templates first to see how many atoms we expect --- src/Exec_Build.cpp | 120 ++++++++++++++++++++++++++++++++------------- 1 file changed, 86 insertions(+), 34 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 7ae235c81b..2fc6793994 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -47,21 +47,57 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, Topology const& topIn, Frame const& frameIn) { - std::vector XYZ; // FIXME should use frameOut - Cpptraj::Structure::Zmatrix::Barray hasPosition; - int nAtomsMissing = 0; + // Array of templates for each residue + std::vector ResTemplates; + ResTemplates.reserve( topIn.Nres() ); + // Initial loop to try to match residues to templates + int newNatom = 0; for (int ires = 0; ires != topIn.Nres(); ires++) { // Identify a template based on the residue name. - DataSet_Coords* resTemplate = IdTemplateFromName(Templates, topIn.Res(ires).Name()); + Residue const& currentRes = topIn.Res(ires); + DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name()); if (resTemplate == 0) { mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + newNatom += currentRes.NumAtoms(); } else { mprintf("\tTemplate %s being used for residue %s\n", resTemplate->legend(), topIn.TruncResNameNum(ires).c_str()); - // Map atoms to template atoms + newNatom += resTemplate->Top().Natom(); + } + ResTemplates.push_back( resTemplate ); + } + mprintf("\tFinal structure should have %i atoms.\n", newNatom); + frameOut.SetupFrame( newNatom ); + // Clear frame so that AddXYZ can be used + frameOut.ClearAtoms(); + + // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building + Cpptraj::Structure::Zmatrix::Barray hasPosition; + hasPosition.reserve( newNatom ); + // Z-matrices for residues that have missing atoms + typedef std::vector Zarray; + Zarray ResZmatrices; + ResZmatrices.reserve( topIn.Nres() ); + int nRefAtomsMissing = 0; + for (int ires = 0; ires != topIn.Nres(); ires++) + { + Residue const& currentRes = topIn.Res(ires); + DataSet_Coords* resTemplate = ResTemplates[ires]; + if (resTemplate == 0) { + // No template. Just add the atoms. + for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) + { + topOut.AddTopAtom( topIn[itgt], currentRes ); + frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); + hasPosition.push_back( true ); + } + } else { + // A template exists for this residue. + // Map source atoms to template atoms. std::vector map = MapAtomsToTemplate( topIn, ires, resTemplate ); mprintf("\t Atom map:\n"); + // DEBUG - print map for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { mprintf("\t\t%6i %6s =>", iref+1, *(resTemplate->Top()[iref].Name())); if (map[iref] == -1) @@ -69,50 +105,66 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, else mprintf(" %6i %6s\n", map[iref]+1, *(topIn[map[iref]].Name())); } + // Map template atoms back to source atoms. + std::vector pdb(currentRes.NumAtoms(), -1); + bool atomsNeedBuilding = false; for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { - topOut.AddTopAtom( resTemplate->Top()[iref], topIn.Res(ires) ); + topOut.AddTopAtom( resTemplate->Top()[iref], currentRes ); if (map[iref] == -1) { - XYZ.push_back( Vec3(0.0) ); + frameOut.AddVec3( Vec3(0.0) ); hasPosition.push_back( false ); - nAtomsMissing++; + nRefAtomsMissing++; + atomsNeedBuilding = true; } else { - XYZ.push_back( Vec3(frameIn.XYZ(map[iref])) ); + int itgt = map[iref]; + frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); hasPosition.push_back( true ); + pdb[itgt-currentRes.FirstAtom()] = iref; } } - // DEBUG - Frame templateFrame = resTemplate->AllocateFrame(); - resTemplate->GetFrame( 0, templateFrame ); - Cpptraj::Structure::Zmatrix zmatrix; - if (zmatrix.SetFromFrame( templateFrame, resTemplate->Top(), 0 )) { - mprinterr("Error: Could not set up residue template zmatrix.\n"); - return 1; - } - zmatrix.RemapIcIndices( map ); - zmatrix.print(); - // If no atoms missing just fill in the residue -/* if (nAtomsMissing == 0) { - for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { - topOut.AddTopAtom( resTemplate->Top()[iref], topIn.Res(ires) ); - XYZ.push_back( Vec3(frameIn.XYZ(map[iref])) ); + // See if any current atoms were not mapped to reference + int nTgtAtomsMissing = 0; + for (int itgt = 0; itgt != currentRes.NumAtoms(); itgt++) + if (pdb[itgt] == -1) + nTgtAtomsMissing++; + mprintf("\t%i source atoms not mapped to template.\n", nTgtAtomsMissing); + // Save zmatrix if atoms need to be built + if (atomsNeedBuilding) { + Frame templateFrame = resTemplate->AllocateFrame(); + resTemplate->GetFrame( 0, templateFrame ); + Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); + if (zmatrix->SetFromFrame( templateFrame, resTemplate->Top(), 0 )) { + mprinterr("Error: Could not set up residue template zmatrix.\n"); + return 1; } - } else { - mprintf("\tTrying to fill in missing atoms.\n"); - // one or more atoms missing. Try to use Zmatrix to fill it in - - // DEBUG*/ - - } - } - mprintf("\t%i atoms missing.\n", nAtomsMissing); + zmatrix->RemapIcIndices( map ); + ResZmatrices.push_back( zmatrix ); + //zmatrix->print(); + } else + ResZmatrices.push_back( 0 ); + } // END template exists + } // END loop over source residues + mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); for (int iat = 0; iat != topOut.Natom(); iat++) { Residue const& res = topOut.Res( topOut[iat].ResNum() ); + const double* XYZ = frameOut.XYZ(iat); mprintf("%6i %6s %6i %6s (%i) %g %g %g\n", iat+1, *(topOut[iat].Name()), res.OriginalResNum(), *(res.Name()), - (int)hasPosition[iat], XYZ[iat][0], XYZ[iat][1], XYZ[iat][2]); + (int)hasPosition[iat], XYZ[0], XYZ[1], XYZ[2]); + } + + for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) + { + mprintf("DEBUG: Zmatrix for building residue %li\n", it - ResZmatrices.begin() + 1); + Cpptraj::Structure::Zmatrix* zmatrix = *it; + if (zmatrix != 0) + zmatrix->print(); } + // Clean up zmatrices + for (Zarray::iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) + delete *it; return 0; } From 2292b6d14d84d754992b8bc35c96ddd312cce623 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 09:18:08 -0500 Subject: [PATCH 0179/1492] Do initial missing atom build. Use offset instead of remap since not all atoms may be mapped. --- src/Exec_Build.cpp | 39 +++++++++++++++++++++++--------- src/Structure/InternalCoords.cpp | 10 +++++++- src/Structure/InternalCoords.h | 4 +++- src/Structure/Zmatrix.cpp | 8 ++++++- src/Structure/Zmatrix.h | 4 +++- 5 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 2fc6793994..5abc4f54c4 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -82,6 +82,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int nRefAtomsMissing = 0; for (int ires = 0; ires != topIn.Nres(); ires++) { + mprintf("\tAdding atoms for residue %s\n", topIn.TruncResNameNum(ires).c_str()); Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = ResTemplates[ires]; if (resTemplate == 0) { @@ -108,6 +109,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // Map template atoms back to source atoms. std::vector pdb(currentRes.NumAtoms(), -1); bool atomsNeedBuilding = false; + int atomOffset = topOut.Natom(); for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { topOut.AddTopAtom( resTemplate->Top()[iref], currentRes ); if (map[iref] == -1) { @@ -137,14 +139,35 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } - zmatrix->RemapIcIndices( map ); + zmatrix->print( resTemplate->TopPtr() ); + zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); - //zmatrix->print(); + zmatrix->print( &topOut ); } else ResZmatrices.push_back( 0 ); } // END template exists } // END loop over source residues mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); + + // Build using internal coords if needed. + bool buildFailed = false; + for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) + { + Cpptraj::Structure::Zmatrix* zmatrix = *it; + if (zmatrix != 0) { + mprintf("DEBUG: Zmatrix for building residue %li %s\n", it - ResZmatrices.begin() + 1, + topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + zmatrix->print(&topOut); + zmatrix->SetDebug( 1 ); // DEBUG + if (zmatrix->SetToFrame( frameOut, hasPosition )) { + mprinterr("Error: Building residue %s failed.\n", + topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + buildFailed = true; + } + } + } + + // DEBUG - Print new top/coords for (int iat = 0; iat != topOut.Natom(); iat++) { Residue const& res = topOut.Res( topOut[iat].ResNum() ); @@ -154,17 +177,11 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, (int)hasPosition[iat], XYZ[0], XYZ[1], XYZ[2]); } - for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) - { - mprintf("DEBUG: Zmatrix for building residue %li\n", it - ResZmatrices.begin() + 1); - Cpptraj::Structure::Zmatrix* zmatrix = *it; - if (zmatrix != 0) - zmatrix->print(); - } - // Clean up zmatrices for (Zarray::iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) - delete *it; + if (*it != 0) delete *it; + + if (buildFailed) return 1; return 0; } diff --git a/src/Structure/InternalCoords.cpp b/src/Structure/InternalCoords.cpp index d923fb22a2..08b65e39fe 100644 --- a/src/Structure/InternalCoords.cpp +++ b/src/Structure/InternalCoords.cpp @@ -69,9 +69,17 @@ void InternalCoords::printIC(Topology const& top) const { } /** Remap internal coords indices. */ -void InternalCoords::RemapIndices(std::vector const& map) { +/*void InternalCoords::RemapIndices(std::vector const& map) { if (ati_ != NO_ATOM) ati_ = map[AtI()]; if (idx_[0] != NO_ATOM) idx_[0] = map[AtJ()]; if (idx_[1] != NO_ATOM) idx_[1] = map[AtK()]; if (idx_[2] != NO_ATOM) idx_[2] = map[AtL()]; +}*/ + +/** Offset internal coords indices. */ +void InternalCoords::OffsetIndices(int offset) { + if (ati_ != NO_ATOM) ati_ += offset; + if (idx_[0] != NO_ATOM) idx_[0] += offset; + if (idx_[1] != NO_ATOM) idx_[1] += offset; + if (idx_[2] != NO_ATOM) idx_[2] += offset; } diff --git a/src/Structure/InternalCoords.h b/src/Structure/InternalCoords.h index b1ac7140ed..7494d2f9d2 100644 --- a/src/Structure/InternalCoords.h +++ b/src/Structure/InternalCoords.h @@ -40,7 +40,9 @@ class InternalCoords { void printIC(Topology const&) const; /// Remap internal indices according to given map - void RemapIndices(std::vector const&); + //void RemapIndices(std::vector const&); + /// Offset internal indices by given offset + void OffsetIndices(int); private: int ati_; ///< Atom I index int idx_[3]; ///< Atom indices for distance, angle, torsion diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index d64be5f22e..8c03c97d39 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -121,9 +121,15 @@ void Zmatrix::print(Topology* topIn) const { } /** Remap internal coordinate indices according to the given atom map. */ -void Zmatrix::RemapIcIndices(std::vector const& map) { +/*void Zmatrix::RemapIcIndices(std::vector const& map) { for (ICarray::iterator it = IC_.begin(); it != IC_.end(); ++it) it->RemapIndices(map); +}*/ + +/** Increment IC indices by given offset */ +void Zmatrix::OffsetIcIndices(int offset) { + for (ICarray::iterator it = IC_.begin(); it != IC_.end(); ++it) + it->OffsetIndices(offset); } /** \return True if all Cartesian seeds are set. */ diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index f2342c0a46..8b53f03fe7 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -32,7 +32,9 @@ class Zmatrix { /// Set specified IC void SetIC(unsigned int, InternalCoords const&); /// Remap IC indices according to given map - void RemapIcIndices(std::vector const&); + //void RemapIcIndices(std::vector const&); + /// Offset IC indices by given value + void OffsetIcIndices(int); /// Set seed atoms from frame/top int SetSeedPositions(Frame const&, Topology const&, int, int, int); From b27004f2c886de3ef6399dbe0a78948b76f1877d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 09:50:04 -0500 Subject: [PATCH 0180/1492] Require output COORDS be specified --- src/Exec_Build.cpp | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 5abc4f54c4..6b1ac4cfeb 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -75,7 +75,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building Cpptraj::Structure::Zmatrix::Barray hasPosition; hasPosition.reserve( newNatom ); - // Z-matrices for residues that have missing atoms + // Hold Z-matrices for residues that have missing atoms typedef std::vector Zarray; Zarray ResZmatrices; ResZmatrices.reserve( topIn.Nres() ); @@ -185,10 +185,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, return 0; } +// ----------------------------------------------------------------------------- // Exec_Build::Help() void Exec_Build::Help() const { - mprintf("\tcrdset [frame <#>] [parmset ...]\n"); + mprintf("\tname crdset [frame <#>]\n" + "\t[parmset ...] [lib ...]\n"); } // Exec_Build::Execute() @@ -200,12 +202,13 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mprinterr("Error: Must specify input COORDS set with 'crdset'\n"); return CpptrajState::ERR; } - DataSet* ds = State.DSL().FindSetOfGroup( crdset, DataSet::COORDINATES ); - if (ds == 0) { + DataSet* inCrdPtr = State.DSL().FindSetOfGroup( crdset, DataSet::COORDINATES ); + if (inCrdPtr == 0) { mprinterr("Error: No COORDS set found matching %s\n", crdset.c_str()); return CpptrajState::ERR; } - DataSet_Coords& coords = static_cast( *((DataSet_Coords*)ds) ); + // TODO make it so this can be const (cant bc GetFrame) + DataSet_Coords& coords = static_cast( *((DataSet_Coords*)inCrdPtr) ); // Get frame from input coords int tgtframe = argIn.getKeyInt("frame", 1) - 1; mprintf("\tUsing frame %i from COORDS set %s\n", tgtframe+1, coords.legend()); @@ -216,7 +219,22 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) Frame frameIn = coords.AllocateFrame(); coords.GetFrame(tgtframe, frameIn); // Get modifiable topology - Topology& topIn = *(coords.TopPtr()); + //Topology& topIn = *(coords.TopPtr()); + Topology const& topIn = coords.Top(); + + // Output coords + std::string outset = argIn.GetStringKey("name"); + if (outset.empty()) { + mprinterr("Error: Must specify output COORDS set with 'name'\n"); + return CpptrajState::ERR; + } + DataSet* outCrdPtr = State.DSL().AddSet( DataSet::COORDS, outset ); + if (outCrdPtr == 0) { + mprinterr("Error: Could not allocate output COORDS set with name '%s'\n", outset.c_str()); + return CpptrajState::ERR; + } + DataSet_Coords& crdout = static_cast( *((DataSet_Coords*)outCrdPtr) ); + mprintf("\tOutput COORDS set: %s\n", crdout.legend()); // Get residue templates. Carray Templates; @@ -266,8 +284,8 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) } // Generate angles/dihedrals - if (Cpptraj::Structure::GenerateAngles(topIn)) { - mprinterr("Error: Could not generate angles/dihedrals for '%s'\n", topIn.c_str()); + if (Cpptraj::Structure::GenerateAngles(topOut)) { + mprinterr("Error: Could not generate angles/dihedrals for '%s'\n", topOut.c_str()); return CpptrajState::ERR; } @@ -319,12 +337,19 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) // Update parameters Exec::RetType ret = CpptrajState::OK; - if ( topIn.UpdateParams( *mainParmSet ) ) { - mprinterr("Error: Could not update parameters for '%s'.\n", topIn.c_str()); + if ( topOut.UpdateParams( *mainParmSet ) ) { + mprinterr("Error: Could not update parameters for '%s'.\n", topOut.c_str()); ret = CpptrajState::ERR; } if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; + // Update coords + if (crdout.CoordsSetup( topOut, CoordinateInfo() )) { // FIXME better coordinate info + mprinterr("Error: Could not set up output COORDS.\n"); + return CpptrajState::ERR; + } + crdout.SetCRD(0, frameOut); + return ret; } From a1909f8293cba78453782d17bef6575894859e0e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 13:00:43 -0500 Subject: [PATCH 0181/1492] Add non-template intra-residue bonds --- src/Exec_Build.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 6b1ac4cfeb..f7f81869aa 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -75,6 +75,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building Cpptraj::Structure::Zmatrix::Barray hasPosition; hasPosition.reserve( newNatom ); + // For holding bonded atom pairs + typedef std::pair Ipair; + typedef std::vector IParray; // Hold Z-matrices for residues that have missing atoms typedef std::vector Zarray; Zarray ResZmatrices; @@ -83,16 +86,33 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, for (int ires = 0; ires != topIn.Nres(); ires++) { mprintf("\tAdding atoms for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + int atomOffset = topOut.Natom(); Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = ResTemplates[ires]; if (resTemplate == 0) { // No template. Just add the atoms. + IParray bondsToAdd; for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { - topOut.AddTopAtom( topIn[itgt], currentRes ); + // Add intra-residue bonds + Atom currentAtom = topIn[itgt]; + int at0 = itgt - currentRes.FirstAtom() + atomOffset; + for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { + if ( topIn[*bat].ResNum() == ires ) { + int at1 = *bat - currentRes.FirstAtom() + atomOffset; + mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); + bondsToAdd.push_back( Ipair(at0, at1) ); + //topOut.AddBond(at0, at1); + // TODO inter-residue + } + } + currentAtom.ClearBonds(); + topOut.AddTopAtom( currentAtom, currentRes ); frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); hasPosition.push_back( true ); } + for (IParray::const_iterator it = bondsToAdd.begin(); it != bondsToAdd.end(); ++it) + topOut.AddBond(it->first, it->second); } else { // A template exists for this residue. // Map source atoms to template atoms. @@ -109,7 +129,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // Map template atoms back to source atoms. std::vector pdb(currentRes.NumAtoms(), -1); bool atomsNeedBuilding = false; - int atomOffset = topOut.Natom(); for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { topOut.AddTopAtom( resTemplate->Top()[iref], currentRes ); if (map[iref] == -1) { From abec019459203184f71f4cb30ecf3afc918e0e97 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 14:27:56 -0500 Subject: [PATCH 0182/1492] Change to intraResBonds --- src/Exec_Build.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index f7f81869aa..9d78cb1737 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -91,7 +91,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, DataSet_Coords* resTemplate = ResTemplates[ires]; if (resTemplate == 0) { // No template. Just add the atoms. - IParray bondsToAdd; + IParray intraResBonds; for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { // Add intra-residue bonds @@ -101,17 +101,17 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if ( topIn[*bat].ResNum() == ires ) { int at1 = *bat - currentRes.FirstAtom() + atomOffset; mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); - bondsToAdd.push_back( Ipair(at0, at1) ); + intraResBonds.push_back( Ipair(at0, at1) ); //topOut.AddBond(at0, at1); // TODO inter-residue } } - currentAtom.ClearBonds(); + currentAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds topOut.AddTopAtom( currentAtom, currentRes ); frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); hasPosition.push_back( true ); } - for (IParray::const_iterator it = bondsToAdd.begin(); it != bondsToAdd.end(); ++it) + for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) topOut.AddBond(it->first, it->second); } else { // A template exists for this residue. From a29e395688f0f0efa77bde0486f1f7ae0b1c697c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 15:06:45 -0500 Subject: [PATCH 0183/1492] Track intra-residue bonds for template residues as well --- src/Exec_Build.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 9d78cb1737..899d1b598e 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -89,12 +89,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int atomOffset = topOut.Natom(); Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = ResTemplates[ires]; + IParray intraResBonds; if (resTemplate == 0) { // No template. Just add the atoms. - IParray intraResBonds; for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { - // Add intra-residue bonds + // Track intra-residue bonds Atom currentAtom = topIn[itgt]; int at0 = itgt - currentRes.FirstAtom() + atomOffset; for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { @@ -111,8 +111,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); hasPosition.push_back( true ); } - for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) - topOut.AddBond(it->first, it->second); } else { // A template exists for this residue. // Map source atoms to template atoms. @@ -130,7 +128,18 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, std::vector pdb(currentRes.NumAtoms(), -1); bool atomsNeedBuilding = false; for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { - topOut.AddTopAtom( resTemplate->Top()[iref], currentRes ); + // Track intra-residue bonds + Atom currentAtom = resTemplate->Top()[iref]; + int at0 = iref + atomOffset; + for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { + if ( topIn[*bat].ResNum() == ires ) { + int at1 = *bat + atomOffset; + mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, iref+1, *bat + 1); + intraResBonds.push_back( Ipair(at0, at1) ); + } + } + currentAtom.ClearBonds(); + topOut.AddTopAtom( currentAtom, currentRes ); if (map[iref] == -1) { frameOut.AddVec3( Vec3(0.0) ); hasPosition.push_back( false ); @@ -165,6 +174,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } else ResZmatrices.push_back( 0 ); } // END template exists + // Add intra-residue bonds + for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) + topOut.AddBond(it->first, it->second); } // END loop over source residues mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); From f7c848c132b84e0521c5ff78a2684a61eb6ab712 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 15:44:09 -0500 Subject: [PATCH 0184/1492] Fix intra-residue bonds for templates. Start inter-residue bonds. --- src/Exec_Build.cpp | 53 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 899d1b598e..ce4dd2bd97 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -75,13 +75,19 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building Cpptraj::Structure::Zmatrix::Barray hasPosition; hasPosition.reserve( newNatom ); - // For holding bonded atom pairs - typedef std::pair Ipair; - typedef std::vector IParray; + // Hold Z-matrices for residues that have missing atoms typedef std::vector Zarray; Zarray ResZmatrices; ResZmatrices.reserve( topIn.Nres() ); + + // For inter-residue bonding, use residue # and atom name since + // atom numbering may change if atoms are added from templates. + typedef std::pair ResAtPair; + typedef std::vector ResAtArray; + ResAtArray interResBonds; + + // Loop for setting up atoms in the topology from residues or residue templates. int nRefAtomsMissing = 0; for (int ires = 0; ires != topIn.Nres(); ires++) { @@ -89,6 +95,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int atomOffset = topOut.Natom(); Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = ResTemplates[ires]; + // For holding bonded atom pairs + typedef std::pair Ipair; + typedef std::vector IParray; IParray intraResBonds; if (resTemplate == 0) { // No template. Just add the atoms. @@ -100,10 +109,13 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { if ( topIn[*bat].ResNum() == ires ) { int at1 = *bat - currentRes.FirstAtom() + atomOffset; - mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); - intraResBonds.push_back( Ipair(at0, at1) ); - //topOut.AddBond(at0, at1); - // TODO inter-residue + if (at1 > at0) { + mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); + intraResBonds.push_back( Ipair(at0, at1) ); + } + } else { + interResBonds.push_back( ResAtPair(ires, currentAtom.Name()) ); + interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); } } currentAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds @@ -132,12 +144,16 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Atom currentAtom = resTemplate->Top()[iref]; int at0 = iref + atomOffset; for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { - if ( topIn[*bat].ResNum() == ires ) { + //if ( resTemplate->Top()[*bat].ResNum() == ires ) { int at1 = *bat + atomOffset; - mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, iref+1, *bat + 1); - intraResBonds.push_back( Ipair(at0, at1) ); - } + if (at1 > at0) { + mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, iref+1, *bat + 1); + intraResBonds.push_back( Ipair(at0, at1) ); + } + //} } + // TODO connect atoms for inter-residue connections + // TODO check source atoms for inter-residue connections currentAtom.ClearBonds(); topOut.AddTopAtom( currentAtom, currentRes ); if (map[iref] == -1) { @@ -176,8 +192,23 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } // END template exists // Add intra-residue bonds for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) + { + mprintf("DEBUG: Intra-res bond: Res %s atom %s to res %s atom %s\n", + topOut.TruncResNameNum(topOut[it->first].ResNum()).c_str(), *(topOut[it->first].Name()), + topOut.TruncResNameNum(topOut[it->second].ResNum()).c_str(), *(topOut[it->second].Name())); topOut.AddBond(it->first, it->second); + } } // END loop over source residues + // Add inter-residue bonds + for (ResAtArray::const_iterator it = interResBonds.begin(); it != interResBonds.end(); ++it) + { + ResAtPair const& ra0 = *it; + ++it; + ResAtPair const& ra1 = *it; + mprintf("DEBUG: Inter-res bond: Res %i atom %s to res %i atom %s\n", + ra0.first+1, *(ra0.second), + ra1.first+1, *(ra1.second)); + } mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); // Build using internal coords if needed. From 95e151cc16f8122ccca3546f759dc199cabd55f4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 15:52:25 -0500 Subject: [PATCH 0185/1492] Track existing inter-residue connections for templates --- src/Exec_Build.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index ce4dd2bd97..0b345f6982 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -104,9 +104,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { // Track intra-residue bonds - Atom currentAtom = topIn[itgt]; + Atom sourceAtom = topIn[itgt]; int at0 = itgt - currentRes.FirstAtom() + atomOffset; - for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { + for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { if ( topIn[*bat].ResNum() == ires ) { int at1 = *bat - currentRes.FirstAtom() + atomOffset; if (at1 > at0) { @@ -114,12 +114,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, intraResBonds.push_back( Ipair(at0, at1) ); } } else { - interResBonds.push_back( ResAtPair(ires, currentAtom.Name()) ); + interResBonds.push_back( ResAtPair(ires, sourceAtom.Name()) ); interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); } } - currentAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds - topOut.AddTopAtom( currentAtom, currentRes ); + sourceAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds + topOut.AddTopAtom( sourceAtom, currentRes ); frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); hasPosition.push_back( true ); } @@ -141,9 +141,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, bool atomsNeedBuilding = false; for (int iref = 0; iref != resTemplate->Top().Natom(); iref++) { // Track intra-residue bonds - Atom currentAtom = resTemplate->Top()[iref]; + Atom templateAtom = resTemplate->Top()[iref]; int at0 = iref + atomOffset; - for (Atom::bond_iterator bat = currentAtom.bondbegin(); bat != currentAtom.bondend(); ++bat) { + for (Atom::bond_iterator bat = templateAtom.bondbegin(); bat != templateAtom.bondend(); ++bat) { //if ( resTemplate->Top()[*bat].ResNum() == ires ) { int at1 = *bat + atomOffset; if (at1 > at0) { @@ -153,9 +153,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, //} } // TODO connect atoms for inter-residue connections - // TODO check source atoms for inter-residue connections - currentAtom.ClearBonds(); - topOut.AddTopAtom( currentAtom, currentRes ); + templateAtom.ClearBonds(); + topOut.AddTopAtom( templateAtom, currentRes ); if (map[iref] == -1) { frameOut.AddVec3( Vec3(0.0) ); hasPosition.push_back( false ); @@ -166,6 +165,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, frameOut.AddVec3( Vec3(frameIn.XYZ(itgt)) ); hasPosition.push_back( true ); pdb[itgt-currentRes.FirstAtom()] = iref; + // Check source atoms for inter-residue connections + Atom const& sourceAtom = topIn[itgt]; + for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { + if ( topIn[*bat].ResNum() != ires ) { + interResBonds.push_back( ResAtPair(ires, sourceAtom.Name()) ); + interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); + } + } } } // See if any current atoms were not mapped to reference From d7910ece13189e1af865504481843aa36b35a53a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 15:55:47 -0500 Subject: [PATCH 0186/1492] Try to avoid duplicate inter-residue bonds --- src/Exec_Build.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 0b345f6982..536d092edc 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -114,8 +114,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, intraResBonds.push_back( Ipair(at0, at1) ); } } else { - interResBonds.push_back( ResAtPair(ires, sourceAtom.Name()) ); - interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); + if (topIn[*bat].ResNum() > ires) { + interResBonds.push_back( ResAtPair(ires, sourceAtom.Name()) ); + interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); + } } } sourceAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds @@ -168,7 +170,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // Check source atoms for inter-residue connections Atom const& sourceAtom = topIn[itgt]; for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { - if ( topIn[*bat].ResNum() != ires ) { + if ( topIn[*bat].ResNum() > ires ) { interResBonds.push_back( ResAtPair(ires, sourceAtom.Name()) ); interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); } From 9978117dbb909145b91892aefa14a2d9f6e00320 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 19 Dec 2023 16:02:46 -0500 Subject: [PATCH 0187/1492] Do the inter-residue bonds --- src/Exec_Build.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 536d092edc..0992ed984a 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -217,6 +217,17 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: Inter-res bond: Res %i atom %s to res %i atom %s\n", ra0.first+1, *(ra0.second), ra1.first+1, *(ra1.second)); + int at0 = topOut.FindAtomInResidue(ra0.first, ra0.second); + if (at0 < 0) { + mprinterr("Error: Atom %s not found in residue %i\n", *(ra0.second), ra0.first); + return 1; + } + int at1 = topOut.FindAtomInResidue(ra1.first, ra1.second); + if (at1 < 0) { + mprinterr("Error: Atom %s not found in residue %i\n", *(ra1.second), ra1.first); + return 1; + } + topOut.AddBond(at0, at1); } mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); @@ -252,6 +263,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, for (Zarray::iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) if (*it != 0) delete *it; + // Finalize topology + topOut.CommonSetup(); // TODO dont assign default bond parameters here + topOut.Summary(); + if (buildFailed) return 1; return 0; } From 14cc4522ab3950d1866d6dc1079e2455e1db9bb3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 20 Dec 2023 14:47:54 -0500 Subject: [PATCH 0188/1492] Try to deal with dihedral/improper wildcard terms. Want to honor wildcards when searching, not when adding. --- src/AmberParamFile.cpp | 9 ++++++-- src/CharmmParamFile.cpp | 7 +++++- src/Exec_Change.cpp | 2 +- src/ParameterHolders.h | 36 +++++++++++++++++++++++------ src/TypeNameHolder.h | 51 +++++++++++++++++++++++++++++++++++++---- 5 files changed, 90 insertions(+), 15 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index f62d6bf329..f3030d00bc 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -375,7 +375,10 @@ int AmberParamFile::assign_offdiag(ParameterSet& prm, Oarray const& Offdiag) con /** Read parametrers from Amber frcmod file. */ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int debugIn) const { - // Read title + // Set wildcard character for dihedrals and impropers + prm.DP().SetWildcard('X'); + prm.IP().SetWildcard('X'); + // Read title BufferedLine infile; if (infile.OpenFileRead( fname )) { mprinterr("Error: Could not open file '%s' as Amber FF.\n", fname.full()); @@ -455,7 +458,9 @@ int AmberParamFile::ReadFrcmod(ParameterSet& prm, FileName const& fname, int deb int AmberParamFile::ReadParams(ParameterSet& prm, FileName const& fname, std::string const& nbsetnameIn, int debugIn) const { - + // Set wildcard character for dihedrals and impropers + prm.DP().SetWildcard('X'); + prm.IP().SetWildcard('X'); // For files with > 1 set of NB params typedef std::vector NbSetArrayType; NbSetArrayType NBsets; diff --git a/src/CharmmParamFile.cpp b/src/CharmmParamFile.cpp index f89f9fe086..5f635074d5 100644 --- a/src/CharmmParamFile.cpp +++ b/src/CharmmParamFile.cpp @@ -82,6 +82,10 @@ int CharmmParamFile::ReadParams(ParameterSet& prm, FileName const& nameIn, int d std::string currentResName; double currentResQ = 0.0; + // Set wildcard character for dihedrals and impropers + prm.DP().SetWildcard('X'); + prm.IP().SetWildcard('X'); + while (ReadInput(input, infile)) { if (input.empty()) continue; if (input[0] == '*') { @@ -220,7 +224,8 @@ int CharmmParamFile::ReadParams(ParameterSet& prm, FileName const& nameIn, int d if (args.Nargs() < 7) mprintf("Warning: Bad syntax for dihedral parameter on line %i: %s\n", infile.LineNumber(), line); else { - TypeNameHolder types(4, "X"); // X is wildcard character + //TypeNameHolder types(4, "X"); // X is wildcard character + TypeNameHolder types(4); types.AddName( args.GetStringNext() ); types.AddName( args.GetStringNext() ); types.AddName( args.GetStringNext() ); diff --git a/src/Exec_Change.cpp b/src/Exec_Change.cpp index 254892c36f..ad71c1bab8 100644 --- a/src/Exec_Change.cpp +++ b/src/Exec_Change.cpp @@ -377,7 +377,7 @@ int Exec_Change::FindBondTypeIdx(Topology const& topIn, BondArray const& bonds, TypeNameHolder thisType(2); thisType.AddName( topIn[bnd->A1()].Type() ); thisType.AddName( topIn[bnd->A2()].Type() ); - if (thisType == tgtType) { + if (thisType.Match_NoWC( tgtType )) { bidx = bnd->Idx(); break; } diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index cfbc83f4e1..a01ba6ce41 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -20,12 +20,14 @@ template class ParmHolder { void clear() { bpmap_.clear(); } size_t size() const { return bpmap_.size(); } bool empty() const { return bpmap_.empty(); } + /// Set wildcard character + void SetWildcard(char wc) { wc_ = NameType(std::string(1, wc)); } /// Add (or update if allowed) given parameter to holder. ParameterHolders::RetType AddParm(TypeNameHolder const& types, T const& bp, bool allowUpdate) { // Check if parm for these types exist typename Bmap::iterator it = bpmap_.begin(); for (; it != bpmap_.end(); ++it) - if (it->first == types) break; + if (it->first.Match_NoWC( types )) break; if (it == bpmap_.end()) { // New parm //mprintf("DEBUG: New parameter:"); @@ -71,20 +73,32 @@ template class ParmHolder { T FindParam(TypeNameHolder const& types, bool& found) const { // TODO only use GetParam()? found = true; for (const_iterator it = begin(); it != end(); ++it) - if (it->first == types) return it->second; + if (it->first.Match_NoWC( types )) return it->second; + if (wc_.len() > 0) { + for (const_iterator it = begin(); it != end(); ++it) + if (it->first.Match_WC( types, wc_)) return it->second; + } found = false; return T(); } /// \return iterator to parameter matching the given types. iterator GetParam(TypeNameHolder const& types) { for (iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) - if (it->first == types) return it; + if (it->first.Match_NoWC( types )) return it; + if (wc_.len() > 0) { + for (iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) + if (it->first.Match_WC( types, wc_)) return it; + } return bpmap_.end(); } /// \return const iterator to parameter matching the given types. const_iterator GetParam(TypeNameHolder const& types) const { for (const_iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) - if (it->first == types) return it; + if (it->first.Match_NoWC( types )) return it; + if (wc_.len() > 0) { + for (const_iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) + if (it->first.Match_WC( types, wc_)) return it; + } return bpmap_.end(); } /// \return size in memory in bytes @@ -98,6 +112,7 @@ template class ParmHolder { } private: Bmap bpmap_; + NameType wc_; ///< Wildcard character }; // ----------------------------------------------------------------------------- @@ -115,6 +130,8 @@ class DihedralParmHolder { void clear() { bpmap_.clear(); } size_t size() const { return bpmap_.size(); } bool empty() const { return bpmap_.empty(); } + /// Set wildcard character + void SetWildcard(char wc) { wc_ = NameType(std::string(1, wc)); } /** Add (or update) a single dihedral parameter for given atom types. */ ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { @@ -122,7 +139,7 @@ class DihedralParmHolder { Bmap::iterator it0 = bpmap_.begin(); for (; it0 != bpmap_.end(); ++it0) { - if (it0->first == types) + if (it0->first.Match_NoWC( types )) break; } if (it0 == bpmap_.end()) { @@ -167,7 +184,7 @@ class DihedralParmHolder { Bmap::iterator it0 = bpmap_.begin(); for (; it0 != bpmap_.end(); ++it0) { - if (it0->first == types) + if (it0->first.Match_NoWC( types )) break; } if (it0 == bpmap_.end()) { @@ -204,7 +221,11 @@ class DihedralParmHolder { DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { found = true; for (const_iterator it = begin(); it != end(); ++it) - if (it->first == types) return it->second; + if (it->first.Match_NoWC( types )) return it->second; + if (wc_.len() > 0) { + for (const_iterator it = begin(); it != end(); ++it) + if (it->first.Match_WC( types, wc_)) return it->second; + } found = false; return DihedralParmArray(); } @@ -219,5 +240,6 @@ class DihedralParmHolder { } private: Bmap bpmap_; + NameType wc_; ///< Wildcard character }; #endif diff --git a/src/TypeNameHolder.h b/src/TypeNameHolder.h index be362f7c90..eb8b129e1a 100644 --- a/src/TypeNameHolder.h +++ b/src/TypeNameHolder.h @@ -14,8 +14,8 @@ class TypeNameHolder { TypeNameHolder(Narray const& namesIn) : types_(namesIn) {} /// CONSTRUCTOR - Reserve space for given number of type names TypeNameHolder(int size) { types_.clear(); types_.reserve(size); } - /// CONSTRUCTOR - Set wildcard name and reserve space for given number of type names. - TypeNameHolder(int size, NameType const& wc) : wildcard_(wc) { types_.clear(); types_.reserve(size); } +/* /// CONSTRUCTOR - Set wildcard name and reserve space for given number of type names. + TypeNameHolder(int size, NameType const& wc) : wildcard_(wc) { types_.clear(); types_.reserve(size); }*/ /// Add atom type name. void AddName(NameType const& n) { types_.push_back( n ); } /// \return Iterator to beginning of type name array. @@ -26,7 +26,50 @@ class TypeNameHolder { size_t Size() const { return types_.size(); } /// \return Type name at index NameType const& operator[](int idx) const { return types_[idx]; } + /// \return true if either direction is an exact match, no wildcard. + bool Match_NoWC(TypeNameHolder const& rhs) const { + if (types_.size() != rhs.types_.size()) return false; + // Forwards direction + bool match = true; + for (unsigned int idx = 0; idx != types_.size(); idx++) + if (types_[idx] != rhs.types_[idx]) { + match = false; + break; + } + if (match) return true; + // Reverse direction + match = true; + unsigned int idx2 = types_.size() - 1; + for (unsigned int idx = 0; idx != types_.size(); idx++, idx2--) + if (types_[idx] != rhs.types_[idx2]) { + match = false; + break; + } + return match; + } /// \return true if either direction is a match, taking into account wildcard. + bool Match_WC(TypeNameHolder const& rhs, NameType const& wildcard) const { + // Sanity check + if (types_.size() != rhs.types_.size()) return false; + // Forwards direction + bool match = true; + for (unsigned int idx = 0; idx != types_.size(); idx++) + if (types_[idx] != rhs.types_[idx] && types_[idx] != wildcard) { + match = false; + break; + } + if (match) return true; + // Reverse direction + match = true; + unsigned int idx2 = types_.size() - 1; + for (unsigned int idx = 0; idx != types_.size(); idx++, idx2--) + if (types_[idx] != rhs.types_[idx2] && types_[idx] != wildcard) { + match = false; + break; + } + return match; + } +/* /// \return true if either direction is a match, taking into account wildcard. bool operator==(TypeNameHolder const& rhs) const { // Sanity check if (types_.size() != rhs.types_.size()) return false; @@ -47,7 +90,7 @@ class TypeNameHolder { break; } return match; - } + }*/ /// Will sort by type names in ascending order. bool operator<(TypeNameHolder const& rhs) const { if (types_.size() != rhs.types_.size()) { @@ -71,6 +114,6 @@ class TypeNameHolder { size_t DataSize() const { return (types_.size()*NameType::DataSize()) + NameType::DataSize(); } private: Narray types_; - NameType wildcard_; + //NameType wildcard_; }; #endif From a2ac2ed44c21a01110cd2b65d40b93dd29f504ec Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 20 Dec 2023 15:25:43 -0500 Subject: [PATCH 0189/1492] Dihedral phase should be stored internally in radians --- src/AmberParamFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index f3030d00bc..76cb3c8a74 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -203,7 +203,7 @@ const types.AddName( symbols[2] ); types.AddName( symbols[3] ); ParameterHolders::RetType ret = - prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE, scee, scnb), true); + prm.DP().AddParm(types, DihedralParmType(PK / (double)IDIVF, PN, PHASE*Constants::DEGRAD, scee, scnb), true); if (ret == ParameterHolders::UPDATED) { mprintf("Warning: Redefining dihedral type %s - %s - %s - %s (PN=%g)\n", *(types[0]), *(types[1]), *(types[2]), *(types[3]), PN); @@ -239,7 +239,7 @@ const types.AddName( symbols[2] ); types.AddName( symbols[3] ); ParameterHolders::RetType ret = - prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE), true); + prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE*Constants::DEGRAD), true); if (ret == ParameterHolders::UPDATED) mprintf("Warning: Redefining improper type %s - %s - %s - %s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); From 3f2c2f0a561123807a5d1feaf6f4c8ee922d767b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 06:12:30 -0500 Subject: [PATCH 0190/1492] For debug only, set empty dihedral parameters and put a leading 'D' when printing regular dihedrals --- src/TopInfo.cpp | 3 ++- src/Topology.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/TopInfo.cpp b/src/TopInfo.cpp index d7e7e6172f..0293b7e8b1 100644 --- a/src/TopInfo.cpp +++ b/src/TopInfo.cpp @@ -622,7 +622,8 @@ void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray cons mask1.AtomInCharMask(atom4)); if (printDihedral) { // Determine dihedral type: 'E'nd, 'I'mproper, or 'B'oth - char type = ' '; + //char type = ' '; + char type = 'D'; // DEBUG if (dih->Type() == DihedralType::END ) type = 'E'; else if (dih->Type() == DihedralType::IMPROPER) type = 'I'; else if (dih->Type() == DihedralType::BOTH ) type = 'B'; diff --git a/src/Topology.cpp b/src/Topology.cpp index 9143404cd4..6e3b484ef1 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2818,7 +2818,9 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, TruncResAtomNameNum(dih->A4()).c_str(), *types[0], *types[1], *types[2], *types[3]); DihedralType mydih = *dih; - mydih.SetIdx( -1 ); + int idx = addTorsionParm( dihedralparm_, DihedralParmType() ); // DEBUG + mydih.SetIdx( idx ); // DEBUG + //mydih.SetIdx( -1 ); dihedralsIn.push_back( mydih ); } else { // Actually add parameters for this dihedral. From 67ca1b2280df16a2afdf8a2347ebbf566701267e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 09:14:52 -0500 Subject: [PATCH 0191/1492] Output phase in degrees --- src/ParameterSet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index 70438dcd07..ad071ec51c 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -93,13 +93,13 @@ void ParameterSet::Print(CpptrajFile& Out) const { for (DihedralParmHolder::const_iterator it0 = dihParm_.begin(); it0 != dihParm_.end(); ++it0) for (DihedralParmArray::const_iterator it1 = it0->second.begin(); it1 != it0->second.end(); ++it1) - Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(it0->first[0]), *(it0->first[1]), *(it0->first[2]), *(it0->first[3]), it1->Pk(), it1->Pn(), it1->Phase()); + Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(it0->first[0]), *(it0->first[1]), *(it0->first[2]), *(it0->first[3]), it1->Pk(), it1->Pn(), it1->Phase()*Constants::RADDEG); } if (!impParm_.empty()) { Out.Printf("Improper parameters:\n"); Out.Printf("\t%6s %6s %6s %6s %12s %12s %12s\n", "Type1", "Type2", "Type3", "Type4", "Pk", "Pn", "Phase"); for (ParmHolder::const_iterator bp = impParm_.begin(); bp != impParm_.end(); ++bp) - Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(bp->first[0]), *(bp->first[1]), *(bp->first[2]), *(bp->first[3]), bp->second.Pk(), bp->second.Pn(), bp->second.Phase()); + Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(bp->first[0]), *(bp->first[1]), *(bp->first[2]), *(bp->first[3]), bp->second.Pk(), bp->second.Pn(), bp->second.Phase()*Constants::RADDEG); } if (!hydrophilicAtomTypes_.empty()) { Out.Printf("Hydrophilic atom types:"); From ac4ac50889f443c59b1e670869f663c6c5987e6f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 09:17:03 -0500 Subject: [PATCH 0192/1492] For debug, if not printing indices print D for regular dihedrals --- src/TopInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TopInfo.cpp b/src/TopInfo.cpp index 0293b7e8b1..b0738f65ce 100644 --- a/src/TopInfo.cpp +++ b/src/TopInfo.cpp @@ -622,8 +622,8 @@ void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray cons mask1.AtomInCharMask(atom4)); if (printDihedral) { // Determine dihedral type: 'E'nd, 'I'mproper, or 'B'oth - //char type = ' '; - char type = 'D'; // DEBUG + char type = ' '; + if (!printIndices_) type = 'D'; // DEBUG if (dih->Type() == DihedralType::END ) type = 'E'; else if (dih->Type() == DihedralType::IMPROPER) type = 'I'; else if (dih->Type() == DihedralType::BOTH ) type = 'B'; From 72f2a0032affd678537254d783965090b5a52b4c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 09:36:13 -0500 Subject: [PATCH 0193/1492] Properly handle negative PN --- src/AmberParamFile.cpp | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index 76cb3c8a74..b09d0f35a8 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -156,21 +156,27 @@ const return 0; } -/** Read input for dihedral. */ +/** Read input for dihedral. + * IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN + * FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) + * If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the + * system involving the atoms "JPT" and and "KPT" are assigned + * the same parameters. This is called the general dihedral type + * and is of the form "X "-"JPT"-"KPT"-"X ". + * IDIVF is the factor by which the torsional barrier is divided. + * Consult Weiner, et al., JACS 106:765 (1984) p. 769 for + * details. Basically, the actual torsional potential is + * (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) + * If PN .lt. 0.0 then the torsional potential is assumed to have more + * than one term, and the values of the rest of the terms are read from + * the next cards until a positive PN is encountered. The negative value + * of pn is used only for identifying the existence of the next term and + * only the absolute value of PN is kept. + */ int AmberParamFile::read_dihedral(ParameterSet& prm, const char* ptr) const { // Dihedral parameters - // IPT , JPT , KPT , LPT , IDIVF , PK , PHASE , PN - // FORMAT(A2,1X,A2,1X,A2,1X,A2,I4,3F15.2) - // If IPT .eq. 'X ' .and. LPT .eq. 'X ' then any dihedrals in the - // system involving the atoms "JPT" and and "KPT" are assigned - // the same parameters. This is called the general dihedral type - // and is of the form "X "-"JPT"-"KPT"-"X ". - // IDIVF is the factor by which the torsional barrier is divided. - // Consult Weiner, et al., JACS 106:765 (1984) p. 769 for - // details. Basically, the actual torsional potential is - // (PK/IDIVF) * (1 + cos(PN*phi - PHASE)) if (debug_ > 1) mprintf("DEBUG: Dihedral: %s\n", ptr); std::vector symbols(4); int pos = read_symbols(ptr, symbols, 4); @@ -183,11 +189,13 @@ const double PK, PHASE, PN; char sSCEE[128]; char sSCNB[128]; + // TODO note when PN is negative and expect more terms? int nscan = sscanf(ptr+pos, "%i %lf %lf %lf %s %s", &IDIVF, &PK, &PHASE, &PN, sSCEE, sSCNB); if (nscan < 4) { mprinterr("Error: Expected IDIVF, PK, PHASE, PN, got only %i elements\n", nscan); return 1; } + if (PN < 0.0) PN = -PN; double scee = 1.2; // AMBER DEFAULT double scnb = 2.0; // AMBER DEFAULT if (nscan == 6) { @@ -233,6 +241,11 @@ const mprinterr("Error: Expected PK, PHASE, PN, got only %i elements\n", nscan); return 1; } + if (PN < 0.0) { + mprintf("Warning: Improper for %s-%s-%s-%s has negative phase (%g)\n", + symbols[0].c_str(), symbols[1].c_str(), symbols[2].c_str(), symbols[3].c_str(), PN); + PN = -PN; + } TypeNameHolder types(4); types.AddName( symbols[0] ); types.AddName( symbols[1] ); From 21c54d066cb29d4af92ff220864aaf7a4e07eed3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 09:52:35 -0500 Subject: [PATCH 0194/1492] Recognize residuesPdbSequenceNumber section in OFF files --- src/DataIO_AmberLib.cpp | 2 +- src/DataIO_AmberLib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataIO_AmberLib.cpp b/src/DataIO_AmberLib.cpp index 8088f022ea..3743a0800e 100644 --- a/src/DataIO_AmberLib.cpp +++ b/src/DataIO_AmberLib.cpp @@ -89,7 +89,7 @@ int DataIO_AmberLib::ReadData(FileName const& fname, DataSetList& dsl, std::stri const char* DataIO_AmberLib::sectionStr_[] = { "atoms", "atomspertinfo", "boundbox", "childsequence", "connect", "connectivity", "hierarchy", "name", "positions", "residueconnect", - "residues", "solventcap", "velocities", 0 }; + "residues", "residuesPdbSequenceNumber", "solventcap", "velocities", 0 }; /** \return Section type from entry line. */ DataIO_AmberLib::SectionType DataIO_AmberLib::id_section(std::string const& line, diff --git a/src/DataIO_AmberLib.h b/src/DataIO_AmberLib.h index 9f8952fa37..6ea4d12b91 100644 --- a/src/DataIO_AmberLib.h +++ b/src/DataIO_AmberLib.h @@ -19,7 +19,7 @@ class DataIO_AmberLib : public DataIO { // Keep in sync with sectionStr_ enum SectionType { ATOMTABLE = 0, PERTINFO, BOUNDBOX, CHILDSEQUENCE, CONNECT, CONNECTIVITY, HIERARCHY, UNITNAME, POSITIONS, RESCONNECT, - RESIDUES, SOLVENTCAP, VELOCITIES, UNKNOWN_SECTION }; + RESIDUES, RESPDBSEQUENCE, SOLVENTCAP, VELOCITIES, UNKNOWN_SECTION }; /// Strings corresponding to section type static const char* sectionStr_[]; From 63dd4f86e633eacff890366192cdf6598da77f17 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 11:46:30 -0500 Subject: [PATCH 0195/1492] Try to follow the apparent leap convention of having dihedral first atom always < last atom --- src/Structure/GenerateAngles.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 61fabb25bf..f490071ec8 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -30,7 +30,11 @@ static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { for (Atom::bond_iterator bat2 = A2.bondbegin(); bat2 != A2.bondend(); ++bat2) { if (*bat2 != at1) { - topIn.AddDihedral(*bat1, at1, at2, *bat2); + // LEaP convention appears to be first atom less than last atom + if (*bat1 < *bat2) + topIn.AddDihedral(*bat1, at1, at2, *bat2); + else + topIn.AddDihedral(*bat2, at2, at1, *bat1); mprintf("%s - %s - %s - %s\n", topIn.AtomMaskName(*bat1).c_str(), topIn.AtomMaskName(at1).c_str(), From 4dcaa2a0fd4e15ae6bb74c196cba7c915f9a1b6c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 11:46:56 -0500 Subject: [PATCH 0196/1492] Try to follow leap convention of dihedral parms sorted by multiplicity in ascending order --- src/ParameterHolders.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index a01ba6ce41..b4da67ecff 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -159,7 +159,20 @@ class DihedralParmHolder { // Brand new multiplicity for this dihedral. //mprintf("DEBUG: Dihedral new mult: %s %s %s %s pk=%12.4f pn=%12.4f pp=%12.4f\n", // *types[0], *types[1], *types[2], *types[3], dp.Pk(), dp.Pn(), dp.Phase()); - it0->second.push_back( dp ); + //it0->second.push_back( dp ); + // Try to keep multiplicities in order. + DihedralParmArray sorted; + bool isInserted = false; + for (DihedralParmArray::const_iterator jt = it0->second.begin(); jt != it0->second.end(); ++jt) { + if (!isInserted) { + if (dp.Pn() < jt->Pn()) { + sorted.push_back( dp ); + isInserted = true; + } + } + sorted.push_back( *jt ); + } + it0->second = sorted; } else { if (dp < *it1 || *it1 < dp) { //mprintf("DEBUG: Attempt dihedral update mult (allow=%i): %s %s %s %s pk=%6.2f pn=%3.1f pp=%6.3f (orig pk=%6.2f pn=%3.1f pp=%6.3f )\n", From 851076e643ba2103b77711741d43a0da2b580ea4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 11:47:36 -0500 Subject: [PATCH 0197/1492] Add an assign parameters function --- src/Exec_Build.cpp | 2 +- src/Topology.cpp | 27 +++++++++++++++++++++++++++ src/Topology.h | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 0992ed984a..d1b4214e67 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -423,7 +423,7 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) // Update parameters Exec::RetType ret = CpptrajState::OK; - if ( topOut.UpdateParams( *mainParmSet ) ) { + if ( topOut.AssignParams( *mainParmSet ) ) { mprinterr("Error: Could not update parameters for '%s'.\n", topOut.c_str()); ret = CpptrajState::ERR; } diff --git a/src/Topology.cpp b/src/Topology.cpp index 6e3b484ef1..9652e99b1e 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -3010,6 +3010,33 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, } } +/** Replace existing parameters with the given parameter set. */ +int Topology::AssignParams(ParameterSet const& set0) { + // Bond parameters + mprintf("\tRegenerating bond parameters.\n"); + AssignBondParams( set0.BP() ); + // Angle parameters + mprintf("\tRegenerating angle parameters.\n"); + AssignAngleParams( set0.AP() ); + // Dihedral parameters + mprintf("\tRegenerating dihedral parameters.\n"); + AssignDihedralParams( set0.DP(), set0.IP() ); + // Urey-Bradley + mprintf("\tRegenerating UB parameters.\n"); + AssignUBParams( set0.UB() ); + // Improper parameters + mprintf("\tRegenerating improper parameters.\n"); + AssignImproperParams( set0.IP() ); + // Atom types + mprintf("\tRegenerating atom type parameters.\n"); + AssignAtomTypeParm( set0.AT() ); + // LJ 6-12 + mprintf("\tRegenerating nonbond parameters.\n"); + AssignNonbondParams( set0.AT(), set0.NB(), set0.HB() ); + // TODO LJ14 + return 0; +} + /** Update/add to parameters in this topology with those from given set. * NOTE: This routine is separate from updateParams() to allow that * routine to be used by AppendTop() for testing the parameter diff --git a/src/Topology.h b/src/Topology.h index 8444bb58c1..354fe9509e 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -198,6 +198,8 @@ class Topology { int SetSolvent(std::string const&); /// \return ParameterSet for this Topology ParameterSet GetParameters() const; + /// Replace existing parameters with those in given set. + int AssignParams(ParameterSet const&); /// Update parameters in this Topology with those in given set. int UpdateParams(ParameterSet const&); // ----- Print topology info ----------------- From 785060c98e7eb681fa27e10958c1ebd5def43df1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 12:14:05 -0500 Subject: [PATCH 0198/1492] Use FEQ to compare floating points. Handle case where existing DihedralParmArray is empty or the incoming multiplicity is already > than the last (i.e. already in order). --- src/ParameterHolders.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index b4da67ecff..cb1d77ae9b 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -152,27 +152,32 @@ class DihedralParmHolder { DihedralParmArray::iterator it1 = it0->second.begin(); for (; it1 != it0->second.end(); ++it1) { - if (it1->Pn() == dp.Pn()) + if (FEQ(it1->Pn(), dp.Pn())) break; } if (it1 == it0->second.end()) { // Brand new multiplicity for this dihedral. //mprintf("DEBUG: Dihedral new mult: %s %s %s %s pk=%12.4f pn=%12.4f pp=%12.4f\n", // *types[0], *types[1], *types[2], *types[3], dp.Pk(), dp.Pn(), dp.Phase()); - //it0->second.push_back( dp ); - // Try to keep multiplicities in order. - DihedralParmArray sorted; - bool isInserted = false; - for (DihedralParmArray::const_iterator jt = it0->second.begin(); jt != it0->second.end(); ++jt) { - if (!isInserted) { - if (dp.Pn() < jt->Pn()) { - sorted.push_back( dp ); - isInserted = true; + if (it0->second.empty()) + it0->second.push_back( dp ); + else if (dp.Pn() > it0->second.back().Pn()) + it0->second.push_back( dp ); + else { + // Try to keep multiplicities in order. + DihedralParmArray sorted; + bool isInserted = false; + for (DihedralParmArray::const_iterator jt = it0->second.begin(); jt != it0->second.end(); ++jt) { + if (!isInserted) { + if (dp.Pn() < jt->Pn()) { + sorted.push_back( dp ); + isInserted = true; + } } + sorted.push_back( *jt ); } - sorted.push_back( *jt ); + it0->second = sorted; } - it0->second = sorted; } else { if (dp < *it1 || *it1 < dp) { //mprintf("DEBUG: Attempt dihedral update mult (allow=%i): %s %s %s %s pk=%6.2f pn=%3.1f pp=%6.3f (orig pk=%6.2f pn=%3.1f pp=%6.3f )\n", From 61cb8f3b4440e8dd044aa153f50c29c84ec7c023 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 13:03:11 -0500 Subject: [PATCH 0199/1492] Function to guess atom hybridization --- src/GuessAtomHybridization.cpp | 58 ++++++++++++++++++++++++++++++++++ src/GuessAtomHybridization.h | 10 ++++++ 2 files changed, 68 insertions(+) create mode 100644 src/GuessAtomHybridization.cpp create mode 100644 src/GuessAtomHybridization.h diff --git a/src/GuessAtomHybridization.cpp b/src/GuessAtomHybridization.cpp new file mode 100644 index 0000000000..289cffd98f --- /dev/null +++ b/src/GuessAtomHybridization.cpp @@ -0,0 +1,58 @@ +#include "GuessAtomHybridization.h" +#include "Atom.h" +#include "Topology.h" + +AtomType::HybridizationType Cpptraj::GuessAtomHybridization(Atom const& AJ, Topology const& topIn) +{ + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + // Handle specific elements + switch (AJ.Element()) { + case Atom::CARBON : + switch (AJ.Nbonds()) { + case 2 : hybrid = AtomType::SP; break; + case 3 : hybrid = AtomType::SP2; break; + case 4 : hybrid = AtomType::SP3; break; + } + break; + case Atom::NITROGEN : + switch (AJ.Nbonds()) { + case 2 : hybrid = AtomType::SP2; break; + case 3 : + // Check for potential SP2. If only 1 of the bonded atoms is + // hydrogen, assume SP2. TODO actually check for aromaticity. + int n_hydrogens = 0; + for (Atom::bond_iterator bat = AJ.bondbegin(); bat != AJ.bondend(); ++bat) + if (topIn[*bat].Element() == Atom::HYDROGEN) + n_hydrogens++; + if (n_hydrogens == 1) + hybrid = AtomType::SP2; + else + hybrid = AtomType::SP3; + break; + } + break; + case Atom::OXYGEN : + switch (AJ.Nbonds()) { + case 2 : hybrid = AtomType::SP3; break; + } + break; + case Atom::SULFUR : + switch (AJ.Nbonds()) { + case 2 : hybrid = AtomType::SP3; break; + } + break; + default: hybrid = AtomType::UNKNOWN_HYBRIDIZATION; break; + } +/* +if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { + // Assign a theta based on number of bonds + switch (AJ.Nbonds()) { + case 4 : hybrid = AtomType::SP3; break; + case 3 : hybrid = AtomType::SP2; break; + case 2 : hybrid = AtomType::SP; break; + default : mprinterr("Internal Error: GuessAtomHybridization(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; + } +*/ + + return hybrid; +} diff --git a/src/GuessAtomHybridization.h b/src/GuessAtomHybridization.h new file mode 100644 index 0000000000..dc7b84fe76 --- /dev/null +++ b/src/GuessAtomHybridization.h @@ -0,0 +1,10 @@ +#ifndef INC_GUESSATOMHYBRIDIZATION_H +#define INC_GUESSATOMHYBRIDIZATION_H +#include "AtomType.h" // for HybridizationType +class Atom; +class Topology; +namespace Cpptraj { +/// Guess atom hybridization type based on element/bonding +AtomType::HybridizationType GuessAtomHybridization(Atom const&, Topology const&); +} +#endif From c2f0627b6c0af6a832a252c5e5d17d1e349d097b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 13:03:51 -0500 Subject: [PATCH 0200/1492] Update dependencies --- src/cpptrajdepend | 1 + src/cpptrajfiles | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 3f959374c5..2aef471f15 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -368,6 +368,7 @@ Gpu.o : Gpu.cpp Gpu.h GridAction.o : GridAction.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridAction.h GridBin.h GridMover.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h GridBin.o : GridBin.cpp Box.h CpptrajStdio.h GridBin.h Matrix_3x3.h Parallel.h Vec3.h GridMover.o : GridMover.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_3D.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h GridMover.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h +GuessAtomHybridization.o : GuessAtomHybridization.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h HistBin.o : HistBin.cpp Constants.h CpptrajStdio.h Dimension.h HistBin.h Hungarian.o : Hungarian.cpp ArrayIterator.h Constants.h CpptrajStdio.h Hungarian.h Matrix.h ImageRoutines.o : ImageRoutines.cpp Atom.h AtomMask.h Box.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h Frame.h ImageOption.h ImageRoutines.h ImageTypes.h Image_List.h Image_List_Mask.h Image_List_Pair.h Image_List_Pair_CoM.h Image_List_Pair_First.h Image_List_Pair_Geom.h Image_List_Unit.h Image_List_Unit_CoM.h Image_List_Unit_First.h Image_List_Unit_Geom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 7bcfb827aa..d0929dd54c 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -337,6 +337,7 @@ COMMON_SOURCES= \ GridAction.cpp \ GridMover.cpp \ GridBin.cpp \ + GuessAtomHybridization.cpp \ HistBin.cpp \ Hungarian.cpp \ ImageRoutines.cpp \ From 14f15693fdfa6ab0ecb91e05c140a3d256e013bd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 13:04:15 -0500 Subject: [PATCH 0201/1492] Add note --- src/Structure/Model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index affbf21f06..d818e129ec 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -7,7 +7,7 @@ /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. - */ + */ // FIXME use GuessAtomHybridization int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, int debug) { // Figure out hybridization and chirality of atom j. From 839f4bccf6cadfce1c28f1dfd8cb0960fcef6c7e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 13:13:51 -0500 Subject: [PATCH 0202/1492] Start generating impropers --- src/Exec_Build.cpp | 6 ++++++ src/Structure/GenerateAngles.cpp | 16 ++++++++++++++++ src/Structure/GenerateAngles.h | 2 ++ src/cpptrajdepend | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index d1b4214e67..55d337bdde 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -375,6 +375,12 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) return CpptrajState::ERR; } + // Generate impropers + if (Cpptraj::Structure::GenerateImpropers(topOut)) { + mprinterr("Error: Could not generate impropers for '%s'\n", topOut.c_str()); + return CpptrajState::ERR; + } + // Get parameter sets. typedef std::vector Parray; Parray ParamSets; diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index f490071ec8..8d2e05e07e 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -1,5 +1,6 @@ #include "GenerateAngles.h" #include "../CpptrajStdio.h" +#include "../GuessAtomHybridization.h" #include "../ParameterTypes.h" #include "../Topology.h" #include // std::sort @@ -99,3 +100,18 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { } return 0; } + +/** Try to determine impropers for topology. */ +int Cpptraj::Structure::GenerateImpropers(Topology& topIn) { + for (int iat = 0; iat != topIn.Natom(); iat++) { + Atom const& AJ = topIn[iat]; + if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? + // FIXME pass in atom types + AtomType::HybridizationType hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); + if (hybrid == AtomType::SP2) { + mprintf("DEBUG: Potential improper center: %s\n", topIn.AtomMaskName(iat).c_str()); + } + } + } + return 0; +} diff --git a/src/Structure/GenerateAngles.h b/src/Structure/GenerateAngles.h index b3e1c141c2..79abe86b4e 100644 --- a/src/Structure/GenerateAngles.h +++ b/src/Structure/GenerateAngles.h @@ -5,6 +5,8 @@ namespace Cpptraj { namespace Structure { /// Generate angles from bonds in a Topology int GenerateAngles(Topology&); +/// Generate impropers +int GenerateImpropers(Topology&); } } #endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 2aef471f15..8a2ed830b0 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -446,7 +446,7 @@ Structure/Chirality.o : Structure/Chirality.cpp Atom.h AtomMask.h AtomType.h Box Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/GenerateAngles.o : Structure/GenerateAngles.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/GenerateAngles.o : Structure/GenerateAngles.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h From a6a83e4038a27decf6c764a849b85257310d2ccd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 13:25:40 -0500 Subject: [PATCH 0203/1492] Use atom type info --- src/Exec_Build.cpp | 12 ++++++------ src/Structure/GenerateAngles.cpp | 11 ++++++++--- src/Structure/GenerateAngles.h | 4 +++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 55d337bdde..4fee21d2fb 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -375,12 +375,6 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) return CpptrajState::ERR; } - // Generate impropers - if (Cpptraj::Structure::GenerateImpropers(topOut)) { - mprinterr("Error: Could not generate impropers for '%s'\n", topOut.c_str()); - return CpptrajState::ERR; - } - // Get parameter sets. typedef std::vector Parray; Parray ParamSets; @@ -427,6 +421,12 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mainParmSet->UpdateParamSet( *(*it), UC, State.Debug(), State.Debug() ); // FIXME verbose } + // Generate impropers + if (Cpptraj::Structure::GenerateImpropers(topOut, mainParmSet->AT())) { + mprinterr("Error: Could not generate impropers for '%s'\n", topOut.c_str()); + return CpptrajState::ERR; + } + // Update parameters Exec::RetType ret = CpptrajState::OK; if ( topOut.AssignParams( *mainParmSet ) ) { diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 8d2e05e07e..36c8584008 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -102,12 +102,17 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { } /** Try to determine impropers for topology. */ -int Cpptraj::Structure::GenerateImpropers(Topology& topIn) { +int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder const& AT) { for (int iat = 0; iat != topIn.Natom(); iat++) { Atom const& AJ = topIn[iat]; if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? - // FIXME pass in atom types - AtomType::HybridizationType hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + bool found; + AtomType atype = AT.FindParam(TypeNameHolder(AJ.Type()), found); + if (found) + hybrid = atype.Hybridization(); + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) + hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); if (hybrid == AtomType::SP2) { mprintf("DEBUG: Potential improper center: %s\n", topIn.AtomMaskName(iat).c_str()); } diff --git a/src/Structure/GenerateAngles.h b/src/Structure/GenerateAngles.h index 79abe86b4e..09bd38785b 100644 --- a/src/Structure/GenerateAngles.h +++ b/src/Structure/GenerateAngles.h @@ -1,12 +1,14 @@ #ifndef INC_STRUCTURE_GENERATEANGLES_H #define INC_STRUCTURE_GENERATEANGLES_H class Topology; +class AtomType; +template class ParmHolder; namespace Cpptraj { namespace Structure { /// Generate angles from bonds in a Topology int GenerateAngles(Topology&); /// Generate impropers -int GenerateImpropers(Topology&); +int GenerateImpropers(Topology&, ParmHolder const&); } } #endif From 6221799a3e92efd6bff667eeae4a085164e3f02c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 13:30:14 -0500 Subject: [PATCH 0204/1492] Use GuessAtomHybridization in Model --- src/Structure/Model.cpp | 23 +++++++++++++---------- src/cpptrajdepend | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index d818e129ec..cdd914223d 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,6 +1,7 @@ #include "Model.h" #include "BuildAtom.h" #include "../CpptrajStdio.h" +#include "../GuessAtomHybridization.h" #include "../Topology.h" #include "../TorsionRoutines.h" #include "../Constants.h" @@ -14,7 +15,7 @@ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak if (debug > 0) mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); - enum HybridizationType { SP = 0, SP2, SP3, UNKNOWN_HYBRIDIZATION }; + //enum HybridizationType { SP = 0, SP2, SP3, UNKNOWN_HYBRIDIZATION }; Atom const& AJ = topIn[aj]; if (debug > 0) { @@ -27,7 +28,9 @@ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); return 1; } - + // TODO pass in atom type info? + AtomType::HybridizationType hybrid = GuessAtomHybridization(AJ, topIn); +/* HybridizationType hybrid = UNKNOWN_HYBRIDIZATION; // Handle specific elements switch (AJ.Element()) { @@ -66,7 +69,7 @@ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak } break; default: hybrid = UNKNOWN_HYBRIDIZATION; break; - } + }*/ // Fill in what values we can for known atoms /* std::vector knownTheta( AJ.Nbonds() ); int knownIdx = -1; @@ -82,20 +85,20 @@ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak } if (knownIdx == -1) {*/ //mprintf("DEBUG:\t\tNo known theta.\n"); - if (hybrid == UNKNOWN_HYBRIDIZATION) { + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { // Assign a theta based on number of bonds switch (AJ.Nbonds()) { - case 4 : hybrid = SP3; break; - case 3 : hybrid = SP2; break; - case 2 : hybrid = SP; break; + case 4 : hybrid = AtomType::SP3; break; + case 3 : hybrid = AtomType::SP2; break; + case 2 : hybrid = AtomType::SP; break; default : mprinterr("Internal Error: AssignTheta(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; } } // Assign a theta based on hybridization switch (hybrid) { - case SP3 : theta = 109.5 * Constants::DEGRAD; break; - case SP2 : theta = 120.0 * Constants::DEGRAD; break; - case SP : theta = 180.0 * Constants::DEGRAD; break; + case AtomType::SP3 : theta = 109.5 * Constants::DEGRAD; break; + case AtomType::SP2 : theta = 120.0 * Constants::DEGRAD; break; + case AtomType::SP : theta = 180.0 * Constants::DEGRAD; break; default : mprinterr("Internal Error: AssignTheta(): Unhandled hybridization for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; }/* } else { diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 8a2ed830b0..1515262f73 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -449,7 +449,7 @@ Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h At Structure/GenerateAngles.o : Structure/GenerateAngles.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/StructureEnum.o : Structure/StructureEnum.cpp Structure/StructureEnum.h Structure/StructureRoutines.o : Structure/StructureRoutines.cpp Atom.h CpptrajStdio.h NameType.h Residue.h Structure/StructureRoutines.h SymbolExporting.h Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From d291831128674637f9c4f1c17821e1b7c23646a7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 14:37:32 -0500 Subject: [PATCH 0205/1492] Add warning --- src/Structure/GenerateAngles.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 36c8584008..e7f5ec6ed8 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -115,6 +115,9 @@ int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); if (hybrid == AtomType::SP2) { mprintf("DEBUG: Potential improper center: %s\n", topIn.AtomMaskName(iat).c_str()); + } else if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { + mprintf("Warning: When searching for impropers could not determine hybridization of %s\n", + topIn.AtomMaskName(iat).c_str()); } } } From d0b428f3e0039a3f36580f239a38985ac206f138 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 21 Dec 2023 14:51:52 -0500 Subject: [PATCH 0206/1492] Actually add the improper. I think I'm doing the ordering the same as leap but not 100% certain. --- src/Structure/GenerateAngles.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index e7f5ec6ed8..990f54cfa5 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -48,8 +48,7 @@ static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { } } - - +/* Set angles and dihedrals in given topology based on current bond arrays. */ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { if (topIn.Nbonds() < 1) { mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); @@ -101,7 +100,7 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { return 0; } -/** Try to determine impropers for topology. */ +/** Try to determine impropers for topology. */ // TODO option for charmm improper int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder const& AT) { for (int iat = 0; iat != topIn.Natom(); iat++) { Atom const& AJ = topIn[iat]; @@ -115,6 +114,14 @@ int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); if (hybrid == AtomType::SP2) { mprintf("DEBUG: Potential improper center: %s\n", topIn.AtomMaskName(iat).c_str()); + // iat is the central (3rd) atom. + // lowest bonded atom index is the 1st atom. + // highest bonded atom index is the second atom. + // remaining atom is the fourth atom. + Atom AJcopy = AJ; + AJcopy.SortBonds(); + std::vector const& bonds = AJcopy.BondIdxArray(); + topIn.AddDihedral( DihedralType( bonds[0], bonds[2], iat, bonds[1], DihedralType::BOTH ) ); } else if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { mprintf("Warning: When searching for impropers could not determine hybridization of %s\n", topIn.AtomMaskName(iat).c_str()); From f2ebefac9c8c2628fae734befeb55ab714ae938a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 24 Dec 2023 13:18:59 -0500 Subject: [PATCH 0207/1492] Add desc command for comparing to LEaP --- src/Exec_Desc.cpp | 79 +++++++++++++++++++++++++++++++++++++++++++++++ src/Exec_Desc.h | 14 +++++++++ 2 files changed, 93 insertions(+) create mode 100644 src/Exec_Desc.cpp create mode 100644 src/Exec_Desc.h diff --git a/src/Exec_Desc.cpp b/src/Exec_Desc.cpp new file mode 100644 index 0000000000..433f0306e8 --- /dev/null +++ b/src/Exec_Desc.cpp @@ -0,0 +1,79 @@ +#include "Exec_Desc.h" +#include "CpptrajStdio.h" + +int Exec_Desc::desc_atom(Topology const& topIn, int iat) { + Atom const& AT = topIn[iat]; + + const int bondorder = 1; // FIXME + mprintf("ATOM\n"); + mprintf("Name: %-5s\n", *(AT.Name())); + mprintf("Type: %-5s\n", *(AT.Type())); + mprintf("Charge: %6.4f\n", AT.Charge()); + mprintf("Polarization: %6.4f\n", 0.0); // FIXME + mprintf("Element: %-5s\n", AT.ElementName()); + if (AT.Nbonds() == 0) + mprintf(" NO BONDS\n"); + else { + for (Atom::bond_iterator bat = AT.bondbegin(); bat != AT.bondend(); ++bat) { + mprintf(" Bonded to %s by a", topIn.AtomMaskName(*bat).c_str()); + switch (bondorder) { + case 1 : mprintf(" single"); break; + case 2 : mprintf(" double"); break; + case 3 : mprintf(" triple"); break; + case 4 : mprintf(" n aromatic"); break; + default : mprintf(" ????"); break; + } + mprintf(" bond.\n"); + } + } + return 0; +} + + +// Exec_Desc::Help() +void Exec_Desc::Help() const +{ + +} + +// Exec_Desc::Execute() +Exec::RetType Exec_Desc::Execute(CpptrajState& State, ArgList& argIn) +{ + // Get Topology + Topology* parm = State.DSL().GetTopByIndex( argIn ); + if (parm == 0) { + mprinterr("Error: No topologies loaded.\n"); + return CpptrajState::ERR; + } + mprintf("\tUsing topology: %s\n", parm->c_str()); + // Get output file + std::string outname = argIn.GetStringKey("out"); + CpptrajFile* outfile = State.DFL().AddCpptrajFile(outname, "Atom description", + DataFileList::TEXT, true); + if (outfile == 0) return CpptrajState::ERR; + mprintf("\tOutput to '%s'\n", outfile->Filename().full()); + // Get mask + std::string maskstr = argIn.GetMaskNext(); + AtomMask mask; + if (mask.SetMaskString(maskstr)) { + mprinterr("Error: Invalid atom mask: %s\n", maskstr.c_str()); + return CpptrajState::ERR; + } + + // Set up mask + if (parm->SetupIntegerMask( mask )) { + mprinterr("Error: Could not set up mask '%s'\n", mask.MaskString()); + return CpptrajState::ERR; + } + mask.MaskInfo(); + if (mask.None()) { + mprintf("Warning: '%s' selects no atoms.\n", mask.MaskString()); + return CpptrajState::OK; + } + + // Loop over atoms + for (AtomMask::const_iterator at = mask.begin(); at != mask.end(); ++at) + desc_atom( *parm, *at ); + + return CpptrajState::OK; +} diff --git a/src/Exec_Desc.h b/src/Exec_Desc.h new file mode 100644 index 0000000000..abf3a6bb18 --- /dev/null +++ b/src/Exec_Desc.h @@ -0,0 +1,14 @@ +#ifndef INC_EXEC_DESC_H +#define INC_EXEC_DESC_H +#include "Exec.h" +/// +class Exec_Desc : public Exec { + public: + Exec_Desc() : Exec(GENERAL) {} + void Help() const; + DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Desc(); } + RetType Execute(CpptrajState&, ArgList&); + private: + static int desc_atom(Topology const&, int); +}; +#endif From 1081cbbc2ffad74de63a9aa602d9405da3238dee Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 24 Dec 2023 13:36:53 -0500 Subject: [PATCH 0208/1492] Enable desc for comparing to leap --- src/Command.cpp | 2 ++ src/Exec_Desc.h | 2 +- src/cpptrajdepend | 3 ++- src/cpptrajfiles | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Command.cpp b/src/Command.cpp index 4b3e12aed2..6c905c66c2 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -72,6 +72,7 @@ #include "Exec_ScaleDihedralK.h" #include "Exec_Top.h" #include "Exec_UpdateParameters.h" +#include "Exec_Desc.h" // ----- ACTION ---------------------------------------------------------------- #include "Action_Angle.h" #include "Action_Distance.h" @@ -299,6 +300,7 @@ void Command::Init() { Command::AddCmd( new Exec_Change(), Cmd::EXE, 1, "change" ); Command::AddCmd( new Exec_ChargeInfo(), Cmd::EXE, 1, "charge" ); Command::AddCmd( new Exec_CompareTop(), Cmd::EXE, 1, "comparetop" ); + Command::AddCmd( new Exec_Desc(), Cmd::EXE, 1, "desc" ); Command::AddCmd( new Exec_DihedralInfo(),Cmd::EXE, 3,"dihedrals","dihedralinfo","printdihedrals"); Command::AddCmd( new Exec_HmassRepartition(),Cmd::EXE, 1, "hmassrepartition" ); Command::AddCmd( new Exec_ImproperInfo(),Cmd::EXE, 3,"impropers","improperinfo","printimpropers"); diff --git a/src/Exec_Desc.h b/src/Exec_Desc.h index abf3a6bb18..2bf830a71d 100644 --- a/src/Exec_Desc.h +++ b/src/Exec_Desc.h @@ -4,7 +4,7 @@ /// class Exec_Desc : public Exec { public: - Exec_Desc() : Exec(GENERAL) {} + Exec_Desc() : Exec(PARM) {} void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Desc(); } RetType Execute(CpptrajState&, ArgList&); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 1515262f73..3e62c05a7d 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -187,7 +187,7 @@ ClusterMap.o : ClusterMap.cpp AssociatedData.h ClusterMap.h Constants.h CpptrajF Cmd.o : Cmd.cpp Cmd.h DispatchObject.h CmdInput.o : CmdInput.cpp CmdInput.h StringRoutines.h CmdList.o : CmdList.cpp Cmd.h CmdList.h DispatchObject.h -Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h ActionTopWriter.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_AvgBox.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_Keep.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiPucker.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_ToroidalDiffusion.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_CalcDiffusion.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_TICA.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BoxArgs.h BufferedLine.h CharMask.h Cluster/Algorithm.h Cluster/BestReps.h Cluster/CentroidArray.h Cluster/Cframes.h Cluster/Control.h Cluster/DrawGraph.h Cluster/List.h Cluster/Metric.h Cluster/MetricArray.h Cluster/Node.h Cluster/Sieve.h Cluster/Silhouette.h ClusterMap.h Cmd.h CmdInput.h CmdList.h Command.h CompactFrameArray.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DiffusionResults.h DihedralSearch.h Dimension.h DispatchObject.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Ewald.h EwaldOptions.h Ewald_ParticleMesh.h ExclusionArray.h Exec.h Exec_AddMissingRes.h Exec_Analyze.h Exec_Build.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareClusters.h Exec_CompareEnergy.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CrdTransform.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_Emin.h Exec_ExtendedComparison.h Exec_Flatten.h Exec_GenerateAmberRst.h Exec_Graft.h Exec_Help.h Exec_HmassRepartition.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_ParseTiming.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrepareForLeap.h Exec_PrintData.h Exec_Random.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_Sequence.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h Exec_Zmatrix.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h GIST_PME.h Grid.h GridAction.h GridBin.h GridMover.h HistBin.h Hungarian.h ImageOption.h ImageTypes.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Pucker.h Pucker_PuckerMask.h Pucker_PuckerSearch.h Pucker_PuckerToken.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h SplineFxnTable.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/GistCudaSetup.cuh helpme_standalone.h molsurf.h +Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h ActionTopWriter.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_AvgBox.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_Keep.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiPucker.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_ToroidalDiffusion.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_CalcDiffusion.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_TICA.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BoxArgs.h BufferedLine.h CharMask.h Cluster/Algorithm.h Cluster/BestReps.h Cluster/CentroidArray.h Cluster/Cframes.h Cluster/Control.h Cluster/DrawGraph.h Cluster/List.h Cluster/Metric.h Cluster/MetricArray.h Cluster/Node.h Cluster/Sieve.h Cluster/Silhouette.h ClusterMap.h Cmd.h CmdInput.h CmdList.h Command.h CompactFrameArray.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DiffusionResults.h DihedralSearch.h Dimension.h DispatchObject.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Ewald.h EwaldOptions.h Ewald_ParticleMesh.h ExclusionArray.h Exec.h Exec_AddMissingRes.h Exec_Analyze.h Exec_Build.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareClusters.h Exec_CompareEnergy.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CrdTransform.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_Desc.h Exec_Emin.h Exec_ExtendedComparison.h Exec_Flatten.h Exec_GenerateAmberRst.h Exec_Graft.h Exec_Help.h Exec_HmassRepartition.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_ParseTiming.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrepareForLeap.h Exec_PrintData.h Exec_Random.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_Sequence.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h Exec_Zmatrix.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h GIST_PME.h Grid.h GridAction.h GridBin.h GridMover.h HistBin.h Hungarian.h ImageOption.h ImageTypes.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Pucker.h Pucker_PuckerMask.h Pucker_PuckerSearch.h Pucker_PuckerToken.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h SplineFxnTable.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/GistCudaSetup.cuh helpme_standalone.h molsurf.h CompactFrameArray.o : CompactFrameArray.cpp Box.h CompactFrameArray.h CoordinateInfo.h CpptrajStdio.h Matrix_3x3.h Parallel.h ReplicaDimArray.h Vec3.h ComplexArray.o : ComplexArray.cpp ArrayIterator.h ComplexArray.h Constraints.o : Constraints.cpp ArgList.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h Constraints.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -305,6 +305,7 @@ Exec_CreateSet.o : Exec_CreateSet.cpp Action.h ActionList.h ActionState.h Analys Exec_DataFile.o : Exec_DataFile.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataFile.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_DataFilter.o : Exec_DataFilter.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataFilter.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_DataSetCmd.o : Exec_DataSetCmd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h ArrayIterator.h AssociatedData.h AssociatedData_Connect.h AssociatedData_NOE.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Vector.h DataSet_string.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataSetCmd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Desc.o : Exec_Desc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Desc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Emin.o : Exec_Emin.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Emin.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ExtendedComparison.o : Exec_ExtendedComparison.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ExtendedComparison.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Flatten.o : Exec_Flatten.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Flatten.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OnlineVarT.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index d0929dd54c..11560b4aa0 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -275,6 +275,7 @@ COMMON_SOURCES= \ Exec_DataFile.cpp \ Exec_DataFilter.cpp \ Exec_DataSetCmd.cpp \ + Exec_Desc.cpp \ Exec_Emin.cpp \ Exec_ExtendedComparison.cpp \ Exec_Flatten.cpp \ From ed84c21ae67c4d4dd22128e434476849d4dc36b3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 24 Dec 2023 13:53:43 -0500 Subject: [PATCH 0209/1492] Move debug step to TopInfo --- src/TopInfo.cpp | 5 +++++ src/Topology.cpp | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/TopInfo.cpp b/src/TopInfo.cpp index b0738f65ce..9fa244fa7f 100644 --- a/src/TopInfo.cpp +++ b/src/TopInfo.cpp @@ -637,6 +637,11 @@ void TopInfo::PrintDihedrals(DihedralArray const& darray, DihedralParmArray cons dihedralparm[didx].Pn()); if (printExtraInfo) outfile_->Printf(" %4.1f %4.1f", dihedralparm[didx].SCEE(), dihedralparm[didx].SCNB()); + } else { + // DEBUG + outfile_->Printf(" %7s %5s %4s", "NONE", "NONE", "NONE"); + if (printExtraInfo) + outfile_->Printf(" %4s %4s", "NONE", "NONE"); } if ( !coords_.empty() ) outfile_->Printf(" %7.2f", Torsion( coords_.XYZ(atom1), diff --git a/src/Topology.cpp b/src/Topology.cpp index 9652e99b1e..24a720c61b 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2818,9 +2818,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, TruncResAtomNameNum(dih->A4()).c_str(), *types[0], *types[1], *types[2], *types[3]); DihedralType mydih = *dih; - int idx = addTorsionParm( dihedralparm_, DihedralParmType() ); // DEBUG - mydih.SetIdx( idx ); // DEBUG - //mydih.SetIdx( -1 ); + mydih.SetIdx( -1 ); dihedralsIn.push_back( mydih ); } else { // Actually add parameters for this dihedral. From 6b7fdaf4092c031341a0ad77f6d453beeb022d66 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 24 Dec 2023 16:24:39 -0500 Subject: [PATCH 0210/1492] Order improper atoms the same way leap does, alphabetically by atom type --- src/Structure/GenerateAngles.cpp | 129 +++++++++++++++++++++++++++++-- 1 file changed, 121 insertions(+), 8 deletions(-) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateAngles.cpp index 990f54cfa5..078ded5a22 100644 --- a/src/Structure/GenerateAngles.cpp +++ b/src/Structure/GenerateAngles.cpp @@ -100,6 +100,113 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { return 0; } +/** Try to order an improper the same way that LEaP does. + * LEaP has wild card names first, followed by atom types + * in alphabetical order. The third atom is always the central + * atom. + */ +static int order_improper_atoms(int* leapdih, int centralAt, Topology const& topIn) +{ + Atom const& Ak = topIn[centralAt]; + std::vector const& bonds = Ak.BondIdxArray(); + int indices[3]; + indices[0] = bonds[0]; + indices[1] = bonds[1]; + indices[2] = bonds[2]; + if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); + if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); + if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); + if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); + leapdih[0] = indices[0]; + leapdih[1] = indices[1]; + leapdih[2] = centralAt; + leapdih[3] = indices[2]; + return 0; +} +/* +static int order_improper_atoms(int* indices, int centralAt, Topology const& topIn) +{ + indices[2] = centralAt; + Atom const& Ak = topIn[centralAt]; + std::vector const& bonds = Ak.BondIdxArray(); + NameType const& a1 = topIn[bonds[0]].Type(); + NameType const& a2 = topIn[bonds[1]].Type(); + NameType const& a3 = topIn[bonds[2]].Type(); + if (a1 < a2) { + if (a1 < a3) { + // a1 < a2 and a1 < a3 + indices[0] = bonds[0]; + if (a2 < a3) { + indices[1] = bonds[1]; + indices[3] = bonds[2]; + } else { + indices[1] = bonds[2]; + indices[3] = bonds[1]; + } + } else { + // a1 < a2 and a3 < a1 + indices[0] = bonds[2]; + indices[1] = bonds[0]; + indices[3] = bonds[1]; + } + } else { + if (a2 < a3) { + // a2 < a1 and a2 < a3 + indices[0] = bonds[1]; + if (a1 < a3) { + indices[1] = bonds[0]; + indices[3] = bonds[2]; + } else { + indices[1] = bonds[2]; + indices[3] = bonds[0]; + } + } else { + // a2 < a1 and a3 < a2 + indices[0] = bonds[2]; + indices[1] = bonds[1]; + indices[3] = bonds[0]; + } + } + + return 0; +}*/ +/*static int order_improper_atoms(int* oaObj, int iat, Topology const& topIn) { + int iIndex1 = 0; + int iIndex2 = 0; + int iIndex0 = 0; + for (int i = 0; i < 3; i++) + oaObj[i] = -1; + + Atom const& AJ = topIn[iat]; + int iAtomCoordination = AJ.Nbonds(); + + if ( iIndex1 <= iIndex0 ) + iIndex1 = iIndex0+1; + if ( iIndex2 <= iIndex1 ) + iIndex2 = iIndex1+1; + else iIndex2++; + + if ( iIndex2 >= iAtomCoordination ) { + iIndex1++; + iIndex2 = iIndex1 + 1; + if ( iIndex2 >= iAtomCoordination ) { + iIndex0++; + iIndex1 = iIndex0 + 1; + iIndex2 = iIndex1 + 1; + } + } + + if ( iIndex2 < (iAtomCoordination) ) { + mprintf("DEBUG: iIndex %i %i %i\n", iIndex0, iIndex1, iIndex2); + oaObj[2] = iat; + oaObj[0] = AJ.BondIdxArray()[iIndex0]; //(OBJEKT) aAtomBondedNeighbor( cCont, iIndex0 ); + oaObj[1] = AJ.BondIdxArray()[iIndex1]; //(OBJEKT) aAtomBondedNeighbor( cCont, iIndex1 ); + oaObj[3] = AJ.BondIdxArray()[iIndex2]; //(OBJEKT) aAtomBondedNeighbor( cCont, iIndex2 ); + return 0; + } + return 1; +}*/ + /** Try to determine impropers for topology. */ // TODO option for charmm improper int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder const& AT) { for (int iat = 0; iat != topIn.Natom(); iat++) { @@ -114,14 +221,20 @@ int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); if (hybrid == AtomType::SP2) { mprintf("DEBUG: Potential improper center: %s\n", topIn.AtomMaskName(iat).c_str()); - // iat is the central (3rd) atom. - // lowest bonded atom index is the 1st atom. - // highest bonded atom index is the second atom. - // remaining atom is the fourth atom. - Atom AJcopy = AJ; - AJcopy.SortBonds(); - std::vector const& bonds = AJcopy.BondIdxArray(); - topIn.AddDihedral( DihedralType( bonds[0], bonds[2], iat, bonds[1], DihedralType::BOTH ) ); + int leapdih[4]; + order_improper_atoms(leapdih, iat, topIn); + mprintf("DEBUG: Bond order %s : %i %i %i %i %s %s %s %s\n", + topIn.AtomMaskName(iat).c_str(), + AJ.BondIdxArray()[0]+1, + AJ.BondIdxArray()[1]+1, + iat+1, + AJ.BondIdxArray()[2]+1, + topIn.AtomMaskName(AJ.BondIdxArray()[0]).c_str(), + topIn.AtomMaskName(AJ.BondIdxArray()[1]).c_str(), + topIn.AtomMaskName(iat).c_str(), + topIn.AtomMaskName(AJ.BondIdxArray()[2]).c_str()); + mprintf("DEBUG: Leap order: %i %i %i %i\n", leapdih[0]+1, leapdih[1]+1, leapdih[2]+1, leapdih[3]+1); + topIn.AddDihedral( DihedralType(leapdih[0], leapdih[1], leapdih[2], leapdih[3], DihedralType::BOTH) ); } else if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { mprintf("Warning: When searching for impropers could not determine hybridization of %s\n", topIn.AtomMaskName(iat).c_str()); From 32cadce072912a6e760dd1d459d8342ab1e9cc8e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Dec 2023 09:22:56 -0500 Subject: [PATCH 0211/1492] Add function to do improper type name sorting --- src/TypeNameHolder.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/TypeNameHolder.h b/src/TypeNameHolder.h index eb8b129e1a..04a53508f8 100644 --- a/src/TypeNameHolder.h +++ b/src/TypeNameHolder.h @@ -4,6 +4,12 @@ #include "NameType.h" /// Used to hold one or more atom type names. class TypeNameHolder { + // Swap NameTypes + static inline void tswap(NameType& n0, NameType& n1) { + NameType tmp = n1; + n1 = n0; + n0 = tmp; + } public: typedef std::vector Narray; typedef Narray::const_iterator const_iterator; @@ -110,6 +116,20 @@ class TypeNameHolder { tstr.append( " " + std::string( *(*it) ) ); return tstr; } + /// Sort typenames alphabetically, preserving the 3rd position (for impropers) + void SortImproperByAlpha(NameType const& wc) { + if (types_.size() != 4) return; + if (wc.len() > 0) { + // Replace wildcards with spaces so they appear first + if (types_[0] == wc) types_[0] = NameType(" "); + if (types_[1] == wc) types_[1] = NameType(" "); + if (types_[3] == wc) types_[3] = NameType(" "); + } + if (types_[0] > types_[1]) tswap(types_[0], types_[1]); + if (types_[1] > types_[3]) tswap(types_[1], types_[3]); + if (types_[0] > types_[1]) tswap(types_[0], types_[1]); + if (types_[1] > types_[3]) tswap(types_[1], types_[3]); + } /// \return size in bytes size_t DataSize() const { return (types_.size()*NameType::DataSize()) + NameType::DataSize(); } private: From b347abac99b021b64fc8e1c8a6a1ae7fce0cecdf Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Dec 2023 09:26:32 -0500 Subject: [PATCH 0212/1492] Start adding TypeNameHolder unit test --- unitTests/TypeNameHolder/UnitTest.sh | 13 +++++++++++++ unitTests/TypeNameHolder/main.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 unitTests/TypeNameHolder/UnitTest.sh create mode 100644 unitTests/TypeNameHolder/main.cpp diff --git a/unitTests/TypeNameHolder/UnitTest.sh b/unitTests/TypeNameHolder/UnitTest.sh new file mode 100755 index 0000000000..42b0fbe761 --- /dev/null +++ b/unitTests/TypeNameHolder/UnitTest.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +. ../UnitMaster.sh + +CleanFiles Makefile main.o NameType.o a.out CpptrajStdio.o + +UNITSOURCES='NameType.cpp CpptrajStdio.cpp' + +CreateMakefile + +RunMake "TypeNameHolder class unit test." + +EndTest diff --git a/unitTests/TypeNameHolder/main.cpp b/unitTests/TypeNameHolder/main.cpp new file mode 100644 index 0000000000..b6a79a7199 --- /dev/null +++ b/unitTests/TypeNameHolder/main.cpp @@ -0,0 +1,26 @@ +// Unit test for NameType class +#include +#include +#include +#include +#include "TypeNameHolder.h" + +static const int Err(const char* msg) { + fprintf(stderr, "Error: %s\n", msg); + return 1; +} + +/*struct reverseSort { + bool operator() (const NameType& lhs, const NameType& rhs) const { + return ( lhs > rhs ); + } +} reverseSortObj;*/ + +int main() { + TypeNameHolder type1; + type1.AddName("CT"); + TypeNameHolder type2("O"); + bool ismatch = type1.Match_NoWC( type2 ); + if (ismatch) return Err("TypeNameHolder single type match failed."); + return 0; +} From cc4e4ff3084124effb94be8dd4b4d0ba43fc9a94 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Dec 2023 09:42:43 -0500 Subject: [PATCH 0213/1492] Ensure replaced wc names are restored --- src/TypeNameHolder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/TypeNameHolder.h b/src/TypeNameHolder.h index 04a53508f8..19ce1ce1ef 100644 --- a/src/TypeNameHolder.h +++ b/src/TypeNameHolder.h @@ -129,6 +129,12 @@ class TypeNameHolder { if (types_[1] > types_[3]) tswap(types_[1], types_[3]); if (types_[0] > types_[1]) tswap(types_[0], types_[1]); if (types_[1] > types_[3]) tswap(types_[1], types_[3]); + if (wc.len() > 0) { + // Restore wildcards + if (types_[0] == " ") types_[0] = wc; + if (types_[1] == " ") types_[1] = wc; + if (types_[3] == " ") types_[3] = wc; + } } /// \return size in bytes size_t DataSize() const { return (types_.size()*NameType::DataSize()) + NameType::DataSize(); } From 0b8477c644285b145903fabcbcf9a8791ce28515 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Dec 2023 09:48:31 -0500 Subject: [PATCH 0214/1492] Finish TypeNameHolder test --- unitTests/TypeNameHolder/main.cpp | 71 ++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/unitTests/TypeNameHolder/main.cpp b/unitTests/TypeNameHolder/main.cpp index b6a79a7199..3b3f32609a 100644 --- a/unitTests/TypeNameHolder/main.cpp +++ b/unitTests/TypeNameHolder/main.cpp @@ -21,6 +21,75 @@ int main() { type1.AddName("CT"); TypeNameHolder type2("O"); bool ismatch = type1.Match_NoWC( type2 ); - if (ismatch) return Err("TypeNameHolder single type match failed."); + if (ismatch) return Err("TypeNameHolder single type no match failed."); + TypeNameHolder type3("CT"); + ismatch = type1.Match_NoWC( type3 ); + if (!ismatch) return Err("TypeNameHolder single type match failed."); + + TypeNameHolder bp1(2); + bp1.AddName("CT"); + bp1.AddName("O"); + TypeNameHolder bp2(2); + bp2.AddName("O"); + bp2.AddName("CT"); + ismatch = bp1.Match_NoWC( bp2 ); + if (!ismatch) return Err("TypeNameHolder two type reverse match failed."); + + TypeNameHolder ap1(3); + ap1.AddName("CT"); + ap1.AddName("O"); + ap1.AddName("HO"); + TypeNameHolder ap2(3); + ap2.AddName("HO"); + ap2.AddName("O"); + ap2.AddName("CT"); + ismatch = ap2.Match_NoWC( ap1 ); + if (!ismatch) return Err("TypeNameHolder three type reverse match failed."); + + TypeNameHolder dp1(4); + dp1.AddName("X"); + dp1.AddName("CX"); + dp1.AddName("O"); + dp1.AddName("X"); + TypeNameHolder dp2(4); + dp2.AddName("CT"); + dp2.AddName("CX"); + dp2.AddName("O"); + dp2.AddName("HO"); + ismatch = dp1.Match_NoWC( dp2 ); + if (ismatch) return Err("TypeNameHolder four type no WC match failed."); + ismatch = dp1.Match_WC( dp2, "X" ); + if (!ismatch) return Err("TypeNameHolder four type WC match failed."); + + TypeNameHolder ip1(4); + ip1.AddName("O"); + ip1.AddName("HO"); + ip1.AddName("CT"); + ip1.AddName("N"); + ip1.SortImproperByAlpha("X"); + if (ip1[0] != "HO") return Err("TypeNameHolder improper alpha sort failed (pos 0)"); + if (ip1[1] != "N") return Err("TypeNameHolder improper alpha sort failed (pos 1)"); + if (ip1[2] != "CT") return Err("TypeNameHolder improper alpha sort failed (pos 2)"); + if (ip1[3] != "O") return Err("TypeNameHolder improper alpha sort failed (pos 3)"); + + TypeNameHolder ip2(4); + ip2.AddName("O"); + ip2.AddName("X"); + ip2.AddName("CT"); + ip2.AddName("X"); + ip2.SortImproperByAlpha("X"); + if (ip2[0] != "X") return Err("TypeNameHolder improper2 alpha sort failed (pos 0)"); + if (ip2[1] != "X") return Err("TypeNameHolder improper2 alpha sort failed (pos 1)"); + if (ip2[2] != "CT") return Err("TypeNameHolder improper2 alpha sort failed (pos 2)"); + if (ip2[3] != "O") return Err("TypeNameHolder improper2 alpha sort failed (pos 3)"); + + //printf("ip1 %s %s %s %s\n", *ip1[0], *ip1[1], *ip1[2], *ip1[3]); + //printf("ip2 %s %s %s %s\n", *ip2[0], *ip2[1], *ip2[2], *ip2[3]); + + ismatch = ip2.Match_NoWC( ip1 ); + if (ismatch) return Err("TypeNameHolder improper no WC match failed."); + ismatch = ip2.Match_WC( ip1, "X" ); + if (!ismatch) return Err("TypeNameHolder improper WC match failed."); + return 0; } From 1934135fc4d979e32e5861f7d5a111e6b6ff5755 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Dec 2023 09:49:57 -0500 Subject: [PATCH 0215/1492] Enable TypeNameHolder test --- unitTests/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unitTests/Makefile b/unitTests/Makefile index 7a694a5cfa..a099ae2f00 100644 --- a/unitTests/Makefile +++ b/unitTests/Makefile @@ -19,13 +19,17 @@ unit.StringRoutines: unit.Range: @-cd Range && ./UnitTest.sh $(OPT) +unit.TypeNameHolder: + @-cd TypeNameHolder && ./UnitTest.sh $(OPT) + # ----- Every unit test should go here ----------- COMPLETETESTS= \ unit.NameType \ unit.ArgList \ unit.GistEntropyUtils \ unit.StringRoutines \ - unit.Range + unit.Range \ + unit.TypeNameHolder test.cpptraj: $(COMPLETETESTS) From 447f57c14da245cfdae6d92afb5e0344eda271bb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Dec 2023 12:11:40 -0500 Subject: [PATCH 0216/1492] Fix the function call --- unitTests/GistEntropyUtils/main.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/unitTests/GistEntropyUtils/main.cpp b/unitTests/GistEntropyUtils/main.cpp index 3d33af708d..809f6c6421 100644 --- a/unitTests/GistEntropyUtils/main.cpp +++ b/unitTests/GistEntropyUtils/main.cpp @@ -111,22 +111,26 @@ int main() { int grid_Nz = 3; Vec3 grid_origin(0, 0, 0); double grid_spacing = 0.5; + float w4 = 0.0; + float x4 = 0.0; + float y4 = 0.0; + float z4 = 0.0; assertClose(searchGridNearestNeighbors6D( - Vec3(1, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 2, -1).first, + Vec3(1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 2, -1).first, GIST_HUGE, "Wrong trans. dist. with empty grid."); // after adding a point in the same voxel, it should be found. grid_crd[9].push_back(0.6); grid_crd[9].push_back(0); grid_crd[9].push_back(0); grid_Q[9].push_back(1); grid_Q[9].push_back(0); grid_Q[9].push_back(0); grid_Q[9].push_back(0); std::pairnbrs; - nbrs = searchGridNearestNeighbors6D(Vec3(1, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 1, -1); + nbrs = searchGridNearestNeighbors6D(Vec3(1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 1, -1); assertClose(nbrs.first, 0.16, "Wrong trans. dist. with empty grid."); assertClose(nbrs.second, PI_SQR + 0.16, "Wrong trans. dist. with empty grid."); - nbrs = searchGridNearestNeighbors6D(Vec3(1, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 0, -1); + nbrs = searchGridNearestNeighbors6D(Vec3(1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 0, -1); assertClose(nbrs.first, GIST_HUGE, "Does not omit outer shells in NN search."); - nbrs = searchGridNearestNeighbors6D(Vec3(-1, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 10, -1); + nbrs = searchGridNearestNeighbors6D(Vec3(-1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 10, -1); assertClose(nbrs.first, 1.6*1.6, "Does not work for out of bounds center."); // add another point one voxel higher, with different rotation; @@ -134,20 +138,20 @@ int main() { grid_crd[18].push_back(1.1); grid_crd[18].push_back(0); grid_crd[18].push_back(0); grid_Q[18].push_back(0); grid_Q[18].push_back(1); grid_Q[18].push_back(0); grid_Q[18].push_back(0); - nbrs = searchGridNearestNeighbors6D(Vec3(0.1, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 2, -1); + nbrs = searchGridNearestNeighbors6D(Vec3(0.1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 2, -1); assertClose(nbrs.first, 0.5 * 0.5, "Does not find correct trans NN."); assertClose(nbrs.second, 1.0 * 1.0, "Does not find correct six NN with n_layers=2."); - nbrs = searchGridNearestNeighbors6D(Vec3(0.1, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 1, -1); + nbrs = searchGridNearestNeighbors6D(Vec3(0.1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 1, -1); assertClose(nbrs.first, 0.5*0.5, "Does not find correct trans NN."); assertClose(nbrs.second, 0.5*0.5 + PI_SQR, "Does not find correct six NN with n_layers=1."); // test that a molecule can be omitted in the central voxel. - nbrs = searchGridNearestNeighbors6D(Vec3(0.6, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 1, 0); + nbrs = searchGridNearestNeighbors6D(Vec3(0.6, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 1, 0); assertClose(nbrs.first, 0.5*0.5, "Does not find correct trans NN."); // test that no molecule is always omitted in the central voxel. - nbrs = searchGridNearestNeighbors6D(Vec3(0.6, 0, 0), 0, 1, 0, 0, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_origin, grid_spacing, 1, -1); + nbrs = searchGridNearestNeighbors6D(Vec3(0.6, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 1, -1); assertClose(nbrs.first, 0.0, "Does not find correct trans NN."); // Test quaternion distance with slightly non-normalized quaternions From c73aca9ac19971653de66260e8977b25d9951caa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 27 Dec 2023 08:30:04 -0500 Subject: [PATCH 0217/1492] Add some notes --- unitTests/GistEntropyUtils/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unitTests/GistEntropyUtils/main.cpp b/unitTests/GistEntropyUtils/main.cpp index 809f6c6421..e327011e4d 100644 --- a/unitTests/GistEntropyUtils/main.cpp +++ b/unitTests/GistEntropyUtils/main.cpp @@ -119,7 +119,8 @@ int main() { Vec3(1, 0, 0), 0, 1, 0, w4, x4, y4, z4, grid_crd, grid_Q, grid_Nx, grid_Ny, grid_Nz, grid_spacing, 2, -1).first, GIST_HUGE, "Wrong trans. dist. with empty grid."); - // after adding a point in the same voxel, it should be found. + // after adding a point in the same voxel, it should be foundi. + // grid index 9 corresponds to 1 0 0 grid_crd[9].push_back(0.6); grid_crd[9].push_back(0); grid_crd[9].push_back(0); grid_Q[9].push_back(1); grid_Q[9].push_back(0); grid_Q[9].push_back(0); grid_Q[9].push_back(0); std::pairnbrs; @@ -135,6 +136,7 @@ int main() { // add another point one voxel higher, with different rotation; // Depending on rotation, this might be the NN. But might not be found if n_layers is < 2; + // grid index 18 corresponds to 2 0 0 grid_crd[18].push_back(1.1); grid_crd[18].push_back(0); grid_crd[18].push_back(0); grid_Q[18].push_back(0); grid_Q[18].push_back(1); grid_Q[18].push_back(0); grid_Q[18].push_back(0); From b9a8c22c222d59a4c0fa3891c5cab785d253d195 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 31 Dec 2023 09:17:48 -0500 Subject: [PATCH 0218/1492] First attempt at creating a dedicated improper holder --- src/ParameterHolders.h | 105 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index cb1d77ae9b..255b8794b2 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -127,6 +127,7 @@ class DihedralParmHolder { typedef std::vector Bmap; public: DihedralParmHolder() {} + virtual ~DihedralParmHolder() {} ///< Virtual since inherited void clear() { bpmap_.clear(); } size_t size() const { return bpmap_.size(); } bool empty() const { return bpmap_.empty(); } @@ -236,7 +237,7 @@ class DihedralParmHolder { const_iterator begin() const { return bpmap_.begin(); } const_iterator end() const { return bpmap_.end(); } /// \return Array of dihedral parameters matching given atom types. - DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { + virtual DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { found = true; for (const_iterator it = begin(); it != end(); ++it) if (it->first.Match_NoWC( types )) return it->second; @@ -256,8 +257,108 @@ class DihedralParmHolder { (bpmap_.size() * sizeof(DihedralParmArray)) + sizeof(Bmap); } + protected: + NameType wc_; ///< Wildcard character private: Bmap bpmap_; - NameType wc_; ///< Wildcard character +}; +// ----------------------------------------------------------------------------- +/// Specialized class for associating atom types with improper parameters. +/** Impropers are a little tricky in that by convention the third atom is + * the central atom, and all other atoms can be in any order. + * The Amber convention is usually (but not always) to have the non-central + * improper atom types sorted alphabetically, with wildcards given + * precedence, but this is not always the case and does not always work. + * For example, using straight up backwards/forwards matching, the wildcard + * type X-X-CW-H4 will not match the given alphabetized type C*-H4-CW-NA. + * All combinations of A1, A2, and A4 should be checked. + */ +class ImproperParmHolder : private DihedralParmHolder { + /// Function for matching wildcards (WildCard Match) + static inline bool wcm(NameType const& t0, NameType const& t1, NameType const& wc) { + return (t0 == wc || t0 == t1); + } + public: + ImproperParmHolder() {} + /** Add (or update) a single improper parameter for given atom types. */ + ParameterHolders::RetType + AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { + return DihedralParmHolder::AddParm( types, dp, allowUpdate ); + } + /// \return Array of improper parameters matching given atom types. + DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { + found = true; + // First, no wildcard + for (const_iterator it = begin(); it != end(); ++it) { + TypeNameHolder const& myTypes = it->first; + // Central (third) type must match + if (myTypes[2] == types[2]) { + // Try all permutations + if (myTypes[0] == types[0]) { + if (myTypes[1] == types[1] && myTypes[3] == types[3]) { + // 0 1 2 3 + return it->second; + } else if (myTypes[1] == types[3] && myTypes[3] == types[1]) { + // 0 3 2 1 + return it->second; + } + } else if (myTypes[0] == types[1]) { + if (myTypes[1] == types[0] && myTypes[3] == types[3]) { + // 1 0 2 3 + return it->second; + } else if (myTypes[1] == types[3] && myTypes[3] == types[0]) { + // 1 3 2 0 + return it->second; + } + } else if (myTypes[0] == types[3]) { + if (myTypes[1] == types[0] && myTypes[3] == types[1]) { + // 3 0 2 1 + return it->second; + } else if (myTypes[1] == types[1] && myTypes[3] == types[0]) { + // 3 1 2 0 + return it->second; + } + } + } + } // END loop over parameters + // Wildcard if present + if (wc_.len() > 0) { + for (const_iterator it = begin(); it != end(); ++it) { + TypeNameHolder const& myTypes = it->first; + // Central (third) type must match + if (wcm(myTypes[2], types[2], wc_)) { + // Try all permutations + if (wcm(myTypes[0], types[0], wc_)) { + if (wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { + // 0 1 2 3 + return it->second; + } else if (wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { + // 0 3 2 1 + return it->second; + } + } else if (wcm(myTypes[0], types[1], wc_)) { + if (wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { + // 1 0 2 3 + return it->second; + } else if (wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { + // 1 3 2 0 + return it->second; + } + } else if (wcm(myTypes[0], types[3], wc_)) { + if (wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { + // 3 0 2 1 + return it->second; + } else if (wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { + // 3 1 2 0 + return it->second; + } + } + } + } // END loop over parameters + } // END wildcard matches + found = false; + return DihedralParmArray(); + } // END FindParam() + private: }; #endif From 22bb0dddf1056781edec1b62fc44e67081db2dfc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 31 Dec 2023 09:22:54 -0500 Subject: [PATCH 0219/1492] Start ImproperParmHolder unit test --- unitTests/ImproperParmHolder/UnitTest.sh | 13 +++++++++ unitTests/ImproperParmHolder/main.cpp | 35 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 unitTests/ImproperParmHolder/UnitTest.sh create mode 100644 unitTests/ImproperParmHolder/main.cpp diff --git a/unitTests/ImproperParmHolder/UnitTest.sh b/unitTests/ImproperParmHolder/UnitTest.sh new file mode 100755 index 0000000000..0be03f5a67 --- /dev/null +++ b/unitTests/ImproperParmHolder/UnitTest.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +. ../UnitMaster.sh + +CleanFiles Makefile main.o NameType.o a.out CpptrajStdio.o + +UNITSOURCES='NameType.cpp CpptrajStdio.cpp' + +CreateMakefile + +RunMake "ImproperParmHolder class unit test." + +EndTest diff --git a/unitTests/ImproperParmHolder/main.cpp b/unitTests/ImproperParmHolder/main.cpp new file mode 100644 index 0000000000..964b4089c0 --- /dev/null +++ b/unitTests/ImproperParmHolder/main.cpp @@ -0,0 +1,35 @@ +// Unit test for ImproperParmHolder class +#include +#include +#include +#include +#include "ParameterHolders.h" + +static const int Err(const char* msg) { + fprintf(stderr, "Error: %s\n", msg); + return 1; +} + +int main() { + ImproperParmHolder IP; + + TypeNameHolder ip1(4); + ip1.AddName("O"); + ip1.AddName("HO"); + ip1.AddName("CT"); + ip1.AddName("N"); + //ip1.SortImproperByAlpha("X"); + + TypeNameHolder ip2(4); + ip2.AddName("O"); + ip2.AddName("X"); + ip2.AddName("CT"); + ip2.AddName("X"); + //ip2.SortImproperByAlpha("X"); + + //printf("ip1 %s %s %s %s\n", *ip1[0], *ip1[1], *ip1[2], *ip1[3]); + //printf("ip2 %s %s %s %s\n", *ip2[0], *ip2[1], *ip2[2], *ip2[3]); + + + return 0; +} From 57a9746859d0d13bad993c6d3f752cfefb7ed8cb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 31 Dec 2023 09:23:19 -0500 Subject: [PATCH 0220/1492] Fix comment --- unitTests/TypeNameHolder/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unitTests/TypeNameHolder/main.cpp b/unitTests/TypeNameHolder/main.cpp index 3b3f32609a..2b84eb824a 100644 --- a/unitTests/TypeNameHolder/main.cpp +++ b/unitTests/TypeNameHolder/main.cpp @@ -1,4 +1,4 @@ -// Unit test for NameType class +// Unit test for TypeNameHolder class #include #include #include From 935e8f0eed462e1813de0fb63f774a975dc5a55c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 31 Dec 2023 09:30:57 -0500 Subject: [PATCH 0221/1492] Try an actual test, doesnt work yet --- unitTests/ImproperParmHolder/main.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/unitTests/ImproperParmHolder/main.cpp b/unitTests/ImproperParmHolder/main.cpp index 964b4089c0..816854939c 100644 --- a/unitTests/ImproperParmHolder/main.cpp +++ b/unitTests/ImproperParmHolder/main.cpp @@ -13,6 +13,12 @@ static const int Err(const char* msg) { int main() { ImproperParmHolder IP; + TypeNameHolder ip0(4); + ip0.AddName("N*"); + ip0.AddName("CX"); + ip0.AddName("CT"); + ip0.AddName("HN"); + TypeNameHolder ip1(4); ip1.AddName("O"); ip1.AddName("HO"); @@ -21,15 +27,26 @@ int main() { //ip1.SortImproperByAlpha("X"); TypeNameHolder ip2(4); - ip2.AddName("O"); ip2.AddName("X"); - ip2.AddName("CT"); ip2.AddName("X"); + ip2.AddName("CT"); + ip2.AddName("O"); + ParameterHolders::RetType ret = IP.AddParm( ip2, DihedralParmType( 2.0, 1.0, 3.14159/2.0 ), false ); + if (ret == ParameterHolders::ERR) return Err("Could not add improper parameter"); //ip2.SortImproperByAlpha("X"); //printf("ip1 %s %s %s %s\n", *ip1[0], *ip1[1], *ip1[2], *ip1[3]); //printf("ip2 %s %s %s %s\n", *ip2[0], *ip2[1], *ip2[2], *ip2[3]); + bool found; + DihedralParmArray impropers = IP.FindParam( ip1, found ); + if (!found) { + return Err("Improper parameter search with wildcard match failed."); + } + impropers = IP.FindParam( ip0, found ); + if (found) { + return Err("Improper parameter search found something when it should not have."); + } return 0; } From 29a909a8bd2ff8a99f04c94c7a9bef702f105d58 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 31 Dec 2023 09:33:37 -0500 Subject: [PATCH 0222/1492] Set wildcard --- unitTests/ImproperParmHolder/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/unitTests/ImproperParmHolder/main.cpp b/unitTests/ImproperParmHolder/main.cpp index 816854939c..8866d0b0ca 100644 --- a/unitTests/ImproperParmHolder/main.cpp +++ b/unitTests/ImproperParmHolder/main.cpp @@ -12,6 +12,7 @@ static const int Err(const char* msg) { int main() { ImproperParmHolder IP; + IP.SetWildcard('X'); TypeNameHolder ip0(4); ip0.AddName("N*"); From 092c89c9bf6c71202c3493d6cd76d15a928dcfb9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 31 Dec 2023 09:34:03 -0500 Subject: [PATCH 0223/1492] Add function to set wc --- src/ParameterHolders.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 255b8794b2..c967b61f6e 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -280,6 +280,8 @@ class ImproperParmHolder : private DihedralParmHolder { } public: ImproperParmHolder() {} + /** Set Wildcard char */ + void SetWildcard(char wc) { DihedralParmHolder::SetWildcard(wc); } /** Add (or update) a single improper parameter for given atom types. */ ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { From 7bb9a58caae834ffc253a60d37e06ffb13d566ee Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 1 Jan 2024 09:43:37 -0500 Subject: [PATCH 0224/1492] Add some more tests --- unitTests/ImproperParmHolder/main.cpp | 40 +++++++++++++++------------ 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/unitTests/ImproperParmHolder/main.cpp b/unitTests/ImproperParmHolder/main.cpp index 8866d0b0ca..056d4c2d36 100644 --- a/unitTests/ImproperParmHolder/main.cpp +++ b/unitTests/ImproperParmHolder/main.cpp @@ -1,8 +1,5 @@ // Unit test for ImproperParmHolder class #include -#include -#include -#include #include "ParameterHolders.h" static const int Err(const char* msg) { @@ -11,9 +8,6 @@ static const int Err(const char* msg) { } int main() { - ImproperParmHolder IP; - IP.SetWildcard('X'); - TypeNameHolder ip0(4); ip0.AddName("N*"); ip0.AddName("CX"); @@ -27,27 +21,39 @@ int main() { ip1.AddName("N"); //ip1.SortImproperByAlpha("X"); + TypeNameHolder ip1a(4); + ip1a.AddName("N"); + ip1a.AddName("O"); + ip1a.AddName("CT"); + ip1a.AddName("HO"); + + ImproperParmHolder IP0; + ParameterHolders::RetType ret = IP0.AddParm( ip1, DihedralParmType( 3.0, 1.0, 0.0 ), false ); + if (ret == ParameterHolders::ERR) return Err("Could not add improper parameter"); + bool found; + DihedralParmArray impropers = IP0.FindParam( ip1a, found ); + if (!found) return Err("Could not find improper parameter (no wildcards)."); + TypeNameHolder ip2(4); ip2.AddName("X"); ip2.AddName("X"); ip2.AddName("CT"); ip2.AddName("O"); - ParameterHolders::RetType ret = IP.AddParm( ip2, DihedralParmType( 2.0, 1.0, 3.14159/2.0 ), false ); + + ImproperParmHolder IP; + ret = IP.AddParm( ip2, DihedralParmType( 2.0, 1.0, 3.14159/2.0 ), false ); if (ret == ParameterHolders::ERR) return Err("Could not add improper parameter"); //ip2.SortImproperByAlpha("X"); - //printf("ip1 %s %s %s %s\n", *ip1[0], *ip1[1], *ip1[2], *ip1[3]); - //printf("ip2 %s %s %s %s\n", *ip2[0], *ip2[1], *ip2[2], *ip2[3]); + impropers = IP.FindParam( ip1, found); + if (found) return Err("Improper parameter search before wildcard added failed."); + + IP.SetWildcard('X'); + impropers = IP.FindParam( ip1, found ); + if (!found) return Err("Improper parameter search with wildcard match failed."); - bool found; - DihedralParmArray impropers = IP.FindParam( ip1, found ); - if (!found) { - return Err("Improper parameter search with wildcard match failed."); - } impropers = IP.FindParam( ip0, found ); - if (found) { - return Err("Improper parameter search found something when it should not have."); - } + if (found) return Err("Improper parameter search found something when it should not have."); return 0; } From f067732dee8f456c445bca0e6b162f55fd2a6269 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 1 Jan 2024 09:44:00 -0500 Subject: [PATCH 0225/1492] Fix FindParam, add some debug info --- src/ParameterHolders.h | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index c967b61f6e..017289c4e0 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -4,7 +4,7 @@ #include // std::pair #include "TypeNameHolder.h" #include "ParameterTypes.h" -//#incl ude "CpptrajStdio.h" // DEBUG +//#inc lude "CpptrajStdio.h" // DEBUG namespace ParameterHolders { enum RetType { ADDED = 0, SAME, UPDATED, ERR }; @@ -289,37 +289,35 @@ class ImproperParmHolder : private DihedralParmHolder { } /// \return Array of improper parameters matching given atom types. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { + //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); found = true; // First, no wildcard for (const_iterator it = begin(); it != end(); ++it) { TypeNameHolder const& myTypes = it->first; // Central (third) type must match if (myTypes[2] == types[2]) { + //mprintf("DEBUG: FindParam (improper) central atom match %s", *(types[2])); + //mprintf(" This=%s-%s-%s-%s", *(myTypes[0]), *(myTypes[1]), *(myTypes[2]), *(myTypes[3])); + //mprintf(" Inco=%s-%s-%s-%s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); // Try all permutations - if (myTypes[0] == types[0]) { - if (myTypes[1] == types[1] && myTypes[3] == types[3]) { + if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { // 0 1 2 3 return it->second; - } else if (myTypes[1] == types[3] && myTypes[3] == types[1]) { + } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { // 0 3 2 1 return it->second; - } - } else if (myTypes[0] == types[1]) { - if (myTypes[1] == types[0] && myTypes[3] == types[3]) { + } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { // 1 0 2 3 return it->second; - } else if (myTypes[1] == types[3] && myTypes[3] == types[0]) { + } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { // 1 3 2 0 return it->second; - } - } else if (myTypes[0] == types[3]) { - if (myTypes[1] == types[0] && myTypes[3] == types[1]) { + } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { // 3 0 2 1 return it->second; - } else if (myTypes[1] == types[1] && myTypes[3] == types[0]) { + } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { // 3 1 2 0 return it->second; - } } } } // END loop over parameters @@ -330,30 +328,24 @@ class ImproperParmHolder : private DihedralParmHolder { // Central (third) type must match if (wcm(myTypes[2], types[2], wc_)) { // Try all permutations - if (wcm(myTypes[0], types[0], wc_)) { - if (wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { + if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { // 0 1 2 3 return it->second; - } else if (wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { + } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { // 0 3 2 1 return it->second; - } - } else if (wcm(myTypes[0], types[1], wc_)) { - if (wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { + } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { // 1 0 2 3 return it->second; - } else if (wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { + } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { // 1 3 2 0 return it->second; - } - } else if (wcm(myTypes[0], types[3], wc_)) { - if (wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { + } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { // 3 0 2 1 return it->second; - } else if (wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { + } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { // 3 1 2 0 return it->second; - } } } } // END loop over parameters From a6324d53bdb1c2da609dac70d5458a4922904b34 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 1 Jan 2024 09:46:53 -0500 Subject: [PATCH 0226/1492] Add but dont yet enable sort --- src/AmberParamFile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AmberParamFile.cpp b/src/AmberParamFile.cpp index b09d0f35a8..317f85ee96 100644 --- a/src/AmberParamFile.cpp +++ b/src/AmberParamFile.cpp @@ -251,6 +251,7 @@ const types.AddName( symbols[1] ); types.AddName( symbols[2] ); types.AddName( symbols[3] ); + //types.SortImproperByAlpha("X"); // FIXME wildcard should be a static var ParameterHolders::RetType ret = prm.IP().AddParm(types, DihedralParmType(PK, PN, PHASE*Constants::DEGRAD), true); if (ret == ParameterHolders::UPDATED) From 818069b7b11bb21d6499eeb04fd96bd5ad4f2d30 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 1 Jan 2024 14:42:16 -0500 Subject: [PATCH 0227/1492] Use ImproperParmHolder --- src/ParameterHolders.h | 16 ++++++++++++++++ src/ParameterSet.cpp | 8 +++++--- src/ParameterSet.h | 6 +++--- src/Parm_CharmmPsf.cpp | 9 +++++++-- src/Topology.cpp | 26 ++++++++++++++++---------- src/Topology.h | 8 ++++---- 6 files changed, 51 insertions(+), 22 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 017289c4e0..0ceba700ba 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -280,6 +280,15 @@ class ImproperParmHolder : private DihedralParmHolder { } public: ImproperParmHolder() {} + /// \return Number of improper parameter sets + size_t size() const { return DihedralParmHolder::size(); } + /// \return True if no parameters + bool empty() const { return DihedralParmHolder::empty(); } + + typedef typename DihedralParmHolder::const_iterator const_iterator; + const_iterator begin() const { return DihedralParmHolder::begin(); } + const_iterator end() const { return DihedralParmHolder::end(); } + /** Set Wildcard char */ void SetWildcard(char wc) { DihedralParmHolder::SetWildcard(wc); } /** Add (or update) a single improper parameter for given atom types. */ @@ -287,6 +296,11 @@ class ImproperParmHolder : private DihedralParmHolder { AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { return DihedralParmHolder::AddParm( types, dp, allowUpdate ); } + /** This version takes an array of dihedral parameters. */ + ParameterHolders::RetType + AddParm(TypeNameHolder const& types, DihedralParmArray const& dpa, bool allowUpdate) { + return DihedralParmHolder::AddParm( types, dpa, allowUpdate ); + } /// \return Array of improper parameters matching given atom types. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); @@ -353,6 +367,8 @@ class ImproperParmHolder : private DihedralParmHolder { found = false; return DihedralParmArray(); } // END FindParam() + /// \return size in memory in bytes + size_t DataSize() const { return DihedralParmHolder::DataSize(); } private: }; #endif diff --git a/src/ParameterSet.cpp b/src/ParameterSet.cpp index ad071ec51c..4cb1039c8f 100644 --- a/src/ParameterSet.cpp +++ b/src/ParameterSet.cpp @@ -98,8 +98,10 @@ void ParameterSet::Print(CpptrajFile& Out) const { if (!impParm_.empty()) { Out.Printf("Improper parameters:\n"); Out.Printf("\t%6s %6s %6s %6s %12s %12s %12s\n", "Type1", "Type2", "Type3", "Type4", "Pk", "Pn", "Phase"); - for (ParmHolder::const_iterator bp = impParm_.begin(); bp != impParm_.end(); ++bp) - Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(bp->first[0]), *(bp->first[1]), *(bp->first[2]), *(bp->first[3]), bp->second.Pk(), bp->second.Pn(), bp->second.Phase()*Constants::RADDEG); + for (ImproperParmHolder::const_iterator it0 = impParm_.begin(); it0 != impParm_.end(); ++it0) + for (DihedralParmArray::const_iterator it1 = it0->second.begin(); + it1 != it0->second.end(); ++it1) + Out.Printf("\t%6s %6s %6s %6s : %12.4f %12.4f %12.4f\n", *(it0->first[0]), *(it0->first[1]), *(it0->first[2]), *(it0->first[3]), it1->Pk(), it1->Pn(), it1->Phase()*Constants::RADDEG); } if (!hydrophilicAtomTypes_.empty()) { Out.Printf("Hydrophilic atom types:"); @@ -126,7 +128,7 @@ int ParameterSet::UpdateParamSet(ParameterSet const& set1, UpdateCount& uc, int // Dihedral/improper parameters uc.nDihedralsUpdated_ = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral", verbose); // Improper parameters - uc.nImpropersUpdated_ = UpdateParameters< ParmHolder >(set0.IP(), set1.IP(), "improper", verbose); + uc.nImpropersUpdated_ = UpdateParameters< ImproperParmHolder >(set0.IP(), set1.IP(), "improper", verbose); // Urey-Bradley parameters uc.nUreyBradleyUpdated_ = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley", verbose); // Atom types diff --git a/src/ParameterSet.h b/src/ParameterSet.h index 072e4c598f..422ce2b345 100644 --- a/src/ParameterSet.h +++ b/src/ParameterSet.h @@ -15,7 +15,7 @@ class ParameterSet { ParmHolder& BP() { return bondParm_; } ParmHolder& AP() { return angleParm_; } ParmHolder& UB() { return ubParm_; } - ParmHolder& IP() { return impParm_; } + ImproperParmHolder& IP() { return impParm_; } DihedralParmHolder& DP() { return dihParm_; } ParmHolder& HB() { return HBparm_; } @@ -28,7 +28,7 @@ class ParameterSet { ParmHolder const& BP() const { return bondParm_; } ParmHolder const& AP() const { return angleParm_; } ParmHolder const& UB() const { return ubParm_; } - ParmHolder const& IP() const { return impParm_; } + ImproperParmHolder const& IP() const { return impParm_; } DihedralParmHolder const& DP() const { return dihParm_; } ParmHolder const& HB() const { return HBparm_; } std::string const& NbParamName() const { return NBname_; } @@ -83,7 +83,7 @@ class ParameterSet { ParmHolder bondParm_; ///< Hooke's law bond potential parameters ParmHolder angleParm_; ///< Hooke's law angle potential parameters ParmHolder ubParm_; ///< Urey-Bradley parameters - ParmHolder impParm_; ///< Improper dihedral parameters + ImproperParmHolder impParm_; ///< Improper dihedral parameters DihedralParmHolder dihParm_; ///< Cosine-series dihedral parameters ParmHolder HBparm_; ///< LJ 10-12 A-B parameters for hydrogen bonds NsetType hydrophilicAtomTypes_; ///< Hold names of hydrophilic atom types diff --git a/src/Parm_CharmmPsf.cpp b/src/Parm_CharmmPsf.cpp index 0f59b32efb..b5c7702b15 100644 --- a/src/Parm_CharmmPsf.cpp +++ b/src/Parm_CharmmPsf.cpp @@ -113,8 +113,13 @@ int Parm_CharmmPsf::ReadDihedrals(BufferedLine& infile, int ndihedral, const cha } } else { // Charmm Improper. Expect only one paramter per type. - DihedralParmType ipt = params_.IP().FindParam( types, found ); - parmOut.AddCharmmImproper( dih, ipt ); + DihedralParmArray ipa = params_.IP().FindParam( types, found ); + if (found) { + if (ipa.size() > 1) + mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." + "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); + parmOut.AddCharmmImproper( dih, ipa.front() ); + } } if (!found) { mprintf("Warning: Parameters not found for %s %s - %s - %s - %s\n", typestr, parmOut.AtomMaskName(a1).c_str(), parmOut.AtomMaskName(a2).c_str(), parmOut.AtomMaskName(a3).c_str(), parmOut.AtomMaskName(a4).c_str()); diff --git a/src/Topology.cpp b/src/Topology.cpp index 24a720c61b..af29e46fa3 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2119,7 +2119,7 @@ static inline void GetAngleParams(ParmHolder& AP, std::vector& IP, std::vector const& atoms, DihedralArray const& imp, DihedralParmArray const& ipa) { +static inline void GetImproperParams(ImproperParmHolder& IP, std::vector const& atoms, DihedralArray const& imp, DihedralParmArray const& ipa) { for (DihedralArray::const_iterator b = imp.begin(); b != imp.end(); ++b) { if (b->Idx() != -1) { @@ -2136,7 +2136,7 @@ static inline void GetImproperParams(ParmHolder& IP, std::vect } // GetDihedralParams() -static inline void GetDihedralParams(DihedralParmHolder& DP, ParmHolder& IP, std::vector const& atoms, DihedralArray const& dih, DihedralParmArray const& dpa) { +static inline void GetDihedralParams(DihedralParmHolder& DP, ImproperParmHolder& IP, std::vector const& atoms, DihedralArray const& dih, DihedralParmArray const& dpa) { for (DihedralArray::const_iterator b = dih.begin(); b != dih.end(); ++b) { if (b->Idx() != -1) { @@ -2696,7 +2696,7 @@ void Topology::AssignAngleParams(ParmHolder const& newAngleParams } /** Set parameters for improper dihedrals in given improper dihedral array. */ -void Topology::AssignImproperParm(ParmHolder const& newImproperParams, +void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, DihedralArray& impropers) { for (DihedralArray::iterator imp = impropers.begin(); imp != impropers.end(); ++imp) { @@ -2708,7 +2708,7 @@ void Topology::AssignImproperParm(ParmHolder const& newImprope bool found; // See if parameter is present. int idx = -1; - DihedralParmType ip = newImproperParams.FindParam( types, found ); + DihedralParmArray ipa = newImproperParams.FindParam( types, found ); if (!found) { mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(imp->A1()).c_str(), @@ -2717,14 +2717,17 @@ void Topology::AssignImproperParm(ParmHolder const& newImprope TruncResAtomNameNum(imp->A4()).c_str(), *types[0], *types[1], *types[3], *types[4]); } else { - idx = addTorsionParm( chamber_.SetImproperParm(), ip ); + if (ipa.size() > 1) + mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." + "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); + idx = addTorsionParm( chamber_.SetImproperParm(), ipa.front() ); } imp->SetIdx( idx ); } } /** Replace any current improper parameters with given improper parameters. */ -void Topology::AssignImproperParams(ParmHolder const& newImproperParams) { +void Topology::AssignImproperParams(ImproperParmHolder const& newImproperParams) { chamber_.SetImproperParm().clear(); AssignImproperParm( newImproperParams, chamber_.SetImpropers() ); } @@ -2734,7 +2737,7 @@ void Topology::AssignImproperParams(ParmHolder const& newImpro * this function in order for improper and 1-4 detection to work. */ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, - ParmHolder const& newImproperParams, + ImproperParmHolder const& newImproperParams, DihedralArray& dihedralsIn) { // Dihedrals can be a bit of a pain since there can be multiple @@ -2789,7 +2792,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, bool found; if (isImproper) { // ----- This is actually an improper dihedral. ---------------- - DihedralParmType ip = newImproperParams.FindParam( types, found ); + DihedralParmArray ipa = newImproperParams.FindParam( types, found ); int idx = -1; if (!found) { mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", @@ -2799,7 +2802,10 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, TruncResAtomNameNum(dih->A4()).c_str(), *types[0], *types[1], *types[2], *types[3]); } else { - idx = addTorsionParm( dihedralparm_, ip ); + if (ipa.size() > 1) + mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." + "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); + idx = addTorsionParm( dihedralparm_, ipa.front() ); } DihedralType mydih = *dih; mydih.SetIdx( idx ); @@ -2896,7 +2902,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, } /** Replace any current dihedral parameters with given dihedral parameters. */ -void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, ParmHolder const& newImproperParams) { +void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams) { dihedralparm_.clear(); AssignDihedralParm( newDihedralParams, newImproperParams, dihedrals_ ); AssignDihedralParm( newDihedralParams, newImproperParams, dihedralsh_ ); diff --git a/src/Topology.h b/src/Topology.h index 354fe9509e..8c049510a1 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -139,8 +139,8 @@ class Topology { void AddDihedral(int i, int j, int k, int l) { AddDihedral(DihedralType(i,j,k,l,-1), -1); } void AddDihedral(DihedralType const&, bool); void AddDihedral(DihedralType const&, DihedralParmType const&); - void AssignImproperParams(ParmHolder const&); - void AssignDihedralParams(DihedralParmHolder const&, ParmHolder const&); + void AssignImproperParams(ImproperParmHolder const&); + void AssignDihedralParams(DihedralParmHolder const&, ImproperParmHolder const&); // ----- CMAP-specific routines -------------- bool HasCmap() const { return !cmapGrid_.empty(); } CmapGridArray const& CmapGrid() const { return cmapGrid_; } @@ -300,8 +300,8 @@ class Topology { void AssignAtomTypeParm(ParmHolder const&); void AssignBondParm(ParmHolder const&, BondArray&, BondParmArray&, const char*) const; void AssignAngleParm(ParmHolder const&, AngleArray&); - void AssignImproperParm(ParmHolder const&, DihedralArray&); - void AssignDihedralParm(DihedralParmHolder const&, ParmHolder const&, DihedralArray&); + void AssignImproperParm(ImproperParmHolder const&, DihedralArray&); + void AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, DihedralArray&); static const NonbondType LJ_EMPTY; std::vector atoms_; From af62e6314ab56dac6356fc1055148e374d47ad91 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 1 Jan 2024 20:56:43 -0500 Subject: [PATCH 0228/1492] Save atom ordering --- src/ParameterHolders.h | 31 ++++++++++++++++++++++++++++--- src/Topology.cpp | 20 ++++++++++++++++++-- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 0ceba700ba..898cc7a879 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -237,7 +237,7 @@ class DihedralParmHolder { const_iterator begin() const { return bpmap_.begin(); } const_iterator end() const { return bpmap_.end(); } /// \return Array of dihedral parameters matching given atom types. - virtual DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { + DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { found = true; for (const_iterator it = begin(); it != end(); ++it) if (it->first.Match_NoWC( types )) return it->second; @@ -279,12 +279,20 @@ class ImproperParmHolder : private DihedralParmHolder { return (t0 == wc || t0 == t1); } public: + /// Denote returned parameter atom type order + enum OrderType { O_013, + O_031, + O_103, + O_130, + O_301, + O_310 }; ImproperParmHolder() {} /// \return Number of improper parameter sets size_t size() const { return DihedralParmHolder::size(); } /// \return True if no parameters bool empty() const { return DihedralParmHolder::empty(); } - + /// \return ordering of last type + //OrderType LastOrder() const { return lastOrder_; } typedef typename DihedralParmHolder::const_iterator const_iterator; const_iterator begin() const { return DihedralParmHolder::begin(); } const_iterator end() const { return DihedralParmHolder::end(); } @@ -301,8 +309,12 @@ class ImproperParmHolder : private DihedralParmHolder { AddParm(TypeNameHolder const& types, DihedralParmArray const& dpa, bool allowUpdate) { return DihedralParmHolder::AddParm( types, dpa, allowUpdate ); } - /// \return Array of improper parameters matching given atom types. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { + OrderType lastOrder; + return FindParam(types, found, lastOrder); + } + /// \return Array of improper parameters matching given atom types. + DihedralParmArray FindParam(TypeNameHolder const& types, bool& found, OrderType& lastOrder_) const { //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); found = true; // First, no wildcard @@ -316,21 +328,27 @@ class ImproperParmHolder : private DihedralParmHolder { // Try all permutations if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { // 0 1 2 3 + lastOrder_ = O_013; return it->second; } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { // 0 3 2 1 + lastOrder_ = O_031; return it->second; } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { // 1 0 2 3 + lastOrder_ = O_103; return it->second; } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { // 1 3 2 0 + lastOrder_ = O_130; return it->second; } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { // 3 0 2 1 + lastOrder_ = O_301; return it->second; } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { // 3 1 2 0 + lastOrder_ = O_310; return it->second; } } @@ -344,21 +362,27 @@ class ImproperParmHolder : private DihedralParmHolder { // Try all permutations if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { // 0 1 2 3 + lastOrder_ = O_013; return it->second; } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { // 0 3 2 1 + lastOrder_ = O_031; return it->second; } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { // 1 0 2 3 + lastOrder_ = O_103; return it->second; } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { // 1 3 2 0 + lastOrder_ = O_130; return it->second; } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { // 3 0 2 1 + lastOrder_ = O_301; return it->second; } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { // 3 1 2 0 + lastOrder_ = O_310; return it->second; } } @@ -370,5 +394,6 @@ class ImproperParmHolder : private DihedralParmHolder { /// \return size in memory in bytes size_t DataSize() const { return DihedralParmHolder::DataSize(); } private: + //OrderType lastOrder_; ///< Atom ordering of the last returned parameter }; #endif diff --git a/src/Topology.cpp b/src/Topology.cpp index af29e46fa3..f42ff00ea6 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2695,6 +2695,18 @@ void Topology::AssignAngleParams(ParmHolder const& newAngleParams AssignAngleParm( newAngleParams, anglesh_ ); } +/** Reorder improper atoms so that they match the parameter. */ +static void match_improper_to_parm(DihedralType& imp, TypeNameHolder const& types, ImproperParmHolder::OrderType order) +{ + mprintf("DEBUG: Improper types : %4s %4s %4s %4s (order %i)\n", *(types[0]), *(types[1]), *(types[2]), *(types[3]), + //*(atoms_[imp->A1()].Type()), + //*(atoms_[imp->A2()].Type()), + //*(atoms_[imp->A3()].Type()), + //*(atoms_[imp->A4()].Type()), + (int)order); + //mprintf("DEBUG: Parm types : %4s %4s %4s %4s\n", +} + /** Set parameters for improper dihedrals in given improper dihedral array. */ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, DihedralArray& impropers) @@ -2708,7 +2720,8 @@ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, bool found; // See if parameter is present. int idx = -1; - DihedralParmArray ipa = newImproperParams.FindParam( types, found ); + ImproperParmHolder::OrderType lastOrder; + DihedralParmArray ipa = newImproperParams.FindParam( types, found, lastOrder ); if (!found) { mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(imp->A1()).c_str(), @@ -2720,6 +2733,7 @@ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, if (ipa.size() > 1) mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); + match_improper_to_parm( *imp, types, lastOrder ); idx = addTorsionParm( chamber_.SetImproperParm(), ipa.front() ); } imp->SetIdx( idx ); @@ -2792,7 +2806,8 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, bool found; if (isImproper) { // ----- This is actually an improper dihedral. ---------------- - DihedralParmArray ipa = newImproperParams.FindParam( types, found ); + ImproperParmHolder::OrderType lastOrder; + DihedralParmArray ipa = newImproperParams.FindParam( types, found, lastOrder ); int idx = -1; if (!found) { mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", @@ -2805,6 +2820,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, if (ipa.size() > 1) mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); + match_improper_to_parm( *dih, types, lastOrder ); idx = addTorsionParm( dihedralparm_, ipa.front() ); } DihedralType mydih = *dih; From 4559bf94c4cb5eebd086d34d1643a0d85b6d5ad7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 2 Jan 2024 11:57:57 -0500 Subject: [PATCH 0229/1492] Add function for reordering improper and a test --- src/ParameterHolders.h | 13 +++++++++++ src/ParameterTypes.h | 4 ++++ unitTests/ImproperParmHolder/main.cpp | 31 +++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 898cc7a879..610b1de79d 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -278,6 +278,8 @@ class ImproperParmHolder : private DihedralParmHolder { static inline bool wcm(NameType const& t0, NameType const& t1, NameType const& wc) { return (t0 == wc || t0 == t1); } + /// Function for swapping integers + static inline void swp(int& i1, int& i2) { int tmp = i1; i1 = i2; i2 = tmp; } public: /// Denote returned parameter atom type order enum OrderType { O_013, @@ -313,6 +315,17 @@ class ImproperParmHolder : private DihedralParmHolder { OrderType lastOrder; return FindParam(types, found, lastOrder); } + /// Remap the given improper according to the desired order + static void ReorderImproper(DihedralType& imp, OrderType order) { + switch (order) { + case O_013 : break; + case O_031 : swp( imp.ChangeA2(), imp.ChangeA4() ); break; + case O_103 : swp( imp.ChangeA1(), imp.ChangeA2() ); break; + case O_130 : swp( imp.ChangeA1(), imp.ChangeA4() ); swp( imp.ChangeA1(), imp.ChangeA2() ); break; + case O_301 : swp( imp.ChangeA2(), imp.ChangeA4() ); swp( imp.ChangeA1(), imp.ChangeA2() ); break; + case O_310 : swp( imp.ChangeA1(), imp.ChangeA4() ); break; + } + } /// \return Array of improper parameters matching given atom types. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found, OrderType& lastOrder_) const { //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 9098f561a4..99dbd05568 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -233,6 +233,10 @@ class DihedralType { void SetIdx(int i) { idx_ = i; } void SetSkip14(bool b) { skip14_ = b; } void SetImproper(bool b) { improper_ = b; } + int& ChangeA1() { return a1_; } + int& ChangeA2() { return a2_; } + int& ChangeA3() { return a3_; } + int& ChangeA4() { return a4_; } /// \return type based on skip 1-4 (end) and improper status inline Dtype Type() const { if (skip14_ && improper_) return BOTH; diff --git a/unitTests/ImproperParmHolder/main.cpp b/unitTests/ImproperParmHolder/main.cpp index 056d4c2d36..ef6bd4fa28 100644 --- a/unitTests/ImproperParmHolder/main.cpp +++ b/unitTests/ImproperParmHolder/main.cpp @@ -7,6 +7,10 @@ static const int Err(const char* msg) { return 1; } +/*static void printImp(DihedralType const& imp) { + printf("%i %i %i %i\n", imp.A1(), imp.A2(), imp.A3(), imp.A4()); +}*/ + int main() { TypeNameHolder ip0(4); ip0.AddName("N*"); @@ -55,5 +59,32 @@ int main() { impropers = IP.FindParam( ip0, found ); if (found) return Err("Improper parameter search found something when it should not have."); + DihedralType imp( 0, 1, 2, 3, -1 ); + ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_013 ); + if (imp.A1() != 0 || imp.A2() != 1 || imp.A3() != 2 || imp.A4() != 3) + return Err("Improper reorder failed (O_013)."); + ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_031 ); + if (imp.A1() != 0 || imp.A2() != 3 || imp.A3() != 2 || imp.A4() != 1) + return Err("Improper reorder failed (O_031)."); + imp = DihedralType( 0, 1, 2, 3, -1 ); + ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_103 ); + if (imp.A1() != 1 || imp.A2() != 0 || imp.A3() != 2 || imp.A4() != 3) + return Err("Improper reorder failed (O_103)."); + imp = DihedralType( 0, 1, 2, 3, -1 ); + ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_130 ); + //printImp(imp); + if (imp.A1() != 1 || imp.A2() != 3 || imp.A3() != 2 || imp.A4() != 0) + return Err("Improper reorder failed (O_130)."); + imp = DihedralType( 0, 1, 2, 3, -1 ); + ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_301 ); + //printImp(imp); + if (imp.A1() != 3 || imp.A2() != 0 || imp.A3() != 2 || imp.A4() != 1) + return Err("Improper reorder failed (O_301)."); + imp = DihedralType( 0, 1, 2, 3, -1 ); + ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_310 ); + //printImp(imp); + if (imp.A1() != 3 || imp.A2() != 1 || imp.A3() != 2 || imp.A4() != 0) + return Err("Improper reorder failed (O_310)."); + return 0; } From 642690a3689af9e5b305018bb1d560462b225465 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 2 Jan 2024 16:08:49 -0500 Subject: [PATCH 0230/1492] Have improper FindParam do improper reordering --- src/ParameterHolders.h | 113 +++++++++++++++++++++++++++++++---------- 1 file changed, 87 insertions(+), 26 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 610b1de79d..433fd6a036 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -311,12 +311,9 @@ class ImproperParmHolder : private DihedralParmHolder { AddParm(TypeNameHolder const& types, DihedralParmArray const& dpa, bool allowUpdate) { return DihedralParmHolder::AddParm( types, dpa, allowUpdate ); } - DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { - OrderType lastOrder; - return FindParam(types, found, lastOrder); - } - /// Remap the given improper according to the desired order - static void ReorderImproper(DihedralType& imp, OrderType order) { + private: + /// Remap the given improper according to the desired order, correct for wildcards in given types + void ReorderImproper(DihedralType& imp, OrderType order, TypeNameHolder const& types) const { switch (order) { case O_013 : break; case O_031 : swp( imp.ChangeA2(), imp.ChangeA4() ); break; @@ -325,13 +322,42 @@ class ImproperParmHolder : private DihedralParmHolder { case O_301 : swp( imp.ChangeA2(), imp.ChangeA4() ); swp( imp.ChangeA1(), imp.ChangeA2() ); break; case O_310 : swp( imp.ChangeA1(), imp.ChangeA4() ); break; } + if (wc_.len() > 0 && types.Size() > 0) { + // If there are wildcards, need to order matching types by atom index. + // General order of imp should now match types due to above swaps. + bool wc1 = (types[0] == wc_); + bool wc2 = (types[1] == wc_); + bool wc4 = (types[3] == wc_); + //mprintf("DEBUG: %s WC0=%i %s WC1=%i %s WC3=%i\n", *types[0], (int)wc1, *types[1], (int)wc2, *types[3], (int)wc4); + if (wc4 && wc2 && wc1) { + // All three wildcard - should be rare but need to check. + if (imp.A1() > imp.A2()) swp(imp.ChangeA1(), imp.ChangeA2()); + if (imp.A2() > imp.A4()) swp(imp.ChangeA2(), imp.ChangeA4()); + if (imp.A1() > imp.A2()) swp(imp.ChangeA1(), imp.ChangeA2()); + if (imp.A2() > imp.A4()) swp(imp.ChangeA2(), imp.ChangeA4()); + } else if (wc1 && wc2) { + if (imp.A1() > imp.A2()) swp(imp.ChangeA1(), imp.ChangeA2()); + } else if (wc1 && wc4) { + if (imp.A1() > imp.A4()) swp(imp.ChangeA1(), imp.ChangeA4()); + } else if (wc2 && wc4) { + if (imp.A2() > imp.A4()) swp(imp.ChangeA2(), imp.ChangeA4()); + } + } } - /// \return Array of improper parameters matching given atom types. - DihedralParmArray FindParam(TypeNameHolder const& types, bool& found, OrderType& lastOrder_) const { + public: + /// Remap the given improper according to the desired order. Used by unit test to check that reordering works. + void ReorderImproper(DihedralType& imp, OrderType order) const { + ReorderImproper(imp, order, TypeNameHolder()); + } + /// \return Array of improper parameters matching given atom types. Improper will be reordered to match parameter order. + DihedralParmArray FindParam(TypeNameHolder const& types, bool& found, DihedralType& imp, bool& reordered) const { //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); - found = true; + found = false; + reordered = false; // First, no wildcard - for (const_iterator it = begin(); it != end(); ++it) { + const_iterator it = begin(); + OrderType lastOrder_; + for (; it != end(); ++it) { TypeNameHolder const& myTypes = it->first; // Central (third) type must match if (myTypes[2] == types[2]) { @@ -342,33 +368,46 @@ class ImproperParmHolder : private DihedralParmHolder { if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { // 0 1 2 3 lastOrder_ = O_013; - return it->second; + found = true; + //return it->second; + break; } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { // 0 3 2 1 lastOrder_ = O_031; - return it->second; + found = true; + //return it->second; + break; } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { // 1 0 2 3 lastOrder_ = O_103; - return it->second; + found = true; + //return it->second; + break; } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { // 1 3 2 0 lastOrder_ = O_130; - return it->second; + found = true; + //return it->second; + break; } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { // 3 0 2 1 lastOrder_ = O_301; - return it->second; + found = true; + //return it->second; + break; } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { // 3 1 2 0 lastOrder_ = O_310; - return it->second; + found = true; + //return it->second; + break; } } } // END loop over parameters // Wildcard if present - if (wc_.len() > 0) { - for (const_iterator it = begin(); it != end(); ++it) { + if (!found && wc_.len() > 0) { + it = begin(); + for (; it != end(); ++it) { TypeNameHolder const& myTypes = it->first; // Central (third) type must match if (wcm(myTypes[2], types[2], wc_)) { @@ -376,34 +415,56 @@ class ImproperParmHolder : private DihedralParmHolder { if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { // 0 1 2 3 lastOrder_ = O_013; - return it->second; + found = true; + //return it->second; + break; } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { // 0 3 2 1 lastOrder_ = O_031; - return it->second; + found = true; + //return it->second; + break; } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { // 1 0 2 3 lastOrder_ = O_103; - return it->second; + found = true; + //return it->second; + break; } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { // 1 3 2 0 lastOrder_ = O_130; - return it->second; + found = true; + //return it->second; + break; } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { // 3 0 2 1 lastOrder_ = O_301; - return it->second; + found = true; + //return it->second; + break; } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { // 3 1 2 0 lastOrder_ = O_310; - return it->second; + found = true; + //return it->second; + break; } } } // END loop over parameters } // END wildcard matches - found = false; - return DihedralParmArray(); + //found = false; + if (!found) return DihedralParmArray(); + // We have found a parameter. Do any reordering. + if (lastOrder_ != O_013) reordered = true; + ReorderImproper( imp, lastOrder_, it->first ); + return it->second; } // END FindParam() + /// \return Dihedral parm array corresponding to types. Use by unit test. + DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { + DihedralType blank; + bool reordered; + return FindParam(types, found, blank, reordered); + } /// \return size in memory in bytes size_t DataSize() const { return DihedralParmHolder::DataSize(); } private: From 4bd249a305e9913cd7b553b1caaedd23f6cd3c85 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 2 Jan 2024 16:09:46 -0500 Subject: [PATCH 0231/1492] Enable unit test and update for updated FindParam --- unitTests/ImproperParmHolder/main.cpp | 12 ++++++------ unitTests/Makefile | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/unitTests/ImproperParmHolder/main.cpp b/unitTests/ImproperParmHolder/main.cpp index ef6bd4fa28..c19ebc547f 100644 --- a/unitTests/ImproperParmHolder/main.cpp +++ b/unitTests/ImproperParmHolder/main.cpp @@ -60,28 +60,28 @@ int main() { if (found) return Err("Improper parameter search found something when it should not have."); DihedralType imp( 0, 1, 2, 3, -1 ); - ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_013 ); + IP.ReorderImproper( imp, ImproperParmHolder::O_013 ); if (imp.A1() != 0 || imp.A2() != 1 || imp.A3() != 2 || imp.A4() != 3) return Err("Improper reorder failed (O_013)."); - ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_031 ); + IP.ReorderImproper( imp, ImproperParmHolder::O_031 ); if (imp.A1() != 0 || imp.A2() != 3 || imp.A3() != 2 || imp.A4() != 1) return Err("Improper reorder failed (O_031)."); imp = DihedralType( 0, 1, 2, 3, -1 ); - ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_103 ); + IP.ReorderImproper( imp, ImproperParmHolder::O_103 ); if (imp.A1() != 1 || imp.A2() != 0 || imp.A3() != 2 || imp.A4() != 3) return Err("Improper reorder failed (O_103)."); imp = DihedralType( 0, 1, 2, 3, -1 ); - ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_130 ); + IP.ReorderImproper( imp, ImproperParmHolder::O_130 ); //printImp(imp); if (imp.A1() != 1 || imp.A2() != 3 || imp.A3() != 2 || imp.A4() != 0) return Err("Improper reorder failed (O_130)."); imp = DihedralType( 0, 1, 2, 3, -1 ); - ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_301 ); + IP.ReorderImproper( imp, ImproperParmHolder::O_301 ); //printImp(imp); if (imp.A1() != 3 || imp.A2() != 0 || imp.A3() != 2 || imp.A4() != 1) return Err("Improper reorder failed (O_301)."); imp = DihedralType( 0, 1, 2, 3, -1 ); - ImproperParmHolder::ReorderImproper( imp, ImproperParmHolder::O_310 ); + IP.ReorderImproper( imp, ImproperParmHolder::O_310 ); //printImp(imp); if (imp.A1() != 3 || imp.A2() != 1 || imp.A3() != 2 || imp.A4() != 0) return Err("Improper reorder failed (O_310)."); diff --git a/unitTests/Makefile b/unitTests/Makefile index a099ae2f00..4e1b304426 100644 --- a/unitTests/Makefile +++ b/unitTests/Makefile @@ -22,6 +22,9 @@ unit.Range: unit.TypeNameHolder: @-cd TypeNameHolder && ./UnitTest.sh $(OPT) +unit.ImproperParmHolder: + @-cd ImproperParmHolder && ./UnitTest.sh $(OPT) + # ----- Every unit test should go here ----------- COMPLETETESTS= \ unit.NameType \ @@ -29,7 +32,8 @@ COMPLETETESTS= \ unit.GistEntropyUtils \ unit.StringRoutines \ unit.Range \ - unit.TypeNameHolder + unit.TypeNameHolder \ + unit.ImproperParmHolder test.cpptraj: $(COMPLETETESTS) From 9ffa4855ed7ba83d29691bc385f63ac7b84e931d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 2 Jan 2024 16:17:42 -0500 Subject: [PATCH 0232/1492] FindParam does reordering. Just warn if reordering has occurred. --- src/Topology.cpp | 38 +++++++++++++++++++++++--------------- src/Topology.h | 1 + 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index f42ff00ea6..0bcb9d694b 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2695,16 +2695,20 @@ void Topology::AssignAngleParams(ParmHolder const& newAngleParams AssignAngleParm( newAngleParams, anglesh_ ); } -/** Reorder improper atoms so that they match the parameter. */ -static void match_improper_to_parm(DihedralType& imp, TypeNameHolder const& types, ImproperParmHolder::OrderType order) +/** Warn if improper atoms have been reordered so they match the parameter. */ +void Topology::warn_improper_reorder(DihedralType const& imp0, DihedralType const& imp) +const { - mprintf("DEBUG: Improper types : %4s %4s %4s %4s (order %i)\n", *(types[0]), *(types[1]), *(types[2]), *(types[3]), - //*(atoms_[imp->A1()].Type()), - //*(atoms_[imp->A2()].Type()), - //*(atoms_[imp->A3()].Type()), - //*(atoms_[imp->A4()].Type()), - (int)order); - //mprintf("DEBUG: Parm types : %4s %4s %4s %4s\n", + mprintf("Warning: Improper types have been reordered from %4s %4s %4s %4s", + *(atoms_[imp0.A1()].Type()), + *(atoms_[imp0.A2()].Type()), + *(atoms_[imp0.A3()].Type()), + *(atoms_[imp0.A4()].Type())); + mprintf(" to %4s %4s %4s %4s to match improper parameter.\n", + *(atoms_[imp.A1()].Type()), + *(atoms_[imp.A2()].Type()), + *(atoms_[imp.A3()].Type()), + *(atoms_[imp.A4()].Type())); } /** Set parameters for improper dihedrals in given improper dihedral array. */ @@ -2720,8 +2724,10 @@ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, bool found; // See if parameter is present. int idx = -1; - ImproperParmHolder::OrderType lastOrder; - DihedralParmArray ipa = newImproperParams.FindParam( types, found, lastOrder ); + //ImproperParmHolder::OrderType lastOrder; + DihedralType imp0 = *imp; + bool reordered; + DihedralParmArray ipa = newImproperParams.FindParam( types, found, *imp, reordered ); if (!found) { mprintf("Warning: Parameter not found for improper %s-%s-%s-%s (%s-%s-%s-%s)\n", TruncResAtomNameNum(imp->A1()).c_str(), @@ -2733,7 +2739,7 @@ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, if (ipa.size() > 1) mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); - match_improper_to_parm( *imp, types, lastOrder ); + if (reordered) warn_improper_reorder( imp0, *imp ); idx = addTorsionParm( chamber_.SetImproperParm(), ipa.front() ); } imp->SetIdx( idx ); @@ -2806,8 +2812,10 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, bool found; if (isImproper) { // ----- This is actually an improper dihedral. ---------------- - ImproperParmHolder::OrderType lastOrder; - DihedralParmArray ipa = newImproperParams.FindParam( types, found, lastOrder ); + //ImproperParmHolder::OrderType lastOrder; + DihedralType dih0 = *dih; + bool reordered; + DihedralParmArray ipa = newImproperParams.FindParam( types, found, *dih, reordered ); int idx = -1; if (!found) { mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", @@ -2820,7 +2828,7 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, if (ipa.size() > 1) mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); - match_improper_to_parm( *dih, types, lastOrder ); + if (reordered) warn_improper_reorder( dih0, *dih ); idx = addTorsionParm( dihedralparm_, ipa.front() ); } DihedralType mydih = *dih; diff --git a/src/Topology.h b/src/Topology.h index 8c049510a1..399c47f83d 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -300,6 +300,7 @@ class Topology { void AssignAtomTypeParm(ParmHolder const&); void AssignBondParm(ParmHolder const&, BondArray&, BondParmArray&, const char*) const; void AssignAngleParm(ParmHolder const&, AngleArray&); + void warn_improper_reorder(DihedralType const&, DihedralType const&) const; void AssignImproperParm(ImproperParmHolder const&, DihedralArray&); void AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, DihedralArray&); From 0a2ae3ff34fe09be3c726f5f4708ec6311d592aa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 09:32:26 -0500 Subject: [PATCH 0233/1492] Remove function that will never be used --- src/Topology.cpp | 6 ------ src/Topology.h | 1 - 2 files changed, 7 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 0bcb9d694b..531a6cd17b 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -898,12 +898,6 @@ void Topology::AddBond(BondType const& bndIn, bool isH) { atoms_[bndIn.A2()].AddBondToIdx( bndIn.A1() ); } -/** Sort bond arrays. May want to do this to e.g. match LEAP bond ordering. */ -/*void Topology::SortBonds() { - std::sort(bonds_.begin(), bonds_.end()); - std::sort(bondsh_.begin(), bondsh_.end()); -}*/ - /** Check if given angle parm exists in given angle parm array. Add if not. * \return Index in angle parm array. */ diff --git a/src/Topology.h b/src/Topology.h index 399c47f83d..8c26c1cfb6 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -115,7 +115,6 @@ class Topology { void AddBond(BondType const&, bool); void AddBond(int, int, BondParmType const&); int RemoveBond(int, int); - //void SortBonds(); void AssignBondParams(ParmHolder const&); // ----- Angle-specific routines ------------- size_t Nangles() const { return angles_.size()+anglesh_.size(); } From 9bdab484d1b6a34c9d4ade1000420a71f832f914 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 09:46:55 -0500 Subject: [PATCH 0234/1492] Rename file to better reflect what the functions do --- src/Structure/{GenerateAngles.cpp => GenerateConnectivity.cpp} | 0 src/Structure/{GenerateAngles.h => GenerateConnectivity.h} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/Structure/{GenerateAngles.cpp => GenerateConnectivity.cpp} (100%) rename src/Structure/{GenerateAngles.h => GenerateConnectivity.h} (100%) diff --git a/src/Structure/GenerateAngles.cpp b/src/Structure/GenerateConnectivity.cpp similarity index 100% rename from src/Structure/GenerateAngles.cpp rename to src/Structure/GenerateConnectivity.cpp diff --git a/src/Structure/GenerateAngles.h b/src/Structure/GenerateConnectivity.h similarity index 100% rename from src/Structure/GenerateAngles.h rename to src/Structure/GenerateConnectivity.h From 30039cd54a062fb8cbec20e1a4e2fffb2643d538 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 09:52:20 -0500 Subject: [PATCH 0235/1492] Change names to better reflect what happens, remove old code. --- src/Structure/GenerateConnectivity.cpp | 42 +++++++++++++++++++------- src/Structure/GenerateConnectivity.h | 10 +++--- src/Structure/structuredepend | 4 +-- src/Structure/structurefiles | 2 +- 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index 078ded5a22..cf795f8a36 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -1,9 +1,9 @@ -#include "GenerateAngles.h" +#include "GenerateConnectivity.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../ParameterTypes.h" #include "../Topology.h" -#include // std::sort +#include // std::swap static inline void enumerateAngles(int at1, int at2, Topology& topIn) { Atom const& A2 = topIn[at2]; @@ -48,8 +48,12 @@ static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { } } -/* Set angles and dihedrals in given topology based on current bond arrays. */ -int Cpptraj::Structure::GenerateAngles(Topology& topIn) { +/* Set bonds, angles, and dihedral arrays for a given topology based on + * current atom connectivity. + * This is done in the same manner as LEaP, which goes in increasing + * residue order but decreasing atom index. + */ +int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { if (topIn.Nbonds() < 1) { mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); return 0; @@ -65,15 +69,31 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { //return 0; } if (has_angles && has_dihedrals) return 0; + // Clear existing bond information TODO clear angles and dihedrals? + topIn.ClearBondArrays(); // Create a combined bonds array BondArray allBonds; allBonds.reserve(topIn.Nbonds()); - for (BondArray::const_iterator it = topIn.Bonds().begin(); it != topIn.Bonds().end(); ++it) - allBonds.push_back( *it ); - for (BondArray::const_iterator it = topIn.BondsH().begin(); it != topIn.BondsH().end(); ++it) - allBonds.push_back( *it ); - std::sort( allBonds.begin(), allBonds.end() ); + int bidx = 0; + for (int ires = 0; ires < topIn.Nres(); ires++) + { + Residue const& res = topIn.Res(ires); + for (int iat = res.LastAtom()-1; iat >= res.FirstAtom(); iat--) + { + Atom const& At = topIn[iat]; + for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) + { + if (iat < *bat) { + mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + allBonds.push_back( BondType(iat, *bat, -1) ); + topIn.AddToBondArrays( BondType(iat, *bat, -1) ); + } + //else + // mprintf("DEBUG: X i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + } + } + } mprintf("DEBUG: Sorted bonds:\n"); for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) @@ -82,8 +102,8 @@ int Cpptraj::Structure::GenerateAngles(Topology& topIn) { topIn.AtomMaskName(it->A2()).c_str()); // Angles - AngleArray angles; - AngleArray anglesH; + //AngleArray angles; + //AngleArray anglesH; for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) { if (!has_angles) { diff --git a/src/Structure/GenerateConnectivity.h b/src/Structure/GenerateConnectivity.h index 09bd38785b..d56585b9dc 100644 --- a/src/Structure/GenerateConnectivity.h +++ b/src/Structure/GenerateConnectivity.h @@ -1,13 +1,13 @@ -#ifndef INC_STRUCTURE_GENERATEANGLES_H -#define INC_STRUCTURE_GENERATEANGLES_H +#ifndef INC_STRUCTURE_GENERATECONNECTIVITY_H +#define INC_STRUCTURE_GENERATECONNECTIVITY_H class Topology; class AtomType; template class ParmHolder; namespace Cpptraj { namespace Structure { -/// Generate angles from bonds in a Topology -int GenerateAngles(Topology&); -/// Generate impropers +/// Generate bond/angle/torsion arrays from atom connectivity in a Topology +int GenerateBondAngleTorsionArrays(Topology&); +/// Generate impropers in a Topology int GenerateImpropers(Topology&, ParmHolder const&); } } diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index bd21185aeb..b99a9b01ec 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -3,10 +3,10 @@ Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Co Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h -GenerateAngles.o : GenerateAngles.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateAngles.h +GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h -Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h +Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index a6449d535b..47dcb912e4 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -5,7 +5,7 @@ STRUCTURE_SOURCES= \ Disulfide.cpp \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ - GenerateAngles.cpp \ + GenerateConnectivity.cpp \ HisProt.cpp \ InternalCoords.cpp \ Model.cpp \ From e8b71378f36052ab040321b764801d04fefb8d0a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 09:52:35 -0500 Subject: [PATCH 0236/1492] Update CMakeLists --- src/Structure/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index c88fecfe3f..7350e7edca 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -5,7 +5,7 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp - ${CMAKE_CURRENT_LIST_DIR}/GenerateAngles.cpp + ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivity.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp ${CMAKE_CURRENT_LIST_DIR}/Model.cpp From f2d37bdbdd93573f3fa3146f75e6ac77126377f6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 09:58:42 -0500 Subject: [PATCH 0237/1492] Update for changed function name --- src/Exec_Build.cpp | 4 ++-- src/Exec_Sequence.cpp | 4 ++-- src/Exec_UpdateParameters.cpp | 4 ++-- src/Topology.cpp | 20 ++++++++++++++++++++ src/Topology.h | 4 ++++ src/cpptrajdepend | 8 ++++---- 6 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 4fee21d2fb..52e74efc33 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -1,7 +1,7 @@ #include "Exec_Build.h" #include "CpptrajStdio.h" #include "DataSet_Parameters.h" -#include "Structure/GenerateAngles.h" +#include "Structure/GenerateConnectivity.h" #include "Structure/Zmatrix.h" DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, @@ -370,7 +370,7 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) } // Generate angles/dihedrals - if (Cpptraj::Structure::GenerateAngles(topOut)) { + if (Cpptraj::Structure::GenerateBondAngleTorsionArrays(topOut)) { mprinterr("Error: Could not generate angles/dihedrals for '%s'\n", topOut.c_str()); return CpptrajState::ERR; } diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 89fe0f823d..6b5356fd7b 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -2,7 +2,7 @@ #include "CpptrajStdio.h" #include "AssociatedData_Connect.h" #include "Structure/Builder.h" -#include "Structure/GenerateAngles.h" +#include "Structure/GenerateConnectivity.h" /** Generate and build the specified sequence. */ int Exec_Sequence::generate_sequence(DataSet_Coords* OUT, @@ -117,7 +117,7 @@ const // Generate angles and dihedrals if (combinedTop.Nbonds() > 0) { - if (Cpptraj::Structure::GenerateAngles(combinedTop)) { + if (Cpptraj::Structure::GenerateBondAngleTorsionArrays(combinedTop)) { mprinterr("Error: Angle generation failed.\n"); return 1; } diff --git a/src/Exec_UpdateParameters.cpp b/src/Exec_UpdateParameters.cpp index 7f7414393e..735cdcfd8a 100644 --- a/src/Exec_UpdateParameters.cpp +++ b/src/Exec_UpdateParameters.cpp @@ -2,7 +2,7 @@ #include "CpptrajStdio.h" #include "DataSet_Parameters.h" #include "DataSet_Topology.h" -#include "Structure/GenerateAngles.h" +#include "Structure/GenerateConnectivity.h" const char* Exec_UpdateParameters::disclaimer_ = "Warning: This command is provided for convenience only.\nWarning: For editing topology files, ParmEd is a much better alternative.\n"; @@ -53,7 +53,7 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn //top.SortBonds(); if (genAngles) { - if (Cpptraj::Structure::GenerateAngles( top )) { + if (Cpptraj::Structure::GenerateBondAngleTorsionArrays( top )) { mprinterr("Error: Could not generate angle/dihedral information.\n"); return CpptrajState::ERR; } diff --git a/src/Topology.cpp b/src/Topology.cpp index 531a6cd17b..7b83420bc2 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -898,6 +898,26 @@ void Topology::AddBond(BondType const& bndIn, bool isH) { atoms_[bndIn.A2()].AddBondToIdx( bndIn.A1() ); } +/** Clear bond arrays, but do not clear atom connectivity. Used + * when regenerating bond information from atom connectivity. + */ +void Topology::ClearBondArrays() { + bonds_.clear(); + bondsh_.clear(); +} + +/** Add to bond arrays but do not update atom connectivity. Used + * when regenerating bond information from atom connectivity. + */ +void Topology::AddToBondArrays(BondType const& bnd) { + // TODO enforce H as second atom? + if (atoms_[bnd.A1()].Element() == Atom::HYDROGEN || + atoms_[bnd.A2()].Element() == Atom::HYDROGEN) + bondsh_.push_back( bnd ); + else + bonds_.push_back( bnd ); +} + /** Check if given angle parm exists in given angle parm array. Add if not. * \return Index in angle parm array. */ diff --git a/src/Topology.h b/src/Topology.h index 8c26c1cfb6..c34333f1d7 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -116,6 +116,10 @@ class Topology { void AddBond(int, int, BondParmType const&); int RemoveBond(int, int); void AssignBondParams(ParmHolder const&); + /// Clear bond arrays but not atom connectivity + void ClearBondArrays(); + /// Add to bond arrays but do not update atom connectivity + void AddToBondArrays(BondType const&); // ----- Angle-specific routines ------------- size_t Nangles() const { return angles_.size()+anglesh_.size(); } AngleArray const& Angles() const { return angles_; } diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 3e62c05a7d..db7c95c1c7 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -288,7 +288,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivity.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -332,7 +332,7 @@ Exec_ReadInput.o : Exec_ReadInput.cpp Action.h ActionList.h ActionState.h Analys Exec_RotateDihedral.o : Exec_RotateDihedral.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DihedralSearch.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RotateDihedral.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_RunAnalysis.o : Exec_RunAnalysis.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RunAnalysis.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ScaleDihedralK.o : Exec_ScaleDihedralK.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ScaleDihedralK.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivity.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_SequenceAlign.o : Exec_SequenceAlign.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_SequenceAlign.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Set.o : Exec_Set.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Set.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Show.o : Exec_Show.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Show.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -341,7 +341,7 @@ Exec_SplitCoords.o : Exec_SplitCoords.cpp Action.h ActionList.h ActionState.h An Exec_System.o : Exec_System.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_System.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Top.o : Exec_Top.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Top.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h TopInfo.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Traj.o : Exec_Traj.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Traj.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ViewRst.o : Exec_ViewRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ViewRst.h Exec_Zmatrix.o : Exec_Zmatrix.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Zmatrix.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Zmatrix.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ExtendedSimilarity.o : ExtendedSimilarity.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h ExtendedSimilarity.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -447,7 +447,7 @@ Structure/Chirality.o : Structure/Chirality.cpp Atom.h AtomMask.h AtomType.h Box Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/GenerateAngles.o : Structure/GenerateAngles.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateAngles.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h From 858742f49489913d210170b138414e45e812f134 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 10:39:35 -0500 Subject: [PATCH 0238/1492] Do Angles the same way as leap --- src/Structure/GenerateConnectivity.cpp | 66 ++++++++++++++++++-------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index cf795f8a36..b01ae0d0aa 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -5,17 +5,18 @@ #include "../Topology.h" #include // std::swap -static inline void enumerateAngles(int at1, int at2, Topology& topIn) { +static inline void enumerateAngles(int& aidx, int at1, int at2, Topology& topIn) { Atom const& A2 = topIn[at2]; if (A2.Nbonds() > 1) { for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) { if (*bat != at1 && at1 < *bat) { topIn.AddAngle(at1, at2, *bat); - mprintf("%s - %s - %s\n", - topIn.AtomMaskName(at1).c_str(), - topIn.AtomMaskName(at2).c_str(), - topIn.AtomMaskName(*bat).c_str()); + mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, at1+1, at2+1, *bat+1, at1*3, at2*3, *bat*3); + //mprintf("%s - %s - %s\n", + // topIn.AtomMaskName(at1).c_str(), + // topIn.AtomMaskName(at2).c_str(), + // topIn.AtomMaskName(*bat).c_str()); } } } @@ -36,11 +37,11 @@ static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { topIn.AddDihedral(*bat1, at1, at2, *bat2); else topIn.AddDihedral(*bat2, at2, at1, *bat1); - mprintf("%s - %s - %s - %s\n", - topIn.AtomMaskName(*bat1).c_str(), - topIn.AtomMaskName(at1).c_str(), - topIn.AtomMaskName(at2).c_str(), - topIn.AtomMaskName(*bat2).c_str()); + //mprintf("%s - %s - %s - %s\n", + // topIn.AtomMaskName(*bat1).c_str(), + // topIn.AtomMaskName(at1).c_str(), + // topIn.AtomMaskName(at2).c_str(), + // topIn.AtomMaskName(*bat2).c_str()); } } } @@ -95,23 +96,46 @@ int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { } } - mprintf("DEBUG: Sorted bonds:\n"); - for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) - mprintf("\t%s - %s\n", - topIn.AtomMaskName(it->A1()).c_str(), - topIn.AtomMaskName(it->A2()).c_str()); + // ANGLES TODO combine above + int aidx = 0; + for (int ires = 0; ires < topIn.Nres(); ires++) + { + Residue const& res = topIn.Res(ires); + for (int iat1 = res.LastAtom()-1; iat1 >= res.FirstAtom(); iat1--) + { + Atom const& At1 = topIn[iat1]; + for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { + int iat2 = At1.Bond(bidx1); + Atom const& At2 = topIn[iat2]; + for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { + int iat3 = At2.Bond(bidx2); + if (iat1 < iat3) { + mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, iat1+1, iat2+1, iat3+1, iat1*3, iat2*3, iat3*3); + topIn.AddAngle(iat1, iat2, iat3); + } + } + } + } + } + + //mprintf("DEBUG: Sorted bonds:\n"); + //for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) + // mprintf("\t%s - %s\n", + // topIn.AtomMaskName(it->A1()).c_str(), + // topIn.AtomMaskName(it->A2()).c_str()); // Angles //AngleArray angles; //AngleArray anglesH; + aidx = 0; for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) { - if (!has_angles) { - // Forward direction. A1-A2-X - enumerateAngles( it->A1(), it->A2(), topIn ); - // Reverse direction. A2-A1-X - enumerateAngles( it->A2(), it->A1(), topIn ); - } + //if (!has_angles) { + // // Forward direction. A1-A2-X + // enumerateAngles( aidx, it->A1(), it->A2(), topIn ); + // // Reverse direction. A2-A1-X + // enumerateAngles( aidx, it->A2(), it->A1(), topIn ); + //} if (!has_dihedrals) { // Dihedrals enumerateDihedrals( it->A1(), it->A2(), topIn ); From eba259917b41716192e62640909145381ecf4d59 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 12:38:41 -0500 Subject: [PATCH 0239/1492] Move old way of generating angles/torsions to different routine --- src/Structure/GenerateConnectivity.cpp | 79 +++++++++++++++++--------- src/Structure/GenerateConnectivity.h | 2 + 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index b01ae0d0aa..e20a2f777b 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -49,6 +49,57 @@ static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { } } +/* Set bonds, angles, and dihedral arrays for a given topology based on + * a sorted and combined version of the current bond arrays. + */ +int Cpptraj::Structure::GenerateAngleTorsionArrays(Topology& topIn) { + if (topIn.Nbonds() < 1) { + mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); + return 0; + } + bool has_angles = topIn.Nangles() > 0; + if (has_angles) { + mprintf("Warning: Topology '%s' already has angle information.\n", topIn.c_str()); + //return 0; + } + bool has_dihedrals = topIn.Ndihedrals() > 0; + if (has_dihedrals) { + mprintf("Warning: Topology '%s' already has dihedral information.\n", topIn.c_str()); + //return 0; + } + if (has_angles && has_dihedrals) return 0; + // Create a combined bonds array + BondArray allBonds; + allBonds.reserve(topIn.Nbonds()); + for (BondArray::const_iterator it = topIn.Bonds().begin(); it != topIn.Bonds().end(); ++it) + allBonds.push_back( *it ); + for (BondArray::const_iterator it = topIn.BondsH().begin(); it != topIn.BondsH().end(); ++it) + allBonds.push_back( *it ); + std::sort( allBonds.begin(), allBonds.end() ); + mprintf("DEBUG: Sorted bonds:\n"); + for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) + mprintf("\t%s - %s\n", + topIn.AtomMaskName(it->A1()).c_str(), + topIn.AtomMaskName(it->A2()).c_str()); + + // Angles and Torsiions + int aidx = 0; + for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) + { + if (!has_angles) { + // Forward direction. A1-A2-X + enumerateAngles( aidx, it->A1(), it->A2(), topIn ); + // Reverse direction. A2-A1-X + enumerateAngles( aidx, it->A2(), it->A1(), topIn ); + } + if (!has_dihedrals) { + // Dihedrals + enumerateDihedrals( it->A1(), it->A2(), topIn ); + } + } + return 0; +} + /* Set bonds, angles, and dihedral arrays for a given topology based on * current atom connectivity. * This is done in the same manner as LEaP, which goes in increasing @@ -72,10 +123,8 @@ int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { if (has_angles && has_dihedrals) return 0; // Clear existing bond information TODO clear angles and dihedrals? topIn.ClearBondArrays(); - // Create a combined bonds array - BondArray allBonds; - allBonds.reserve(topIn.Nbonds()); + // BONDS int bidx = 0; for (int ires = 0; ires < topIn.Nres(); ires++) { @@ -87,7 +136,6 @@ int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { { if (iat < *bat) { mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); - allBonds.push_back( BondType(iat, *bat, -1) ); topIn.AddToBondArrays( BondType(iat, *bat, -1) ); } //else @@ -118,29 +166,6 @@ int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { } } - //mprintf("DEBUG: Sorted bonds:\n"); - //for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) - // mprintf("\t%s - %s\n", - // topIn.AtomMaskName(it->A1()).c_str(), - // topIn.AtomMaskName(it->A2()).c_str()); - - // Angles - //AngleArray angles; - //AngleArray anglesH; - aidx = 0; - for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) - { - //if (!has_angles) { - // // Forward direction. A1-A2-X - // enumerateAngles( aidx, it->A1(), it->A2(), topIn ); - // // Reverse direction. A2-A1-X - // enumerateAngles( aidx, it->A2(), it->A1(), topIn ); - //} - if (!has_dihedrals) { - // Dihedrals - enumerateDihedrals( it->A1(), it->A2(), topIn ); - } - } return 0; } diff --git a/src/Structure/GenerateConnectivity.h b/src/Structure/GenerateConnectivity.h index d56585b9dc..8016cde261 100644 --- a/src/Structure/GenerateConnectivity.h +++ b/src/Structure/GenerateConnectivity.h @@ -5,6 +5,8 @@ class AtomType; template class ParmHolder; namespace Cpptraj { namespace Structure { +/// Generate angle/torsion arrays from bond arrays in a Topology +int GenerateAngleTorsionArrays(Topology&); /// Generate bond/angle/torsion arrays from atom connectivity in a Topology int GenerateBondAngleTorsionArrays(Topology&); /// Generate impropers in a Topology From e7e53cc7cfcbe1ad84fe624bb05b235983d2f1fc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 12:58:25 -0500 Subject: [PATCH 0240/1492] Add torsion search that mimics leap --- src/Structure/GenerateConnectivity.cpp | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index e20a2f777b..207aaf575f 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -166,6 +166,34 @@ int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { } } + // TORSIONS TODO combine above + int didx = 0; + for (int ires = 0; ires < topIn.Nres(); ires++) + { + Residue const& res = topIn.Res(ires); + for (int iat1 = res.LastAtom()-1; iat1 >= res.FirstAtom(); iat1--) + { + Atom const& At1 = topIn[iat1]; + for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { + int iat2 = At1.Bond(bidx1); + Atom const& At2 = topIn[iat2]; + for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { + int iat3 = At2.Bond(bidx2); + if (iat3 != iat1) { + Atom const& At3 = topIn[iat3]; + for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { + int iat4 = At3.Bond(bidx3); + if (iat4 != iat2 && iat1 < iat4) { + mprintf("DEBUG: DIHEDRAL i= %i %i - %i - %i - %i (%i %i %i %i)\n", didx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + topIn.AddDihedral( iat1, iat2, iat3, iat4 ); + } + } + } + } + } + } + } + return 0; } From 1e93a49c6ebd8a5fc443c2f4ff2f116c07fd64cc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 13:05:49 -0500 Subject: [PATCH 0241/1492] Switch order in which impropers are searched for to match leap --- src/Structure/GenerateConnectivity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index 207aaf575f..1b20a6c3b5 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -306,7 +306,7 @@ static int order_improper_atoms(int* indices, int centralAt, Topology const& top /** Try to determine impropers for topology. */ // TODO option for charmm improper int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder const& AT) { - for (int iat = 0; iat != topIn.Natom(); iat++) { + for (int iat = topIn.Natom()-1; iat >= 0; iat--) { Atom const& AJ = topIn[iat]; if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; From d79b3e2714858386645506e2749ee141d807141c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 14:28:10 -0500 Subject: [PATCH 0242/1492] Add function for generating a bond array in same order as leap. Created BondArray class so it can be forward declared. --- src/Exec_CompareEnergy.cpp | 4 +-- src/ParameterTypes.h | 41 +++++++++++++++++++++++++- src/Structure/GenerateConnectivity.cpp | 26 ++++++++++++++++ src/Structure/GenerateConnectivity.h | 3 ++ 4 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/Exec_CompareEnergy.cpp b/src/Exec_CompareEnergy.cpp index 5040fb092f..519b3a278b 100644 --- a/src/Exec_CompareEnergy.cpp +++ b/src/Exec_CompareEnergy.cpp @@ -146,8 +146,8 @@ const Eresults Ebond(bondDeltaE_, bondDeltaR_); CalcEnergy(Ebond, bondout_, - frame0, commonBonds0_, top0.BondParm(), - frame1, commonBonds1_, top1.BondParm(), + frame0, commonBonds0_.Array(), top0.BondParm(), + frame1, commonBonds1_.Array(), top1.BondParm(), bondNames_, EBONDFXN); Ebond.Print( bondout_, "Bond" ); } diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 99dbd05568..611a350986 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -81,7 +81,46 @@ class BondType { int a2_; int idx_; }; -typedef std::vector BondArray; +/// Hold array of bond parameters +class BondArray { + typedef std::vector BArray; + public: + /// CONSTRUCTOR + BondArray() {} + + /// iterator + typedef BArray::iterator iterator; + /// begin + iterator begin() { return bonds_.begin(); } + /// end + iterator end() { return bonds_.end(); } + /// const iterator + typedef BArray::const_iterator const_iterator; + /// const begin + const_iterator begin() const { return bonds_.begin(); } + /// const end + const_iterator end() const { return bonds_.end(); } + + /// Reserve space for # of bonds + void reserve(size_t n) { bonds_.reserve(n); } + /// Add bond + void push_back(BondType const& b) { bonds_.push_back(b); } + /// Clear bonds + void clear() { bonds_.clear(); } + /// Erase given bond from array + void erase( iterator bnd ) { bonds_.erase( bnd ); } + + /// \return true if no bonds + bool empty() const { return bonds_.empty(); } + /// \return number of bonds + size_t size() const { return bonds_.size(); } + /// \return specified bond + BondType const& operator[](size_t idx) const { return bonds_[idx]; } + /// \return underlying array + std::vector const& Array() const { return bonds_; } + private: + BArray bonds_; +}; /// Hold angle parameters class AngleParmType { public: diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index 1b20a6c3b5..31388ccc8e 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -100,6 +100,32 @@ int Cpptraj::Structure::GenerateAngleTorsionArrays(Topology& topIn) { return 0; } +/** From atom connectivity, generate a bond array in the same order as LEaP. */ // TODO use in GenerateBAT +BondArray Cpptraj::Structure::GenerateBondArray(Topology const& topIn) +{ + BondArray out; + // BONDS + int bidx = 0; + for (int ires = 0; ires < topIn.Nres(); ires++) + { + Residue const& res = topIn.Res(ires); + for (int iat = res.LastAtom()-1; iat >= res.FirstAtom(); iat--) + { + Atom const& At = topIn[iat]; + for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) + { + if (iat < *bat) { + mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + out.push_back( BondType(iat, *bat, -1) ); + } + //else + // mprintf("DEBUG: X i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + } + } + } + return out; +} + /* Set bonds, angles, and dihedral arrays for a given topology based on * current atom connectivity. * This is done in the same manner as LEaP, which goes in increasing diff --git a/src/Structure/GenerateConnectivity.h b/src/Structure/GenerateConnectivity.h index 8016cde261..38040e73ef 100644 --- a/src/Structure/GenerateConnectivity.h +++ b/src/Structure/GenerateConnectivity.h @@ -2,6 +2,7 @@ #define INC_STRUCTURE_GENERATECONNECTIVITY_H class Topology; class AtomType; +class BondArray; template class ParmHolder; namespace Cpptraj { namespace Structure { @@ -11,6 +12,8 @@ int GenerateAngleTorsionArrays(Topology&); int GenerateBondAngleTorsionArrays(Topology&); /// Generate impropers in a Topology int GenerateImpropers(Topology&, ParmHolder const&); +/// Generate bond array in same order as leap +BondArray GenerateBondArray(Topology const&); } } #endif From a8108e4f8a38c1f78c9d26f4f5cd3e14dcc3d64f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:01:40 -0500 Subject: [PATCH 0243/1492] Add GenerateConnectivityArrays --- src/Structure/CMakeLists.txt | 1 + src/Structure/GenerateConnectivityArrays.cpp | 33 ++++++++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 13 ++++++++ src/Structure/structuredepend | 1 + src/Structure/structurefiles | 1 + 5 files changed, 49 insertions(+) create mode 100644 src/Structure/GenerateConnectivityArrays.cpp create mode 100644 src/Structure/GenerateConnectivityArrays.h diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index 7350e7edca..d04716f8bc 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -5,6 +5,7 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp + ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivityArrays.cpp ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivity.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp new file mode 100644 index 0000000000..e19b0acd3c --- /dev/null +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -0,0 +1,33 @@ +#include "GenerateConnectivityArrays.h" +#include "../ParameterTypes.h" +#include "../Atom.h" +#include "../Residue.h" +#include "../CpptrajStdio.h" + +/** From atom connectivity, generate a bond array in the same order as LEaP. */ // TODO use in GenerateBAT +BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& residues, + std::vector const& atoms) +{ + BondArray out; + // BONDS + int bidx = 0; + for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) + { + for (int iat = res->LastAtom()-1; iat >= res->FirstAtom(); iat--) + { + Atom const& At = atoms[iat]; + for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) + { + if (iat < *bat) { + mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + out.push_back( BondType(iat, *bat, -1) ); + } + //else + // mprintf("DEBUG: X i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + } + } + } + return out; +} + + diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h new file mode 100644 index 0000000000..b0503642f1 --- /dev/null +++ b/src/Structure/GenerateConnectivityArrays.h @@ -0,0 +1,13 @@ +#ifndef INC_STRUCTURE_GENERATECONNECTIVITYARRAYS_H +#define INC_STRUCTURE_GENERATECONNECTIVITYARRAYS_H +#include +class BondArray; +class Residue; +class Atom; +namespace Cpptraj { +namespace Structure { +/// Generate bond array in same order as leap +BondArray GenerateBondArray(std::vector const&, std::vector const&); +} +} +#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index b99a9b01ec..eedc6f95c4 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -4,6 +4,7 @@ Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Co FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h +GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 47dcb912e4..6a6dd3da57 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -5,6 +5,7 @@ STRUCTURE_SOURCES= \ Disulfide.cpp \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ + GenerateConnectivityArrays.cpp \ GenerateConnectivity.cpp \ HisProt.cpp \ InternalCoords.cpp \ From 70cf575ce0dc607a0a333b82fb0be875e8fc4da4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:06:10 -0500 Subject: [PATCH 0244/1492] GenerateBondArray is now in a separate file so that Topology can use it --- src/Structure/GenerateConnectivity.cpp | 26 -------------------------- src/Structure/GenerateConnectivity.h | 3 --- 2 files changed, 29 deletions(-) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index 31388ccc8e..1b20a6c3b5 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -100,32 +100,6 @@ int Cpptraj::Structure::GenerateAngleTorsionArrays(Topology& topIn) { return 0; } -/** From atom connectivity, generate a bond array in the same order as LEaP. */ // TODO use in GenerateBAT -BondArray Cpptraj::Structure::GenerateBondArray(Topology const& topIn) -{ - BondArray out; - // BONDS - int bidx = 0; - for (int ires = 0; ires < topIn.Nres(); ires++) - { - Residue const& res = topIn.Res(ires); - for (int iat = res.LastAtom()-1; iat >= res.FirstAtom(); iat--) - { - Atom const& At = topIn[iat]; - for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) - { - if (iat < *bat) { - mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); - out.push_back( BondType(iat, *bat, -1) ); - } - //else - // mprintf("DEBUG: X i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); - } - } - } - return out; -} - /* Set bonds, angles, and dihedral arrays for a given topology based on * current atom connectivity. * This is done in the same manner as LEaP, which goes in increasing diff --git a/src/Structure/GenerateConnectivity.h b/src/Structure/GenerateConnectivity.h index 38040e73ef..8016cde261 100644 --- a/src/Structure/GenerateConnectivity.h +++ b/src/Structure/GenerateConnectivity.h @@ -2,7 +2,6 @@ #define INC_STRUCTURE_GENERATECONNECTIVITY_H class Topology; class AtomType; -class BondArray; template class ParmHolder; namespace Cpptraj { namespace Structure { @@ -12,8 +11,6 @@ int GenerateAngleTorsionArrays(Topology&); int GenerateBondAngleTorsionArrays(Topology&); /// Generate impropers in a Topology int GenerateImpropers(Topology&, ParmHolder const&); -/// Generate bond array in same order as leap -BondArray GenerateBondArray(Topology const&); } } #endif From 0030723030dfc2b6653d16758eab7667094739c4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:06:29 -0500 Subject: [PATCH 0245/1492] When assigning bond parameters, regenerate the bond arrays in a leap type order so parameter assignment happens the same way. --- src/Topology.cpp | 12 ++++++++++-- src/cpptrajdepend | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 7b83420bc2..a6326c39a8 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -7,6 +7,7 @@ #include "AtomType.h" #include "AtomMask.h" #include "CharMask.h" +#include "Structure/GenerateConnectivityArrays.h" const NonbondType Topology::LJ_EMPTY = NonbondType(); @@ -2600,8 +2601,15 @@ const /** Replace any current bond parameters with given bond parameters. */ void Topology::AssignBondParams(ParmHolder const& newBondParams) { bondparm_.clear(); - AssignBondParm( newBondParams, bonds_, bondparm_, "bond" ); - AssignBondParm( newBondParams, bondsh_, bondparm_, "bond" ); + // Regenerate bond array in LEaP order + bonds_.clear(); + bondsh_.clear(); + BondArray allBonds = Cpptraj::Structure::GenerateBondArray(residues_, atoms_); + AssignBondParm( newBondParams, allBonds, bondparm_, "bond" ); + for (BondArray::const_iterator bnd = allBonds.begin(); bnd != allBonds.end(); ++bnd) + AddToBondArrays( *bnd ); +// AssignBondParm( newBondParams, bonds_, bondparm_, "bond" ); +// AssignBondParm( newBondParams, bondsh_, bondparm_, "bond" ); /** // Try to match leap bond ordering. Appears to be by index with priority // given to heavy atoms. BondArray tmpBonds; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index db7c95c1c7..c1cdc06b6b 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -448,6 +448,7 @@ Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h @@ -466,7 +467,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h From 284db71e69dad5bb7521d7be209cff6d07a4d8bf Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:14:37 -0500 Subject: [PATCH 0246/1492] Generate angles same order as leap function --- src/ParameterTypes.h | 41 +++++++++++++++++++- src/Structure/GenerateConnectivityArrays.cpp | 28 ++++++++++++- src/Structure/GenerateConnectivityArrays.h | 3 ++ 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 611a350986..7efdd13c77 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -175,7 +175,46 @@ class AngleType { int a3_; int idx_; }; -typedef std::vector AngleArray; +/// Hold array of angle parameters +class AngleArray { + typedef std::vector AArray; + public: + /// CONSTRUCTOR + AngleArray() {} + + /// iterator + typedef AArray::iterator iterator; + /// begin + iterator begin() { return angles_.begin(); } + /// end + iterator end() { return angles_.end(); } + /// const iterator + typedef AArray::const_iterator const_iterator; + /// const begin + const_iterator begin() const { return angles_.begin(); } + /// const end + const_iterator end() const { return angles_.end(); } + + /// Reserve space for # of angles + void reserve(size_t n) { angles_.reserve(n); } + /// Add angle + void push_back(AngleType const& b) { angles_.push_back(b); } + /// Clear angles + void clear() { angles_.clear(); } + /// Erase given angle from array + void erase( iterator bnd ) { angles_.erase( bnd ); } + + /// \return true if no angles + bool empty() const { return angles_.empty(); } + /// \return number of angles + size_t size() const { return angles_.size(); } + /// \return specified angle + AngleType const& operator[](size_t idx) const { return angles_[idx]; } + /// \return underlying array + std::vector const& Array() const { return angles_; } + private: + AArray angles_; +}; /// Hold dihedral parameters class DihedralParmType { public: diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index e19b0acd3c..88e973a91a 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -30,4 +30,30 @@ BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& resi return out; } - +/** From atom connectiviy, generate an angle array in the same order as LEaP. */ // TODO use in GenerateBAT +AngleArray Cpptraj::Structure::GenerateAngleArray(std::vector const& residues, + std::vector const& atoms) +{ + AngleArray out; + // ANGLES TODO combine above + int aidx = 0; + for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) + { + for (int iat1 = res->LastAtom()-1; iat1 >= res->FirstAtom(); iat1--) + { + Atom const& At1 = atoms[iat1]; + for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { + int iat2 = At1.Bond(bidx1); + Atom const& At2 = atoms[iat2]; + for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { + int iat3 = At2.Bond(bidx2); + if (iat1 < iat3) { + mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, iat1+1, iat2+1, iat3+1, iat1*3, iat2*3, iat3*3); + out.push_back( AngleType(iat1, iat2, iat3, -1) ); + } + } + } + } + } + return out; +} diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index b0503642f1..aaebff0cdf 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -2,12 +2,15 @@ #define INC_STRUCTURE_GENERATECONNECTIVITYARRAYS_H #include class BondArray; +class AngleArray; class Residue; class Atom; namespace Cpptraj { namespace Structure { /// Generate bond array in same order as leap BondArray GenerateBondArray(std::vector const&, std::vector const&); +/// Generate angle array in same order as leap +AngleArray GenerateAngleArray(std::vector const&, std::vector const&); } } #endif From a92c819f2fdb4fc44ec8aa51cc8c600e04b1a3b4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:16:33 -0500 Subject: [PATCH 0247/1492] Add DihedralArray class --- src/ParameterTypes.h | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 7efdd13c77..380408b0b5 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -350,7 +350,46 @@ class DihedralType { bool skip14_; ///< If true the 1-4 interaction for this dihedral should be skipped. bool improper_; ///< If true this is an improper dihedral. }; -typedef std::vector DihedralArray; +/// Hold array of dihedral parameters +class DihedralArray { + typedef std::vector DArray; + public: + /// CONSTRUCTOR + DihedralArray() {} + + /// iterator + typedef DArray::iterator iterator; + /// begin + iterator begin() { return dihedrals_.begin(); } + /// end + iterator end() { return dihedrals_.end(); } + /// const iterator + typedef DArray::const_iterator const_iterator; + /// const begin + const_iterator begin() const { return dihedrals_.begin(); } + /// const end + const_iterator end() const { return dihedrals_.end(); } + + /// Reserve space for # of dihedrals + void reserve(size_t n) { dihedrals_.reserve(n); } + /// Add dihedral + void push_back(DihedralType const& b) { dihedrals_.push_back(b); } + /// Clear dihedrals + void clear() { dihedrals_.clear(); } + /// Erase given dihedral from array + void erase( iterator bnd ) { dihedrals_.erase( bnd ); } + + /// \return true if no dihedrals + bool empty() const { return dihedrals_.empty(); } + /// \return number of dihedrals + size_t size() const { return dihedrals_.size(); } + /// \return specified dihedral + DihedralType const& operator[](size_t idx) const { return dihedrals_[idx]; } + /// \return underlying array + std::vector const& Array() const { return dihedrals_; } + private: + DArray dihedrals_; +}; // ----- NON-BONDED PARAMETERS ------------------------------------------------- /// Hold LJ 10-12 hbond params class HB_ParmType { From c025fcfad309c11950f5ddec3f056e77c6518265 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:19:58 -0500 Subject: [PATCH 0248/1492] Generate dihedral array in same order as leap function --- src/Structure/GenerateConnectivityArrays.cpp | 34 ++++++++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 3 ++ 2 files changed, 37 insertions(+) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 88e973a91a..8d5590893a 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -57,3 +57,37 @@ AngleArray Cpptraj::Structure::GenerateAngleArray(std::vector const& re } return out; } + +/** From atom connectivity, generate a dihedral array in the same order as LEaP. */ // TODO use in GenerateBAT +DihedralArray Cpptraj::Structure::GenerateDihedralArray(std::vector const& residues, + std::vector const& atoms) +{ + DihedralArray out; + // TORSIONS TODO combine above + int didx = 0; + for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) + { + for (int iat1 = res->LastAtom()-1; iat1 >= res->FirstAtom(); iat1--) + { + Atom const& At1 = atoms[iat1]; + for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { + int iat2 = At1.Bond(bidx1); + Atom const& At2 = atoms[iat2]; + for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { + int iat3 = At2.Bond(bidx2); + if (iat3 != iat1) { + Atom const& At3 = atoms[iat3]; + for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { + int iat4 = At3.Bond(bidx3); + if (iat4 != iat2 && iat1 < iat4) { + mprintf("DEBUG: DIHEDRAL i= %i %i - %i - %i - %i (%i %i %i %i)\n", didx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + out.push_back( DihedralType( iat1, iat2, iat3, iat4, -1 ) ); + } + } + } + } + } + } + } + return out; +} diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index aaebff0cdf..0119c0f391 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -3,6 +3,7 @@ #include class BondArray; class AngleArray; +class DihedralArray; class Residue; class Atom; namespace Cpptraj { @@ -11,6 +12,8 @@ namespace Structure { BondArray GenerateBondArray(std::vector const&, std::vector const&); /// Generate angle array in same order as leap AngleArray GenerateAngleArray(std::vector const&, std::vector const&); +/// Generate dihedral array in same order as leap +DihedralArray GenerateDihedralArray(std::vector const&, std::vector const&); } } #endif From ae6cda59e2b48a45ddee442aca5c39f98f5af773 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:32:23 -0500 Subject: [PATCH 0249/1492] Update for new array types --- src/Exec_CompareEnergy.cpp | 8 ++++---- src/ParameterTypes.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Exec_CompareEnergy.cpp b/src/Exec_CompareEnergy.cpp index 519b3a278b..4b83e2015b 100644 --- a/src/Exec_CompareEnergy.cpp +++ b/src/Exec_CompareEnergy.cpp @@ -234,8 +234,8 @@ const Eresults Eangle(angleDeltaE_, angleDeltaR_); CalcEnergy(Eangle, angleout_, - frame0, commonAngles0_, top0.AngleParm(), - frame1, commonAngles1_, top1.AngleParm(), + frame0, commonAngles0_.Array(), top0.AngleParm(), + frame1, commonAngles1_.Array(), top1.AngleParm(), angleNames_, EANGFXN); Eangle.Print( angleout_, "Angle" ); } @@ -324,8 +324,8 @@ const Eresults Edihedral(dihedralDeltaE_, dihedralDeltaR_); CalcEnergy(Edihedral, dihedralout_, - frame0, commonDihedrals0_, top0.DihedralParm(), - frame1, commonDihedrals1_, top1.DihedralParm(), + frame0, commonDihedrals0_.Array(), top0.DihedralParm(), + frame1, commonDihedrals1_.Array(), top1.DihedralParm(), dihedralNames_, EDIHFXN); Edihedral.Print( dihedralout_, "Dihedral" ); } diff --git a/src/ParameterTypes.h b/src/ParameterTypes.h index 380408b0b5..12ace1b869 100644 --- a/src/ParameterTypes.h +++ b/src/ParameterTypes.h @@ -385,6 +385,8 @@ class DihedralArray { size_t size() const { return dihedrals_.size(); } /// \return specified dihedral DihedralType const& operator[](size_t idx) const { return dihedrals_[idx]; } + /// \return last dihedral added + DihedralType const& back() const { return dihedrals_.back(); } /// \return underlying array std::vector const& Array() const { return dihedrals_; } private: From c5f2d52ded3e32abe21df72f3d4328ba6470af9e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 3 Jan 2024 16:40:46 -0500 Subject: [PATCH 0250/1492] Do angles the same way as leap --- src/Topology.cpp | 22 ++++++++++++++++++++-- src/Topology.h | 4 +++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index a6326c39a8..864942e0be 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -980,6 +980,17 @@ void Topology::AddAngle(AngleType const& angIn, bool isH) { angles_.push_back( angIn ); } +/** Add to angle arrays. Used when regenerating angle information + * from atom connectivity. + */ +void Topology::AddToAngleArrays(AngleType const& ang) { + if (atoms_[ang.A1()].Element() == Atom::HYDROGEN || + atoms_[ang.A2()].Element() == Atom::HYDROGEN || + atoms_[ang.A3()].Element() == Atom::HYDROGEN) + anglesh_.push_back( ang ); + else + angles_.push_back( ang ); +} // ----------------------------------------------- /** Check if given dihedral parm exists in given dihedral parm array. Add if not. * \return Index in dihedral parm array. @@ -2713,8 +2724,15 @@ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, /** Replace any current angle parameters with given angle parameters. */ void Topology::AssignAngleParams(ParmHolder const& newAngleParams) { angleparm_.clear(); - AssignAngleParm( newAngleParams, angles_ ); - AssignAngleParm( newAngleParams, anglesh_ ); + // Regenerate angle array in LEaP order + angles_.clear(); + anglesh_.clear(); + AngleArray allAngles = Cpptraj::Structure::GenerateAngleArray(residues_, atoms_); + AssignAngleParm( newAngleParams, allAngles ); + for (AngleArray::const_iterator ang = allAngles.begin(); ang != allAngles.end(); ++ang) + AddToAngleArrays( *ang ); + //AssignAngleParm( newAngleParams, angles_ ); + //AssignAngleParm( newAngleParams, anglesh_ ); } /** Warn if improper atoms have been reordered so they match the parameter. */ diff --git a/src/Topology.h b/src/Topology.h index c34333f1d7..4999fa28c4 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -129,7 +129,9 @@ class Topology { void AddAngle(int i, int j, int k) { AddAngle(i, j, k, -1); } void AddAngle(int, int, int, int); void AddAngle(AngleType const&, bool); - void AddAngle(int, int, int, AngleParmType const&); + void AddAngle(int, int, int, AngleParmType const&); + /// Add to angle arrays + void AddToAngleArrays(AngleType const&); void AssignAngleParams(ParmHolder const&); // ----- Dihedral-specific routines ---------- size_t Ndihedrals() const { return dihedrals_.size()+dihedralsh_.size(); } From 230d1e8b5448c4224d07d26918ab2ee882d337ce Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 08:33:51 -0500 Subject: [PATCH 0251/1492] Only regenerate connectivity arrays when AssignParam is called --- src/Topology.cpp | 77 +++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 56 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 864942e0be..5b2ab2679f 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2612,51 +2612,8 @@ const /** Replace any current bond parameters with given bond parameters. */ void Topology::AssignBondParams(ParmHolder const& newBondParams) { bondparm_.clear(); - // Regenerate bond array in LEaP order - bonds_.clear(); - bondsh_.clear(); - BondArray allBonds = Cpptraj::Structure::GenerateBondArray(residues_, atoms_); - AssignBondParm( newBondParams, allBonds, bondparm_, "bond" ); - for (BondArray::const_iterator bnd = allBonds.begin(); bnd != allBonds.end(); ++bnd) - AddToBondArrays( *bnd ); -// AssignBondParm( newBondParams, bonds_, bondparm_, "bond" ); -// AssignBondParm( newBondParams, bondsh_, bondparm_, "bond" ); -/** // Try to match leap bond ordering. Appears to be by index with priority - // given to heavy atoms. - BondArray tmpBonds; - tmpBonds.resize( bonds_.size() + bondsh_.size() ); - std::copy( bonds_.begin(), bonds_.end(), tmpBonds.begin() ); - std::copy( bondsh_.begin(), bondsh_.end(), tmpBonds.begin() + bonds_.size() ); - std::sort( tmpBonds.begin(), tmpBonds.end() );**/ -/* - BondArray::iterator b1 = bonds_.begin(); - BondArray::iterator b2 = bondsh_.begin(); - while (b1 != bonds_.end() || b2 != bondsh_.end()) { - int iat = b1->A1(); - tmpBonds.push_back( *b1 ); - ++b1; - while (b1 != bonds_.end() && b1->A1() == iat) { - tmpBonds.push_back( *b1 ); - ++b1; - } - while (b2 != bondsh_.end() && b2->A1() == iat) { - tmpBonds.push_back( *b2 ); - ++b2; - } - } - if (tmpBonds.size() != bonds_.size() + bondsh_.size()) { - mprinterr("Internal Error: AssignBondParams: Size of temp. bonds array %zu != total # bonds %zu\n", - tmpBonds.size(), bonds_.size() + bondsh_.size()); - }*/ -/** AssignBondParm( newBondParams, tmpBonds, bondparm_, "bond" ); - bonds_.clear(); - bondsh_.clear(); - for (BondArray::const_iterator it = tmpBonds.begin(); it != tmpBonds.end(); ++it) - if ( atoms_[it->A1()].Element() == Atom::HYDROGEN || - atoms_[it->A2()].Element() == Atom::HYDROGEN) - bondsh_.push_back( *it ); - else - bonds_.push_back( *it );**/ + AssignBondParm( newBondParams, bonds_, bondparm_, "bond" ); + AssignBondParm( newBondParams, bondsh_, bondparm_, "bond" ); } /** Replace any current Urey-Bradley parameters with given UB parameters. */ @@ -2724,15 +2681,8 @@ void Topology::AssignAngleParm(ParmHolder const& newAngleParams, /** Replace any current angle parameters with given angle parameters. */ void Topology::AssignAngleParams(ParmHolder const& newAngleParams) { angleparm_.clear(); - // Regenerate angle array in LEaP order - angles_.clear(); - anglesh_.clear(); - AngleArray allAngles = Cpptraj::Structure::GenerateAngleArray(residues_, atoms_); - AssignAngleParm( newAngleParams, allAngles ); - for (AngleArray::const_iterator ang = allAngles.begin(); ang != allAngles.end(); ++ang) - AddToAngleArrays( *ang ); - //AssignAngleParm( newAngleParams, angles_ ); - //AssignAngleParm( newAngleParams, anglesh_ ); + AssignAngleParm( newAngleParams, angles_ ); + AssignAngleParm( newAngleParams, anglesh_ ); } /** Warn if improper atoms have been reordered so they match the parameter. */ @@ -3080,12 +3030,27 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, /** Replace existing parameters with the given parameter set. */ int Topology::AssignParams(ParameterSet const& set0) { + // Bond parameters mprintf("\tRegenerating bond parameters.\n"); - AssignBondParams( set0.BP() ); + bondparm_.clear(); + // Regenerate bond array in LEaP order + bonds_.clear(); + bondsh_.clear(); + BondArray allBonds = Cpptraj::Structure::GenerateBondArray(residues_, atoms_); + AssignBondParm( set0.BP(), allBonds, bondparm_, "bond" ); + for (BondArray::const_iterator bnd = allBonds.begin(); bnd != allBonds.end(); ++bnd) + AddToBondArrays( *bnd ); // Angle parameters mprintf("\tRegenerating angle parameters.\n"); - AssignAngleParams( set0.AP() ); + angleparm_.clear(); + // Regenerate angle array in LEaP order + angles_.clear(); + anglesh_.clear(); + AngleArray allAngles = Cpptraj::Structure::GenerateAngleArray(residues_, atoms_); + AssignAngleParm( set0.AP(), allAngles ); + for (AngleArray::const_iterator ang = allAngles.begin(); ang != allAngles.end(); ++ang) + AddToAngleArrays( *ang ); // Dihedral parameters mprintf("\tRegenerating dihedral parameters.\n"); AssignDihedralParams( set0.DP(), set0.IP() ); From d7961c9f6a0a65b36fe8db759173a6e8353ea21b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 08:54:43 -0500 Subject: [PATCH 0252/1492] Refactor dihedral parameter assignment so it can accept a passed-in array --- src/Topology.cpp | 68 +++++++++++++++++++++++++----------------------- src/Topology.h | 3 ++- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 5b2ab2679f..03d27bdd04 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2745,39 +2745,21 @@ void Topology::AssignImproperParams(ImproperParmHolder const& newImproperParams) /** Set parameters for dihedrals in given dihedral array. * Bond and angle information must be set up prior to calling * this function in order for improper and 1-4 detection to work. + * \param newDihedralParams New proper dihedral parameters. + * \param newImproperParams New improper dihedral parameters. + * \param dihedrals Array containing only unique dihedrals. */ -void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, - ImproperParmHolder const& newImproperParams, - DihedralArray& dihedralsIn) +DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, + ImproperParmHolder const& newImproperParams, + DihedralArray const& dihedrals) { - // Dihedrals can be a bit of a pain since there can be multiple - // multiplicities for a single dihedral type. In case multiplicities - // change, start with a fresh dihedral array containing only unique - // dihedrals. - //DihedralArray tmpdih = dihedralsIn; - //std::sort( tmpdih.begin(), tmpdih.end() ); - // Assume dihedrals with multiple terms are consecutive already - DihedralArray dihedrals; - for (DihedralArray::const_iterator dih = dihedralsIn.begin(); dih != dihedralsIn.end(); ++dih) { - if (dihedrals.empty()) - dihedrals.push_back( *dih ); - else { - if ( *dih != dihedrals.back() ) - dihedrals.push_back( *dih ); - } - } - if (debug_ > 0) - mprintf("DEBUG: %zu incoming dihedrals, %zu unique dihedrals.\n", - dihedralsIn.size(), dihedrals.size()); - - dihedralsIn.clear(); + DihedralArray dihedralsIn; // Keep track of 1-4 interactions typedef std::pair Ipair; typedef std::set Imap; Imap PairMap; // Loop over all dihedrals - for (DihedralArray::iterator dih = dihedrals.begin(); dih != dihedrals.end(); ++dih) { - + for (DihedralArray::const_iterator dih = dihedrals.begin(); dih != dihedrals.end(); ++dih) { TypeNameHolder types(4); types.AddName( atoms_[dih->A1()].Type() ); types.AddName( atoms_[dih->A2()].Type() ); @@ -2803,9 +2785,9 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, if (isImproper) { // ----- This is actually an improper dihedral. ---------------- //ImproperParmHolder::OrderType lastOrder; - DihedralType dih0 = *dih; + DihedralType mydih = *dih; bool reordered; - DihedralParmArray ipa = newImproperParams.FindParam( types, found, *dih, reordered ); + DihedralParmArray ipa = newImproperParams.FindParam( types, found, mydih, reordered ); int idx = -1; if (!found) { mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", @@ -2818,10 +2800,9 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, if (ipa.size() > 1) mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); - if (reordered) warn_improper_reorder( dih0, *dih ); + if (reordered) warn_improper_reorder( *dih, mydih ); idx = addTorsionParm( dihedralparm_, ipa.front() ); } - DihedralType mydih = *dih; mydih.SetIdx( idx ); mydih.SetImproper( true ); // Always skip 1-4 for impropers @@ -2913,13 +2894,36 @@ void Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, } } } // END loop over all dihedrals + return dihedralsIn; +} + +/** \return Array of only unique dihedrals (get rid of multiplicities) */ +DihedralArray Topology::get_unique_dihedrals(DihedralArray const& dihedralsIn) const { + // Assume dihedrals with multiple terms are consecutive already + DihedralArray dihedrals; + for (DihedralArray::const_iterator dih = dihedralsIn.begin(); dih != dihedralsIn.end(); ++dih) { + if (dihedrals.empty()) + dihedrals.push_back( *dih ); + else { + if ( *dih != dihedrals.back() ) + dihedrals.push_back( *dih ); + } + } + if (debug_ > 0) + mprintf("DEBUG: %zu incoming dihedrals, %zu unique dihedrals.\n", + dihedralsIn.size(), dihedrals.size()); + return dihedrals; } /** Replace any current dihedral parameters with given dihedral parameters. */ void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams) { dihedralparm_.clear(); - AssignDihedralParm( newDihedralParams, newImproperParams, dihedrals_ ); - AssignDihedralParm( newDihedralParams, newImproperParams, dihedralsh_ ); + // Dihedrals can be a bit of a pain since there can be multiple + // multiplicities for a single dihedral type. In case multiplicities + // change, start with a fresh dihedral array containing only unique + // dihedrals. + dihedrals_ = AssignDihedralParm( newDihedralParams, newImproperParams, get_unique_dihedrals(dihedrals_) ); + dihedralsh_ = AssignDihedralParm( newDihedralParams, newImproperParams, get_unique_dihedrals(dihedralsh_) ); } /** Replace current nonbond parameters with given nonbond parameters. */ diff --git a/src/Topology.h b/src/Topology.h index 4999fa28c4..0d07077f3e 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -307,7 +307,8 @@ class Topology { void AssignAngleParm(ParmHolder const&, AngleArray&); void warn_improper_reorder(DihedralType const&, DihedralType const&) const; void AssignImproperParm(ImproperParmHolder const&, DihedralArray&); - void AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, DihedralArray&); + inline DihedralArray get_unique_dihedrals(DihedralArray const&) const; + DihedralArray AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, DihedralArray const&); static const NonbondType LJ_EMPTY; std::vector atoms_; From 361a71b2072a6c58df2f980fe66f1285b7401223 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 09:06:11 -0500 Subject: [PATCH 0253/1492] Add dihedrals. Start working on impropers. --- src/Topology.cpp | 29 +++++++++++++++++++++++++---- src/Topology.h | 4 +++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 03d27bdd04..ee80430582 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -991,6 +991,7 @@ void Topology::AddToAngleArrays(AngleType const& ang) { else angles_.push_back( ang ); } + // ----------------------------------------------- /** Check if given dihedral parm exists in given dihedral parm array. Add if not. * \return Index in dihedral parm array. @@ -1074,6 +1075,19 @@ void Topology::AddDihedral(DihedralType const& dihIn, bool isH) { dihedrals_.push_back( dihIn ); } +/** Add to dihedral arrays. Used when regenerating dihedral information + * from atom connectivity. + */ +void Topology::AddToDihedralArrays(DihedralType const& dih) { + if (atoms_[dih.A1()].Element() == Atom::HYDROGEN || + atoms_[dih.A4()].Element() == Atom::HYDROGEN || + atoms_[dih.A2()].Element() == Atom::HYDROGEN || + atoms_[dih.A3()].Element() == Atom::HYDROGEN) + dihedralsh_.push_back( dih ); + else + dihedrals_.push_back( dih ); +} + /** Add given Charmm improper with given improper parm to Charmm improper array. */ void Topology::AddCharmmImproper(DihedralType const& imp, DihedralParmType const& IPin) { @@ -2703,7 +2717,9 @@ const /** Set parameters for improper dihedrals in given improper dihedral array. */ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, - DihedralArray& impropers) + DihedralArray& impropers, + DihedralParmArray& dpa) +const { for (DihedralArray::iterator imp = impropers.begin(); imp != impropers.end(); ++imp) { TypeNameHolder types(4); @@ -2730,7 +2746,7 @@ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); if (reordered) warn_improper_reorder( imp0, *imp ); - idx = addTorsionParm( chamber_.SetImproperParm(), ipa.front() ); + idx = addTorsionParm( dpa, ipa.front() ); } imp->SetIdx( idx ); } @@ -2739,7 +2755,7 @@ void Topology::AssignImproperParm(ImproperParmHolder const& newImproperParams, /** Replace any current improper parameters with given improper parameters. */ void Topology::AssignImproperParams(ImproperParmHolder const& newImproperParams) { chamber_.SetImproperParm().clear(); - AssignImproperParm( newImproperParams, chamber_.SetImpropers() ); + AssignImproperParm( newImproperParams, chamber_.SetImpropers(), chamber_.SetImproperParm() ); } /** Set parameters for dihedrals in given dihedral array. @@ -3057,7 +3073,12 @@ int Topology::AssignParams(ParameterSet const& set0) { AddToAngleArrays( *ang ); // Dihedral parameters mprintf("\tRegenerating dihedral parameters.\n"); - AssignDihedralParams( set0.DP(), set0.IP() ); + dihedrals_.clear(); + dihedralsh_.clear(); + DihedralArray allDihedrals = Cpptraj::Structure::GenerateDihedralArray(residues_, atoms_); + allDihedrals = AssignDihedralParm( set0.DP(), set0.IP(), allDihedrals ); + for (DihedralArray::const_iterator dih = allDihedrals.begin(); dih != allDihedrals.end(); ++dih) + AddToDihedralArrays( *dih ); // Urey-Bradley mprintf("\tRegenerating UB parameters.\n"); AssignUBParams( set0.UB() ); diff --git a/src/Topology.h b/src/Topology.h index 0d07077f3e..ec9d70981c 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -146,6 +146,8 @@ class Topology { void AddDihedral(DihedralType const&, DihedralParmType const&); void AssignImproperParams(ImproperParmHolder const&); void AssignDihedralParams(DihedralParmHolder const&, ImproperParmHolder const&); + /// Add to dihedral arrays + void AddToDihedralArrays(DihedralType const&); // ----- CMAP-specific routines -------------- bool HasCmap() const { return !cmapGrid_.empty(); } CmapGridArray const& CmapGrid() const { return cmapGrid_; } @@ -306,7 +308,7 @@ class Topology { void AssignBondParm(ParmHolder const&, BondArray&, BondParmArray&, const char*) const; void AssignAngleParm(ParmHolder const&, AngleArray&); void warn_improper_reorder(DihedralType const&, DihedralType const&) const; - void AssignImproperParm(ImproperParmHolder const&, DihedralArray&); + void AssignImproperParm(ImproperParmHolder const&, DihedralArray&, DihedralParmArray&) const; inline DihedralArray get_unique_dihedrals(DihedralArray const&) const; DihedralArray AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, DihedralArray const&); From 5926a46378b34dad9ee6fdb78621bd6432c7c7e7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:08:25 -0500 Subject: [PATCH 0254/1492] Only the array of atoms is needed --- src/GuessAtomHybridization.cpp | 5 ++--- src/GuessAtomHybridization.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/GuessAtomHybridization.cpp b/src/GuessAtomHybridization.cpp index 289cffd98f..249bb29a31 100644 --- a/src/GuessAtomHybridization.cpp +++ b/src/GuessAtomHybridization.cpp @@ -1,8 +1,7 @@ #include "GuessAtomHybridization.h" #include "Atom.h" -#include "Topology.h" -AtomType::HybridizationType Cpptraj::GuessAtomHybridization(Atom const& AJ, Topology const& topIn) +AtomType::HybridizationType Cpptraj::GuessAtomHybridization(Atom const& AJ, std::vector const& atoms) { AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; // Handle specific elements @@ -22,7 +21,7 @@ AtomType::HybridizationType Cpptraj::GuessAtomHybridization(Atom const& AJ, Topo // hydrogen, assume SP2. TODO actually check for aromaticity. int n_hydrogens = 0; for (Atom::bond_iterator bat = AJ.bondbegin(); bat != AJ.bondend(); ++bat) - if (topIn[*bat].Element() == Atom::HYDROGEN) + if (atoms[*bat].Element() == Atom::HYDROGEN) n_hydrogens++; if (n_hydrogens == 1) hybrid = AtomType::SP2; diff --git a/src/GuessAtomHybridization.h b/src/GuessAtomHybridization.h index dc7b84fe76..a99bea9d32 100644 --- a/src/GuessAtomHybridization.h +++ b/src/GuessAtomHybridization.h @@ -1,10 +1,10 @@ #ifndef INC_GUESSATOMHYBRIDIZATION_H #define INC_GUESSATOMHYBRIDIZATION_H +#include #include "AtomType.h" // for HybridizationType class Atom; -class Topology; namespace Cpptraj { /// Guess atom hybridization type based on element/bonding -AtomType::HybridizationType GuessAtomHybridization(Atom const&, Topology const&); +AtomType::HybridizationType GuessAtomHybridization(Atom const&, std::vector const&); } #endif From 1b99f5c02b082c4c0f0de8072d964fc9f5805e48 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:08:53 -0500 Subject: [PATCH 0255/1492] Separate out function to find impropers --- src/Structure/GenerateImpropers.cpp | 83 +++++++++++++++++++++++++++++ src/Structure/GenerateImpropers.h | 14 +++++ src/Structure/structuredepend | 3 +- src/Structure/structurefiles | 1 + 4 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 src/Structure/GenerateImpropers.cpp create mode 100644 src/Structure/GenerateImpropers.h diff --git a/src/Structure/GenerateImpropers.cpp b/src/Structure/GenerateImpropers.cpp new file mode 100644 index 0000000000..9db50929f2 --- /dev/null +++ b/src/Structure/GenerateImpropers.cpp @@ -0,0 +1,83 @@ +#include "GenerateImpropers.h" +#include "../CpptrajStdio.h" +#include "../Atom.h" +#include "../AtomType.h" +#include "../GuessAtomHybridization.h" +#include "../ParameterTypes.h" +#include "../ParameterHolders.h" +#include // std::swap + +/** Try to order an improper the same way that LEaP does. + * LEaP has wild card names first, followed by atom types + * in alphabetical order. The third atom is always the central + * atom. + */ +static int order_improper_atoms(int* leapdih, int centralAt, std::vector const& topIn) +{ + Atom const& Ak = topIn[centralAt]; + std::vector const& bonds = Ak.BondIdxArray(); + int indices[3]; + indices[0] = bonds[0]; + indices[1] = bonds[1]; + indices[2] = bonds[2]; + if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); + if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); + if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); + if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); + leapdih[0] = indices[0]; + leapdih[1] = indices[1]; + leapdih[2] = centralAt; + leapdih[3] = indices[2]; + return 0; +} + +// DEBUG +static inline void printName(Atom const& AJ) { + mprintf(" :%i@%s", AJ.ResNum()+1, AJ.Name().Truncated().c_str()); +} + +/** Try to determine impropers for topology. */ // TODO option for charmm improper +DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector const& atoms, + ParmHolder const& AT) +{ + DihedralArray out; + long int atBegin = (long int)(atoms.size()) - 1; + for (long int iat = atBegin; iat >= 0; iat--) { + Atom const& AJ = atoms[iat]; + if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + bool found; + AtomType atype = AT.FindParam(TypeNameHolder(AJ.Type()), found); + if (found) + hybrid = atype.Hybridization(); + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) + hybrid = Cpptraj::GuessAtomHybridization( AJ, atoms ); + if (hybrid == AtomType::SP2) { + mprintf("DEBUG: Potential improper center:"); + printName(AJ); + mprintf("\n"); + int leapdih[4]; + order_improper_atoms(leapdih, iat, atoms); + mprintf("DEBUG: Bond order"); + printName(AJ); + mprintf(": %i %i %i %i", + AJ.BondIdxArray()[0]+1, + AJ.BondIdxArray()[1]+1, + iat+1, + AJ.BondIdxArray()[2]+1); + printName(atoms[AJ.BondIdxArray()[0]]); + printName(atoms[AJ.BondIdxArray()[1]]); + printName(AJ); + printName(atoms[AJ.BondIdxArray()[2]]); + mprintf("\n"); + mprintf("DEBUG: Leap order: %i %i %i %i\n", leapdih[0]+1, leapdih[1]+1, leapdih[2]+1, leapdih[3]+1); + out.push_back( DihedralType(leapdih[0], leapdih[1], leapdih[2], leapdih[3], DihedralType::BOTH) ); + } else if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { + mprintf("Warning: When searching for impropers could not determine hybridization of"); + printName(AJ); + mprintf("\n"); + } + } + } + return out; +} diff --git a/src/Structure/GenerateImpropers.h b/src/Structure/GenerateImpropers.h new file mode 100644 index 0000000000..8d47c42e05 --- /dev/null +++ b/src/Structure/GenerateImpropers.h @@ -0,0 +1,14 @@ +#ifndef INC_STRUCTURE_GENERATEIMPROPERS_H +#define INC_STRUCTURE_GENERATEIMPROPERS_H +#include +class Atom; +class AtomType; +class DihedralArray; +template class ParmHolder; +namespace Cpptraj { +namespace Structure { +/// Generate improper dihedral array in same order as leap +DihedralArray GenerateImproperArray(std::vector const&, ParmHolder const&); +} +} +#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index eedc6f95c4..cb893b8f36 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -3,8 +3,9 @@ Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Co Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h -GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h +GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h +GenerateImpropers.o : GenerateImpropers.cpp ../Atom.h ../AtomType.h ../Constants.h ../CpptrajStdio.h ../GuessAtomHybridization.h ../NameType.h ../ParameterHolders.h ../ParameterTypes.h ../SymbolExporting.h ../TypeNameHolder.h GenerateImpropers.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 6a6dd3da57..825ca83eb0 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -7,6 +7,7 @@ STRUCTURE_SOURCES= \ FxnGroupBuilder.cpp \ GenerateConnectivityArrays.cpp \ GenerateConnectivity.cpp \ + GenerateImpropers.cpp \ HisProt.cpp \ InternalCoords.cpp \ Model.cpp \ From 1b4688571e8bb0a3c8e1d1cac658e8eb2c6c40b3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:09:26 -0500 Subject: [PATCH 0256/1492] Make comment more specific --- src/Structure/GenerateConnectivityArrays.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index 0119c0f391..8fac565a63 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -12,7 +12,7 @@ namespace Structure { BondArray GenerateBondArray(std::vector const&, std::vector const&); /// Generate angle array in same order as leap AngleArray GenerateAngleArray(std::vector const&, std::vector const&); -/// Generate dihedral array in same order as leap +/// Generate proper dihedral array in same order as leap DihedralArray GenerateDihedralArray(std::vector const&, std::vector const&); } } From 8e5235a3fd12c555a96371164311ccd86971820c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:09:38 -0500 Subject: [PATCH 0257/1492] Update CMakeLists --- src/Structure/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index d04716f8bc..e0fa49b0e7 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -7,6 +7,7 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivityArrays.cpp ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivity.cpp + ${CMAKE_CURRENT_LIST_DIR}/GenerateImpropers.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp ${CMAKE_CURRENT_LIST_DIR}/Model.cpp From 81780ebf2c592e68a011e4309d84e027caf6feb8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:09:58 -0500 Subject: [PATCH 0258/1492] Update for how GuessHybridization should be called --- src/Structure/Model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index cdd914223d..33b99d4a16 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -29,7 +29,7 @@ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak return 1; } // TODO pass in atom type info? - AtomType::HybridizationType hybrid = GuessAtomHybridization(AJ, topIn); + AtomType::HybridizationType hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); /* HybridizationType hybrid = UNKNOWN_HYBRIDIZATION; // Handle specific elements From d66a9e76430d179ce83150eeb4a9ebdfbec034a4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:11:38 -0500 Subject: [PATCH 0259/1492] Generate impropers is now in separate file. Update dependencies. --- src/Structure/GenerateConnectivity.cpp | 148 +------------------------ src/Structure/GenerateConnectivity.h | 4 - src/cpptrajdepend | 9 +- 3 files changed, 6 insertions(+), 155 deletions(-) diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp index 1b20a6c3b5..e303482902 100644 --- a/src/Structure/GenerateConnectivity.cpp +++ b/src/Structure/GenerateConnectivity.cpp @@ -1,9 +1,7 @@ #include "GenerateConnectivity.h" #include "../CpptrajStdio.h" -#include "../GuessAtomHybridization.h" -#include "../ParameterTypes.h" #include "../Topology.h" -#include // std::swap +#include // std::sort static inline void enumerateAngles(int& aidx, int at1, int at2, Topology& topIn) { Atom const& A2 = topIn[at2]; @@ -196,147 +194,3 @@ int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { return 0; } - -/** Try to order an improper the same way that LEaP does. - * LEaP has wild card names first, followed by atom types - * in alphabetical order. The third atom is always the central - * atom. - */ -static int order_improper_atoms(int* leapdih, int centralAt, Topology const& topIn) -{ - Atom const& Ak = topIn[centralAt]; - std::vector const& bonds = Ak.BondIdxArray(); - int indices[3]; - indices[0] = bonds[0]; - indices[1] = bonds[1]; - indices[2] = bonds[2]; - if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); - if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); - if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); - if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); - leapdih[0] = indices[0]; - leapdih[1] = indices[1]; - leapdih[2] = centralAt; - leapdih[3] = indices[2]; - return 0; -} -/* -static int order_improper_atoms(int* indices, int centralAt, Topology const& topIn) -{ - indices[2] = centralAt; - Atom const& Ak = topIn[centralAt]; - std::vector const& bonds = Ak.BondIdxArray(); - NameType const& a1 = topIn[bonds[0]].Type(); - NameType const& a2 = topIn[bonds[1]].Type(); - NameType const& a3 = topIn[bonds[2]].Type(); - if (a1 < a2) { - if (a1 < a3) { - // a1 < a2 and a1 < a3 - indices[0] = bonds[0]; - if (a2 < a3) { - indices[1] = bonds[1]; - indices[3] = bonds[2]; - } else { - indices[1] = bonds[2]; - indices[3] = bonds[1]; - } - } else { - // a1 < a2 and a3 < a1 - indices[0] = bonds[2]; - indices[1] = bonds[0]; - indices[3] = bonds[1]; - } - } else { - if (a2 < a3) { - // a2 < a1 and a2 < a3 - indices[0] = bonds[1]; - if (a1 < a3) { - indices[1] = bonds[0]; - indices[3] = bonds[2]; - } else { - indices[1] = bonds[2]; - indices[3] = bonds[0]; - } - } else { - // a2 < a1 and a3 < a2 - indices[0] = bonds[2]; - indices[1] = bonds[1]; - indices[3] = bonds[0]; - } - } - - return 0; -}*/ -/*static int order_improper_atoms(int* oaObj, int iat, Topology const& topIn) { - int iIndex1 = 0; - int iIndex2 = 0; - int iIndex0 = 0; - for (int i = 0; i < 3; i++) - oaObj[i] = -1; - - Atom const& AJ = topIn[iat]; - int iAtomCoordination = AJ.Nbonds(); - - if ( iIndex1 <= iIndex0 ) - iIndex1 = iIndex0+1; - if ( iIndex2 <= iIndex1 ) - iIndex2 = iIndex1+1; - else iIndex2++; - - if ( iIndex2 >= iAtomCoordination ) { - iIndex1++; - iIndex2 = iIndex1 + 1; - if ( iIndex2 >= iAtomCoordination ) { - iIndex0++; - iIndex1 = iIndex0 + 1; - iIndex2 = iIndex1 + 1; - } - } - - if ( iIndex2 < (iAtomCoordination) ) { - mprintf("DEBUG: iIndex %i %i %i\n", iIndex0, iIndex1, iIndex2); - oaObj[2] = iat; - oaObj[0] = AJ.BondIdxArray()[iIndex0]; //(OBJEKT) aAtomBondedNeighbor( cCont, iIndex0 ); - oaObj[1] = AJ.BondIdxArray()[iIndex1]; //(OBJEKT) aAtomBondedNeighbor( cCont, iIndex1 ); - oaObj[3] = AJ.BondIdxArray()[iIndex2]; //(OBJEKT) aAtomBondedNeighbor( cCont, iIndex2 ); - return 0; - } - return 1; -}*/ - -/** Try to determine impropers for topology. */ // TODO option for charmm improper -int Cpptraj::Structure::GenerateImpropers(Topology& topIn, ParmHolder const& AT) { - for (int iat = topIn.Natom()-1; iat >= 0; iat--) { - Atom const& AJ = topIn[iat]; - if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? - AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; - bool found; - AtomType atype = AT.FindParam(TypeNameHolder(AJ.Type()), found); - if (found) - hybrid = atype.Hybridization(); - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) - hybrid = Cpptraj::GuessAtomHybridization( AJ, topIn ); - if (hybrid == AtomType::SP2) { - mprintf("DEBUG: Potential improper center: %s\n", topIn.AtomMaskName(iat).c_str()); - int leapdih[4]; - order_improper_atoms(leapdih, iat, topIn); - mprintf("DEBUG: Bond order %s : %i %i %i %i %s %s %s %s\n", - topIn.AtomMaskName(iat).c_str(), - AJ.BondIdxArray()[0]+1, - AJ.BondIdxArray()[1]+1, - iat+1, - AJ.BondIdxArray()[2]+1, - topIn.AtomMaskName(AJ.BondIdxArray()[0]).c_str(), - topIn.AtomMaskName(AJ.BondIdxArray()[1]).c_str(), - topIn.AtomMaskName(iat).c_str(), - topIn.AtomMaskName(AJ.BondIdxArray()[2]).c_str()); - mprintf("DEBUG: Leap order: %i %i %i %i\n", leapdih[0]+1, leapdih[1]+1, leapdih[2]+1, leapdih[3]+1); - topIn.AddDihedral( DihedralType(leapdih[0], leapdih[1], leapdih[2], leapdih[3], DihedralType::BOTH) ); - } else if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { - mprintf("Warning: When searching for impropers could not determine hybridization of %s\n", - topIn.AtomMaskName(iat).c_str()); - } - } - } - return 0; -} diff --git a/src/Structure/GenerateConnectivity.h b/src/Structure/GenerateConnectivity.h index 8016cde261..dd4a150bfc 100644 --- a/src/Structure/GenerateConnectivity.h +++ b/src/Structure/GenerateConnectivity.h @@ -1,16 +1,12 @@ #ifndef INC_STRUCTURE_GENERATECONNECTIVITY_H #define INC_STRUCTURE_GENERATECONNECTIVITY_H class Topology; -class AtomType; -template class ParmHolder; namespace Cpptraj { namespace Structure { /// Generate angle/torsion arrays from bond arrays in a Topology int GenerateAngleTorsionArrays(Topology&); /// Generate bond/angle/torsion arrays from atom connectivity in a Topology int GenerateBondAngleTorsionArrays(Topology&); -/// Generate impropers in a Topology -int GenerateImpropers(Topology&, ParmHolder const&); } } #endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index c1cdc06b6b..05ca2d63ae 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -288,7 +288,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivity.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -369,7 +369,7 @@ Gpu.o : Gpu.cpp Gpu.h GridAction.o : GridAction.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridAction.h GridBin.h GridMover.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h GridBin.o : GridBin.cpp Box.h CpptrajStdio.h GridBin.h Matrix_3x3.h Parallel.h Vec3.h GridMover.o : GridMover.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_3D.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h GridMover.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h -GuessAtomHybridization.o : GuessAtomHybridization.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +GuessAtomHybridization.o : GuessAtomHybridization.cpp Atom.h AtomType.h Constants.h GuessAtomHybridization.h NameType.h ParameterTypes.h SymbolExporting.h HistBin.o : HistBin.cpp Constants.h CpptrajStdio.h Dimension.h HistBin.h Hungarian.o : Hungarian.cpp ArrayIterator.h Constants.h CpptrajStdio.h Hungarian.h Matrix.h ImageRoutines.o : ImageRoutines.cpp Atom.h AtomMask.h Box.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h Frame.h ImageOption.h ImageRoutines.h ImageTypes.h Image_List.h Image_List_Mask.h Image_List_Pair.h Image_List_Pair_CoM.h Image_List_Pair_First.h Image_List_Pair_Geom.h Image_List_Unit.h Image_List_Unit_CoM.h Image_List_Unit_First.h Image_List_Unit_Geom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Unit.h Vec3.h @@ -447,8 +447,9 @@ Structure/Chirality.o : Structure/Chirality.cpp Atom.h AtomMask.h AtomType.h Box Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h +Structure/GenerateImpropers.o : Structure/GenerateImpropers.cpp Atom.h AtomType.h Constants.h CpptrajStdio.h GuessAtomHybridization.h NameType.h ParameterHolders.h ParameterTypes.h Structure/GenerateImpropers.h SymbolExporting.h TypeNameHolder.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h @@ -467,7 +468,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h Structure/GenerateImpropers.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h From daba3baaaeeaffdb0a1c06c93e19e651b8fc88d9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:13:57 -0500 Subject: [PATCH 0260/1492] AssignParams in Topology builds the topology arrays, no need to do it explicitly. --- src/Exec_Build.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 52e74efc33..1dc353dea6 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -1,7 +1,7 @@ #include "Exec_Build.h" #include "CpptrajStdio.h" #include "DataSet_Parameters.h" -#include "Structure/GenerateConnectivity.h" +//#inc lude "Structure/GenerateConnectivity.h" #include "Structure/Zmatrix.h" DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, @@ -369,12 +369,6 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) return CpptrajState::ERR; } - // Generate angles/dihedrals - if (Cpptraj::Structure::GenerateBondAngleTorsionArrays(topOut)) { - mprinterr("Error: Could not generate angles/dihedrals for '%s'\n", topOut.c_str()); - return CpptrajState::ERR; - } - // Get parameter sets. typedef std::vector Parray; Parray ParamSets; @@ -421,16 +415,11 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mainParmSet->UpdateParamSet( *(*it), UC, State.Debug(), State.Debug() ); // FIXME verbose } - // Generate impropers - if (Cpptraj::Structure::GenerateImpropers(topOut, mainParmSet->AT())) { - mprinterr("Error: Could not generate impropers for '%s'\n", topOut.c_str()); - return CpptrajState::ERR; - } - - // Update parameters + // Assign parameters. This will create the bond/angle/dihedral/improper + // arrays as well. Exec::RetType ret = CpptrajState::OK; if ( topOut.AssignParams( *mainParmSet ) ) { - mprinterr("Error: Could not update parameters for '%s'.\n", topOut.c_str()); + mprinterr("Error: Could not assign parameters for '%s'.\n", topOut.c_str()); ret = CpptrajState::ERR; } From f36c7a7c1405f75b1f0bdc6d96f75a8598f435ae Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:14:38 -0500 Subject: [PATCH 0261/1492] Generate impropers --- src/Topology.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index ee80430582..8bd0930fd3 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -8,6 +8,7 @@ #include "AtomMask.h" #include "CharMask.h" #include "Structure/GenerateConnectivityArrays.h" +#include "Structure/GenerateImpropers.h" const NonbondType Topology::LJ_EMPTY = NonbondType(); @@ -3080,11 +3081,19 @@ int Topology::AssignParams(ParameterSet const& set0) { for (DihedralArray::const_iterator dih = allDihedrals.begin(); dih != allDihedrals.end(); ++dih) AddToDihedralArrays( *dih ); // Urey-Bradley - mprintf("\tRegenerating UB parameters.\n"); + mprintf("\tRegenerating Urey-Bradley parameters.\n"); AssignUBParams( set0.UB() ); // Improper parameters - mprintf("\tRegenerating improper parameters.\n"); - AssignImproperParams( set0.IP() ); + if (!chamber_.Impropers().empty()) { + mprintf("\tRegenerating CHARMM improper parameters.\n"); + AssignImproperParams( set0.IP() ); + } else { + mprintf("\tRegenerating improper parameters.\n"); + DihedralArray allImpropers = Cpptraj::Structure::GenerateImproperArray(atoms_, set0.AT()); + allImpropers = AssignDihedralParm( set0.DP(), set0.IP(), allImpropers ); + for (DihedralArray::const_iterator imp = allImpropers.begin(); imp != allImpropers.end(); ++imp) + AddToDihedralArrays( *imp ); + } // Atom types mprintf("\tRegenerating atom type parameters.\n"); AssignAtomTypeParm( set0.AT() ); From cd410233f30fe7eefc46078a716cca8c4d81496c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 10:35:14 -0500 Subject: [PATCH 0262/1492] Start adding GB params --- src/Parm/CMakeLists.txt | 4 ++++ src/Parm/GB_Params.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/Parm/GB_Params.h | 21 +++++++++++++++++++++ src/Parm/Makefile | 26 ++++++++++++++++++++++++++ src/Parm/parmdepend | 1 + src/Parm/parmfiles | 3 +++ 6 files changed, 91 insertions(+) create mode 100644 src/Parm/CMakeLists.txt create mode 100644 src/Parm/GB_Params.cpp create mode 100644 src/Parm/GB_Params.h create mode 100644 src/Parm/Makefile create mode 100644 src/Parm/parmdepend create mode 100644 src/Parm/parmfiles diff --git a/src/Parm/CMakeLists.txt b/src/Parm/CMakeLists.txt new file mode 100644 index 0000000000..caeb638991 --- /dev/null +++ b/src/Parm/CMakeLists.txt @@ -0,0 +1,4 @@ +#CMake buildfile for CPPTRAJ Parm subdirectory. +target_sources(cpptraj_common_obj PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/GB_Params.cpp +) diff --git a/src/Parm/GB_Params.cpp b/src/Parm/GB_Params.cpp new file mode 100644 index 0000000000..2b4a9958ca --- /dev/null +++ b/src/Parm/GB_Params.cpp @@ -0,0 +1,36 @@ +#include "GB_Params.h" +#include "../Topology.h" +#include "../CpptrajStdio.h" + +static const char* GB_RadiiTypeStr_[] = { + "Bondi radii", + "Amber 6 modified Bondi radii", + "Modified Bondi radii", + "Radii optimized for Amber charges by Huo and Kollman", + "H(N)-modified Bondi radii", + "PARSE radii", + "ArgH and AspGluO modified Bondi2 radii", + "Unknown GB radii set" +}; + +static const char* GB_RadiiTypeKey_[] = { + "bondi", + "amber6", + "mbondi", + "pbamber", + "mbondi2", + "parse", + "mbondi3" +}; + +/** Assign GB radii and screening parameters based on the given radius set. */ +int Cpptraj::Parm::Assign_GB_Radii(Topology& top, GB_RadiiType radiiSet) +{ + if (radiiSet == UNKNOWN_GB) { + mprinterr("Error: Unknown GB radii set.\n"); + return 1; + } + mprintf("\tUsing GB radii set: %s\n", GB_RadiiTypeStr_[radiiSet]); + + return 0; +} diff --git a/src/Parm/GB_Params.h b/src/Parm/GB_Params.h new file mode 100644 index 0000000000..8dc3e94a88 --- /dev/null +++ b/src/Parm/GB_Params.h @@ -0,0 +1,21 @@ +#ifndef INC_PARM_GBPARAMS_H +#define INC_PARM_GBPARAMS_H +class Topology; +namespace Cpptraj { +namespace Parm { +/// Known radii types. KEEP SYNCED WITH GB_RadiiTypeStr[] in GB_Params.cpp +enum GB_RadiiType { + BONDI=0, ///< 0, bondi, Bondi radii + BONDI_AMBER6, ///< 1, amber6, Amber6 modified Bondi radii + MBONDI, ///< 2, mbondi, Modified bondi radii + PB_AMBER, ///< 3, pbamber, PB radii from Huo and Kollman, currently unused + MBONDI2, ///< 6, mbondi2, H(N)-modified Bondi radii + PARSE, ///< 7, parse, PARSE radii + MBONDI3, ///< 8, ArgH and AspGluO modified Bondi2 radii + UNKNOWN_GB +}; +/// Assign GB radii +int Assign_GB_Radii(Topology&, GB_RadiiType); +} +} +#endif diff --git a/src/Parm/Makefile b/src/Parm/Makefile new file mode 100644 index 0000000000..0f070ffe50 --- /dev/null +++ b/src/Parm/Makefile @@ -0,0 +1,26 @@ +# Parm Makefile +include ../../config.h + +include parmfiles + +DEL_FILE = /bin/rm -f + +# Objects +OBJECTS=$(PARM_SOURCES:.cpp=.o) + +# Default target: objects +all: $(OBJECTS) + +clean: + $(DEL_FILE) *.o + +uninstall: clean + +# Dependency targets +../findDepend: + cd ../ && $(MAKE) findDepend + +depend: ../findDepend + ../findDepend $(PARM_SOURCES) > parmdepend + +include parmdepend diff --git a/src/Parm/parmdepend b/src/Parm/parmdepend new file mode 100644 index 0000000000..3fb8667ee2 --- /dev/null +++ b/src/Parm/parmdepend @@ -0,0 +1 @@ +GB_Params.o : GB_Params.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GB_Params.h diff --git a/src/Parm/parmfiles b/src/Parm/parmfiles new file mode 100644 index 0000000000..86a58ec097 --- /dev/null +++ b/src/Parm/parmfiles @@ -0,0 +1,3 @@ +# Files for Parm subdirectory. +PARM_SOURCES= \ + GB_Params.cpp From f962370205ce640cfdc3daed8d88a5f5bb34bff3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 11:17:17 -0500 Subject: [PATCH 0263/1492] Finish initial GB radii function --- src/Parm/GB_Params.cpp | 264 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 257 insertions(+), 7 deletions(-) diff --git a/src/Parm/GB_Params.cpp b/src/Parm/GB_Params.cpp index 2b4a9958ca..496d9b9cd1 100644 --- a/src/Parm/GB_Params.cpp +++ b/src/Parm/GB_Params.cpp @@ -14,15 +14,263 @@ static const char* GB_RadiiTypeStr_[] = { }; static const char* GB_RadiiTypeKey_[] = { - "bondi", - "amber6", - "mbondi", - "pbamber", - "mbondi2", - "parse", - "mbondi3" + "bondi", // 0 + "amber6", // 1 + "mbondi", // 2 + "pbamber", // 3 + "mbondi2", // 6 + "parse", // 7 + "mbondi3", // 8 + 0 }; +/// These are the numeric iGBparm values used in LEaP +static const int GB_RadiiTypeIGB_[] = { + 0, // bondi + 1, // amber6 + 2, // mbondi + 3, // pbamber + 6, // mbondi2 + 7, // parse + 8, // mbondi3 + 999999 +}; + +/** Assign GB radii. */ +static void assign_gb_radii(Topology& top, Cpptraj::Parm::GB_RadiiType radiiSet) +{ + int iGBparm = GB_RadiiTypeIGB_[radiiSet]; + for (int iat = 0; iat != top.Natom(); iat++) + { + Atom const& currentAtom = top[iat]; + Residue const& currentRes = top.Res(currentAtom.ResNum()); + double dGBrad = 0.0; +// saPAtom = PVAI(uUnit->vaAtoms, SAVEATOMt, i); +// iIndex = iParmSetFindAtom(uUnit->psParameters, saPAtom->sType); +// ParmSetAtom(uUnit->psParameters, iIndex, sType, &dMass, &dPolar, +// &dEpsilon, &dRStar, &dEpsilon14, &dRStar14, &dScreenF, +// &iElement, &iHybridization, sDesc); + if (iGBparm < 3 || iGBparm == 6 || iGBparm == 8) { + // Bondi or modified Bondi radii + switch (currentAtom.Element()) { + case Atom::HYDROGEN: + dGBrad = 1.2; + + // Make the modifications that hydrogen radii + // depend upon the atoms they are bonded to. + // iGBparm=1 corresponds to Amber 6, JACS 122:2489 (2000); + // iGBparm=2 adds the update of Biopolymers 56: 275 (2001) + if (currentAtom.Nbonds() > 0) { + + // For multiply bonded Hydrogen atoms use the first bond for + // determining modified GB radii. WAT contains multiply bonded + // Hydrogen atoms so do not emit a warning. + Atom const& aAtomA = top[currentAtom.Bond(0)]; + if (iGBparm == 1 || iGBparm == 2) { + switch (aAtomA.Element()) { + case Atom::CARBON: dGBrad = 1.3; break; // Carbon + case Atom::OXYGEN: dGBrad = 0.8; break; // Oxygen + case Atom::SULFUR: dGBrad = 0.8; break; // Sulfur + case Atom::NITROGEN: + if (iGBparm == 2) { + dGBrad = 1.3; + } + break; // Nitrogen, mbondi + case Atom::HYDROGEN: // Special case: water hydrogen + if (aAtomA.Type() == "HW" || aAtomA.Type() == "hw") { + dGBrad = 0.8; + } + break; + default : break; + } + } + else if (iGBparm == 6 || iGBparm == 8) { + + // Try Alexey's scheme + if (currentAtom.Element() == Atom::NITROGEN) { + dGBrad = 1.3; + if (iGBparm == 8) { + + // Update residue as appropriate + //if (saPAtom->iResidueIndex != iResidueIndex) { + // iResidueIndex = saPAtom->iResidueIndex; + // cPTemp = PVAI(uUnit->vaResidues, SAVERESIDUEt, + // iResidueIndex - 1)->sName; + // if (strlen(cPTemp) > 3) { + // cPTemp += (strlen(cPTemp) - 3); + // } + //} + + // Adjust Arg HH and HE + if (currentRes.Name() == "ARG" && (currentAtom.Name().Match("HH*") || currentAtom.Name() == "HE")) + { + //if (!strcmp(cPTemp, "ARG") && + // !(strncmp(sAtomName(saPAtom->aAtom), "HH", 2) && + // strcmp(sAtomName(saPAtom->aAtom), "HE"))) { + dGBrad = 1.17; + } + } + } + } + } + else { + mprintf("Warning: Unbonded Hydrogen atom %s in %s.\n" + " Cannot determine the requested GB radius for this atom.\n" + " Writing the unmodified Bondi GB radius.\n", + *(currentAtom.Name()), + top.TruncResNameNum(currentAtom.ResNum()).c_str()); + } + break; + case Atom::CARBON: + + // Use the mass of the carbon atom. We are testing for + // carbons here. C1 == CH, C2 == CH2, C3 == CH3. UA carbons + // have a larger radius (2.2), so we want to make sure that + // the C1, C2, and C3 atom types _really_ correspond to UA + // UA carbons. C1 atoms should have a mass of 12.01 + 1.01, + // C2 should be 12.01 + 2.02, and C3 should be 12.01 + 3.03. + // This mneumonic will not work for 13C named "C1". This is + // a (hopefully) temporary kludge. FIXME not sure this first line is right + //if (strncmp(sType, "C1", 2) && strncmp(sType, "C2", 2) && strncmp(sType, "C3", 2)) { + if (currentAtom.Type() != "C1" && currentAtom.Type() != "C2" && currentAtom.Type() != "C3") { + dGBrad = 1.7; + } + else if (currentAtom.Type() == "C1" && currentAtom.Mass() < 13.0) { + dGBrad = 1.7; + } + else if (currentAtom.Type() == "C2" && currentAtom.Mass() < 14.0) { + dGBrad = 1.7; + } + else if (currentAtom.Type() == "C3" && currentAtom.Mass() < 15.0) { + dGBrad = 1.7; + } + else { + dGBrad = 2.2; + } + break; + case Atom::NITROGEN: + dGBrad = 1.55; + break; + case Atom::OXYGEN: + dGBrad = 1.5; + if (iGBparm == 8) { + + // Update residue as appropriate + //if (saPAtom->iResidueIndex != iResidueIndex) { + // iResidueIndex = saPAtom->iResidueIndex; + // cPTemp = PVAI(uUnit->vaResidues, SAVERESIDUEt, iResidueIndex - 1)->sName; + // if (strlen(cPTemp) > 3) { + // cPTemp += (strlen(cPTemp) - 3); + // } + //} + + // Adjust Asp OD and Glu OE, and terminal OXT + if ( (currentRes.Name() == "ASP" && currentAtom.Name().Match("OD*")) || + (currentRes.Name() == "AS4" && currentAtom.Name().Match("OD*")) || + (currentRes.Name() == "GLU" && currentAtom.Name().Match("OE*")) || + (currentRes.Name() == "GL4" && currentAtom.Name().Match("OE*")) || + currentAtom.Name() == "OXT") + { + //if (!(strcmp(cPTemp, "ASP") || strncmp(sAtomName(saPAtom->aAtom), "OD", 2)) || + // !(strcmp(cPTemp, "AS4") || strncmp(sAtomName(saPAtom->aAtom), "OD", 2)) || + // !(strcmp(cPTemp, "GLU") || strncmp(sAtomName(saPAtom->aAtom), "OE", 2)) || + // !(strcmp(cPTemp, "GL4") || strncmp(sAtomName(saPAtom->aAtom), "OE", 2)) || + // (!strcmp(sAtomName(saPAtom->aAtom), "OXT") || + // (i + 1 < iVarArrayElementCount(uUnit->vaAtoms) && + // !strcmp(sAtomName(PVAI(uUnit->vaAtoms, SAVEATOMt, i + 1)->aAtom), + // "OXT")))) { + dGBrad = 1.4; + } + } + break; + case Atom::FLUORINE: + dGBrad = 1.5; + break; + case Atom::SILICON: + dGBrad = 2.1; + break; + case Atom::PHOSPHORUS: + dGBrad = 1.85; + break; + case Atom::SULFUR: + dGBrad = 1.8; + break; + case Atom::CHLORINE: + dGBrad = 1.7; + break; + default: + dGBrad = 1.5; + break; + } + } + else if (iGBparm == 3) { + + // Radii from Huo & Kollman + switch (currentAtom.Element()) { + case Atom::HYDROGEN: + dGBrad = 1.15; + break; + case Atom::CARBON: + dGBrad = 1.85; + break; + case Atom::NITROGEN: + dGBrad = 1.64; + break; + case Atom::OXYGEN: + dGBrad = 1.53; + break; + case Atom::FLUORINE: + dGBrad = 1.53; + break; + case Atom::PHOSPHORUS: + dGBrad = 2.02; + break; + case Atom::SULFUR: + dGBrad = 2.00; + break; + case Atom::CHLORINE: + dGBrad = 1.97; + break; + case Atom::BROMINE: + dGBrad = 2.03; + break; + case Atom::IODINE: + dGBrad = 2.10; + break; + default: + dGBrad = 1.5; + break; + } + } + else if (iGBparm == 7) { + + // Parse radii + switch (currentAtom.Element()) { + case Atom::HYDROGEN: + dGBrad = 1.00; + break; + case Atom::CARBON: + dGBrad = 1.70; + break; + case Atom::NITROGEN: + dGBrad = 1.50; + break; + case Atom::OXYGEN: + dGBrad = 1.40; + break; + case Atom::SULFUR: + dGBrad = 1.85; + break; + default: + dGBrad = 1.50; + break; + // Radii from J. Phys. Chem. 1994, 98, 1978-1988 + } + } + top.SetAtom(iat).SetGBradius( dGBrad ); + } // END loop over atoms +} + /** Assign GB radii and screening parameters based on the given radius set. */ int Cpptraj::Parm::Assign_GB_Radii(Topology& top, GB_RadiiType radiiSet) { @@ -31,6 +279,8 @@ int Cpptraj::Parm::Assign_GB_Radii(Topology& top, GB_RadiiType radiiSet) return 1; } mprintf("\tUsing GB radii set: %s\n", GB_RadiiTypeStr_[radiiSet]); + top.SetGBradiiSet( std::string(GB_RadiiTypeStr_[radiiSet]) ); + assign_gb_radii( top, radiiSet ); return 0; } From 73cc8ebc2b46a4005c4bdc58e8b8cd0e690c67a8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 11:21:19 -0500 Subject: [PATCH 0264/1492] Add Parm subdir to build --- src/CMakeLists.txt | 1 + src/Makefile | 9 +++++++-- src/cpptrajfiles | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4977c05e15..4e4c3efb75 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -115,6 +115,7 @@ endif() add_library(cpptraj_common_obj OBJECT ${CPPTRAJ_COMMON_SOURCES}) add_subdirectory(Cluster) add_subdirectory(Structure) +add_subdirectory(Parm) make_pic_if_needed(cpptraj_common_obj) #normally this would be applied by target_link_libraries, but since we use that intermediary object library, we have to apply it manually diff --git a/src/Makefile b/src/Makefile index 625e87e043..d739bb6c59 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,9 +8,11 @@ include Cluster/clusterfiles CLUSTER_SOURCEFILES=$(CLUSTER_SOURCES:%.cpp=Cluster/%.cpp) include Structure/structurefiles STRUCTURE_SOURCEFILES=$(STRUCTURE_SOURCES:%.cpp=Structure/%.cpp) +include Parm/parmfiles +PARM_SOURCEFILES=$(PARM_SOURCES:%.cpp=Parm/%.cpp) # All object files -OBJECTS=$(SOURCES:.cpp=.o) $(CSOURCES:.c=.o) $(CLUSTER_SOURCEFILES:.cpp=.o) $(STRUCTURE_SOURCEFILES:.cpp=.o) +OBJECTS=$(SOURCES:.cpp=.o) $(CSOURCES:.c=.o) $(CLUSTER_SOURCEFILES:.cpp=.o) $(STRUCTURE_SOURCEFILES:.cpp=.o) $(PARM_SOURCEFILES:.cpp=.o) # General rules .cpp.o: @@ -27,6 +29,7 @@ DEL_FILE = /bin/rm -f showsources: @echo $(CLUSTER_SOURCEFILES) @echo $(STRUCTURE_SOURCEFILES) + @echo $(PARM_SOURCEFILES) showobjects: @echo $(OBJECTS) @@ -137,7 +140,7 @@ findDepend: FindDepend.cpp FindDepend.o $(CXX) -o findDepend FindDepend.o depend: findDepend - ./findDepend $(SOURCES) $(CSOURCES) $(CLUSTER_SOURCEFILES) $(STRUCTURE_SOURCEFILES) > cpptrajdepend + ./findDepend $(SOURCES) $(CSOURCES) $(CLUSTER_SOURCEFILES) $(STRUCTURE_SOURCEFILES) $(PARM_SOURCEFILES) > cpptrajdepend dependclean: $(DEL_FILE) FindDepend.o findDepend @@ -151,6 +154,7 @@ clean: cd cuda_kernels && $(MAKE) clean cd Cluster && $(MAKE) clean cd Structure && $(MAKE) clean + cd Parm && $(MAKE) clean cd tng && $(MAKE) clean uninstall_lib: @@ -174,6 +178,7 @@ uninstall: uninstall_lib uninstall_inc cd cuda_kernels && $(MAKE) uninstall cd Cluster && $(MAKE) uninstall cd Structure && $(MAKE) uninstall + cd Parm && $(MAKE) uninstall # Header dependencies include cpptrajdepend diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 11560b4aa0..52ca7dce8c 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -478,7 +478,7 @@ SOURCES=$(COMMON_SOURCES) \ # by libcpptraj. They MUST have the '.LIBCPPTRAJ.o' extension and will be # compiled with the '-DLIBCPPTRAJ' define. # NOTE: This variable MUST be in cpptrajfiles as the cmake build expects it. -LIBCPPTRAJ_OBJECTS=$(COMMON_SOURCES:.cpp=.o) $(CSOURCES:.c=.o) $(CLUSTER_SOURCEFILES:.cpp=.o) $(STRUCTURE_SOURCEFILES:.cpp=.o) \ +LIBCPPTRAJ_OBJECTS=$(COMMON_SOURCES:.cpp=.o) $(CSOURCES:.c=.o) $(CLUSTER_SOURCEFILES:.cpp=.o) $(STRUCTURE_SOURCEFILES:.cpp=.o) $(PARM_SOURCEFILES:.cpp=.o) \ Action_Esander.LIBCPPTRAJ.o \ Command.LIBCPPTRAJ.o \ Cpptraj.LIBCPPTRAJ.o \ From 8a5354b1fb830c6fdf2b9e4aab2c3b38bb8b91bd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 11:27:15 -0500 Subject: [PATCH 0265/1492] Get type from key --- src/Parm/GB_Params.cpp | 10 ++++++++++ src/Parm/GB_Params.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/Parm/GB_Params.cpp b/src/Parm/GB_Params.cpp index 496d9b9cd1..34203854b8 100644 --- a/src/Parm/GB_Params.cpp +++ b/src/Parm/GB_Params.cpp @@ -24,6 +24,16 @@ static const char* GB_RadiiTypeKey_[] = { 0 }; +/** \return GB_RadiiType corresponding to string. */ +Cpptraj::Parm::GB_RadiiType Cpptraj::Parm::GbTypeFromKey(std::string const& key) { + if (!key.empty()) { + for (int i = 0; i < (int)UNKNOWN_GB; i++) { + if ( key == std::string(GB_RadiiTypeKey_[i]) ) return (GB_RadiiType)i; + } + } + return UNKNOWN_GB; +} + /// These are the numeric iGBparm values used in LEaP static const int GB_RadiiTypeIGB_[] = { 0, // bondi diff --git a/src/Parm/GB_Params.h b/src/Parm/GB_Params.h index 8dc3e94a88..ab07ac9b0b 100644 --- a/src/Parm/GB_Params.h +++ b/src/Parm/GB_Params.h @@ -1,5 +1,6 @@ #ifndef INC_PARM_GBPARAMS_H #define INC_PARM_GBPARAMS_H +#include class Topology; namespace Cpptraj { namespace Parm { @@ -14,6 +15,8 @@ enum GB_RadiiType { MBONDI3, ///< 8, ArgH and AspGluO modified Bondi2 radii UNKNOWN_GB }; +/// \return GB radii type corresponding to string +GB_RadiiType GbTypeFromKey(std::string const&); /// Assign GB radii int Assign_GB_Radii(Topology&, GB_RadiiType); } From 92650dc0299be944991ad5ca74ad4abae6a7fb37 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 11:30:39 -0500 Subject: [PATCH 0266/1492] Add function to return string corresponding to gb type --- src/Parm/GB_Params.cpp | 5 +++++ src/Parm/GB_Params.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/Parm/GB_Params.cpp b/src/Parm/GB_Params.cpp index 34203854b8..4c31f19a70 100644 --- a/src/Parm/GB_Params.cpp +++ b/src/Parm/GB_Params.cpp @@ -24,6 +24,11 @@ static const char* GB_RadiiTypeKey_[] = { 0 }; +/** \return char string corresponding to type. */ +std::string Cpptraj::Parm::GbTypeStr(GB_RadiiType t) { + return std::string(GB_RadiiTypeStr_[t]); +} + /** \return GB_RadiiType corresponding to string. */ Cpptraj::Parm::GB_RadiiType Cpptraj::Parm::GbTypeFromKey(std::string const& key) { if (!key.empty()) { diff --git a/src/Parm/GB_Params.h b/src/Parm/GB_Params.h index ab07ac9b0b..97f24d11ff 100644 --- a/src/Parm/GB_Params.h +++ b/src/Parm/GB_Params.h @@ -15,6 +15,8 @@ enum GB_RadiiType { MBONDI3, ///< 8, ArgH and AspGluO modified Bondi2 radii UNKNOWN_GB }; +/// \return string corresponding to gb radii set +std::string GbTypeStr(GB_RadiiType); /// \return GB radii type corresponding to string GB_RadiiType GbTypeFromKey(std::string const&); /// Assign GB radii From a7163fce16dd03fd44cc72c3a031cb9fdc90691e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 11:34:46 -0500 Subject: [PATCH 0267/1492] Do gb radii assignment --- src/Exec_Build.cpp | 18 ++++++++++++++++++ src/cpptrajdepend | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 1dc353dea6..371d7058a2 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -3,6 +3,7 @@ #include "DataSet_Parameters.h" //#inc lude "Structure/GenerateConnectivity.h" #include "Structure/Zmatrix.h" +#include "Parm/GB_Params.h" DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, NameType const& rname) @@ -322,6 +323,18 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) DataSet_Coords& crdout = static_cast( *((DataSet_Coords*)outCrdPtr) ); mprintf("\tOutput COORDS set: %s\n", crdout.legend()); + // GB radii set + Cpptraj::Parm::GB_RadiiType gbradii = Cpptraj::Parm::MBONDI; // Default + std::string gbset = argIn.GetStringKey("gb"); + if (!gbset.empty()) { + gbradii = Cpptraj::Parm::GbTypeFromKey( gbset ); + if (gbradii == Cpptraj::Parm::UNKNOWN_GB) { + mprinterr("Error: Unknown GB radii set: %s\n", gbset.c_str()); + return CpptrajState::ERR; + } + } + mprintf("\tGB radii set: %s\n", Cpptraj::Parm::GbTypeStr(gbradii).c_str()); + // Get residue templates. Carray Templates; std::string lib = argIn.GetStringKey("lib"); @@ -422,6 +435,11 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mprinterr("Error: Could not assign parameters for '%s'.\n", topOut.c_str()); ret = CpptrajState::ERR; } + // Assign GB parameters + if (Cpptraj::Parm::Assign_GB_Radii( topOut, gbradii )) { + mprinterr("Error: Could not assign GB parameters for '%s'\n", topOut.c_str()); + ret = CpptrajState::ERR; + } if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 05ca2d63ae..5e3558a479 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -288,7 +288,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -399,6 +399,7 @@ PairList.o : PairList.cpp Atom.h AtomMask.h Box.h CoordinateInfo.h CpptrajStdio. Parallel.o : Parallel.cpp Parallel.h ParallelNetcdf.o : ParallelNetcdf.cpp CpptrajStdio.h Parallel.h ParallelNetcdf.h ParameterSet.o : ParameterSet.cpp AtomType.h Constants.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h TypeNameHolder.h UpdateParameters.h +Parm/GB_Params.o : Parm/GB_Params.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h ParmFile.o : ParmFile.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedFrame.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h ParmIO.h Parm_Amber.h Parm_CIF.h Parm_CharmmPsf.h Parm_Gromacs.h Parm_Mol2.h Parm_PDB.h Parm_SDF.h Parm_Tinker.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h Parm_Amber.o : Parm_Amber.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h ExclusionArray.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmIO.h Parm_Amber.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h Parm_CIF.o : Parm_CIF.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h CIFfile.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmIO.h Parm_CIF.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From fe77b2f5e1613b32e3551447085cc7fa6b1af77b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 11:47:29 -0500 Subject: [PATCH 0268/1492] Add gb screen params --- src/Parm/GB_Params.cpp | 107 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/src/Parm/GB_Params.cpp b/src/Parm/GB_Params.cpp index 4c31f19a70..65db247499 100644 --- a/src/Parm/GB_Params.cpp +++ b/src/Parm/GB_Params.cpp @@ -286,6 +286,112 @@ static void assign_gb_radii(Topology& top, Cpptraj::Parm::GB_RadiiType radiiSet) } // END loop over atoms } +/** Assign GB screening parameters. */ +static void assign_gb_screen(Topology& top, Cpptraj::Parm::GB_RadiiType radiiSet) +{ + int iGBparm = GB_RadiiTypeIGB_[radiiSet]; + for (int iat = 0; iat != top.Natom(); iat++) + { + Atom const& currentAtom = top[iat]; + double dGBscreen = 0; + if (iGBparm < 4 || iGBparm == 6 || iGBparm == 8) { + + // For now, hardwire the Bondi radii + switch (currentAtom.Element()) { + case Atom::HYDROGEN: + dGBscreen = 0.85; + break; + case Atom::CARBON: + dGBscreen = 0.72; + break; + case Atom::NITROGEN: + dGBscreen = 0.79; + break; + case Atom::OXYGEN: + dGBscreen = 0.85; + break; + case Atom::FLUORINE: + dGBscreen = 0.88; + break; + case Atom::PHOSPHORUS: + dGBscreen = 0.86; + break; + case Atom::SULFUR: + dGBscreen = 0.96; + break; + default: + dGBscreen = 0.8; + break; // or should fail?? + } + } + else if (iGBparm == 4) { // param for Jayaram et al. 'GB' + switch (currentAtom.Element()) { + case Atom::HYDROGEN: + dGBscreen = 0.8461; + break; + case Atom::CARBON: + dGBscreen = 0.9615; + break; + case Atom::NITROGEN: + dGBscreen = 0.9343; + break; + case Atom::OXYGEN: + dGBscreen = 1.0088; + break; + case Atom::SODIUM: + dGBscreen = 1.0000; + break; + case Atom::MAGNESIUM: + dGBscreen = 1.0000; + break; // Set by HG + case Atom::PHOSPHORUS: + dGBscreen = 1.0700; + break; + case Atom::SULFUR: + dGBscreen = 1.1733; + break; + default: + dGBscreen = 0.8000; + break; // Set by HG + } + } + else if (iGBparm == 5) { + + // Param for Jayaram et al. 'MGB' + switch (currentAtom.Element()) { + case Atom::HYDROGEN: + dGBscreen = 0.8846; + break; + case Atom::CARBON: + dGBscreen = 0.9186; + break; + case Atom::NITROGEN: + dGBscreen = 0.8733; + break; + case Atom::OXYGEN: + dGBscreen = 0.8836; + break; + case Atom::SODIUM: + dGBscreen = 1.0000; + break; + case Atom::MAGNESIUM: + dGBscreen = 1.0000; + break; // Set by HG + case Atom::PHOSPHORUS: + dGBscreen = 0.9604; + break; + case Atom::SULFUR: + dGBscreen = 0.9323; + break; + default: + dGBscreen = 0.8000; + break; // Set by HG + } + } + top.SetAtom(iat).SetGBscreen( dGBscreen ); + } // END loop over atoms +} + /** Assign GB radii and screening parameters based on the given radius set. */ int Cpptraj::Parm::Assign_GB_Radii(Topology& top, GB_RadiiType radiiSet) { @@ -296,6 +402,7 @@ int Cpptraj::Parm::Assign_GB_Radii(Topology& top, GB_RadiiType radiiSet) mprintf("\tUsing GB radii set: %s\n", GB_RadiiTypeStr_[radiiSet]); top.SetGBradiiSet( std::string(GB_RadiiTypeStr_[radiiSet]) ); assign_gb_radii( top, radiiSet ); + assign_gb_screen( top, radiiSet ); return 0; } From 5a7cec41ab6ed020791eb2e6535c528c959239e9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 15:15:13 -0500 Subject: [PATCH 0269/1492] Add note --- src/Topology.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 8bd0930fd3..4a80add13b 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2769,7 +2769,7 @@ void Topology::AssignImproperParams(ImproperParmHolder const& newImproperParams) DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams, DihedralArray const& dihedrals) -{ +{ // TODO skip extra points DihedralArray dihedralsIn; // Keep track of 1-4 interactions typedef std::pair Ipair; From ac9caf7fb5713e185bde020bf1dfab14d58b411d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 4 Jan 2024 20:26:29 -0500 Subject: [PATCH 0270/1492] Fix atom ordering in impropers. Still need to fix the sp2 checking --- src/Structure/GenerateImpropers.cpp | 15 ++++++++++++--- src/Structure/GenerateImpropers.h | 3 ++- src/Structure/structuredepend | 2 +- src/Topology.cpp | 2 +- src/cpptrajdepend | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/Structure/GenerateImpropers.cpp b/src/Structure/GenerateImpropers.cpp index 9db50929f2..2e7463d23f 100644 --- a/src/Structure/GenerateImpropers.cpp +++ b/src/Structure/GenerateImpropers.cpp @@ -2,6 +2,7 @@ #include "../CpptrajStdio.h" #include "../Atom.h" #include "../AtomType.h" +#include "../Residue.h" #include "../GuessAtomHybridization.h" #include "../ParameterTypes.h" #include "../ParameterHolders.h" @@ -37,12 +38,19 @@ static inline void printName(Atom const& AJ) { } /** Try to determine impropers for topology. */ // TODO option for charmm improper -DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector const& atoms, +DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector const& residues, + std::vector const& atoms, ParmHolder const& AT) { DihedralArray out; - long int atBegin = (long int)(atoms.size()) - 1; - for (long int iat = atBegin; iat >= 0; iat--) { + //int iidx = 0; + for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) + { + for (int iat = res->LastAtom()-1; iat >= res->FirstAtom(); iat--) + { +// +// long int atBegin = (long int)(atoms.size()) - 1; +// for (long int iat = atBegin; iat >= 0; iat--) { Atom const& AJ = atoms[iat]; if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; @@ -78,6 +86,7 @@ DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector const& mprintf("\n"); } } + } } return out; } diff --git a/src/Structure/GenerateImpropers.h b/src/Structure/GenerateImpropers.h index 8d47c42e05..f88dbacf3d 100644 --- a/src/Structure/GenerateImpropers.h +++ b/src/Structure/GenerateImpropers.h @@ -2,13 +2,14 @@ #define INC_STRUCTURE_GENERATEIMPROPERS_H #include class Atom; +class Residue; class AtomType; class DihedralArray; template class ParmHolder; namespace Cpptraj { namespace Structure { /// Generate improper dihedral array in same order as leap -DihedralArray GenerateImproperArray(std::vector const&, ParmHolder const&); +DihedralArray GenerateImproperArray(std::vector const&, std::vector const&, ParmHolder const&); } } #endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index cb893b8f36..a15da61fb8 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -5,7 +5,7 @@ FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../ FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h -GenerateImpropers.o : GenerateImpropers.cpp ../Atom.h ../AtomType.h ../Constants.h ../CpptrajStdio.h ../GuessAtomHybridization.h ../NameType.h ../ParameterHolders.h ../ParameterTypes.h ../SymbolExporting.h ../TypeNameHolder.h GenerateImpropers.h +GenerateImpropers.o : GenerateImpropers.cpp ../Atom.h ../AtomType.h ../Constants.h ../CpptrajStdio.h ../GuessAtomHybridization.h ../NameType.h ../ParameterHolders.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h ../TypeNameHolder.h GenerateImpropers.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h diff --git a/src/Topology.cpp b/src/Topology.cpp index 4a80add13b..ba7437212e 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -3089,7 +3089,7 @@ int Topology::AssignParams(ParameterSet const& set0) { AssignImproperParams( set0.IP() ); } else { mprintf("\tRegenerating improper parameters.\n"); - DihedralArray allImpropers = Cpptraj::Structure::GenerateImproperArray(atoms_, set0.AT()); + DihedralArray allImpropers = Cpptraj::Structure::GenerateImproperArray(residues_, atoms_, set0.AT()); allImpropers = AssignDihedralParm( set0.DP(), set0.IP(), allImpropers ); for (DihedralArray::const_iterator imp = allImpropers.begin(); imp != allImpropers.end(); ++imp) AddToDihedralArrays( *imp ); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 5e3558a479..88a254f584 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -450,7 +450,7 @@ Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h Ato Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h -Structure/GenerateImpropers.o : Structure/GenerateImpropers.cpp Atom.h AtomType.h Constants.h CpptrajStdio.h GuessAtomHybridization.h NameType.h ParameterHolders.h ParameterTypes.h Structure/GenerateImpropers.h SymbolExporting.h TypeNameHolder.h +Structure/GenerateImpropers.o : Structure/GenerateImpropers.cpp Atom.h AtomType.h Constants.h CpptrajStdio.h GuessAtomHybridization.h NameType.h ParameterHolders.h ParameterTypes.h Residue.h Structure/GenerateImpropers.h SymbolExporting.h TypeNameHolder.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h From cf9b3a9b69d7cf99582835eeadf25c059523463a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 10:16:32 -0500 Subject: [PATCH 0271/1492] New version of improper generation that is closer to what leap does --- src/Structure/GenerateConnectivityArrays.cpp | 66 ++++++++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 2 + 2 files changed, 68 insertions(+) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 8d5590893a..1bb7ddb5bb 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -91,3 +91,69 @@ DihedralArray Cpptraj::Structure::GenerateDihedralArray(std::vector con } return out; } + +/** Try to order an improper the same way that LEaP does. + * LEaP has wild card names first, followed by atom types + * in alphabetical order. + */ +static void order_improper_atoms(int* indices, std::vector const& atoms) +{ + if (atoms[indices[0]].Type() > atoms[indices[1]].Type()) std::swap( indices[0], indices[1] ); + if (atoms[indices[1]].Type() > atoms[indices[2]].Type()) std::swap( indices[1], indices[2] ); + if (atoms[indices[0]].Type() > atoms[indices[1]].Type()) std::swap( indices[0], indices[1] ); + if (atoms[indices[1]].Type() > atoms[indices[2]].Type()) std::swap( indices[1], indices[2] ); +} + +// DEBUG +static inline void printName(Atom const& AJ) { + mprintf(" :%i@%s", AJ.ResNum()+1, AJ.Name().Truncated().c_str()); +} + +/** From atom connectivity, generate an improper array in the same order as LEaP. + * No attempt is made to determine if this is an sp2 center; that is done + * during parameterization. + */ +DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector const& residues, + std::vector const& atoms) +{ + DihedralArray out; + int iidx = 0; + for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) + { + for (int iat3 = res->LastAtom()-1; iat3 >= res->FirstAtom(); iat3--) + { + Atom const& AJ = atoms[iat3]; + if (AJ.Nbonds() >= 3) { + for (int bidx0 = 0; bidx0 < AJ.Nbonds(); bidx0++) { + for (int bidx1 = bidx0 + 1; bidx1 < AJ.Nbonds(); bidx1++) { + for (int bidx2 = bidx1 + 1; bidx2 < AJ.Nbonds(); bidx2++) { + int iat1 = AJ.BondIdxArray()[bidx0]; + int iat2 = AJ.BondIdxArray()[bidx1]; + int iat4 = AJ.BondIdxArray()[bidx2]; + mprintf("DEBUG: IMPROPER i= %i %i - %i - %i - %i (%i %i %i %i)\n", iidx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + int indices[3]; + indices[0] = iat1; + indices[1] = iat2; + indices[2] = iat4; + order_improper_atoms(indices, atoms); + out.push_back( DihedralType(indices[0], indices[1], iat3, indices[2], DihedralType::BOTH) ); + // DEBUG + mprintf("DEBUG:\tOriginal order :"); + printName(atoms[iat1]); + printName(atoms[iat2]); + printName(atoms[iat3]); + printName(atoms[iat4]); + mprintf("\nDEBUG:\tLeap order :"); + printName(atoms[indices[0]]); + printName(atoms[indices[1]]); + printName(atoms[iat3]); + printName(atoms[indices[2]]); + mprintf("\n"); + } + } + } // END outer loop over bond indices + } + } // END loop over residue atoms + } // END loop over residues + return out; +} diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index 8fac565a63..27c6f5c647 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -14,6 +14,8 @@ BondArray GenerateBondArray(std::vector const&, std::vector const AngleArray GenerateAngleArray(std::vector const&, std::vector const&); /// Generate proper dihedral array in same order as leap DihedralArray GenerateDihedralArray(std::vector const&, std::vector const&); +/// Generate improper dihedral array in same order as leap +DihedralArray GenerateImproperArray(std::vector const&, std::vector const&); } } #endif From 4651ed6f8df3c1d8f5e85a410b24da39fbf5e3ae Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 10:17:54 -0500 Subject: [PATCH 0272/1492] Remove old routine --- src/Structure/GenerateImpropers.cpp | 92 ----------------------------- src/Structure/GenerateImpropers.h | 15 ----- 2 files changed, 107 deletions(-) delete mode 100644 src/Structure/GenerateImpropers.cpp delete mode 100644 src/Structure/GenerateImpropers.h diff --git a/src/Structure/GenerateImpropers.cpp b/src/Structure/GenerateImpropers.cpp deleted file mode 100644 index 2e7463d23f..0000000000 --- a/src/Structure/GenerateImpropers.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include "GenerateImpropers.h" -#include "../CpptrajStdio.h" -#include "../Atom.h" -#include "../AtomType.h" -#include "../Residue.h" -#include "../GuessAtomHybridization.h" -#include "../ParameterTypes.h" -#include "../ParameterHolders.h" -#include // std::swap - -/** Try to order an improper the same way that LEaP does. - * LEaP has wild card names first, followed by atom types - * in alphabetical order. The third atom is always the central - * atom. - */ -static int order_improper_atoms(int* leapdih, int centralAt, std::vector const& topIn) -{ - Atom const& Ak = topIn[centralAt]; - std::vector const& bonds = Ak.BondIdxArray(); - int indices[3]; - indices[0] = bonds[0]; - indices[1] = bonds[1]; - indices[2] = bonds[2]; - if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); - if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); - if (topIn[indices[0]].Type() > topIn[indices[1]].Type()) std::swap( indices[0], indices[1] ); - if (topIn[indices[1]].Type() > topIn[indices[2]].Type()) std::swap( indices[1], indices[2] ); - leapdih[0] = indices[0]; - leapdih[1] = indices[1]; - leapdih[2] = centralAt; - leapdih[3] = indices[2]; - return 0; -} - -// DEBUG -static inline void printName(Atom const& AJ) { - mprintf(" :%i@%s", AJ.ResNum()+1, AJ.Name().Truncated().c_str()); -} - -/** Try to determine impropers for topology. */ // TODO option for charmm improper -DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector const& residues, - std::vector const& atoms, - ParmHolder const& AT) -{ - DihedralArray out; - //int iidx = 0; - for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) - { - for (int iat = res->LastAtom()-1; iat >= res->FirstAtom(); iat--) - { -// -// long int atBegin = (long int)(atoms.size()) - 1; -// for (long int iat = atBegin; iat >= 0; iat--) { - Atom const& AJ = atoms[iat]; - if (AJ.Nbonds() == 3) { // TODO only 3 atoms OK? - AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; - bool found; - AtomType atype = AT.FindParam(TypeNameHolder(AJ.Type()), found); - if (found) - hybrid = atype.Hybridization(); - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) - hybrid = Cpptraj::GuessAtomHybridization( AJ, atoms ); - if (hybrid == AtomType::SP2) { - mprintf("DEBUG: Potential improper center:"); - printName(AJ); - mprintf("\n"); - int leapdih[4]; - order_improper_atoms(leapdih, iat, atoms); - mprintf("DEBUG: Bond order"); - printName(AJ); - mprintf(": %i %i %i %i", - AJ.BondIdxArray()[0]+1, - AJ.BondIdxArray()[1]+1, - iat+1, - AJ.BondIdxArray()[2]+1); - printName(atoms[AJ.BondIdxArray()[0]]); - printName(atoms[AJ.BondIdxArray()[1]]); - printName(AJ); - printName(atoms[AJ.BondIdxArray()[2]]); - mprintf("\n"); - mprintf("DEBUG: Leap order: %i %i %i %i\n", leapdih[0]+1, leapdih[1]+1, leapdih[2]+1, leapdih[3]+1); - out.push_back( DihedralType(leapdih[0], leapdih[1], leapdih[2], leapdih[3], DihedralType::BOTH) ); - } else if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { - mprintf("Warning: When searching for impropers could not determine hybridization of"); - printName(AJ); - mprintf("\n"); - } - } - } - } - return out; -} diff --git a/src/Structure/GenerateImpropers.h b/src/Structure/GenerateImpropers.h deleted file mode 100644 index f88dbacf3d..0000000000 --- a/src/Structure/GenerateImpropers.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef INC_STRUCTURE_GENERATEIMPROPERS_H -#define INC_STRUCTURE_GENERATEIMPROPERS_H -#include -class Atom; -class Residue; -class AtomType; -class DihedralArray; -template class ParmHolder; -namespace Cpptraj { -namespace Structure { -/// Generate improper dihedral array in same order as leap -DihedralArray GenerateImproperArray(std::vector const&, std::vector const&, ParmHolder const&); -} -} -#endif From 0149fa7896df79a40faaa078227c0a06c4bb4fc8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 13:31:12 -0500 Subject: [PATCH 0273/1492] Assign impropers the same way as leap; do not add improper if no parameter is present, but warn if the central atom is sp2 --- src/Structure/CMakeLists.txt | 1 - src/Structure/GenerateConnectivityArrays.cpp | 1 + src/Structure/structuredepend | 1 - src/Structure/structurefiles | 1 - src/Topology.cpp | 48 ++++++++++++++------ src/Topology.h | 5 +- src/cpptrajdepend | 3 +- 7 files changed, 39 insertions(+), 21 deletions(-) diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index e0fa49b0e7..d04716f8bc 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -7,7 +7,6 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivityArrays.cpp ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivity.cpp - ${CMAKE_CURRENT_LIST_DIR}/GenerateImpropers.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp ${CMAKE_CURRENT_LIST_DIR}/Model.cpp diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 1bb7ddb5bb..8c2c01e261 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -3,6 +3,7 @@ #include "../Atom.h" #include "../Residue.h" #include "../CpptrajStdio.h" +#include // std::swap /** From atom connectivity, generate a bond array in the same order as LEaP. */ // TODO use in GenerateBAT BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& residues, diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index a15da61fb8..1cc597f095 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -5,7 +5,6 @@ FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../ FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h -GenerateImpropers.o : GenerateImpropers.cpp ../Atom.h ../AtomType.h ../Constants.h ../CpptrajStdio.h ../GuessAtomHybridization.h ../NameType.h ../ParameterHolders.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h ../TypeNameHolder.h GenerateImpropers.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 825ca83eb0..6a6dd3da57 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -7,7 +7,6 @@ STRUCTURE_SOURCES= \ FxnGroupBuilder.cpp \ GenerateConnectivityArrays.cpp \ GenerateConnectivity.cpp \ - GenerateImpropers.cpp \ HisProt.cpp \ InternalCoords.cpp \ Model.cpp \ diff --git a/src/Topology.cpp b/src/Topology.cpp index ba7437212e..859a9901a2 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -7,8 +7,8 @@ #include "AtomType.h" #include "AtomMask.h" #include "CharMask.h" +#include "GuessAtomHybridization.h" #include "Structure/GenerateConnectivityArrays.h" -#include "Structure/GenerateImpropers.h" const NonbondType Topology::LJ_EMPTY = NonbondType(); @@ -2768,6 +2768,7 @@ void Topology::AssignImproperParams(ImproperParmHolder const& newImproperParams) */ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams, + ParmHolder const& AT, DihedralArray const& dihedrals) { // TODO skip extra points DihedralArray dihedralsIn; @@ -2799,8 +2800,12 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral (int)dih->IsImproper(), (int)isImproper); } bool found; - if (isImproper) { + if (dih->IsImproper()) { // ----- This is actually an improper dihedral. ---------------- + // Impropers are treated differently than other topology types. If + // no parameter is found, do not add it to the list of dihedrals. + // However, if no parameter is found and the central atom is + // SP2, print a warning. //ImproperParmHolder::OrderType lastOrder; DihedralType mydih = *dih; bool reordered; @@ -2813,18 +2818,31 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral TruncResAtomNameNum(dih->A3()).c_str(), TruncResAtomNameNum(dih->A4()).c_str(), *types[0], *types[1], *types[2], *types[3]); + // Central atom + Atom const& AJ = atoms_[dih->A3()]; + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + AtomType atype = AT.FindParam(TypeNameHolder(AJ.Type()), found); + if (found) + hybrid = atype.Hybridization(); + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { + mprintf("Warning: Guessing hybridization for improper central atom %s\n", AtomMaskName(dih->A3()).c_str()); + hybrid = Cpptraj::GuessAtomHybridization( AJ, atoms_ ); + } + if (hybrid == AtomType::SP2) { + mprintf("Warning: No improper parameters for SP2 hybridized atom %s\n", AtomMaskName(dih->A3()).c_str()); + } } else { if (ipa.size() > 1) mprintf("Warning: %zu improper parameters found for types %s - %s - %s - %s, expected only one." "Warning: Only using first parameter.\n", ipa.size(), *(types[0]), *(types[1]), *(types[2]), *(types[3])); if (reordered) warn_improper_reorder( *dih, mydih ); idx = addTorsionParm( dihedralparm_, ipa.front() ); + mydih.SetIdx( idx ); + mydih.SetImproper( true ); + // Always skip 1-4 for impropers + mydih.SetSkip14( true ); + dihedralsIn.push_back( mydih ); } - mydih.SetIdx( idx ); - mydih.SetImproper( true ); - // Always skip 1-4 for impropers - mydih.SetSkip14( true ); - dihedralsIn.push_back( mydih ); } else { // -----Regular dihedral. See if parameter already present. ---- DihedralParmArray dpa = newDihedralParams.FindParam( types, found ); @@ -2933,14 +2951,16 @@ DihedralArray Topology::get_unique_dihedrals(DihedralArray const& dihedralsIn) c } /** Replace any current dihedral parameters with given dihedral parameters. */ -void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams) { +void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams, + ParmHolder const& AT) +{ dihedralparm_.clear(); // Dihedrals can be a bit of a pain since there can be multiple // multiplicities for a single dihedral type. In case multiplicities // change, start with a fresh dihedral array containing only unique // dihedrals. - dihedrals_ = AssignDihedralParm( newDihedralParams, newImproperParams, get_unique_dihedrals(dihedrals_) ); - dihedralsh_ = AssignDihedralParm( newDihedralParams, newImproperParams, get_unique_dihedrals(dihedralsh_) ); + dihedrals_ = AssignDihedralParm( newDihedralParams, newImproperParams, AT, get_unique_dihedrals(dihedrals_) ); + dihedralsh_ = AssignDihedralParm( newDihedralParams, newImproperParams, AT, get_unique_dihedrals(dihedralsh_) ); } /** Replace current nonbond parameters with given nonbond parameters. */ @@ -3077,7 +3097,7 @@ int Topology::AssignParams(ParameterSet const& set0) { dihedrals_.clear(); dihedralsh_.clear(); DihedralArray allDihedrals = Cpptraj::Structure::GenerateDihedralArray(residues_, atoms_); - allDihedrals = AssignDihedralParm( set0.DP(), set0.IP(), allDihedrals ); + allDihedrals = AssignDihedralParm( set0.DP(), set0.IP(), set0.AT(), allDihedrals ); for (DihedralArray::const_iterator dih = allDihedrals.begin(); dih != allDihedrals.end(); ++dih) AddToDihedralArrays( *dih ); // Urey-Bradley @@ -3089,8 +3109,8 @@ int Topology::AssignParams(ParameterSet const& set0) { AssignImproperParams( set0.IP() ); } else { mprintf("\tRegenerating improper parameters.\n"); - DihedralArray allImpropers = Cpptraj::Structure::GenerateImproperArray(residues_, atoms_, set0.AT()); - allImpropers = AssignDihedralParm( set0.DP(), set0.IP(), allImpropers ); + DihedralArray allImpropers = Cpptraj::Structure::GenerateImproperArray(residues_, atoms_); + allImpropers = AssignDihedralParm( set0.DP(), set0.IP(), set0.AT(), allImpropers ); for (DihedralArray::const_iterator imp = allImpropers.begin(); imp != allImpropers.end(); ++imp) AddToDihedralArrays( *imp ); } @@ -3152,7 +3172,7 @@ int Topology::updateParams(ParameterSet& set0, ParameterSet const& set1) { // updateCount = UpdateParameters< DihedralParmHolder >(set0.DP(), set1.DP(), "dihedral"); if (UC.nDihedralsUpdated_ > 0) { mprintf("\tRegenerating dihedral parameters.\n"); - AssignDihedralParams( set0.DP(), set0.IP() ); + AssignDihedralParams( set0.DP(), set0.IP(), set0.AT() ); } // Urey-Bradley // updateCount = UpdateParameters< ParmHolder >(set0.UB(), set1.UB(), "Urey-Bradley"); diff --git a/src/Topology.h b/src/Topology.h index ec9d70981c..6afa53dcc0 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -145,7 +145,7 @@ class Topology { void AddDihedral(DihedralType const&, bool); void AddDihedral(DihedralType const&, DihedralParmType const&); void AssignImproperParams(ImproperParmHolder const&); - void AssignDihedralParams(DihedralParmHolder const&, ImproperParmHolder const&); + void AssignDihedralParams(DihedralParmHolder const&, ImproperParmHolder const&, ParmHolder const&); /// Add to dihedral arrays void AddToDihedralArrays(DihedralType const&); // ----- CMAP-specific routines -------------- @@ -310,7 +310,8 @@ class Topology { void warn_improper_reorder(DihedralType const&, DihedralType const&) const; void AssignImproperParm(ImproperParmHolder const&, DihedralArray&, DihedralParmArray&) const; inline DihedralArray get_unique_dihedrals(DihedralArray const&) const; - DihedralArray AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, DihedralArray const&); + DihedralArray AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, + ParmHolder const&, DihedralArray const&); static const NonbondType LJ_EMPTY; std::vector atoms_; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 88a254f584..067c995755 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -450,7 +450,6 @@ Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h Ato Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h -Structure/GenerateImpropers.o : Structure/GenerateImpropers.cpp Atom.h AtomType.h Constants.h CpptrajStdio.h GuessAtomHybridization.h NameType.h ParameterHolders.h ParameterTypes.h Residue.h Structure/GenerateImpropers.h SymbolExporting.h TypeNameHolder.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h @@ -469,7 +468,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h Structure/GenerateImpropers.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h From c7a29afc7b90e015630d347e7bc9ba1e1b331533 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 13:39:17 -0500 Subject: [PATCH 0274/1492] Create empty arrays --- src/Exec_Build.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 371d7058a2..886898776a 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -440,6 +440,10 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mprinterr("Error: Could not assign GB parameters for '%s'\n", topOut.c_str()); ret = CpptrajState::ERR; } + // Create empty arrays for the TREE, JOIN, and IROTAT arrays + topOut.AllocTreeChainClassification( ); + topOut.AllocJoinArray(); + topOut.AllocRotateArray(); if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; From 4a2dbf1becb49baaba592b805af1676c584afb42 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 15:33:45 -0500 Subject: [PATCH 0275/1492] Start concept of atom scan direction --- src/Exec_Build.cpp | 18 ++++++++-- src/Structure/GenerateConnectivityArrays.cpp | 36 ++++++++++++++++++-- src/Structure/GenerateConnectivityArrays.h | 4 +++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 886898776a..2060e77fa9 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -1,7 +1,7 @@ #include "Exec_Build.h" #include "CpptrajStdio.h" #include "DataSet_Parameters.h" -//#inc lude "Structure/GenerateConnectivity.h" +#include "Structure/GenerateConnectivityArrays.h" #include "Structure/Zmatrix.h" #include "Parm/GB_Params.h" @@ -277,12 +277,26 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, void Exec_Build::Help() const { mprintf("\tname crdset [frame <#>]\n" - "\t[parmset ...] [lib ...]\n"); + "\t[parmset ...] [lib ...]\n" + "\t[atomscandir {f|b}]\n" + ); } // Exec_Build::Execute() Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) { + // Atom scan direction + std::string atomscandir = argIn.GetStringKey("atomscandir"); + if (!atomscandir.empty()) { + if (atomscandir == "f") + Cpptraj::Structure::SetAtomScanDirection(Cpptraj::Structure::SCAN_ATOMS_FORWARDS); + else if (atomscandir == "b") + Cpptraj::Structure::SetAtomScanDirection(Cpptraj::Structure::SCAN_ATOMS_BACKWARDS); + else { + mprinterr("Error: Unrecognized keyword for 'atomscandir' : %s\n", atomscandir.c_str()); + return CpptrajState::ERR; + } + } // Get input coords std::string crdset = argIn.GetStringKey("crdset"); if (crdset.empty()) { diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 8c2c01e261..fc6e706d79 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -5,6 +5,32 @@ #include "../CpptrajStdio.h" #include // std::swap +/// The direction in which atoms in residues should be scanned +static Cpptraj::Structure::AtomScanDirectionType CpptrajStructureAtomScanDirection_ = Cpptraj::Structure::SCAN_ATOMS_BACKWARDS; + +/** Set default atom scan direction. */ +void Cpptraj::Structure::SetAtomScanDirection( AtomScanDirectionType direction ) { + if (direction == SCAN_ATOMS_BACKWARDS) + mprintf("\tSetting atom scan direction to backwards.\n"); + else + mprintf("\tSetting atom scan direction to forwards.\n"); + CpptrajStructureAtomScanDirection_ = direction; +} + +/// Set start and end atoms along with offset based on atom scan direction +static inline void set_indices(int& start, int& end, int& offset, int firstatom, int lastatom) +{ + if (CpptrajStructureAtomScanDirection_ == Cpptraj::Structure::SCAN_ATOMS_BACKWARDS) { + start = lastatom - 1; + end = firstatom - 1; + offset = -1; + } else { + start = firstatom; + end = lastatom; + offset = 1; + } +} + /** From atom connectivity, generate a bond array in the same order as LEaP. */ // TODO use in GenerateBAT BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& residues, std::vector const& atoms) @@ -14,7 +40,10 @@ BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& resi int bidx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { - for (int iat = res->LastAtom()-1; iat >= res->FirstAtom(); iat--) + int start, end, offset; + set_indices(start, end, offset, res->FirstAtom(), res->LastAtom()); + for (int iat = start; iat != end; iat += offset) + //for (int iat = res->LastAtom()-1; iat >= res->FirstAtom(); iat--) { Atom const& At = atoms[iat]; for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) @@ -40,7 +69,10 @@ AngleArray Cpptraj::Structure::GenerateAngleArray(std::vector const& re int aidx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { - for (int iat1 = res->LastAtom()-1; iat1 >= res->FirstAtom(); iat1--) + int start, end, offset; + set_indices(start, end, offset, res->FirstAtom(), res->LastAtom()); + for (int iat1 = start; iat1 != end; iat1 += offset) + //for (int iat1 = res->LastAtom()-1; iat1 >= res->FirstAtom(); iat1--) { Atom const& At1 = atoms[iat1]; for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index 27c6f5c647..9975c3d83b 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -8,6 +8,10 @@ class Residue; class Atom; namespace Cpptraj { namespace Structure { +/// Specify direction in which atoms in residues should be scanned +enum AtomScanDirectionType { SCAN_ATOMS_BACKWARDS = 0, SCAN_ATOMS_FORWARDS }; +/// Set default atom scan direction +void SetAtomScanDirection(AtomScanDirectionType); /// Generate bond array in same order as leap BondArray GenerateBondArray(std::vector const&, std::vector const&); /// Generate angle array in same order as leap From 059f0e38378894e89b1b6b8230fec332ca2efe5b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 15:37:56 -0500 Subject: [PATCH 0276/1492] Have dihedral and improper respect the atom scan direction --- src/Structure/GenerateConnectivityArrays.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index fc6e706d79..91c9c13127 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -100,7 +100,10 @@ DihedralArray Cpptraj::Structure::GenerateDihedralArray(std::vector con int didx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { - for (int iat1 = res->LastAtom()-1; iat1 >= res->FirstAtom(); iat1--) + int start, end, offset; + set_indices(start, end, offset, res->FirstAtom(), res->LastAtom()); + for (int iat1 = start; iat1 != end; iat1 += offset) + //for (int iat1 = res->LastAtom()-1; iat1 >= res->FirstAtom(); iat1--) { Atom const& At1 = atoms[iat1]; for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { @@ -153,7 +156,10 @@ DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector con int iidx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { - for (int iat3 = res->LastAtom()-1; iat3 >= res->FirstAtom(); iat3--) + int start, end, offset; + set_indices(start, end, offset, res->FirstAtom(), res->LastAtom()); + for (int iat3 = start; iat3 != end; iat3 += offset) + //for (int iat3 = res->LastAtom()-1; iat3 >= res->FirstAtom(); iat3--) { Atom const& AJ = atoms[iat3]; if (AJ.Nbonds() >= 3) { From 4354390d4b77268f914c8564e760fcf630c9dda5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 5 Jan 2024 15:58:30 -0500 Subject: [PATCH 0277/1492] Print atom type as well for debugging --- src/Structure/GenerateConnectivityArrays.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 91c9c13127..e85be89015 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -142,7 +142,7 @@ static void order_improper_atoms(int* indices, std::vector const& atoms) // DEBUG static inline void printName(Atom const& AJ) { - mprintf(" :%i@%s", AJ.ResNum()+1, AJ.Name().Truncated().c_str()); + mprintf(" :%i@%s (%s)", AJ.ResNum()+1, AJ.Name().Truncated().c_str(), AJ.Type().Truncated().c_str()); } /** From atom connectivity, generate an improper array in the same order as LEaP. From 567a3bb39850d5b1bd824e737d66a11d932dca01 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 09:39:26 -0500 Subject: [PATCH 0278/1492] Start adding ability to read leap rc file --- src/DataFile.cpp | 3 ++ src/DataFile.h | 1 + src/DataIO_LeapRC.cpp | 81 +++++++++++++++++++++++++++++++++++++++++++ src/DataIO_LeapRC.h | 17 +++++++++ src/cpptrajdepend | 7 ++-- src/cpptrajfiles | 5 +-- 6 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 src/DataIO_LeapRC.cpp create mode 100644 src/DataIO_LeapRC.h diff --git a/src/DataFile.cpp b/src/DataFile.cpp index 4403b0d6e9..b467763dc3 100644 --- a/src/DataFile.cpp +++ b/src/DataFile.cpp @@ -36,6 +36,7 @@ #include "DataIO_AmberLib.h" #include "DataIO_AmberFF.h" #include "DataIO_AmberFrcmod.h" +#include "DataIO_LeapRC.h" // CONSTRUCTOR DataFile::DataFile() : @@ -93,6 +94,7 @@ const FileTypes::AllocToken DataFile::DF_AllocArray[] = { { "Amber OFF File", 0, 0, DataIO_AmberLib::Alloc}, { "Amber Force Field", DataIO_AmberFF::ReadHelp, 0, DataIO_AmberFF::Alloc}, { "Amber Frcmod File", 0, 0, DataIO_AmberFrcmod::Alloc}, + { "Amber LEaP RC File", 0, 0, DataIO_LeapRC::Alloc}, { "Unknown Data file", 0, 0, 0 } }; @@ -124,6 +126,7 @@ const FileTypes::KeyToken DataFile::DF_KeyArray[] = { { AMBERLIB, "off", ".lib" }, { AMBERFF, "amberff", ".parm" }, { AMBERFRCMOD, "frcmod", ".frcmod" }, + { AMBERLEAPRC, "leaprc", ".leaprc" }, { UNKNOWN_DATA, 0, 0 } }; diff --git a/src/DataFile.h b/src/DataFile.h index 7cd62360b7..814f057108 100644 --- a/src/DataFile.h +++ b/src/DataFile.h @@ -19,6 +19,7 @@ class DataFile { VECTRAJ, XVG, CCP4, CHARMMREPD, CHARMMFASTREP, CHARMMOUT, CPOUT, CHARMMRTFPRM, CMATRIX_BINARY, CMATRIX_NETCDF, PEAKS, NETCDFDATA, AMBERENE, NUMPY, AMBERPREP, AMBERLIB, AMBERFF, AMBERFRCMOD, + AMBERLEAPRC, UNKNOWN_DATA }; DataFile(); diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp new file mode 100644 index 0000000000..a0aaac40e4 --- /dev/null +++ b/src/DataIO_LeapRC.cpp @@ -0,0 +1,81 @@ +#include "DataIO_LeapRC.h" +#include "CpptrajStdio.h" +#include "BufferedLine.h" + +/// CONSTRUCTOR +DataIO_LeapRC::DataIO_LeapRC() +{ + +} + +// DataIO_LeapRC::ID_DataFormat() +bool DataIO_LeapRC::ID_DataFormat(CpptrajFile& infile) +{ + if (infile.OpenFile()) return false; + bool isLeaprc = false; + // Scan the first 5 non-blank non-comment lines + int nLinesScanned = 0; + while (nLinesScanned < 5 && !isLeaprc) { + const char* ptr = infile.NextLine(); + if (ptr == 0) break; + if (ptr[0] == '\0' || ptr[0] == '#') continue; + nLinesScanned++; + ArgList line(ptr); + if (line.Nargs() > 0) { + if (line[0] == "logFile" || line[0] == "logfile") + isLeaprc = true; + else if (line[0] == "source") + isLeaprc = true; + else if (line[0] == "addAtomTypes" || line[0] == "addatomtypes") + isLeaprc = true; + } + } + infile.CloseFile(); + return isLeaprc; +} + +// DataIO_LeapRC::ReadHelp() +void DataIO_LeapRC::ReadHelp() +{ + +} + +// DataIO_LeapRC::processReadArgs() +int DataIO_LeapRC::processReadArgs(ArgList& argIn) +{ + + return 0; +} + +// DataIO_LeapRC::ReadData() +int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) +{ + BufferedLine infile; + if (infile.OpenFileRead(fname)) { + mprinterr("Error: Could not open leaprc file '%s'\n", fname.full()); + return 1; + } + + infile.CloseFile(); + return 0; +} + +// DataIO_LeapRC::WriteHelp() +void DataIO_LeapRC::WriteHelp() +{ + +} + +// DataIO_LeapRC::processWriteArgs() +int DataIO_LeapRC::processWriteArgs(ArgList& argIn) +{ + + return 0; +} + +// DataIO_LeapRC::WriteData() +int DataIO_LeapRC::WriteData(FileName const& fname, DataSetList const& dsl) +{ + + return 1; +} diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h new file mode 100644 index 0000000000..90344f89f8 --- /dev/null +++ b/src/DataIO_LeapRC.h @@ -0,0 +1,17 @@ +#ifndef INC_DATAIO_LEAPRC_H +#define INC_DATAIO_LEAPRC_H +#include "DataIO.h" +/// Read parameters and units from a leap rc file +class DataIO_LeapRC : public DataIO { + public: + DataIO_LeapRC(); + static void ReadHelp(); + static void WriteHelp(); + static BaseIOtype* Alloc() { return (BaseIOtype*)new DataIO_LeapRC(); } + int processReadArgs(ArgList&); + int ReadData(FileName const&, DataSetList&, std::string const&); + int processWriteArgs(ArgList&); + int WriteData(FileName const&, DataSetList const&); + bool ID_DataFormat(CpptrajFile&); +}; +#endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 067c995755..1f0cfef939 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -200,7 +200,7 @@ CpptrajFile.o : CpptrajFile.cpp CpptrajFile.h CpptrajStdio.h FileIO.h FileIO_Bzi CpptrajState.o : CpptrajState.cpp Action.h ActionList.h ActionState.h Action_CreateCrd.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_Coords_TRJ.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleNavigator.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h Frame.h FrameArray.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Random.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajFrameIndex.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h CpptrajStdio.o : CpptrajStdio.cpp Parallel.h CurveFit.o : CurveFit.cpp CurveFit.h -DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h +DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_LeapRC.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PDBfile.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -220,6 +220,7 @@ DataIO_Cpout.o : DataIO_Cpout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_Evecs.o : DataIO_Evecs.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Evecs.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Gnuplot.o : DataIO_Gnuplot.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Gnuplot.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Grace.o : DataIO_Grace.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Grace.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Mdout.o : DataIO_Mdout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Mdout.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_NetCDF.o : DataIO_NetCDF.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_NetCDF.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Modes.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_Vector_Scalar.h DataSet_string.h DataSet_unsignedInt.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Version.h DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Numpy.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h libnpy/npy.hpp @@ -288,7 +289,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -468,7 +469,7 @@ TextFormat.o : TextFormat.cpp StringRoutines.h TextFormat.h Timer.o : Timer.cpp CpptrajStdio.h Timer.h TinkerFile.o : TinkerFile.cpp ArgList.h Atom.h AtomMask.h Box.h BufferedLine.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TinkerFile.h Unit.h Vec3.h TopInfo.o : TopInfo.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Mol.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h TopInfo.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Topology.o : Topology.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h TorsionRoutines.o : TorsionRoutines.cpp Constants.h TorsionRoutines.h Vec3.h TrajFrameCounter.o : TrajFrameCounter.cpp ArgList.h CpptrajStdio.h TrajFrameCounter.h TrajIOarray.o : TrajIOarray.cpp ArgList.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h FileTypes.h Frame.h FramePtrArray.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Topology.h TrajFrameCounter.h TrajIOarray.h TrajectoryFile.h TrajectoryIO.h TypeNameHolder.h Unit.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 52ca7dce8c..fbf1907ef3 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -191,11 +191,12 @@ COMMON_SOURCES= \ DataIO_Evecs.cpp \ DataIO_Gnuplot.cpp \ DataIO_Grace.cpp \ - DataIO_OpenDx.cpp \ - DataIO_Peaks.cpp \ + DataIO_LeapRC.cpp \ DataIO_Mdout.cpp \ DataIO_NetCDF.cpp \ DataIO_Numpy.cpp \ + DataIO_OpenDx.cpp \ + DataIO_Peaks.cpp \ DataIO_RemLog.cpp \ DataIO_Std.cpp \ DataIO_VecTraj.cpp \ From ec42ca1d82c9c409d4d1fd112f42eb3438cd5d63 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 10:06:18 -0500 Subject: [PATCH 0279/1492] Implement loadamberparams --- src/DataIO_LeapRC.cpp | 55 ++++++++++++++++++++++++++++++++++++++++--- src/DataIO_LeapRC.h | 4 ++++ src/cpptrajdepend | 2 +- 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index a0aaac40e4..21440fffed 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -1,6 +1,9 @@ #include "DataIO_LeapRC.h" #include "CpptrajStdio.h" #include "BufferedLine.h" +#include "DataIO_AmberFF.h" +#include "DataIO_AmberFrcmod.h" +#include //getenv /// CONSTRUCTOR DataIO_LeapRC::DataIO_LeapRC() @@ -20,7 +23,7 @@ bool DataIO_LeapRC::ID_DataFormat(CpptrajFile& infile) if (ptr == 0) break; if (ptr[0] == '\0' || ptr[0] == '#') continue; nLinesScanned++; - ArgList line(ptr); + ArgList line(ptr, " \t"); if (line.Nargs() > 0) { if (line[0] == "logFile" || line[0] == "logfile") isLeaprc = true; @@ -47,17 +50,63 @@ int DataIO_LeapRC::processReadArgs(ArgList& argIn) return 0; } +/** LEaP loadAmberParams command. */ +int DataIO_LeapRC::LoadAmberParams(std::string const& filename, DataSetList& dsl, std::string const& dsname) const { + // TODO detect this better + ArgList fargs( filename, "." ); + if (fargs.hasKey("frcmod")) { + mprintf("\tLoading force field modifications from '%s'\n", filename.c_str()); + DataIO_AmberFrcmod infile; + if (infile.ReadData(amberhome_ + "parm/" + filename, dsl, dsname)) { + mprinterr("Error: Could not load force field modifications from '%s'\n", filename.c_str()); + return 1; + } + } else { + mprintf("\tLoading force field from '%s'\n", filename.c_str()); + DataIO_AmberFF infile; + if (infile.ReadData(amberhome_ + "parm/" + filename, dsl, dsname)) { + mprinterr("Error: Could not load force field from '%s'\n", filename.c_str()); + return 1; + } + } + return 0; +} + // DataIO_LeapRC::ReadData() int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { + // First, need to determine where the Amber FF files are + const char* env = getenv("AMBERHOME"); + if (env != 0) + amberhome_ = std::string(env) + "/dat/leap/"; + else { + mprintf("Warning: AMBERHOME is not set. Determining FF file location based on leaprc file.\n"); + // Try to guess based on where the leaprc file is + FileName leapcmddir( fname.DirPrefix_NoSlash() ); + amberhome_ = leapcmddir.DirPrefix(); + } + mprintf("\tForce field files located in '%s'\n", amberhome_.c_str()); BufferedLine infile; if (infile.OpenFileRead(fname)) { mprinterr("Error: Could not open leaprc file '%s'\n", fname.full()); return 1; } - + int err = 0; + const char* ptr = infile.Line(); + while (ptr != 0) { + if (ptr[0] != '\0' && ptr[0] != '#') { + ArgList line( ptr, " \t" ); + std::string param_fname; + if (line.Contains("loadAmberParams")) + err = LoadAmberParams( line.GetStringKey("loadAmberParams"), dsl, dsname ); + else if (line.Contains("loadamberparams")) + err = LoadAmberParams( line.GetStringKey("loadamberparams"), dsl, dsname ); + } + if (err != 0) break; + ptr = infile.Line(); + } infile.CloseFile(); - return 0; + return err; } // DataIO_LeapRC::WriteHelp() diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index 90344f89f8..1b28b2a7ef 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -13,5 +13,9 @@ class DataIO_LeapRC : public DataIO { int processWriteArgs(ArgList&); int WriteData(FileName const&, DataSetList const&); bool ID_DataFormat(CpptrajFile&); + private: + int LoadAmberParams(std::string const&, DataSetList&, std::string const&) const; + + std::string amberhome_; }; #endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 1f0cfef939..61340986e3 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -220,7 +220,7 @@ DataIO_Cpout.o : DataIO_Cpout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_Evecs.o : DataIO_Evecs.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Evecs.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Gnuplot.o : DataIO_Gnuplot.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Gnuplot.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Grace.o : DataIO_Grace.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Grace.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Mdout.o : DataIO_Mdout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Mdout.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_NetCDF.o : DataIO_NetCDF.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_NetCDF.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Modes.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_Vector_Scalar.h DataSet_string.h DataSet_unsignedInt.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Version.h DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Numpy.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h libnpy/npy.hpp From 5b5470ea69a41974a33c12074051646ea152d03b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 10:11:05 -0500 Subject: [PATCH 0280/1492] Implement loadoff command --- src/DataIO_LeapRC.cpp | 15 +++++++++++++++ src/DataIO_LeapRC.h | 1 + src/cpptrajdepend | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index 21440fffed..c7633c354d 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -3,6 +3,7 @@ #include "BufferedLine.h" #include "DataIO_AmberFF.h" #include "DataIO_AmberFrcmod.h" +#include "DataIO_AmberLib.h" #include //getenv /// CONSTRUCTOR @@ -72,6 +73,16 @@ int DataIO_LeapRC::LoadAmberParams(std::string const& filename, DataSetList& dsl return 0; } +/** LEaP loadOff command. */ +int DataIO_LeapRC::LoadOFF(std::string const& filename, DataSetList& dsl, std::string const& dsname) const { + DataIO_AmberLib infile; + if (infile.ReadData(amberhome_ + "lib/" + filename, dsl, dsname)) { + mprinterr("Error: Could not load library file '%s'\n", filename.c_str()); + return 1; + } + return 0; +} + // DataIO_LeapRC::ReadData() int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -101,6 +112,10 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string err = LoadAmberParams( line.GetStringKey("loadAmberParams"), dsl, dsname ); else if (line.Contains("loadamberparams")) err = LoadAmberParams( line.GetStringKey("loadamberparams"), dsl, dsname ); + else if (line.Contains("loadOff")) + err = LoadOFF( line.GetStringKey("loadOff"), dsl, dsname ); + else if (line.Contains("loadoff")) + err = LoadOFF( line.GetStringKey("loadoff"), dsl, dsname ); } if (err != 0) break; ptr = infile.Line(); diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index 1b28b2a7ef..2142417e21 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -15,6 +15,7 @@ class DataIO_LeapRC : public DataIO { bool ID_DataFormat(CpptrajFile&); private: int LoadAmberParams(std::string const&, DataSetList&, std::string const&) const; + int LoadOFF(std::string const&, DataSetList&, std::string const&) const; std::string amberhome_; }; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 61340986e3..f6c1f3a166 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -220,7 +220,7 @@ DataIO_Cpout.o : DataIO_Cpout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_Evecs.o : DataIO_Evecs.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Evecs.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Gnuplot.o : DataIO_Gnuplot.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Gnuplot.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Grace.o : DataIO_Grace.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Grace.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Mdout.o : DataIO_Mdout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Mdout.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_NetCDF.o : DataIO_NetCDF.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_NetCDF.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Modes.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_Vector_Scalar.h DataSet_string.h DataSet_unsignedInt.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Version.h DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Numpy.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h libnpy/npy.hpp From 64586a2137b10ad7b675c1cf0efcbacd6a8bc48c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 10:21:05 -0500 Subject: [PATCH 0281/1492] Read amber prep --- src/DataIO_LeapRC.cpp | 21 ++++++++++++++++++++- src/DataIO_LeapRC.h | 1 + src/cpptrajdepend | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index c7633c354d..3ee24cd38e 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -4,6 +4,7 @@ #include "DataIO_AmberFF.h" #include "DataIO_AmberFrcmod.h" #include "DataIO_AmberLib.h" +#include "DataIO_AmberPrep.h" #include //getenv /// CONSTRUCTOR @@ -83,6 +84,16 @@ int DataIO_LeapRC::LoadOFF(std::string const& filename, DataSetList& dsl, std::s return 0; } +/** LEaP loadAmberPrep command. */ +int DataIO_LeapRC::LoadAmberPrep(std::string const& filename, DataSetList& dsl, std::string const& dsname) const { + DataIO_AmberPrep infile; + if (infile.ReadData(amberhome_ + "lib/" + filename, dsl, dsname)) { + mprinterr("Error: Could not load prep file '%s'\n", filename.c_str()); + return 1; + } + return 0; +} + // DataIO_LeapRC::ReadData() int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -94,7 +105,11 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string mprintf("Warning: AMBERHOME is not set. Determining FF file location based on leaprc file.\n"); // Try to guess based on where the leaprc file is FileName leapcmddir( fname.DirPrefix_NoSlash() ); - amberhome_ = leapcmddir.DirPrefix(); + if (leapcmddir.Base() == "oldff") { + FileName leapcmddir2( leapcmddir.DirPrefix_NoSlash() ); + amberhome_ = leapcmddir2.DirPrefix(); + } else + amberhome_ = leapcmddir.DirPrefix(); } mprintf("\tForce field files located in '%s'\n", amberhome_.c_str()); BufferedLine infile; @@ -116,6 +131,10 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string err = LoadOFF( line.GetStringKey("loadOff"), dsl, dsname ); else if (line.Contains("loadoff")) err = LoadOFF( line.GetStringKey("loadoff"), dsl, dsname ); + else if (line.Contains("loadAmberPrep")) + err = LoadAmberPrep( line.GetStringKey("loadAmberPrep"), dsl, dsname ); + else if (line.Contains("loadamberprep")) + err = LoadAmberPrep( line.GetStringKey("loadamberprep"), dsl, dsname ); } if (err != 0) break; ptr = infile.Line(); diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index 2142417e21..8a3aff3fb2 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -16,6 +16,7 @@ class DataIO_LeapRC : public DataIO { private: int LoadAmberParams(std::string const&, DataSetList&, std::string const&) const; int LoadOFF(std::string const&, DataSetList&, std::string const&) const; + int LoadAmberPrep(std::string const&, DataSetList&, std::string const&) const; std::string amberhome_; }; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index f6c1f3a166..61e5b64a01 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -220,7 +220,7 @@ DataIO_Cpout.o : DataIO_Cpout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_Evecs.o : DataIO_Evecs.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Evecs.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Gnuplot.o : DataIO_Gnuplot.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Gnuplot.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Grace.o : DataIO_Grace.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Grace.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Mdout.o : DataIO_Mdout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Mdout.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_NetCDF.o : DataIO_NetCDF.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_NetCDF.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Modes.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_Vector_Scalar.h DataSet_string.h DataSet_unsignedInt.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Version.h DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Numpy.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h libnpy/npy.hpp From 303581739ffd5d598f40b8e122a243a1448782d6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 11:14:00 -0500 Subject: [PATCH 0282/1492] Remove sequence check. Use residue name from residues section. --- src/DataIO_AmberLib.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/DataIO_AmberLib.cpp b/src/DataIO_AmberLib.cpp index 3743a0800e..82c467adc0 100644 --- a/src/DataIO_AmberLib.cpp +++ b/src/DataIO_AmberLib.cpp @@ -137,17 +137,18 @@ int DataIO_AmberLib::read_atoms(Topology& topOut, std::string const& line, std:: return 1; } // Sanity check - if (seq-1 != topOut.Natom()) { - mprinterr("Error: For unit %s expected sequence %i, got %i\n", unitName.c_str(), topOut.Natom()+1, seq); - return 1; - } + //if (seq-1 != topOut.Natom()) { + // mprinterr("Error: For unit %s expected sequence %i, got %i\n", unitName.c_str(), topOut.Natom()+1, seq); + // return 1; + //} Atom atm; atm.SetName( NameType(noquotes(aname)) ); atm.SetTypeName( NameType(noquotes(atype)) ); atm.DetermineElement( elt ); atm.SetMassFromElement(); atm.SetCharge( charge ); - Residue res( unitName, resx, ' ', ' ' ); + // We dont know the actual residue name yet + Residue res( "TMP", resx, ' ', ' ' ); topOut.AddTopAtom( atm, res ); return 0; } @@ -210,6 +211,7 @@ const top.SetParmName( unitName, FileName() ); std::vector positions; Frame frm; + int ridx = 0; bool readUnit = true; while (readUnit) { @@ -243,6 +245,19 @@ const if (read_positions(positions, Line)) return 1; } else if (currentSection == CONNECT) { if (read_connect(ConnectAtoms, Line)) return 1; + } else if (currentSection == RESIDUES) { + // Rely on ArgList to remove quotes + ArgList tmpArg( Line ); + if (tmpArg.Nargs() < 1) { + mprinterr("Error: Could not read residue from residues section.\n"); + mprinterr("Error: Line: %s\n", Line); + return 1; + } + if (ridx >= top.Nres()) { + mprinterr("Error: Too many residues in residues section, or residues section before atom table.\n"); + return 1; + } + top.SetRes( ridx++ ).SetName( tmpArg[0] ); } } } From 7c7a1698622b78cda91d18a86183740519ab5500 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 11:27:49 -0500 Subject: [PATCH 0283/1492] Do not try to set up bond parms for units --- src/DataIO_AmberLib.cpp | 11 +++++++---- src/DataIO_AmberLib.h | 2 +- src/Topology.cpp | 15 +++++++++++++-- src/Topology.h | 4 +++- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/DataIO_AmberLib.cpp b/src/DataIO_AmberLib.cpp index 82c467adc0..32ff816b45 100644 --- a/src/DataIO_AmberLib.cpp +++ b/src/DataIO_AmberLib.cpp @@ -177,7 +177,7 @@ int DataIO_AmberLib::read_bonds(Topology& topOut, std::string const& line) { } /** Read connections line */ -int DataIO_AmberLib::read_connect(AssociatedData_Connect& ConnectAtoms, std::string const& line) { +int DataIO_AmberLib::read_connect(AssociatedData_Connect& ConnectAtoms, std::string const& line) const { int connectAtom = -1; if (sscanf(line.c_str(), "%i", &connectAtom) != 1) { mprinterr("Error: Expected 1 column for connect line: %s\n", line.c_str()); @@ -185,7 +185,9 @@ int DataIO_AmberLib::read_connect(AssociatedData_Connect& ConnectAtoms, std::str } // Amber lib atoms start from 1 if (connectAtom < 1) { - mprintf("Warning: Atom index < 1 in connect line: %s\n", line.c_str()); + // This may be legit when only one connect atom + if (debug_ > 0) + mprintf("Warning: Atom index < 1 in connect line: %s\n", line.c_str()); } ConnectAtoms.AddConnectAtom( connectAtom-1 ); return 0; @@ -261,7 +263,8 @@ const } } } - top.CommonSetup(); + // Set up topology; determine molecules, but no residue renumber or bond parm determination + top.CommonSetup(true, false, false); if (debug_ > 1) top.Summary(); frm.SetupFrameV( top.Atoms(), CoordinateInfo() ); frm.ClearAtoms(); @@ -272,7 +275,7 @@ const crd->AddFrame( frm ); crd->AssociateData( &ConnectAtoms ); if (debug_ > 1) ConnectAtoms.Ainfo(); - mprintf("\n"); + if (debug_ > 0) mprintf("\n"); return 0; } diff --git a/src/DataIO_AmberLib.h b/src/DataIO_AmberLib.h index 6ea4d12b91..6db1b509cd 100644 --- a/src/DataIO_AmberLib.h +++ b/src/DataIO_AmberLib.h @@ -31,6 +31,6 @@ class DataIO_AmberLib : public DataIO { static int read_atoms(Topology&, std::string const&, std::string const&); static int read_bonds(Topology&, std::string const&); static int read_positions(std::vector&, std::string const&); - static int read_connect(AssociatedData_Connect&, std::string const&); + int read_connect(AssociatedData_Connect&, std::string const&) const; }; #endif diff --git a/src/Topology.cpp b/src/Topology.cpp index 859a9901a2..4304d2b430 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -497,12 +497,23 @@ const } // Topology::CommonSetup() -/** Set up common to all topologies. +/** Set up common to all topologies. Assign bond lengths if none are present. * \param molsearch If true, determine molecules based on bond info. * \param renumberResidues If true, renumber residues if any residue is part of more than 1 molecule * e.g. when alternate locations are present. */ int Topology::CommonSetup(bool molsearch, bool renumberResidues) +{ + return CommonSetup(molsearch, renumberResidues, true); +} + +/** Set up common to all topologies. + * \param molsearch If true, determine molecules based on bond info. + * \param renumberResidues If true, renumber residues if any residue is part of more than 1 molecule + * e.g. when alternate locations are present. + * \param assignBondParm If true, assign default bond lengths if no parameters present. + */ +int Topology::CommonSetup(bool molsearch, bool renumberResidues, bool assignBondParm) { // Check the size of any "extra" arrays if (CheckExtraSize(tree_.size(), "Amber tree")) return 1; @@ -514,7 +525,7 @@ int Topology::CommonSetup(bool molsearch, bool renumberResidues) if (CheckExtraSize(pdbSerialNum_.size(), "PDB serial #")) return 1; // TODO: Make bond parm assignment / molecule search optional? // Assign default lengths if necessary (for e.g. CheckStructure) - if (bondparm_.empty()) + if (assignBondParm && bondparm_.empty()) generateBondParameters(); if (molsearch) { // Determine molecule info from bonds diff --git a/src/Topology.h b/src/Topology.h index 6afa53dcc0..b023e31f1d 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -221,7 +221,9 @@ class Topology { //void StartNewMol(); /// Perform common final setup: optional molecule determination, renumber residues by molecules int CommonSetup(bool, bool); - /// Perform common final setup with molecule determination on, renumber residues off. + /// Perform common final setup: optional molecule determination, renumber residues by molecules, assign bond parameters + int CommonSetup(bool, bool, bool); + /// Perform common final setup with molecule determination on, renumber residues off, assign bond parameters on. int CommonSetup() { return CommonSetup(true, false); } /// Set up with no residue info TODO deprecate in favor of routine in CommonSetup? int Setup_NoResInfo(); From 06322fc409a9a7cbebde9a7f648a09399e39c35d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 11:28:20 -0500 Subject: [PATCH 0284/1492] Dont set up bond parms for prep units --- src/DataIO_AmberPrep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataIO_AmberPrep.cpp b/src/DataIO_AmberPrep.cpp index 1424ec29cd..c5f87ee327 100644 --- a/src/DataIO_AmberPrep.cpp +++ b/src/DataIO_AmberPrep.cpp @@ -294,7 +294,7 @@ const bondSearch.FindBonds( top, BondSearch::SEARCH_REGULAR, frm, 0.2, debug_ ); } // Set up topology - top.CommonSetup(true, false); + top.CommonSetup(true, false, false); if (debug_ > 0) top.Summary(); if (debug_ > 1) From 0b52498eff9f28f5503624faef7015db65d7475c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 14:23:59 -0500 Subject: [PATCH 0285/1492] Only warn on missing improper parameter if debug level is up --- src/Topology.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 4304d2b430..653d722873 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2823,12 +2823,13 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral DihedralParmArray ipa = newImproperParams.FindParam( types, found, mydih, reordered ); int idx = -1; if (!found) { - mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", - TruncResAtomNameNum(dih->A1()).c_str(), - TruncResAtomNameNum(dih->A2()).c_str(), - TruncResAtomNameNum(dih->A3()).c_str(), - TruncResAtomNameNum(dih->A4()).c_str(), - *types[0], *types[1], *types[2], *types[3]); + if (debug_ > 0) + mprintf("Warning: Improper parameters not found for improper dihedral %s-%s-%s-%s (%s-%s-%s-%s)\n", + TruncResAtomNameNum(dih->A1()).c_str(), + TruncResAtomNameNum(dih->A2()).c_str(), + TruncResAtomNameNum(dih->A3()).c_str(), + TruncResAtomNameNum(dih->A4()).c_str(), + *types[0], *types[1], *types[2], *types[3]); // Central atom Atom const& AJ = atoms_[dih->A3()]; AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; From 2eba157ff64e1fda40fde6cca1156bd212a79c7f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 14:31:18 -0500 Subject: [PATCH 0286/1492] Add GetParam() for ImproperParmArray --- src/ParameterHolders.h | 85 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 433fd6a036..a12c33a790 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -349,6 +349,91 @@ class ImproperParmHolder : private DihedralParmHolder { void ReorderImproper(DihedralType& imp, OrderType order) const { ReorderImproper(imp, order, TypeNameHolder()); } + /// Get improper parameters matching given atom types. If found, improper will be reordered to match parameter order. + const_iterator GetParam(TypeNameHolder const& types, DihedralType& imp, bool& reordered) const { + //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); + reordered = false; + // First, no wildcard + const_iterator it = begin(); + OrderType lastOrder_; + for (; it != end(); ++it) { + TypeNameHolder const& myTypes = it->first; + // Central (third) type must match + if (myTypes[2] == types[2]) { + //mprintf("DEBUG: FindParam (improper) central atom match %s", *(types[2])); + //mprintf(" This=%s-%s-%s-%s", *(myTypes[0]), *(myTypes[1]), *(myTypes[2]), *(myTypes[3])); + //mprintf(" Inco=%s-%s-%s-%s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); + // Try all permutations + if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { + // 0 1 2 3 + lastOrder_ = O_013; + break; + } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { + // 0 3 2 1 + lastOrder_ = O_031; + break; + } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { + // 1 0 2 3 + lastOrder_ = O_103; + break; + } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { + // 1 3 2 0 + lastOrder_ = O_130; + break; + } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { + // 3 0 2 1 + lastOrder_ = O_301; + break; + } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { + // 3 1 2 0 + lastOrder_ = O_310; + break; + } + } + } // END loop over parameters + // Wildcard if present + if (it == end() && wc_.len() > 0) { + it = begin(); + for (; it != end(); ++it) { + TypeNameHolder const& myTypes = it->first; + // Central (third) type must match + if (wcm(myTypes[2], types[2], wc_)) { + // Try all permutations + if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { + // 0 1 2 3 + lastOrder_ = O_013; + break; + } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { + // 0 3 2 1 + lastOrder_ = O_031; + break; + } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { + // 1 0 2 3 + lastOrder_ = O_103; + break; + } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { + // 1 3 2 0 + lastOrder_ = O_130; + break; + } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { + // 3 0 2 1 + lastOrder_ = O_301; + break; + } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { + // 3 1 2 0 + lastOrder_ = O_310; + break; + } + } + } // END loop over parameters + } // END wildcard matches + if (it != end()) { + // We have found a parameter. Do any reordering. + if (lastOrder_ != O_013) reordered = true; + ReorderImproper( imp, lastOrder_, it->first ); + } + return it; + } // END GetParam() /// \return Array of improper parameters matching given atom types. Improper will be reordered to match parameter order. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found, DihedralType& imp, bool& reordered) const { //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); From d747a004b91a04f53e92df4458daa17d244f3664 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 14:37:27 -0500 Subject: [PATCH 0287/1492] Start improper cache --- src/Topology.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 653d722873..07a4529ae3 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2783,6 +2783,8 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral DihedralArray const& dihedrals) { // TODO skip extra points DihedralArray dihedralsIn; + // Improper cache + ImproperParmHolder improperCache; // Keep track of 1-4 interactions typedef std::pair Ipair; typedef std::set Imap; @@ -2820,7 +2822,13 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral //ImproperParmHolder::OrderType lastOrder; DihedralType mydih = *dih; bool reordered; - DihedralParmArray ipa = newImproperParams.FindParam( types, found, mydih, reordered ); + DihedralParmArray ipa; + ImproperParmHolder::const_iterator impit = improperCache.GetParam( types, mydih, reordered ); + if (impit == improperCache.end()) { + ipa = newImproperParams.FindParam( types, found, mydih, reordered ); + } else { + ipa = impit->second; + } int idx = -1; if (!found) { if (debug_ > 0) From c42239c07ba06e0dbdc25e4cd570d0870f0f5c2b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 14:47:11 -0500 Subject: [PATCH 0288/1492] Start using improper cache --- src/Topology.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 07a4529ae3..6bd296db58 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2820,14 +2820,29 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral // However, if no parameter is found and the central atom is // SP2, print a warning. //ImproperParmHolder::OrderType lastOrder; + found = false; DihedralType mydih = *dih; bool reordered; DihedralParmArray ipa; + TypeNameHolder paramTypes; ImproperParmHolder::const_iterator impit = improperCache.GetParam( types, mydih, reordered ); if (impit == improperCache.end()) { - ipa = newImproperParams.FindParam( types, found, mydih, reordered ); + impit = newImproperParams.GetParam( types, mydih, reordered ); + if (impit != newImproperParams.end()) { + paramTypes = impit->first; + ipa = impit->second; + found = true; + mprintf("DEBUG: Found new value for improper %2s %2s %2s %2s (%2s %2s %2s %2s)\n", + *types[0], *types[1], *types[2], *types[3], + *paramTypes[0], *paramTypes[1], *paramTypes[2], *paramTypes[3]); + } } else { + paramTypes = impit->first; ipa = impit->second; + found = true; + mprintf("DEBUG: Using cached value for improper %2s %2s %2s %2s (%2s %2s %2s %2s)\n", + *types[0], *types[1], *types[2], *types[3], + *paramTypes[0], *paramTypes[1], *paramTypes[2], *paramTypes[3]); } int idx = -1; if (!found) { From f00e9edb93dcbbcaf8afdb2b937d9e050efdabeb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 14:59:40 -0500 Subject: [PATCH 0289/1492] In order to match leap behavior, make sure that cached improper parameters are sorted alphabetically by type. --- src/ParameterHolders.h | 4 ++++ src/Topology.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index a12c33a790..53d66055fc 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -293,6 +293,8 @@ class ImproperParmHolder : private DihedralParmHolder { size_t size() const { return DihedralParmHolder::size(); } /// \return True if no parameters bool empty() const { return DihedralParmHolder::empty(); } + /// \return Wildcard + NameType const& Wildcard() const { return wc_; } /// \return ordering of last type //OrderType LastOrder() const { return lastOrder_; } typedef typename DihedralParmHolder::const_iterator const_iterator; @@ -301,6 +303,8 @@ class ImproperParmHolder : private DihedralParmHolder { /** Set Wildcard char */ void SetWildcard(char wc) { DihedralParmHolder::SetWildcard(wc); } + /** Set Wildcard */ + void SetWildcard(NameType const& wc) { wc_ = wc; } /** Add (or update) a single improper parameter for given atom types. */ ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { diff --git a/src/Topology.cpp b/src/Topology.cpp index 6bd296db58..d08c672fc0 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2785,6 +2785,7 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral DihedralArray dihedralsIn; // Improper cache ImproperParmHolder improperCache; + improperCache.SetWildcard( newImproperParams.Wildcard() ); // Keep track of 1-4 interactions typedef std::pair Ipair; typedef std::set Imap; @@ -2823,12 +2824,14 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral found = false; DihedralType mydih = *dih; bool reordered; + bool is_new_improper = false; DihedralParmArray ipa; TypeNameHolder paramTypes; ImproperParmHolder::const_iterator impit = improperCache.GetParam( types, mydih, reordered ); if (impit == improperCache.end()) { impit = newImproperParams.GetParam( types, mydih, reordered ); if (impit != newImproperParams.end()) { + is_new_improper = true; paramTypes = impit->first; ipa = impit->second; found = true; @@ -2877,6 +2880,13 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral // Always skip 1-4 for impropers mydih.SetSkip14( true ); dihedralsIn.push_back( mydih ); + // Add to the cache + if (is_new_improper) { + // To match leap behavior, make sure paramTypes are sorted alphabetically. + mprintf("DEBUG: Improper wildcard: %s\n", *(newImproperParams.Wildcard())); + paramTypes.SortImproperByAlpha( newImproperParams.Wildcard() ); + improperCache.AddParm( paramTypes, ipa.front(), false ); + } } } else { // -----Regular dihedral. See if parameter already present. ---- From c9339df31a007e26cdc1dbd47a5b2131a0c64af2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 15:09:17 -0500 Subject: [PATCH 0290/1492] Use GetParam in FindParam --- src/ParameterHolders.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 53d66055fc..4b8b21d306 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -440,6 +440,15 @@ class ImproperParmHolder : private DihedralParmHolder { } // END GetParam() /// \return Array of improper parameters matching given atom types. Improper will be reordered to match parameter order. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found, DihedralType& imp, bool& reordered) const { + const_iterator it = GetParam( types, imp, reordered ); + if (it == end()) { + found = false; + return DihedralParmArray(); + } else { + found = true; + return it->second; + } +/* //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); found = false; reordered = false; @@ -547,6 +556,7 @@ class ImproperParmHolder : private DihedralParmHolder { if (lastOrder_ != O_013) reordered = true; ReorderImproper( imp, lastOrder_, it->first ); return it->second; +*/ } // END FindParam() /// \return Dihedral parm array corresponding to types. Use by unit test. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { From 0e09aee5e22e8e41403f8e8f3d89219f1f075063 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 15:20:58 -0500 Subject: [PATCH 0291/1492] Remove old code --- src/ParameterHolders.h | 112 ----------------------------------------- src/Topology.cpp | 2 - 2 files changed, 114 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 4b8b21d306..440c04d9cc 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -295,8 +295,6 @@ class ImproperParmHolder : private DihedralParmHolder { bool empty() const { return DihedralParmHolder::empty(); } /// \return Wildcard NameType const& Wildcard() const { return wc_; } - /// \return ordering of last type - //OrderType LastOrder() const { return lastOrder_; } typedef typename DihedralParmHolder::const_iterator const_iterator; const_iterator begin() const { return DihedralParmHolder::begin(); } const_iterator end() const { return DihedralParmHolder::end(); } @@ -448,115 +446,6 @@ class ImproperParmHolder : private DihedralParmHolder { found = true; return it->second; } -/* - //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); - found = false; - reordered = false; - // First, no wildcard - const_iterator it = begin(); - OrderType lastOrder_; - for (; it != end(); ++it) { - TypeNameHolder const& myTypes = it->first; - // Central (third) type must match - if (myTypes[2] == types[2]) { - //mprintf("DEBUG: FindParam (improper) central atom match %s", *(types[2])); - //mprintf(" This=%s-%s-%s-%s", *(myTypes[0]), *(myTypes[1]), *(myTypes[2]), *(myTypes[3])); - //mprintf(" Inco=%s-%s-%s-%s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); - // Try all permutations - if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { - // 0 1 2 3 - lastOrder_ = O_013; - found = true; - //return it->second; - break; - } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { - // 0 3 2 1 - lastOrder_ = O_031; - found = true; - //return it->second; - break; - } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { - // 1 0 2 3 - lastOrder_ = O_103; - found = true; - //return it->second; - break; - } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { - // 1 3 2 0 - lastOrder_ = O_130; - found = true; - //return it->second; - break; - } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { - // 3 0 2 1 - lastOrder_ = O_301; - found = true; - //return it->second; - break; - } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { - // 3 1 2 0 - lastOrder_ = O_310; - found = true; - //return it->second; - break; - } - } - } // END loop over parameters - // Wildcard if present - if (!found && wc_.len() > 0) { - it = begin(); - for (; it != end(); ++it) { - TypeNameHolder const& myTypes = it->first; - // Central (third) type must match - if (wcm(myTypes[2], types[2], wc_)) { - // Try all permutations - if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { - // 0 1 2 3 - lastOrder_ = O_013; - found = true; - //return it->second; - break; - } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { - // 0 3 2 1 - lastOrder_ = O_031; - found = true; - //return it->second; - break; - } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { - // 1 0 2 3 - lastOrder_ = O_103; - found = true; - //return it->second; - break; - } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { - // 1 3 2 0 - lastOrder_ = O_130; - found = true; - //return it->second; - break; - } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { - // 3 0 2 1 - lastOrder_ = O_301; - found = true; - //return it->second; - break; - } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { - // 3 1 2 0 - lastOrder_ = O_310; - found = true; - //return it->second; - break; - } - } - } // END loop over parameters - } // END wildcard matches - //found = false; - if (!found) return DihedralParmArray(); - // We have found a parameter. Do any reordering. - if (lastOrder_ != O_013) reordered = true; - ReorderImproper( imp, lastOrder_, it->first ); - return it->second; -*/ } // END FindParam() /// \return Dihedral parm array corresponding to types. Use by unit test. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { @@ -567,6 +456,5 @@ class ImproperParmHolder : private DihedralParmHolder { /// \return size in memory in bytes size_t DataSize() const { return DihedralParmHolder::DataSize(); } private: - //OrderType lastOrder_; ///< Atom ordering of the last returned parameter }; #endif diff --git a/src/Topology.cpp b/src/Topology.cpp index d08c672fc0..5dac6abdf0 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2742,7 +2742,6 @@ const bool found; // See if parameter is present. int idx = -1; - //ImproperParmHolder::OrderType lastOrder; DihedralType imp0 = *imp; bool reordered; DihedralParmArray ipa = newImproperParams.FindParam( types, found, *imp, reordered ); @@ -2820,7 +2819,6 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral // no parameter is found, do not add it to the list of dihedrals. // However, if no parameter is found and the central atom is // SP2, print a warning. - //ImproperParmHolder::OrderType lastOrder; found = false; DihedralType mydih = *dih; bool reordered; From a17f34f928125dbbd0e0c8a4d1e3164d9b6b29c9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 8 Jan 2024 16:07:39 -0500 Subject: [PATCH 0292/1492] Only sort types in cache when assigning to mimic new leap behavior. --- src/Topology.cpp | 30 ++++++++++++++++-------------- src/Topology.h | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Topology.cpp b/src/Topology.cpp index 5dac6abdf0..917827126c 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2775,11 +2775,13 @@ void Topology::AssignImproperParams(ImproperParmHolder const& newImproperParams) * \param newDihedralParams New proper dihedral parameters. * \param newImproperParams New improper dihedral parameters. * \param dihedrals Array containing only unique dihedrals. + * \param sort_improper_cache If true, sort improper types in cache (to match current leap behavior) */ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedralParams, ImproperParmHolder const& newImproperParams, ParmHolder const& AT, - DihedralArray const& dihedrals) + DihedralArray const& dihedrals, + bool sort_improper_cache) { // TODO skip extra points DihedralArray dihedralsIn; // Improper cache @@ -2882,7 +2884,7 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral if (is_new_improper) { // To match leap behavior, make sure paramTypes are sorted alphabetically. mprintf("DEBUG: Improper wildcard: %s\n", *(newImproperParams.Wildcard())); - paramTypes.SortImproperByAlpha( newImproperParams.Wildcard() ); + if (sort_improper_cache) paramTypes.SortImproperByAlpha( newImproperParams.Wildcard() ); improperCache.AddParm( paramTypes, ipa.front(), false ); } } @@ -3002,8 +3004,8 @@ void Topology::AssignDihedralParams(DihedralParmHolder const& newDihedralParams, // multiplicities for a single dihedral type. In case multiplicities // change, start with a fresh dihedral array containing only unique // dihedrals. - dihedrals_ = AssignDihedralParm( newDihedralParams, newImproperParams, AT, get_unique_dihedrals(dihedrals_) ); - dihedralsh_ = AssignDihedralParm( newDihedralParams, newImproperParams, AT, get_unique_dihedrals(dihedralsh_) ); + dihedrals_ = AssignDihedralParm( newDihedralParams, newImproperParams, AT, get_unique_dihedrals(dihedrals_), false ); + dihedralsh_ = AssignDihedralParm( newDihedralParams, newImproperParams, AT, get_unique_dihedrals(dihedralsh_), false ); } /** Replace current nonbond parameters with given nonbond parameters. */ @@ -3116,7 +3118,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, int Topology::AssignParams(ParameterSet const& set0) { // Bond parameters - mprintf("\tRegenerating bond parameters.\n"); + mprintf("\tAssigning bond parameters.\n"); bondparm_.clear(); // Regenerate bond array in LEaP order bonds_.clear(); @@ -3126,7 +3128,7 @@ int Topology::AssignParams(ParameterSet const& set0) { for (BondArray::const_iterator bnd = allBonds.begin(); bnd != allBonds.end(); ++bnd) AddToBondArrays( *bnd ); // Angle parameters - mprintf("\tRegenerating angle parameters.\n"); + mprintf("\tAssigning angle parameters.\n"); angleparm_.clear(); // Regenerate angle array in LEaP order angles_.clear(); @@ -3136,32 +3138,32 @@ int Topology::AssignParams(ParameterSet const& set0) { for (AngleArray::const_iterator ang = allAngles.begin(); ang != allAngles.end(); ++ang) AddToAngleArrays( *ang ); // Dihedral parameters - mprintf("\tRegenerating dihedral parameters.\n"); + mprintf("\tAssigning dihedral parameters.\n"); dihedrals_.clear(); dihedralsh_.clear(); DihedralArray allDihedrals = Cpptraj::Structure::GenerateDihedralArray(residues_, atoms_); - allDihedrals = AssignDihedralParm( set0.DP(), set0.IP(), set0.AT(), allDihedrals ); + allDihedrals = AssignDihedralParm( set0.DP(), set0.IP(), set0.AT(), allDihedrals, false ); for (DihedralArray::const_iterator dih = allDihedrals.begin(); dih != allDihedrals.end(); ++dih) AddToDihedralArrays( *dih ); // Urey-Bradley - mprintf("\tRegenerating Urey-Bradley parameters.\n"); + mprintf("\tAssigning Urey-Bradley parameters.\n"); AssignUBParams( set0.UB() ); // Improper parameters if (!chamber_.Impropers().empty()) { - mprintf("\tRegenerating CHARMM improper parameters.\n"); + mprintf("\tAssigning CHARMM improper parameters.\n"); AssignImproperParams( set0.IP() ); } else { - mprintf("\tRegenerating improper parameters.\n"); + mprintf("\tAssigning improper parameters.\n"); DihedralArray allImpropers = Cpptraj::Structure::GenerateImproperArray(residues_, atoms_); - allImpropers = AssignDihedralParm( set0.DP(), set0.IP(), set0.AT(), allImpropers ); + allImpropers = AssignDihedralParm( set0.DP(), set0.IP(), set0.AT(), allImpropers, true ); for (DihedralArray::const_iterator imp = allImpropers.begin(); imp != allImpropers.end(); ++imp) AddToDihedralArrays( *imp ); } // Atom types - mprintf("\tRegenerating atom type parameters.\n"); + mprintf("\tAssigning atom type parameters.\n"); AssignAtomTypeParm( set0.AT() ); // LJ 6-12 - mprintf("\tRegenerating nonbond parameters.\n"); + mprintf("\tAssigning nonbond parameters.\n"); AssignNonbondParams( set0.AT(), set0.NB(), set0.HB() ); // TODO LJ14 return 0; diff --git a/src/Topology.h b/src/Topology.h index b023e31f1d..825ed4cc50 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -313,7 +313,7 @@ class Topology { void AssignImproperParm(ImproperParmHolder const&, DihedralArray&, DihedralParmArray&) const; inline DihedralArray get_unique_dihedrals(DihedralArray const&) const; DihedralArray AssignDihedralParm(DihedralParmHolder const&, ImproperParmHolder const&, - ParmHolder const&, DihedralArray const&); + ParmHolder const&, DihedralArray const&, bool); static const NonbondType LJ_EMPTY; std::vector atoms_; From 16771edf14d3307232dde8aa9718b4d110ada7ab Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 08:34:26 -0500 Subject: [PATCH 0293/1492] Comment out wildcard for regular parameter holder. Add variable to require exact matching for impropers. --- src/ParameterHolders.h | 181 +++++++++++++++++++++-------------------- 1 file changed, 92 insertions(+), 89 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 440c04d9cc..573c6a598f 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -16,12 +16,16 @@ template class ParmHolder { typedef std::pair Bpair; typedef std::vector Bmap; public: + /// CONSTRUCTOR ParmHolder() {} + /// Clear all parameters void clear() { bpmap_.clear(); } + /// \return Number of parameters size_t size() const { return bpmap_.size(); } + /// \return true if no parameters bool empty() const { return bpmap_.empty(); } /// Set wildcard character - void SetWildcard(char wc) { wc_ = NameType(std::string(1, wc)); } + //void SetWildcard(char wc) { wc_ = NameType(std::string(1, wc)); } /// Add (or update if allowed) given parameter to holder. ParameterHolders::RetType AddParm(TypeNameHolder const& types, T const& bp, bool allowUpdate) { // Check if parm for these types exist @@ -74,10 +78,10 @@ template class ParmHolder { found = true; for (const_iterator it = begin(); it != end(); ++it) if (it->first.Match_NoWC( types )) return it->second; - if (wc_.len() > 0) { - for (const_iterator it = begin(); it != end(); ++it) - if (it->first.Match_WC( types, wc_)) return it->second; - } + //if (wc_.len() > 0) { + // for (const_iterator it = begin(); it != end(); ++it) + // if (it->first.Match_WC( types, wc_)) return it->second; + //} found = false; return T(); } @@ -85,20 +89,20 @@ template class ParmHolder { iterator GetParam(TypeNameHolder const& types) { for (iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) if (it->first.Match_NoWC( types )) return it; - if (wc_.len() > 0) { - for (iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) - if (it->first.Match_WC( types, wc_)) return it; - } + //if (wc_.len() > 0) { + // for (iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) + // if (it->first.Match_WC( types, wc_)) return it; + //} return bpmap_.end(); } /// \return const iterator to parameter matching the given types. const_iterator GetParam(TypeNameHolder const& types) const { for (const_iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) if (it->first.Match_NoWC( types )) return it; - if (wc_.len() > 0) { - for (const_iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) - if (it->first.Match_WC( types, wc_)) return it; - } + //if (wc_.len() > 0) { + // for (const_iterator it = bpmap_.begin(); it != bpmap_.end(); ++it) + // if (it->first.Match_WC( types, wc_)) return it; + //} return bpmap_.end(); } /// \return size in memory in bytes @@ -112,7 +116,7 @@ template class ParmHolder { } private: Bmap bpmap_; - NameType wc_; ///< Wildcard character + //NameType wc_; ///< Wildcard character }; // ----------------------------------------------------------------------------- @@ -126,14 +130,19 @@ class DihedralParmHolder { typedef std::pair Bpair; typedef std::vector Bmap; public: + /// CONSTRUCTOR DihedralParmHolder() {} - virtual ~DihedralParmHolder() {} ///< Virtual since inherited + /// DESTRUCTOR - virtual since inherited + virtual ~DihedralParmHolder() {} + /// Clear dihedral parameters void clear() { bpmap_.clear(); } + /// \return Number of dihedral parameters size_t size() const { return bpmap_.size(); } + /// \return true if no dihedral parameters bool empty() const { return bpmap_.empty(); } /// Set wildcard character void SetWildcard(char wc) { wc_ = NameType(std::string(1, wc)); } - /** Add (or update) a single dihedral parameter for given atom types. */ + /// Add (or update) a single dihedral parameter for given atom types. ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { // Check if parm for these types exist @@ -195,8 +204,7 @@ class DihedralParmHolder { } return ParameterHolders::ADDED; } - - /** This version takes an array of dihedral parameters. */ + /// Add array of dihedral parameters with unique multiplicities ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmArray const& dpa, bool allowUpdate) { // Check if parm for these types exist @@ -232,9 +240,11 @@ class DihedralParmHolder { } return ParameterHolders::ADDED; } - + /// Const iterator typedef typename Bmap::const_iterator const_iterator; + /// \return const iterator to beginning const_iterator begin() const { return bpmap_.begin(); } + /// \return const iterator to end const_iterator end() const { return bpmap_.end(); } /// \return Array of dihedral parameters matching given atom types. DihedralParmArray FindParam(TypeNameHolder const& types, bool& found) const { @@ -288,27 +298,31 @@ class ImproperParmHolder : private DihedralParmHolder { O_130, O_301, O_310 }; - ImproperParmHolder() {} + ImproperParmHolder() : require_exact_match_(false) {} /// \return Number of improper parameter sets size_t size() const { return DihedralParmHolder::size(); } /// \return True if no parameters bool empty() const { return DihedralParmHolder::empty(); } /// \return Wildcard NameType const& Wildcard() const { return wc_; } + /// const iterator typedef typename DihedralParmHolder::const_iterator const_iterator; + /// const iterator to beginning of parameters const_iterator begin() const { return DihedralParmHolder::begin(); } + /// const iterator to end of parameters const_iterator end() const { return DihedralParmHolder::end(); } - - /** Set Wildcard char */ + /// Set Wildcard char void SetWildcard(char wc) { DihedralParmHolder::SetWildcard(wc); } - /** Set Wildcard */ + /// Set Wildcard void SetWildcard(NameType const& wc) { wc_ = wc; } - /** Add (or update) a single improper parameter for given atom types. */ + /// Indicate whether exact type matches are required + void SetRequireExactMatch(bool b) { require_exact_match_ = b; } + /// Add (or update) a single improper parameter for given atom types. ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmType const& dp, bool allowUpdate) { return DihedralParmHolder::AddParm( types, dp, allowUpdate ); } - /** This version takes an array of dihedral parameters. */ + /// Add array of improper parameters, one for each multiplicity. ParameterHolders::RetType AddParm(TypeNameHolder const& types, DihedralParmArray const& dpa, bool allowUpdate) { return DihedralParmHolder::AddParm( types, dpa, allowUpdate ); @@ -355,80 +369,68 @@ class ImproperParmHolder : private DihedralParmHolder { const_iterator GetParam(TypeNameHolder const& types, DihedralType& imp, bool& reordered) const { //mprintf("DEBUG: FindParam wc=%s Inco=%s-%s-%s-%s\n",*wc_, *(types[0]), *(types[1]), *(types[2]), *(types[3])); reordered = false; - // First, no wildcard + OrderType lastOrder_ = O_013; const_iterator it = begin(); - OrderType lastOrder_; - for (; it != end(); ++it) { - TypeNameHolder const& myTypes = it->first; - // Central (third) type must match - if (myTypes[2] == types[2]) { - //mprintf("DEBUG: FindParam (improper) central atom match %s", *(types[2])); - //mprintf(" This=%s-%s-%s-%s", *(myTypes[0]), *(myTypes[1]), *(myTypes[2]), *(myTypes[3])); - //mprintf(" Inco=%s-%s-%s-%s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); - // Try all permutations - if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { - // 0 1 2 3 - lastOrder_ = O_013; - break; - } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { - // 0 3 2 1 - lastOrder_ = O_031; - break; - } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { - // 1 0 2 3 - lastOrder_ = O_103; - break; - } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { - // 1 3 2 0 - lastOrder_ = O_130; - break; - } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { - // 3 0 2 1 - lastOrder_ = O_301; - break; - } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { - // 3 1 2 0 - lastOrder_ = O_310; - break; + // If we require an exact match, look for that first. + if (require_exact_match_) { + for (; it != end(); ++it) { + TypeNameHolder const& myTypes = it->first; + if (myTypes[2] == types[2] && myTypes[0] == types[0] && + myTypes[1] == types[1] && myTypes[3] == types[3]) + { + break; } } - } // END loop over parameters - // Wildcard if present - if (it == end() && wc_.len() > 0) { - it = begin(); + } else { + // Inexact match. First, no wildcard for (; it != end(); ++it) { TypeNameHolder const& myTypes = it->first; // Central (third) type must match - if (wcm(myTypes[2], types[2], wc_)) { + if (myTypes[2] == types[2]) { + //mprintf("DEBUG: FindParam (improper) central atom match %s", *(types[2])); + //mprintf(" This=%s-%s-%s-%s", *(myTypes[0]), *(myTypes[1]), *(myTypes[2]), *(myTypes[3])); + //mprintf(" Inco=%s-%s-%s-%s\n", *(types[0]), *(types[1]), *(types[2]), *(types[3])); // Try all permutations - if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { - // 0 1 2 3 - lastOrder_ = O_013; - break; - } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { - // 0 3 2 1 - lastOrder_ = O_031; - break; - } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { - // 1 0 2 3 - lastOrder_ = O_103; - break; - } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { - // 1 3 2 0 - lastOrder_ = O_130; - break; - } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { - // 3 0 2 1 - lastOrder_ = O_301; - break; - } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { - // 3 1 2 0 - lastOrder_ = O_310; - break; + if ( myTypes[0] == types[0] && myTypes[1] == types[1] && myTypes[3] == types[3]) { // 0 1 2 3 + lastOrder_ = O_013; break; + } else if (myTypes[0] == types[0] && myTypes[1] == types[3] && myTypes[3] == types[1]) { // 0 3 2 1 + lastOrder_ = O_031; break; + } else if (myTypes[0] == types[1] && myTypes[1] == types[0] && myTypes[3] == types[3]) { // 1 0 2 3 + lastOrder_ = O_103; break; + } else if (myTypes[0] == types[1] && myTypes[1] == types[3] && myTypes[3] == types[0]) { // 1 3 2 0 + lastOrder_ = O_130; break; + } else if (myTypes[0] == types[3] && myTypes[1] == types[0] && myTypes[3] == types[1]) { // 3 0 2 1 + lastOrder_ = O_301; break; + } else if (myTypes[0] == types[3] && myTypes[1] == types[1] && myTypes[3] == types[0]) { // 3 1 2 0 + lastOrder_ = O_310; break; } } } // END loop over parameters - } // END wildcard matches + // Second, do wildcard matches if wildcard is set. + if (it == end() && wc_.len() > 0) { + it = begin(); + for (; it != end(); ++it) { + TypeNameHolder const& myTypes = it->first; + // Central (third) type must match + if (wcm(myTypes[2], types[2], wc_)) { + // Try all permutations + if ( wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[3], wc_)) { // 0 1 2 3 + lastOrder_ = O_013; break; + } else if (wcm(myTypes[0], types[0], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[1], wc_)) { // 0 3 2 1 + lastOrder_ = O_031; break; + } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[3], wc_)) { // 1 0 2 3 + lastOrder_ = O_103; break; + } else if (wcm(myTypes[0], types[1], wc_) && wcm(myTypes[1], types[3], wc_) && wcm(myTypes[3], types[0], wc_)) { // 1 3 2 0 + lastOrder_ = O_130; break; + } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[0], wc_) && wcm(myTypes[3], types[1], wc_)) { // 3 0 2 1 + lastOrder_ = O_301; break; + } else if (wcm(myTypes[0], types[3], wc_) && wcm(myTypes[1], types[1], wc_) && wcm(myTypes[3], types[0], wc_)) { // 3 1 2 0 + lastOrder_ = O_310; break; + } + } + } // END loop over parameters + } // END wildcard matches + } // END require exact match if (it != end()) { // We have found a parameter. Do any reordering. if (lastOrder_ != O_013) reordered = true; @@ -456,5 +458,6 @@ class ImproperParmHolder : private DihedralParmHolder { /// \return size in memory in bytes size_t DataSize() const { return DihedralParmHolder::DataSize(); } private: + bool require_exact_match_; ///< If true, types must match in exact order }; #endif From 80956e05cbce7a36431c038480672586fad8f74e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 09:12:34 -0500 Subject: [PATCH 0294/1492] If incoming improper parameters require an exact match, have the improper cache require an exact match --- src/ParameterHolders.h | 14 ++++++++------ src/Topology.cpp | 3 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ParameterHolders.h b/src/ParameterHolders.h index 573c6a598f..ee08d281b3 100644 --- a/src/ParameterHolders.h +++ b/src/ParameterHolders.h @@ -300,22 +300,24 @@ class ImproperParmHolder : private DihedralParmHolder { O_310 }; ImproperParmHolder() : require_exact_match_(false) {} /// \return Number of improper parameter sets - size_t size() const { return DihedralParmHolder::size(); } + size_t size() const { return DihedralParmHolder::size(); } /// \return True if no parameters - bool empty() const { return DihedralParmHolder::empty(); } + bool empty() const { return DihedralParmHolder::empty(); } /// \return Wildcard NameType const& Wildcard() const { return wc_; } + /// \return True if an exact match is required to find a parameter + bool RequireExactMatch() const { return require_exact_match_; } /// const iterator typedef typename DihedralParmHolder::const_iterator const_iterator; /// const iterator to beginning of parameters - const_iterator begin() const { return DihedralParmHolder::begin(); } + const_iterator begin() const { return DihedralParmHolder::begin(); } /// const iterator to end of parameters - const_iterator end() const { return DihedralParmHolder::end(); } + const_iterator end() const { return DihedralParmHolder::end(); } /// Set Wildcard char void SetWildcard(char wc) { DihedralParmHolder::SetWildcard(wc); } /// Set Wildcard void SetWildcard(NameType const& wc) { wc_ = wc; } - /// Indicate whether exact type matches are required + /// Indicate whether exact type matches are required to find parameters void SetRequireExactMatch(bool b) { require_exact_match_ = b; } /// Add (or update) a single improper parameter for given atom types. ParameterHolders::RetType @@ -458,6 +460,6 @@ class ImproperParmHolder : private DihedralParmHolder { /// \return size in memory in bytes size_t DataSize() const { return DihedralParmHolder::DataSize(); } private: - bool require_exact_match_; ///< If true, types must match in exact order + bool require_exact_match_; ///< If true, types must match in exact order when finding parameters }; #endif diff --git a/src/Topology.cpp b/src/Topology.cpp index 917827126c..f504aa29b5 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -2172,6 +2172,7 @@ static inline void GetAngleParams(ParmHolder& AP, std::vector const& atoms, DihedralArray const& imp, DihedralParmArray const& ipa) { + IP.SetRequireExactMatch(true); for (DihedralArray::const_iterator b = imp.begin(); b != imp.end(); ++b) { if (b->Idx() != -1) { @@ -2189,6 +2190,7 @@ static inline void GetImproperParams(ImproperParmHolder& IP, std::vector c // GetDihedralParams() static inline void GetDihedralParams(DihedralParmHolder& DP, ImproperParmHolder& IP, std::vector const& atoms, DihedralArray const& dih, DihedralParmArray const& dpa) { + IP.SetRequireExactMatch(true); for (DihedralArray::const_iterator b = dih.begin(); b != dih.end(); ++b) { if (b->Idx() != -1) { @@ -2787,6 +2789,7 @@ DihedralArray Topology::AssignDihedralParm(DihedralParmHolder const& newDihedral // Improper cache ImproperParmHolder improperCache; improperCache.SetWildcard( newImproperParams.Wildcard() ); + improperCache.SetRequireExactMatch( newImproperParams.RequireExactMatch() ); // Keep track of 1-4 interactions typedef std::pair Ipair; typedef std::set Imap; From b8ef8c0603394f79ab2f9780f9c38d95da8c1c3c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 09:34:55 -0500 Subject: [PATCH 0295/1492] Add function for generating angles/torsions from bond array --- src/Structure/GenerateConnectivityArrays.cpp | 56 ++++++++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 2 + 2 files changed, 58 insertions(+) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index e85be89015..0b7dd8e6c8 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -196,3 +196,59 @@ DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector con } // END loop over residues return out; } + +/// Given 2 bonded atoms at1 and at2, get all angles at1-at2-X +static inline void enumerateAngles(AngleArray& angles, int at1, int at2, std::vector const& atoms) +{ + Atom const& A2 = atoms[at2]; + if (A2.Nbonds() > 1) { + for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) + { + if (*bat != at1 && at1 < *bat) { + mprintf("DEBUG: ANGLE i= %zu %i - %i - %i (%i %i %i)\n", angles.size(), at1+1, at2+1, *bat+1, at1*3, at2*3, *bat*3); + angles.push_back( AngleType(at1, at2, *bat, -1) ); + } + } + } +} + +/// Given 2 bonded atoms at1 and at2, get all torsions X-at1-at2-Y +static inline void enumerateDihedrals(DihedralArray& dihedrals, int at1, int at2, std::vector const& atoms) +{ + Atom const& A1 = atoms[at1]; + Atom const& A2 = atoms[at2]; + if (A1.Nbonds() > 1 && A2.Nbonds() > 1) { + for (Atom::bond_iterator bat1 = A1.bondbegin(); bat1 != A1.bondend(); ++bat1) + { + if (*bat1 != at2) { + for (Atom::bond_iterator bat2 = A2.bondbegin(); bat2 != A2.bondend(); ++bat2) + { + if (*bat2 != at1) { + // LEaP convention appears to be first atom less than last atom + if (*bat1 < *bat2) + dihedrals.push_back( DihedralType(*bat1, at1, at2, *bat2, -1) ); + else + dihedrals.push_back( DihedralType(*bat2, at2, at1, *bat1, -1) ); + } + } + } + } + } +} + +/** Generate angle and torsion arrays from given bond array. */ +void Cpptraj::Structure::GenerateAngleAndTorsionArraysFromBonds(AngleArray& angles, + DihedralArray& dihedrals, + std::vector const& atoms, + BondArray const& allBonds) +{ + for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) + { + // Forward direction. A1-A2-X + enumerateAngles( angles, it->A1(), it->A2(), atoms ); + // Reverse direction. A2-A1-X + enumerateAngles( angles, it->A2(), it->A1(), atoms ); + // Dihedrals + enumerateDihedrals( dihedrals, it->A1(), it->A2(), atoms ); + } +} diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index 9975c3d83b..b0bc6f8bc2 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -20,6 +20,8 @@ AngleArray GenerateAngleArray(std::vector const&, std::vector con DihedralArray GenerateDihedralArray(std::vector const&, std::vector const&); /// Generate improper dihedral array in same order as leap DihedralArray GenerateImproperArray(std::vector const&, std::vector const&); +/// Generate angle and torsion arrays from bonds +void GenerateAngleAndTorsionArraysFromBonds(AngleArray&, DihedralArray&, std::vector const&, BondArray const&); } } #endif From 6003019da555c44107a1db16556c9c5f26fe052b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 09:36:49 -0500 Subject: [PATCH 0296/1492] Remove old connectivity generation --- src/Structure/GenerateConnectivity.cpp | 196 ------------------------- src/Structure/GenerateConnectivity.h | 12 -- 2 files changed, 208 deletions(-) delete mode 100644 src/Structure/GenerateConnectivity.cpp delete mode 100644 src/Structure/GenerateConnectivity.h diff --git a/src/Structure/GenerateConnectivity.cpp b/src/Structure/GenerateConnectivity.cpp deleted file mode 100644 index e303482902..0000000000 --- a/src/Structure/GenerateConnectivity.cpp +++ /dev/null @@ -1,196 +0,0 @@ -#include "GenerateConnectivity.h" -#include "../CpptrajStdio.h" -#include "../Topology.h" -#include // std::sort - -static inline void enumerateAngles(int& aidx, int at1, int at2, Topology& topIn) { - Atom const& A2 = topIn[at2]; - if (A2.Nbonds() > 1) { - for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) - { - if (*bat != at1 && at1 < *bat) { - topIn.AddAngle(at1, at2, *bat); - mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, at1+1, at2+1, *bat+1, at1*3, at2*3, *bat*3); - //mprintf("%s - %s - %s\n", - // topIn.AtomMaskName(at1).c_str(), - // topIn.AtomMaskName(at2).c_str(), - // topIn.AtomMaskName(*bat).c_str()); - } - } - } -} - -static inline void enumerateDihedrals(int at1, int at2, Topology& topIn) { - Atom const& A1 = topIn[at1]; - Atom const& A2 = topIn[at2]; - if (A1.Nbonds() > 1 && A2.Nbonds() > 1) { - for (Atom::bond_iterator bat1 = A1.bondbegin(); bat1 != A1.bondend(); ++bat1) - { - if (*bat1 != at2) { - for (Atom::bond_iterator bat2 = A2.bondbegin(); bat2 != A2.bondend(); ++bat2) - { - if (*bat2 != at1) { - // LEaP convention appears to be first atom less than last atom - if (*bat1 < *bat2) - topIn.AddDihedral(*bat1, at1, at2, *bat2); - else - topIn.AddDihedral(*bat2, at2, at1, *bat1); - //mprintf("%s - %s - %s - %s\n", - // topIn.AtomMaskName(*bat1).c_str(), - // topIn.AtomMaskName(at1).c_str(), - // topIn.AtomMaskName(at2).c_str(), - // topIn.AtomMaskName(*bat2).c_str()); - } - } - } - } - } -} - -/* Set bonds, angles, and dihedral arrays for a given topology based on - * a sorted and combined version of the current bond arrays. - */ -int Cpptraj::Structure::GenerateAngleTorsionArrays(Topology& topIn) { - if (topIn.Nbonds() < 1) { - mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); - return 0; - } - bool has_angles = topIn.Nangles() > 0; - if (has_angles) { - mprintf("Warning: Topology '%s' already has angle information.\n", topIn.c_str()); - //return 0; - } - bool has_dihedrals = topIn.Ndihedrals() > 0; - if (has_dihedrals) { - mprintf("Warning: Topology '%s' already has dihedral information.\n", topIn.c_str()); - //return 0; - } - if (has_angles && has_dihedrals) return 0; - // Create a combined bonds array - BondArray allBonds; - allBonds.reserve(topIn.Nbonds()); - for (BondArray::const_iterator it = topIn.Bonds().begin(); it != topIn.Bonds().end(); ++it) - allBonds.push_back( *it ); - for (BondArray::const_iterator it = topIn.BondsH().begin(); it != topIn.BondsH().end(); ++it) - allBonds.push_back( *it ); - std::sort( allBonds.begin(), allBonds.end() ); - mprintf("DEBUG: Sorted bonds:\n"); - for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) - mprintf("\t%s - %s\n", - topIn.AtomMaskName(it->A1()).c_str(), - topIn.AtomMaskName(it->A2()).c_str()); - - // Angles and Torsiions - int aidx = 0; - for (BondArray::const_iterator it = allBonds.begin(); it != allBonds.end(); ++it) - { - if (!has_angles) { - // Forward direction. A1-A2-X - enumerateAngles( aidx, it->A1(), it->A2(), topIn ); - // Reverse direction. A2-A1-X - enumerateAngles( aidx, it->A2(), it->A1(), topIn ); - } - if (!has_dihedrals) { - // Dihedrals - enumerateDihedrals( it->A1(), it->A2(), topIn ); - } - } - return 0; -} - -/* Set bonds, angles, and dihedral arrays for a given topology based on - * current atom connectivity. - * This is done in the same manner as LEaP, which goes in increasing - * residue order but decreasing atom index. - */ -int Cpptraj::Structure::GenerateBondAngleTorsionArrays(Topology& topIn) { - if (topIn.Nbonds() < 1) { - mprintf("Warning: No bonds in '%s', no angles to generate.\n", topIn.c_str()); - return 0; - } - bool has_angles = topIn.Nangles() > 0; - if (has_angles) { - mprintf("Warning: Topology '%s' already has angle information.\n", topIn.c_str()); - //return 0; - } - bool has_dihedrals = topIn.Ndihedrals() > 0; - if (has_dihedrals) { - mprintf("Warning: Topology '%s' already has dihedral information.\n", topIn.c_str()); - //return 0; - } - if (has_angles && has_dihedrals) return 0; - // Clear existing bond information TODO clear angles and dihedrals? - topIn.ClearBondArrays(); - - // BONDS - int bidx = 0; - for (int ires = 0; ires < topIn.Nres(); ires++) - { - Residue const& res = topIn.Res(ires); - for (int iat = res.LastAtom()-1; iat >= res.FirstAtom(); iat--) - { - Atom const& At = topIn[iat]; - for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) - { - if (iat < *bat) { - mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); - topIn.AddToBondArrays( BondType(iat, *bat, -1) ); - } - //else - // mprintf("DEBUG: X i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); - } - } - } - - // ANGLES TODO combine above - int aidx = 0; - for (int ires = 0; ires < topIn.Nres(); ires++) - { - Residue const& res = topIn.Res(ires); - for (int iat1 = res.LastAtom()-1; iat1 >= res.FirstAtom(); iat1--) - { - Atom const& At1 = topIn[iat1]; - for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { - int iat2 = At1.Bond(bidx1); - Atom const& At2 = topIn[iat2]; - for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { - int iat3 = At2.Bond(bidx2); - if (iat1 < iat3) { - mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, iat1+1, iat2+1, iat3+1, iat1*3, iat2*3, iat3*3); - topIn.AddAngle(iat1, iat2, iat3); - } - } - } - } - } - - // TORSIONS TODO combine above - int didx = 0; - for (int ires = 0; ires < topIn.Nres(); ires++) - { - Residue const& res = topIn.Res(ires); - for (int iat1 = res.LastAtom()-1; iat1 >= res.FirstAtom(); iat1--) - { - Atom const& At1 = topIn[iat1]; - for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { - int iat2 = At1.Bond(bidx1); - Atom const& At2 = topIn[iat2]; - for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { - int iat3 = At2.Bond(bidx2); - if (iat3 != iat1) { - Atom const& At3 = topIn[iat3]; - for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { - int iat4 = At3.Bond(bidx3); - if (iat4 != iat2 && iat1 < iat4) { - mprintf("DEBUG: DIHEDRAL i= %i %i - %i - %i - %i (%i %i %i %i)\n", didx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); - topIn.AddDihedral( iat1, iat2, iat3, iat4 ); - } - } - } - } - } - } - } - - return 0; -} diff --git a/src/Structure/GenerateConnectivity.h b/src/Structure/GenerateConnectivity.h deleted file mode 100644 index dd4a150bfc..0000000000 --- a/src/Structure/GenerateConnectivity.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef INC_STRUCTURE_GENERATECONNECTIVITY_H -#define INC_STRUCTURE_GENERATECONNECTIVITY_H -class Topology; -namespace Cpptraj { -namespace Structure { -/// Generate angle/torsion arrays from bond arrays in a Topology -int GenerateAngleTorsionArrays(Topology&); -/// Generate bond/angle/torsion arrays from atom connectivity in a Topology -int GenerateBondAngleTorsionArrays(Topology&); -} -} -#endif From fe128563802740b49da225aeb811caca6019970e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 10:28:10 -0500 Subject: [PATCH 0297/1492] Remove obsolete bond/angle/torsion generation --- src/Exec_Sequence.cpp | 27 +++++++++++++++++++-------- src/Exec_UpdateParameters.cpp | 24 ++++++++++-------------- src/Structure/CMakeLists.txt | 1 - src/Structure/structuredepend | 1 - src/Structure/structurefiles | 1 - src/Topology.cpp | 2 ++ src/cpptrajdepend | 5 ++--- 7 files changed, 33 insertions(+), 28 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 6b5356fd7b..4bc95592d0 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -2,7 +2,6 @@ #include "CpptrajStdio.h" #include "AssociatedData_Connect.h" #include "Structure/Builder.h" -#include "Structure/GenerateConnectivity.h" /** Generate and build the specified sequence. */ int Exec_Sequence::generate_sequence(DataSet_Coords* OUT, @@ -91,7 +90,6 @@ const Frame CombinedFrame = Units.front()->AllocateFrame(); Units.front()->GetFrame(0, CombinedFrame); - using namespace Cpptraj::Structure; Builder builder; for (unsigned int idx = 1; idx < Units.size(); idx++) { @@ -116,12 +114,12 @@ const } // Generate angles and dihedrals - if (combinedTop.Nbonds() > 0) { - if (Cpptraj::Structure::GenerateBondAngleTorsionArrays(combinedTop)) { - mprinterr("Error: Angle generation failed.\n"); - return 1; - } - } + //if (combinedTop.Nbonds() > 0) { + // if (Cpptraj::Structure::GenerateBondAngleTorsionArrays(combinedTop)) { + // mprinterr("Error: Angle generation failed.\n"); + // return 1; + // } + //} OUT->CoordsSetup(combinedTop, CombinedFrame.CoordsInfo()); OUT->AddFrame( CombinedFrame ); @@ -142,6 +140,19 @@ void Exec_Sequence::Help() const Exec::RetType Exec_Sequence::Execute(CpptrajState& State, ArgList& argIn) { debug_ = State.Debug(); + // Atom scan direction TODO add to help +/* Cpptraj::Structure::SetAtomScanDirection(Cpptraj::Structure::SCAN_ATOMS_FORWARDS); + std::string atomscandir = argIn.GetStringKey("atomscandir"); + if (!atomscandir.empty()) { + if (atomscandir == "f") + Cpptraj::Structure::SetAtomScanDirection(Cpptraj::Structure::SCAN_ATOMS_FORWARDS); + else if (atomscandir == "b") + Cpptraj::Structure::SetAtomScanDirection(Cpptraj::Structure::SCAN_ATOMS_BACKWARDS); + else { + mprinterr("Error: Unrecognized keyword for 'atomscandir' : %s\n", atomscandir.c_str()); + return CpptrajState::ERR; + } + }*/ // Args Sarray LibSetNames; std::string libsetname = argIn.GetStringKey("libset"); diff --git a/src/Exec_UpdateParameters.cpp b/src/Exec_UpdateParameters.cpp index 735cdcfd8a..68b4b0e101 100644 --- a/src/Exec_UpdateParameters.cpp +++ b/src/Exec_UpdateParameters.cpp @@ -2,14 +2,13 @@ #include "CpptrajStdio.h" #include "DataSet_Parameters.h" #include "DataSet_Topology.h" -#include "Structure/GenerateConnectivity.h" const char* Exec_UpdateParameters::disclaimer_ = "Warning: This command is provided for convenience only.\nWarning: For editing topology files, ParmEd is a much better alternative.\n"; // Exec_UpdateParameters::Help() void Exec_UpdateParameters::Help() const { - mprintf("\tsetname [genangles]\n" + mprintf("\tsetname \n" "\t%s\n", DataSetList::TopArgs); mprintf(" Update parameters in specified topology with those from .\n" " can either be a parameter set or a topology. If a\n" @@ -23,7 +22,7 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn { mprintf("%s", disclaimer_); std::string dsname = argIn.GetStringKey("setname"); - bool genAngles = argIn.hasKey("genangles"); + //bool genAngles = argIn.hasKey("genangles"); if (dsname.empty()) { mprinterr("Error: Specify parameter set.\n"); return CpptrajState::ERR; @@ -46,18 +45,15 @@ Exec::RetType Exec_UpdateParameters::Execute(CpptrajState& State, ArgList& argIn mprintf("\tUpdating parameters in topology '%s' using those in set '%s'\n", top.c_str(), ds->legend()); - if (genAngles) - mprintf("\tWill attempt to generate angle/dihedral information from bonds.\n"); + //if (genAngles) + // mprintf("\tWill attempt to generate angle/dihedral information from bonds.\n"); - // Sort topology bond arrays to be consistent with LEaP - //top.SortBonds(); - - if (genAngles) { - if (Cpptraj::Structure::GenerateBondAngleTorsionArrays( top )) { - mprinterr("Error: Could not generate angle/dihedral information.\n"); - return CpptrajState::ERR; - } - } + //if (genAngles) { + // if (Cpptraj::Structure::GenerateBondAngleTorsionArrays( top )) { + // mprinterr("Error: Could not generate angle/dihedral information.\n"); + // return CpptrajState::ERR; + // } + //} if (ds->Type() == DataSet::PARAMETERS) top.UpdateParams(static_cast( *ds )); diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index d04716f8bc..f6ec6cc9f6 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -6,7 +6,6 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivityArrays.cpp - ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivity.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp ${CMAKE_CURRENT_LIST_DIR}/Model.cpp diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 1cc597f095..b11ad9e7ba 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -3,7 +3,6 @@ Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Co Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h -GenerateConnectivity.o : GenerateConnectivity.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivity.h GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 6a6dd3da57..d5c54bfca2 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -6,7 +6,6 @@ STRUCTURE_SOURCES= \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ GenerateConnectivityArrays.cpp \ - GenerateConnectivity.cpp \ HisProt.cpp \ InternalCoords.cpp \ Model.cpp \ diff --git a/src/Topology.cpp b/src/Topology.cpp index f504aa29b5..051e6b3d42 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -3142,6 +3142,8 @@ int Topology::AssignParams(ParameterSet const& set0) { AddToAngleArrays( *ang ); // Dihedral parameters mprintf("\tAssigning dihedral parameters.\n"); + dihedralparm_.clear(); + // Regenerate dihedral array in LEaP order dihedrals_.clear(); dihedralsh_.clear(); DihedralArray allDihedrals = Cpptraj::Structure::GenerateDihedralArray(residues_, atoms_); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 61e5b64a01..7ef4cb6e0b 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -333,7 +333,7 @@ Exec_ReadInput.o : Exec_ReadInput.cpp Action.h ActionList.h ActionState.h Analys Exec_RotateDihedral.o : Exec_RotateDihedral.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DihedralSearch.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RotateDihedral.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_RunAnalysis.o : Exec_RunAnalysis.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RunAnalysis.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ScaleDihedralK.o : Exec_ScaleDihedralK.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ScaleDihedralK.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivity.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_SequenceAlign.o : Exec_SequenceAlign.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_SequenceAlign.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Set.o : Exec_Set.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Set.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Show.o : Exec_Show.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Show.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -342,7 +342,7 @@ Exec_SplitCoords.o : Exec_SplitCoords.cpp Action.h ActionList.h ActionState.h An Exec_System.o : Exec_System.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_System.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Top.o : Exec_Top.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Top.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h TopInfo.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Traj.o : Exec_Traj.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Traj.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ViewRst.o : Exec_ViewRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ViewRst.h Exec_Zmatrix.o : Exec_Zmatrix.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Zmatrix.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Zmatrix.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ExtendedSimilarity.o : ExtendedSimilarity.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h ExtendedSimilarity.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -449,7 +449,6 @@ Structure/Chirality.o : Structure/Chirality.cpp Atom.h AtomMask.h AtomType.h Box Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/GenerateConnectivity.o : Structure/GenerateConnectivity.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivity.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 433fa2f4b95f217b28aa28617e312e7748fa6e5a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 10:36:18 -0500 Subject: [PATCH 0298/1492] Actually set polarizability in constructor --- src/AtomType.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AtomType.h b/src/AtomType.h index e603f0361b..0af047fc74 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -13,7 +13,7 @@ class AtomType { /// CONSTRUCTOR - Mass, polarizability AtomType(double m, double p) : mass_(m), polarizability_(p), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} /// CONSTRUCTOR - Radius, well depth, mass, polarizability - AtomType(double r, double d, double m, double p) : lj_(r, d), mass_(m), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} + AtomType(double r, double d, double m, double p) : lj_(r, d), mass_(m), polarizability_(p), oidx_(-1), hybrid_(UNKNOWN_HYBRIDIZATION) {} /// Set type index void SetTypeIdx(int i) { oidx_ = i; } /// \return default LJ parameters From 2c5322aad65f5de141bbfb1fe60d671efee43a45 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 12:00:56 -0500 Subject: [PATCH 0299/1492] Add seed set routine that takes into account known positions --- src/Structure/Zmatrix.cpp | 104 +++++++++++++++++++++++++++++++++++--- src/Structure/Zmatrix.h | 4 +- 2 files changed, 100 insertions(+), 8 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 8c03c97d39..f161eea714 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -192,6 +192,91 @@ void Zmatrix::addIc(int at0, int at1, int at2, int at3, Torsion(xyz0, xyz1, xyz2, xyz3) * Constants::RADDEG) ); } +/** Set seeds as 3 consecutive atoms for which positions are known. */ +int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& topIn, Molecule const& mol, Barray const& positionKnown) +{ + seedAt0_ = InternalCoords::NO_ATOM; + seedAt1_ = InternalCoords::NO_ATOM; + seedAt2_ = InternalCoords::NO_ATOM; + + if (positionKnown.empty()) { + mprinterr("InternalError: Zmatrix::autoSetSeeds_withPositions() called with an empty known position array.\n"); + return 1; + } + if (mol.NumAtoms() < 1) { + mprinterr("Internal Error: Zmatrix::autoSetSeeds_withPositions() called with an empty molecule.\n"); + return 1; + } + // Special cases + if (mol.NumAtoms() == 1) { + seedAt0_ = mol.MolUnit().Front(); + seed0Pos_ = Vec3(frameIn.XYZ(seedAt0_)); + return 0; + } else if (mol.NumAtoms() == 2) { + seedAt0_ = mol.MolUnit().Front(); + seed0Pos_ = Vec3(frameIn.XYZ(seedAt0_)); + if (topIn[seedAt0_].Nbonds() != 1) { + mprinterr("Internal Error: Zmatrix::autoSetSeeds_simple(): 2 atoms but no bonds.\n"); + return 1; + } + seedAt1_ = topIn[seedAt0_].Bond(0); + seed1Pos_ = Vec3(frameIn.XYZ(seedAt1_)); + return 0; + } + // Loop over atoms in the molecule + int numS2bonds = -1; + for (Unit::const_iterator seg = mol.MolUnit().segBegin(); + seg != mol.MolUnit().segEnd(); ++seg) + { + for (int at = seg->Begin(); at != seg->End(); ++at) { + if (positionKnown[at]) { + Atom const& AJ = topIn[at]; + if (AJ.Nbonds() > 1) { + for (int bidx1 = 0; bidx1 < AJ.Nbonds(); bidx1++) { + for (int bidx2 = bidx1 + 1; bidx2 < AJ.Nbonds(); bidx2++) { + int bat1 = AJ.Bond(bidx1); + int bat2 = AJ.Bond(bidx2); + if (positionKnown[bat1] && positionKnown[bat2]) { + int s1 = at; + int s0, s2; + // b1 - AJ - b2 + Atom const& b1 = topIn[bat1]; + Atom const& b2 = topIn[bat2]; + // The atom with more bonds should be AK (seed 2) + if (b1.Nbonds() > b2.Nbonds()) { + s0 = bat2; + s2 = bat1; + } else { + s0 = bat1; + s2 = bat2; + } + if (numS2bonds == -1 || topIn[s2].Nbonds() > numS2bonds) { + seedAt0_ = s0; + seedAt1_ = s1; + seedAt2_ = s2; + numS2bonds = topIn[s2].Nbonds(); + } + } + } // END inner loop over bonded atoms + } // END outer loop over bonded atoms + } // END AJ bonds > 1 + } // END position of AJ is known + } // END loop over segment atoms + } // END loop over segments + + if (seedAt0_ == InternalCoords::NO_ATOM || + seedAt1_ == InternalCoords::NO_ATOM || + seedAt2_ == InternalCoords::NO_ATOM) + { + mprinterr("Error: No suitable seed atoms with known positions could be found.\n"); + return 1; + } + seed0Pos_ = Vec3(frameIn.XYZ(seedAt0_)); + seed1Pos_ = Vec3(frameIn.XYZ(seedAt1_)); + seed2Pos_ = Vec3(frameIn.XYZ(seedAt2_)); + return 0; +} + /** Simple automatic setting of seeds for a molecule. * seed0 - seed1 - seed 2 * Prefer that seed1 has only exactly 2 bonds. It cannot have 1. @@ -202,11 +287,11 @@ int Zmatrix::autoSetSeeds_simple(Frame const& frameIn, Topology const& topIn, Mo seedAt1_ = InternalCoords::NO_ATOM; seedAt2_ = InternalCoords::NO_ATOM; - // Handle special cases if (mol.NumAtoms() < 1) { mprinterr("Internal Error: Zmatrix::autoSetSeeds_simple() called with an empty molecule.\n"); return 1; } + // Handle special cases if (mol.NumAtoms() == 1) { seedAt0_ = mol.MolUnit().Front(); seed0Pos_ = Vec3(frameIn.XYZ(seedAt0_)); @@ -450,7 +535,8 @@ int Zmatrix::traceMol(int atL0, int atK0, int atJ0, * This algorithm attempts to "trace" the molecule in a manner that * should make internal coordinate assignment more "natural". */ -int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int molnum) +int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int molnum, + Barray const& knownPositions) { if (molnum < 0) { mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); @@ -470,13 +556,17 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int // See if we need to assign seed atoms if (!HasCartSeeds()) { - // First seed atom will just be first atom TODO lowest index heavy atom? - if (autoSetSeeds_simple(frameIn, topIn, currentMol)) { + int seedErr = 0; + if (knownPositions.empty()) + // First seed atom will just be first atom TODO lowest index heavy atom? + seedErr = autoSetSeeds_simple(frameIn, topIn, currentMol); + else + seedErr = autoSetSeeds_withPositions(frameIn, topIn, currentMol, knownPositions); + if (seedErr != 0) { //if (autoSetSeeds(frameIn, topIn, maxnatom, currentMol.MolUnit().Front())) { mprinterr("Error: Could not automatically determine seed atoms.\n"); return 1; } - } else { // Seed atoms already set if (debug_ > 0) @@ -542,13 +632,13 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int /** Setup Zmatrix from Cartesian coordinates/topology. */ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn) { - return SetFromFrame_Trace(frameIn, topIn, 0); + return SetFromFrame_Trace(frameIn, topIn, 0, Barray()); } /** Setup Zmatrix from Cartesian coordinates/topology. */ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn, int molnum) { - return SetFromFrame_Trace(frameIn, topIn, molnum); + return SetFromFrame_Trace(frameIn, topIn, molnum, Barray()); } /** Given two bonded atoms A and B, where B has a depth of at least 2 diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 8b53f03fe7..89f20007b7 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -71,6 +71,8 @@ class Zmatrix { static Vec3 AtomIposition(InternalCoords const&, Frame const&); private: typedef std::vector Iarray; + /// Set seeds as 3 consecutive atoms with known positions + int autoSetSeeds_withPositions(Frame const&, Topology const&, Molecule const&, Barray const&); /// Simple version of auto set seeds based on connectivity only int autoSetSeeds_simple(Frame const&, Topology const&, Molecule const&); /// Calculate and add an internal coordinate given indices and Cartesian coords. @@ -78,7 +80,7 @@ class Zmatrix { /// Add internal coordiantes by tracing a molecule int traceMol(int, int, int, Frame const&, Topology const&, unsigned int, unsigned int&, Barray&); /// Convert from Cartesian to minimal Zmatrix by tracing a molecule - int SetFromFrame_Trace(Frame const&, Topology const&, int); + int SetFromFrame_Trace(Frame const&, Topology const&, int, Barray const&); /// \return True if IC seeds are set //bool HasICSeeds() const; /// \return True if Cartesian seeds are set From aef619ac6c2ba100280fcc4a30f2944553ba46d4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 12:27:43 -0500 Subject: [PATCH 0300/1492] Start new way to properly set up seeds so that residues actually get built. --- src/Exec_Build.cpp | 20 +++++++++++------ src/Structure/Zmatrix.cpp | 45 ++++++++++++++++++++++----------------- src/Structure/Zmatrix.h | 6 ++++-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 2060e77fa9..5c749363ed 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -238,14 +238,20 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, { Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { - mprintf("DEBUG: Zmatrix for building residue %li %s\n", it - ResZmatrices.begin() + 1, - topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); - zmatrix->print(&topOut); - zmatrix->SetDebug( 1 ); // DEBUG - if (zmatrix->SetToFrame( frameOut, hasPosition )) { - mprinterr("Error: Building residue %s failed.\n", - topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + // Update zmatrix seeds + if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, it - ResZmatrices.begin(), hasPosition )) { + mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); buildFailed = true; + } else { + mprintf("DEBUG: Zmatrix for building residue %li %s\n", it - ResZmatrices.begin() + 1, + topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + zmatrix->print(&topOut); + zmatrix->SetDebug( 1 ); // DEBUG + if (zmatrix->SetToFrame( frameOut, hasPosition )) { + mprinterr("Error: Building residue %s failed.\n", + topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + buildFailed = true; + } } } } diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index f161eea714..760c8e20f2 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -192,8 +192,14 @@ void Zmatrix::addIc(int at0, int at1, int at2, int at3, Torsion(xyz0, xyz1, xyz2, xyz3) * Constants::RADDEG) ); } +/** Set seeds as 3 consecutive atoms from mol 0 for which positions are known. */ +int Zmatrix::AutoSetSeedsWithPositions(Frame const& frameIn, Topology const& topIn, int ires, Barray const& positionKnown) +{ + return autoSetSeeds_withPositions(frameIn, topIn, topIn.Res(ires).FirstAtom(), topIn.Res(ires).LastAtom(), positionKnown); +} + /** Set seeds as 3 consecutive atoms for which positions are known. */ -int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& topIn, Molecule const& mol, Barray const& positionKnown) +int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& topIn, int startAtom, int endAtom, Barray const& positionKnown) { seedAt0_ = InternalCoords::NO_ATOM; seedAt1_ = InternalCoords::NO_ATOM; @@ -203,17 +209,18 @@ int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& to mprinterr("InternalError: Zmatrix::autoSetSeeds_withPositions() called with an empty known position array.\n"); return 1; } - if (mol.NumAtoms() < 1) { - mprinterr("Internal Error: Zmatrix::autoSetSeeds_withPositions() called with an empty molecule.\n"); + int numAtoms = endAtom - startAtom; + if (numAtoms < 1) { + mprinterr("Internal Error: Zmatrix::autoSetSeeds_withPositions() called with start <= end atom.\n"); return 1; } // Special cases - if (mol.NumAtoms() == 1) { - seedAt0_ = mol.MolUnit().Front(); + if (numAtoms == 1) { + seedAt0_ = startAtom; seed0Pos_ = Vec3(frameIn.XYZ(seedAt0_)); return 0; - } else if (mol.NumAtoms() == 2) { - seedAt0_ = mol.MolUnit().Front(); + } else if (numAtoms == 2) { + seedAt0_ = startAtom; seed0Pos_ = Vec3(frameIn.XYZ(seedAt0_)); if (topIn[seedAt0_].Nbonds() != 1) { mprinterr("Internal Error: Zmatrix::autoSetSeeds_simple(): 2 atoms but no bonds.\n"); @@ -225,10 +232,11 @@ int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& to } // Loop over atoms in the molecule int numS2bonds = -1; - for (Unit::const_iterator seg = mol.MolUnit().segBegin(); - seg != mol.MolUnit().segEnd(); ++seg) - { - for (int at = seg->Begin(); at != seg->End(); ++at) { + for (int at = startAtom; at < endAtom; at++) { +// for (Unit::const_iterator seg = mol.MolUnit().segBegin(); +// seg != mol.MolUnit().segEnd(); ++seg) +// { +// for (int at = seg->Begin(); at != seg->End(); ++at) { if (positionKnown[at]) { Atom const& AJ = topIn[at]; if (AJ.Nbonds() > 1) { @@ -261,7 +269,7 @@ int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& to } // END outer loop over bonded atoms } // END AJ bonds > 1 } // END position of AJ is known - } // END loop over segment atoms + //} // END loop over segment atoms } // END loop over segments if (seedAt0_ == InternalCoords::NO_ATOM || @@ -535,8 +543,7 @@ int Zmatrix::traceMol(int atL0, int atK0, int atJ0, * This algorithm attempts to "trace" the molecule in a manner that * should make internal coordinate assignment more "natural". */ -int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int molnum, - Barray const& knownPositions) +int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int molnum) { if (molnum < 0) { mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); @@ -557,11 +564,11 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int // See if we need to assign seed atoms if (!HasCartSeeds()) { int seedErr = 0; - if (knownPositions.empty()) + //if (knownPositions.empty()) // First seed atom will just be first atom TODO lowest index heavy atom? seedErr = autoSetSeeds_simple(frameIn, topIn, currentMol); - else - seedErr = autoSetSeeds_withPositions(frameIn, topIn, currentMol, knownPositions); + //else + // seedErr = autoSetSeeds_withPositions(frameIn, topIn, currentMol, knownPositions); if (seedErr != 0) { //if (autoSetSeeds(frameIn, topIn, maxnatom, currentMol.MolUnit().Front())) { mprinterr("Error: Could not automatically determine seed atoms.\n"); @@ -632,13 +639,13 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int /** Setup Zmatrix from Cartesian coordinates/topology. */ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn) { - return SetFromFrame_Trace(frameIn, topIn, 0, Barray()); + return SetFromFrame_Trace(frameIn, topIn, 0); } /** Setup Zmatrix from Cartesian coordinates/topology. */ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn, int molnum) { - return SetFromFrame_Trace(frameIn, topIn, molnum, Barray()); + return SetFromFrame_Trace(frameIn, topIn, molnum); } /** Given two bonded atoms A and B, where B has a depth of at least 2 diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 89f20007b7..608a4b26b5 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -38,6 +38,8 @@ class Zmatrix { /// Set seed atoms from frame/top int SetSeedPositions(Frame const&, Topology const&, int, int, int); + /// Set seed atoms as 3 consecutive atoms with known positions for specified residue # + int AutoSetSeedsWithPositions(Frame const&, Topology const&, int, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&, int); @@ -72,7 +74,7 @@ class Zmatrix { private: typedef std::vector Iarray; /// Set seeds as 3 consecutive atoms with known positions - int autoSetSeeds_withPositions(Frame const&, Topology const&, Molecule const&, Barray const&); + int autoSetSeeds_withPositions(Frame const&, Topology const&, int, int, Barray const&); /// Simple version of auto set seeds based on connectivity only int autoSetSeeds_simple(Frame const&, Topology const&, Molecule const&); /// Calculate and add an internal coordinate given indices and Cartesian coords. @@ -80,7 +82,7 @@ class Zmatrix { /// Add internal coordiantes by tracing a molecule int traceMol(int, int, int, Frame const&, Topology const&, unsigned int, unsigned int&, Barray&); /// Convert from Cartesian to minimal Zmatrix by tracing a molecule - int SetFromFrame_Trace(Frame const&, Topology const&, int, Barray const&); + int SetFromFrame_Trace(Frame const&, Topology const&, int); /// \return True if IC seeds are set //bool HasICSeeds() const; /// \return True if Cartesian seeds are set From 53382bf7b29fa024cf64b861a8842fc83ea9bcd0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 9 Jan 2024 17:23:59 -0500 Subject: [PATCH 0301/1492] Add full internal coordinates for seed atoms --- src/Structure/Zmatrix.cpp | 85 +++++++++++++++++++++++++++++++++++---- src/Structure/Zmatrix.h | 5 ++- 2 files changed, 81 insertions(+), 9 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 760c8e20f2..18327e4f7f 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -539,6 +539,47 @@ int Zmatrix::traceMol(int atL0, int atK0, int atJ0, return 0; } +/** Add IC for the given atom. */ +int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology const& topIn) +{ + int maxScore = -1; + int maxAtj = -1; + int maxAtk = -1; + int maxAtl = -1; + Atom const& atomI = topIn[iat]; + for (Atom::bond_iterator jat = atomI.bondbegin(); jat != atomI.bondend(); ++jat) { + Atom const& atomJ = topIn[*jat]; + for (Atom::bond_iterator kat = atomJ.bondbegin(); kat != atomJ.bondend(); ++kat) { + if (*kat != iat) { + Atom const& atomK = topIn[*kat]; + for (Atom::bond_iterator lat = atomK.bondbegin(); lat != atomK.bondend(); ++lat) { + if (*lat != *jat && *lat != iat) { + int nbondScore = topIn[*lat].Nbonds(); + if (maxScore == -1 || nbondScore > maxScore) { + maxScore = nbondScore; + maxAtj = *jat; + maxAtk = *kat; + maxAtl = *lat; + } + mprintf("DEBUG: Potential IC for %s [ %s - %s - %s ] score= %i\n", + topIn.AtomMaskName(iat).c_str(), + topIn.AtomMaskName(*jat).c_str(), + topIn.AtomMaskName(*kat).c_str(), + topIn.AtomMaskName(*lat).c_str(), + nbondScore); + } + } + } + } + } + if (maxScore == -1) { + mprintf("Warning: Unable to define IC for atom %s\n", topIn.AtomMaskName(iat).c_str()); + } else { + addIc( iat, maxAtj, maxAtk, maxAtl, frameIn.XYZ(iat), frameIn.XYZ(maxAtj), frameIn.XYZ(maxAtk), frameIn.XYZ(maxAtl) ); + } + return 0; +} + /** Set up Zmatrix from Cartesian coordinates and topology. * This algorithm attempts to "trace" the molecule in a manner that * should make internal coordinate assignment more "natural". @@ -582,7 +623,7 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int topIn.AtomMaskName(seedAt1_).c_str(), topIn.AtomMaskName(seedAt2_).c_str()); } - // Add IC seeds + // Add basic ICs for seeds if (seedAt0_ != InternalCoords::NO_ATOM) AddIC( InternalCoords(seedAt0_, InternalCoords::NO_ATOM, InternalCoords::NO_ATOM, InternalCoords::NO_ATOM, 0, 0, 0) ); @@ -633,7 +674,28 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int if (nHasIC < maxnatom) { mprintf("Warning: Not all atoms have an associated internal coordinate.\n"); } - + // Add ICs for seeds + if (maxnatom > 3) { + //Atom const& SA0 = topIn[seedAt0_]; + //Atom const& SA1 = topIn[seedAt1_]; + //Atom const& SA2 = topIn[seedAt2_]; + // Seed 0; 0-1-2-X + addInternalCoordForAtom(seedAt0_, frameIn, topIn); + addInternalCoordForAtom(seedAt1_, frameIn, topIn); + addInternalCoordForAtom(seedAt2_, frameIn, topIn); +/* if (SA2.Nbonds() < 2) + mprintf("Warning: Third seed atom has only one bond. Cannot create full IC for seed 0.\n"); + else { + int at3; + for (Atom::bond_iterator bat = SA2.bondbegin(); bat != SA2.bondend(); ++bat) { + if (*bat != seedAt1_ && *bat != seedAt0_) { + at3 = *bat; + break; + } + } + addIc( seedAt0_, seedAt1_, seedAt2_, at3, frameIn.XYZ(seedAt0_), frameIn.XYZ(seedAt1_), frameIn.XYZ(seedAt2_), frameIn.XYZ(at3) ); + }*/ + } return 0; } @@ -923,6 +985,7 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { Barray isUsed( IC_.size(), false ); unsigned int Nused = 0; if (HasCartSeeds()) { + mprintf("DEBUG: Has Cartesian seeds.\n"); if (icseed0_ != InternalCoords::NO_ATOM) MARK(icseed0_, isUsed, Nused); if (icseed1_ != InternalCoords::NO_ATOM) MARK(icseed1_, isUsed, Nused); if (icseed2_ != InternalCoords::NO_ATOM) MARK(icseed2_, isUsed, Nused); @@ -968,17 +1031,21 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { } // END Does not have Cart. seeds // Find the lowest unused IC unsigned int lowestUnusedIC = 0; - for (; lowestUnusedIC < IC_.size(); ++lowestUnusedIC) - if (!isUsed[lowestUnusedIC]) break; - if (debug_ > 0) mprintf("DEBUG: Lowest unused IC: %u\n", lowestUnusedIC+1); +// for (; lowestUnusedIC < IC_.size(); ++lowestUnusedIC) +// if (!isUsed[lowestUnusedIC]) break; +// if (debug_ > 0) mprintf("DEBUG: Lowest unused IC: %u\n", lowestUnusedIC+1); // Loop over remaining ICs while (Nused < IC_.size()) { // Find the next IC that is not yet used. - unsigned int idx = lowestUnusedIC; +// unsigned int idx = lowestUnusedIC; + unsigned int idx = 0; bool findNextIC = true; while (findNextIC) { - while (idx < IC_.size() && isUsed[idx]) idx++; + while (idx < IC_.size() && isUsed[idx]) { + mprintf("DEBUG:\t\tIC %u is used\n", idx+1); + idx++; + } if (idx >= IC_.size()) { mprinterr("Error: Could not find next IC to use.\n"); return 1; @@ -989,8 +1056,10 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { hasPosition[ IC_[idx].AtL() ]) { findNextIC = false; - } else + } else { + mprintf("DEBUG:\t\tIC %u is missing atoms.\n", idx+1); idx++; + } } // END loop finding next atom to set if (debug_ > 0) mprintf("DEBUG: Next IC to use is %u\n", idx+1); diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 608a4b26b5..3fb70d5c28 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -79,8 +79,11 @@ class Zmatrix { int autoSetSeeds_simple(Frame const&, Topology const&, Molecule const&); /// Calculate and add an internal coordinate given indices and Cartesian coords. void addIc(int,int,int,int,const double*,const double*,const double*,const double*); - /// Add internal coordiantes by tracing a molecule + /// Add internal coordinates by tracing a molecule int traceMol(int, int, int, Frame const&, Topology const&, unsigned int, unsigned int&, Barray&); + /// Add internal coordinate for given atom + int addInternalCoordForAtom(int, Frame const&, Topology const&); + /// Convert from Cartesian to minimal Zmatrix by tracing a molecule int SetFromFrame_Trace(Frame const&, Topology const&, int); /// \return True if IC seeds are set From a891538c0823eded714f07798e4cb45bb32c0f92 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 10 Jan 2024 10:24:50 -0500 Subject: [PATCH 0302/1492] Only set positions for atoms without positions --- src/Structure/Zmatrix.cpp | 43 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 18327e4f7f..c48335ccea 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1030,11 +1030,50 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { } // END seed atom 0 } // END Does not have Cart. seeds // Find the lowest unused IC - unsigned int lowestUnusedIC = 0; +// unsigned int lowestUnusedIC = 0; // for (; lowestUnusedIC < IC_.size(); ++lowestUnusedIC) // if (!isUsed[lowestUnusedIC]) break; // if (debug_ > 0) mprintf("DEBUG: Lowest unused IC: %u\n", lowestUnusedIC+1); + // Out of the remaining ICs, count which ones do not have positions set. + unsigned int remainingPositionsToSet = 0; + for (unsigned int icIdx = 0; icIdx != IC_.size(); ++icIdx) { + if (!isUsed[icIdx] && !hasPosition[IC_[icIdx].AtI()]) + remainingPositionsToSet++; + } + mprintf("DEBUG: %u positions to set.\n", remainingPositionsToSet); + + while (remainingPositionsToSet > 0 && Nused < IC_.size()) { + // Get the next IC with a position to set + int icIdx = -1; + for (unsigned int idx = 0; idx != IC_.size(); ++idx) { + if (!isUsed[idx] && !hasPosition[IC_[idx].AtI()]) { + // All 3 of the connecting atoms must be set + if (hasPosition[ IC_[idx].AtJ() ] && + hasPosition[ IC_[idx].AtK() ] && + hasPosition[ IC_[idx].AtL() ]) + { + icIdx = (int)idx; + break; + } else { + mprintf("DEBUG:\t\tIC %u is missing atoms.\n", idx+1); + } + } + } + if (icIdx < 0) { + mprinterr("Error: Could not find next IC to use.\n"); + return 1; + } + if (debug_ > 0) mprintf("DEBUG: Next IC to use is %i\n", icIdx+1); + InternalCoords const& ic = IC_[icIdx]; + Vec3 posI = AtomIposition(ic, frameOut); + + frameOut.SetXYZ( ic.AtI(), posI ); + hasPosition[ ic.AtI() ] = true; + remainingPositionsToSet--; + MARK(icIdx, isUsed, Nused); + } // END loop over remaining positions +/* // Loop over remaining ICs while (Nused < IC_.size()) { // Find the next IC that is not yet used. @@ -1077,6 +1116,6 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { //break; // DEBUG } // END loop over internal coordinates - +*/ return 0; } From bef5095df7729a9143c678812016021f128388b4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 10 Jan 2024 15:41:55 -0500 Subject: [PATCH 0303/1492] Use the exact same strings that are in leap --- src/Parm/GB_Params.cpp | 18 +++++++++++++++++- src/Parm/GB_Params.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Parm/GB_Params.cpp b/src/Parm/GB_Params.cpp index 65db247499..2205ee853b 100644 --- a/src/Parm/GB_Params.cpp +++ b/src/Parm/GB_Params.cpp @@ -24,11 +24,27 @@ static const char* GB_RadiiTypeKey_[] = { 0 }; +static const char* GB_RadiiAmberFlag_[] = { + "Bondi radii (bondi)", // 0 + "amber6 modified Bondi radii (amber6)", // 1 + "modified Bondi radii (mbondi)", // 2 + "Huo and Kollman optimized radii (pbamber)", // 3 + "H(N)-modified Bondi radii (mbondi2)", // 6 + "Parse radii (parse)", // 7 + "ArgH and AspGluO modified Bondi2 radii (mbondi3)", // 8 + "Unknown radius set (leap needs to be modified!)" +}; + /** \return char string corresponding to type. */ std::string Cpptraj::Parm::GbTypeStr(GB_RadiiType t) { return std::string(GB_RadiiTypeStr_[t]); } +/** \return Amber topology FLAG */ +std::string Cpptraj::Parm::GbAmberFlag(GB_RadiiType t) { + return std::string(GB_RadiiAmberFlag_[t]); +} + /** \return GB_RadiiType corresponding to string. */ Cpptraj::Parm::GB_RadiiType Cpptraj::Parm::GbTypeFromKey(std::string const& key) { if (!key.empty()) { @@ -400,7 +416,7 @@ int Cpptraj::Parm::Assign_GB_Radii(Topology& top, GB_RadiiType radiiSet) return 1; } mprintf("\tUsing GB radii set: %s\n", GB_RadiiTypeStr_[radiiSet]); - top.SetGBradiiSet( std::string(GB_RadiiTypeStr_[radiiSet]) ); + top.SetGBradiiSet( std::string(GB_RadiiAmberFlag_[radiiSet]) ); assign_gb_radii( top, radiiSet ); assign_gb_screen( top, radiiSet ); diff --git a/src/Parm/GB_Params.h b/src/Parm/GB_Params.h index 97f24d11ff..6067d2f6ee 100644 --- a/src/Parm/GB_Params.h +++ b/src/Parm/GB_Params.h @@ -15,6 +15,8 @@ enum GB_RadiiType { MBONDI3, ///< 8, ArgH and AspGluO modified Bondi2 radii UNKNOWN_GB }; +/// \return string corresponding to Amber Radii Flag +std::string GbAmberFlag(GB_RadiiType); /// \return string corresponding to gb radii set std::string GbTypeStr(GB_RadiiType); /// \return GB radii type corresponding to string From ba8c30c9ce180a3a60e64250616753d8cf6ef86e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 10 Jan 2024 18:55:18 -0500 Subject: [PATCH 0304/1492] Detect terminal residues --- src/Exec_Build.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 5c749363ed..32aff5eb8e 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -48,6 +48,48 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, Topology const& topIn, Frame const& frameIn) { + // Determine which residues are terminal + typedef std::vector Iarray; + typedef std::vector IIarray; + IIarray terminalResidues( topIn.Nmol() ); + for (int ires = 0; ires != topIn.Nres(); ires++) + { + Residue const& currentRes = topIn.Res(ires); + int n_connections = 0; + for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); at++) + { + if (topIn[at].Element() != Atom::HYDROGEN && topIn[at].Nbonds() > 1) { + for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) + { + if (topIn[*bat].ResNum() != topIn[at].ResNum()) + n_connections++; + } + } + } + mprintf("DEBUG: Res %s has %i connections.\n", topIn.TruncResNameNum(ires).c_str(), n_connections); + if (n_connections == 1) { + int molnum = topIn[currentRes.FirstAtom()].MolNum(); + terminalResidues[ molnum ].push_back( ires ); + } + } + enum TermType { BEG_TERMINAL = 0, REGULAR, END_TERMINAL }; + typedef std::vector Tarray; + Tarray residueTerminalStatus( topIn.Nres(), REGULAR ); + mprintf("\tTerminal residues:\n"); + for (IIarray::const_iterator mit = terminalResidues.begin(); mit != terminalResidues.end(); ++mit) + { + mprintf("\t\tMol %li:", mit - terminalResidues.begin() + 1); + for (Iarray::const_iterator it = mit->begin(); it != mit->end(); ++it) { + mprintf(" %s", topIn.TruncResNameNum( *it ).c_str()); + if (it == mit->begin()) + residueTerminalStatus[*it] = BEG_TERMINAL; + else + residueTerminalStatus[*it] = END_TERMINAL; + mprintf("(%i)", (int)residueTerminalStatus[*it]); + } + mprintf("\n"); + } + // Array of templates for each residue std::vector ResTemplates; ResTemplates.reserve( topIn.Nres() ); From 3963744ff26367f888ae970c97fae970cf4660ee Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 09:48:05 -0500 Subject: [PATCH 0305/1492] Track residue connections --- src/Exec_Build.cpp | 28 ++++++++++++++++++++++------ src/Structure/Zmatrix.cpp | 4 +++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 32aff5eb8e..fdc2e70c25 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -48,10 +48,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, Topology const& topIn, Frame const& frameIn) { - // Determine which residues are terminal typedef std::vector Iarray; typedef std::vector IIarray; - IIarray terminalResidues( topIn.Nmol() ); + // Determine which residues are terminal + IIarray molTermResidues( topIn.Nmol() ); + // Track residue connections + IIarray resConnections( topIn.Nres() ); for (int ires = 0; ires != topIn.Nres(); ires++) { Residue const& currentRes = topIn.Res(ires); @@ -61,24 +63,36 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (topIn[at].Element() != Atom::HYDROGEN && topIn[at].Nbonds() > 1) { for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) { - if (topIn[*bat].ResNum() != topIn[at].ResNum()) + if (topIn[*bat].ResNum() != topIn[at].ResNum()) { n_connections++; + resConnections[ ires ].push_back( topIn[*bat].ResNum() ); + } } } } mprintf("DEBUG: Res %s has %i connections.\n", topIn.TruncResNameNum(ires).c_str(), n_connections); if (n_connections == 1) { int molnum = topIn[currentRes.FirstAtom()].MolNum(); - terminalResidues[ molnum ].push_back( ires ); + molTermResidues[ molnum ].push_back( ires ); } } + // DEBUG Print residue connections + mprintf("DEBUG: Residue connections:\n"); + for (IIarray::const_iterator rit = resConnections.begin(); rit != resConnections.end(); ++rit) + { + mprintf("DEBUG:\t\t%s to", topIn.TruncResNameNum(rit-resConnections.begin()).c_str()); + for (Iarray::const_iterator it = rit->begin(); it != rit->end(); ++it) + mprintf(" %s", topIn.TruncResNameNum( *it ).c_str()); + mprintf("\n"); + } + // Set residue terminal status enum TermType { BEG_TERMINAL = 0, REGULAR, END_TERMINAL }; typedef std::vector Tarray; Tarray residueTerminalStatus( topIn.Nres(), REGULAR ); mprintf("\tTerminal residues:\n"); - for (IIarray::const_iterator mit = terminalResidues.begin(); mit != terminalResidues.end(); ++mit) + for (IIarray::const_iterator mit = molTermResidues.begin(); mit != molTermResidues.end(); ++mit) { - mprintf("\t\tMol %li:", mit - terminalResidues.begin() + 1); + mprintf("\t\tMol %li:", mit - molTermResidues.begin() + 1); for (Iarray::const_iterator it = mit->begin(); it != mit->end(); ++it) { mprintf(" %s", topIn.TruncResNameNum( *it ).c_str()); if (it == mit->begin()) @@ -280,6 +294,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, { Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { + // Create zmatrix with previous residue if needed + // Update zmatrix seeds if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, it - ResZmatrices.begin(), hasPosition )) { mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index c48335ccea..bc92235e18 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1038,8 +1038,10 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { // Out of the remaining ICs, count which ones do not have positions set. unsigned int remainingPositionsToSet = 0; for (unsigned int icIdx = 0; icIdx != IC_.size(); ++icIdx) { - if (!isUsed[icIdx] && !hasPosition[IC_[icIdx].AtI()]) + if (!isUsed[icIdx] && !hasPosition[IC_[icIdx].AtI()]) { remainingPositionsToSet++; + mprintf("DEBUG:\t\tAtom %i needs its position set.\n", IC_[icIdx].AtI()); + } } mprintf("DEBUG: %u positions to set.\n", remainingPositionsToSet); From 412a1fe59c092d6a4269609bc03ad0455f195857 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 10:26:02 -0500 Subject: [PATCH 0306/1492] Make const --- src/Structure/Zmatrix.cpp | 2 +- src/Structure/Zmatrix.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index bc92235e18..09ad074ab7 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -93,7 +93,7 @@ std::vector Zmatrix::AtomI_indices(int atomi) const { } /** Print to stdout */ -void Zmatrix::print(Topology* topIn) const { +void Zmatrix::print(Topology const* topIn) const { mprintf("%zu internal coords.\n", IC_.size()); mprintf("Seed IC indices : %i %i %i\n", icseed0_+1, icseed1_+1, icseed2_+1); mprintf("Seed Cart. indices : %i %i %i\n", seedAt0_+1, seedAt1_+1, seedAt2_+1); diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 3fb70d5c28..f177758dad 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -19,7 +19,7 @@ class Zmatrix { /// Set debug level void SetDebug(int d) { debug_ = d; } /// Print to stdout - void print(Topology*) const; + void print(Topology const*) const; /// Print to stdout, no atom names void print() const { print(0); } From c43ddc80c719f351bf1be88cb89aae113b8bac3a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 10:49:50 -0500 Subject: [PATCH 0307/1492] Add some debug info --- src/Structure/Zmatrix.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 09ad074ab7..c47e55eb15 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -721,9 +721,10 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology BuildAtom const& AtomA, BuildAtom const& AtomB) { if (debug_ > 0) - mprintf("DEBUG: SetupICsAroundBond: atA= %s (%i) atB= %s (%i)\n", + mprintf("DEBUG: SetupICsAroundBond: atA= %s (%i) atB= %s (%i) total # atoms %i\n", topIn.AtomMaskName(atA).c_str(), atA+1, - topIn.AtomMaskName(atB).c_str(), atB+1); + topIn.AtomMaskName(atB).c_str(), atB+1, + topIn.Natom()); IC_.clear(); Barray hasIC( topIn.Natom(), false ); @@ -732,6 +733,7 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology for (std::vector::const_iterator it = atomPositionKnown.begin(); it != atomPositionKnown.end(); ++it) { + //mprintf("DEBUG: MARKING KNOWN ATOMS. %li\n", it - atomPositionKnown.begin()); if (*it) MARK( it - atomPositionKnown.begin(), hasIC, nHasIC ); } From ff3bcb0a7f76d91d17952fe0bb940dc93e28a057 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 10:54:21 -0500 Subject: [PATCH 0308/1492] Dont check # of bonds in case there are 1 atom residues --- src/Exec_Build.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index fdc2e70c25..8dc5677a9e 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -60,7 +60,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int n_connections = 0; for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); at++) { - if (topIn[at].Element() != Atom::HYDROGEN && topIn[at].Nbonds() > 1) { + //if (topIn[at].Element() != Atom::HYDROGEN && topIn[at].Nbonds() > 1) { for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) { if (topIn[*bat].ResNum() != topIn[at].ResNum()) { @@ -68,7 +68,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, resConnections[ ires ].push_back( topIn[*bat].ResNum() ); } } - } + //} } mprintf("DEBUG: Res %s has %i connections.\n", topIn.TruncResNameNum(ires).c_str(), n_connections); if (n_connections == 1) { From 9cb0b2b899c5f2d37332237de1164d04d6c64cf9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 10:55:12 -0500 Subject: [PATCH 0309/1492] Hide some debug info --- src/Exec_Build.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 8dc5677a9e..30087529fc 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -249,10 +249,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } - zmatrix->print( resTemplate->TopPtr() ); + //zmatrix->print( resTemplate->TopPtr() ); zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); - zmatrix->print( &topOut ); + //zmatrix->print( &topOut ); } else ResZmatrices.push_back( 0 ); } // END template exists From 1e6b6104891444d9269270e64ccc30cfdd5f1d61 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 10:57:07 -0500 Subject: [PATCH 0310/1492] Calculate residue index once --- src/Exec_Build.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 30087529fc..20c40864ee 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -292,22 +292,21 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, bool buildFailed = false; for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) { + long int ires = it-ResZmatrices.begin(); Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { - // Create zmatrix with previous residue if needed - // Update zmatrix seeds - if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, it - ResZmatrices.begin(), hasPosition )) { + if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); buildFailed = true; } else { - mprintf("DEBUG: Zmatrix for building residue %li %s\n", it - ResZmatrices.begin() + 1, - topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, + topOut.TruncResNameNum(ires).c_str()); zmatrix->print(&topOut); zmatrix->SetDebug( 1 ); // DEBUG if (zmatrix->SetToFrame( frameOut, hasPosition )) { mprinterr("Error: Building residue %s failed.\n", - topOut.TruncResNameNum(it - ResZmatrices.begin()).c_str()); + topOut.TruncResNameNum(ires).c_str()); buildFailed = true; } } From 11dc044eea873663c079b2c8756fe686836ab467 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 10:58:24 -0500 Subject: [PATCH 0311/1492] Add some debug info --- src/Exec_Build.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 20c40864ee..7c065c3b38 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -295,6 +295,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, long int ires = it-ResZmatrices.begin(); Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { + mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameNum(ires).c_str()); // Update zmatrix seeds if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); From ba1a2691e4573ffcb791c9b10781474dfb2987b7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 11:12:13 -0500 Subject: [PATCH 0312/1492] Hide some debug info --- src/Structure/Zmatrix.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index c47e55eb15..8d2c74eeae 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -561,12 +561,12 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con maxAtk = *kat; maxAtl = *lat; } - mprintf("DEBUG: Potential IC for %s [ %s - %s - %s ] score= %i\n", - topIn.AtomMaskName(iat).c_str(), - topIn.AtomMaskName(*jat).c_str(), - topIn.AtomMaskName(*kat).c_str(), - topIn.AtomMaskName(*lat).c_str(), - nbondScore); + //mprintf("DEBUG: Potential IC for %s [ %s - %s - %s ] score= %i\n", + // topIn.AtomMaskName(iat).c_str(), + // topIn.AtomMaskName(*jat).c_str(), + // topIn.AtomMaskName(*kat).c_str(), + // topIn.AtomMaskName(*lat).c_str(), + // nbondScore); } } } From 125dd0a144209932e764178c458c39b113ca131c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 11:42:26 -0500 Subject: [PATCH 0313/1492] Fix atom offset in debug message, add another debug message --- src/Structure/Zmatrix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 8d2c74eeae..b6759bd1b0 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -214,6 +214,7 @@ int Zmatrix::autoSetSeeds_withPositions(Frame const& frameIn, Topology const& to mprinterr("Internal Error: Zmatrix::autoSetSeeds_withPositions() called with start <= end atom.\n"); return 1; } + mprintf("DEBUG: autoSetSeeds_withPositions from atoms %s to %s\n", topIn.AtomMaskName(startAtom).c_str(), topIn.AtomMaskName(endAtom-1).c_str()); // Special cases if (numAtoms == 1) { seedAt0_ = startAtom; @@ -1042,7 +1043,7 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { for (unsigned int icIdx = 0; icIdx != IC_.size(); ++icIdx) { if (!isUsed[icIdx] && !hasPosition[IC_[icIdx].AtI()]) { remainingPositionsToSet++; - mprintf("DEBUG:\t\tAtom %i needs its position set.\n", IC_[icIdx].AtI()); + mprintf("DEBUG:\t\tAtom %i needs its position set.\n", IC_[icIdx].AtI()+1); } } mprintf("DEBUG: %u positions to set.\n", remainingPositionsToSet); From 4293dba4bfe5b23704651d5c646e9b550dc7c6d0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 11:42:57 -0500 Subject: [PATCH 0314/1492] Use TruncResNameOnumId to get original residue numbers. Ensure blank build zmatrix inserted when residue does not have a template. --- src/Exec_Build.cpp | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 7c065c3b38..c5cef5e957 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -70,7 +70,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } //} } - mprintf("DEBUG: Res %s has %i connections.\n", topIn.TruncResNameNum(ires).c_str(), n_connections); + mprintf("DEBUG: Res %s has %i connections.\n", topIn.TruncResNameOnumId(ires).c_str(), n_connections); if (n_connections == 1) { int molnum = topIn[currentRes.FirstAtom()].MolNum(); molTermResidues[ molnum ].push_back( ires ); @@ -80,9 +80,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: Residue connections:\n"); for (IIarray::const_iterator rit = resConnections.begin(); rit != resConnections.end(); ++rit) { - mprintf("DEBUG:\t\t%s to", topIn.TruncResNameNum(rit-resConnections.begin()).c_str()); + mprintf("DEBUG:\t\t%s to", topIn.TruncResNameOnumId(rit-resConnections.begin()).c_str()); for (Iarray::const_iterator it = rit->begin(); it != rit->end(); ++it) - mprintf(" %s", topIn.TruncResNameNum( *it ).c_str()); + mprintf(" %s", topIn.TruncResNameOnumId( *it ).c_str()); mprintf("\n"); } // Set residue terminal status @@ -94,7 +94,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, { mprintf("\t\tMol %li:", mit - molTermResidues.begin() + 1); for (Iarray::const_iterator it = mit->begin(); it != mit->end(); ++it) { - mprintf(" %s", topIn.TruncResNameNum( *it ).c_str()); + mprintf(" %s", topIn.TruncResNameOnumId( *it ).c_str()); if (it == mit->begin()) residueTerminalStatus[*it] = BEG_TERMINAL; else @@ -115,11 +115,11 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name()); if (resTemplate == 0) { - mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameOnumId(ires).c_str()); newNatom += currentRes.NumAtoms(); } else { mprintf("\tTemplate %s being used for residue %s\n", - resTemplate->legend(), topIn.TruncResNameNum(ires).c_str()); + resTemplate->legend(), topIn.TruncResNameOnumId(ires).c_str()); newNatom += resTemplate->Top().Natom(); } ResTemplates.push_back( resTemplate ); @@ -148,8 +148,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int nRefAtomsMissing = 0; for (int ires = 0; ires != topIn.Nres(); ires++) { - mprintf("\tAdding atoms for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + mprintf("\tAdding atoms for residue %s\n", topIn.TruncResNameOnumId(ires).c_str()); int atomOffset = topOut.Natom(); + mprintf("DEBUG: atom offset is %i\n", atomOffset); Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = ResTemplates[ires]; // For holding bonded atom pairs @@ -158,6 +159,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, IParray intraResBonds; if (resTemplate == 0) { // No template. Just add the atoms. + ResZmatrices.push_back( 0 ); for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { // Track intra-residue bonds @@ -249,19 +251,24 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } - //zmatrix->print( resTemplate->TopPtr() ); + zmatrix->print( resTemplate->TopPtr() ); zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); - //zmatrix->print( &topOut ); + zmatrix->print( &topOut ); + for (Iarray::const_iterator jres = resConnections[ires].begin(); + jres != resConnections[ires].end(); ++jres) + { + mprintf("DEBUG:\t\tConnected residue %s\n", topIn.TruncResNameOnumId(*jres).c_str()); + } } else ResZmatrices.push_back( 0 ); } // END template exists // Add intra-residue bonds for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) { - mprintf("DEBUG: Intra-res bond: Res %s atom %s to res %s atom %s\n", - topOut.TruncResNameNum(topOut[it->first].ResNum()).c_str(), *(topOut[it->first].Name()), - topOut.TruncResNameNum(topOut[it->second].ResNum()).c_str(), *(topOut[it->second].Name())); + //mprintf("DEBUG: Intra-res bond: Res %s atom %s to res %s atom %s\n", + // topOut.TruncResNameOnumId(topOut[it->first].ResNum()).c_str(), *(topOut[it->first].Name()), + // topOut.TruncResNameOnumId(topOut[it->second].ResNum()).c_str(), *(topOut[it->second].Name())); topOut.AddBond(it->first, it->second); } } // END loop over source residues @@ -287,6 +294,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AddBond(at0, at1); } mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); + if (hasPosition.size() != (unsigned int)newNatom) { + mprinterr("Internal Error: hasPosition size %zu != newNatom size %i\n", hasPosition.size(), newNatom); + return 1; + } // Build using internal coords if needed. bool buildFailed = false; @@ -295,19 +306,19 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, long int ires = it-ResZmatrices.begin(); Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { - mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameNum(ires).c_str()); + mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); // Update zmatrix seeds if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); buildFailed = true; } else { mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, - topOut.TruncResNameNum(ires).c_str()); + topOut.TruncResNameOnumId(ires).c_str()); zmatrix->print(&topOut); zmatrix->SetDebug( 1 ); // DEBUG if (zmatrix->SetToFrame( frameOut, hasPosition )) { mprinterr("Error: Building residue %s failed.\n", - topOut.TruncResNameNum(ires).c_str()); + topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; } } From ce7e96eadaf33ec35e04a6ec470298c1a8dfe5d9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 11:45:17 -0500 Subject: [PATCH 0315/1492] Add a new check --- src/Exec_Build.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index c5cef5e957..6310c4b18c 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -298,6 +298,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Internal Error: hasPosition size %zu != newNatom size %i\n", hasPosition.size(), newNatom); return 1; } + if (ResZmatrices.size() != (unsigned int)topOut.Nres()) { + mprinterr("Internal Error: ResZmatrices size %zu != newNres size %i\n", ResZmatrices.size(), topOut.Nres()); + return 1; + } // Build using internal coords if needed. bool buildFailed = false; From 57294f1e31e9e609b5d9251c9510871cb34057b1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 15:30:34 -0500 Subject: [PATCH 0316/1492] Simplify addIc routine. Add routine to generate complete list of potential ICs from all possible torsions. Modify SetToFrame to deal with multiple potential ICs per atom. --- src/Structure/Zmatrix.cpp | 133 ++++++++++++++++++++++++++++++-------- src/Structure/Zmatrix.h | 8 ++- 2 files changed, 111 insertions(+), 30 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index b6759bd1b0..14b29f6c2d 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -192,6 +192,10 @@ void Zmatrix::addIc(int at0, int at1, int at2, int at3, Torsion(xyz0, xyz1, xyz2, xyz3) * Constants::RADDEG) ); } +void Zmatrix::addIc(int at0, int at1, int at2, int at3, Frame const& frameIn) { + addIc(at0, at1, at2, at3, frameIn.XYZ(at0), frameIn.XYZ(at1), frameIn.XYZ(at2), frameIn.XYZ(at3)); +} + /** Set seeds as 3 consecutive atoms from mol 0 for which positions are known. */ int Zmatrix::AutoSetSeedsWithPositions(Frame const& frameIn, Topology const& topIn, int ires, Barray const& positionKnown) { @@ -436,7 +440,7 @@ int Zmatrix::traceMol(int atL0, int atK0, int atJ0, } // Create ICs for 1 bond atoms for (Iarray::const_iterator atI = OneBondAtoms.begin(); atI != OneBondAtoms.end(); ++atI) { - addIc(*atI, atJ, atK, atL, frameIn.XYZ(*atI), frameIn.XYZ(atJ), frameIn.XYZ(atK), frameIn.XYZ(atL)); + addIc(*atI, atJ, atK, atL, frameIn); if (debug_ > 1) { mprintf("DEBUG: Added (1 atom) "); IC_.back().printIC(topIn); @@ -463,7 +467,7 @@ int Zmatrix::traceMol(int atL0, int atK0, int atJ0, topIn.AtomMaskName(p.al_).c_str()); } if (!hasIC[p.ai_]) { - addIc(p.ai_, p.aj_, p.ak_, p.al_, frameIn.XYZ(p.ai_), frameIn.XYZ(p.aj_), frameIn.XYZ(p.ak_), frameIn.XYZ(p.al_)); + addIc(p.ai_, p.aj_, p.ak_, p.al_, frameIn); if (debug_ > 1) { mprintf("DEBUG: Added (stack) "); IC_.back().printIC(topIn); @@ -501,7 +505,7 @@ int Zmatrix::traceMol(int atL0, int atK0, int atJ0, } // Add lowest index as IC if (!hasIC[atI]) { - addIc(atI, atJ, atK, atL, frameIn.XYZ(atI), frameIn.XYZ(atJ), frameIn.XYZ(atK), frameIn.XYZ(atL)); + addIc(atI, atJ, atK, atL, frameIn); if (debug_ > 1) { mprintf("DEBUG: Added (next) "); IC_.back().printIC(topIn); @@ -576,11 +580,60 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con if (maxScore == -1) { mprintf("Warning: Unable to define IC for atom %s\n", topIn.AtomMaskName(iat).c_str()); } else { - addIc( iat, maxAtj, maxAtk, maxAtl, frameIn.XYZ(iat), frameIn.XYZ(maxAtj), frameIn.XYZ(maxAtk), frameIn.XYZ(maxAtl) ); + addIc( iat, maxAtj, maxAtk, maxAtl, frameIn ); } return 0; } +/** Set up Zmatrix from Cartesian coordinates and topology. + * Use torsions based on bonds to create a complete set of ICs. + */ +int Zmatrix::SetFromFrameAndBonds(Frame const& frameIn, Topology const& topIn, int molnum) +{ + if (molnum < 0) { + mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); + return 1; + } + if (topIn.Nmol() < 1) { + mprinterr("Internal Error: Zmatrix::SetFromFrame(): No molecules.\n"); + return 1; + } + clear(); + + IC_.clear(); + Molecule const& currentMol = topIn.Mol(molnum); + + for (Unit::const_iterator seg = currentMol.MolUnit().segBegin(); + seg != currentMol.MolUnit().segEnd(); ++seg) + { + for (int iat1 = seg->Begin(); iat1 != seg->End(); ++iat1) + { + Atom const& At1 = topIn[iat1]; + for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { + int iat2 = At1.Bond(bidx1); + Atom const& At2 = topIn[iat2]; + for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { + int iat3 = At2.Bond(bidx2); + if (iat3 != iat1) { + Atom const& At3 = topIn[iat3]; + for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { + int iat4 = At3.Bond(bidx3); + if (iat4 != iat2 && iat1 < iat4) { + mprintf("DEBUG: DIHEDRAL %i - %i - %i - %i (%i %i %i %i)\n", iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + //out.push_back( DihedralType( iat1, iat2, iat3, iat4, -1 ) ); + addIc(iat1, iat2, iat3, iat4, frameIn); + addIc(iat4, iat3, iat2, iat1, frameIn); + } + } + } + } + } + } + } + + return 0; +} + /** Set up Zmatrix from Cartesian coordinates and topology. * This algorithm attempts to "trace" the molecule in a manner that * should make internal coordinate assignment more "natural". @@ -663,7 +716,7 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int // I // | // L - K - J - addIc(*bat, seedAt2_, seedAt1_, seedAt0_, frameIn.XYZ(*bat), frameIn.XYZ(seedAt2_), frameIn.XYZ(seedAt1_), frameIn.XYZ(seedAt0_)); + addIc(*bat, seedAt2_, seedAt1_, seedAt0_, frameIn); MARK(*bat, hasIC, nHasIC); // Follow improper branch if needed: L - K - I - ? if (traceMol(seedAt0_, seedAt1_, *bat, frameIn, topIn, maxnatom, nHasIC, hasIC)) return 1; @@ -676,7 +729,7 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int mprintf("Warning: Not all atoms have an associated internal coordinate.\n"); } // Add ICs for seeds - if (maxnatom > 3) { + /*if (maxnatom > 3) { //Atom const& SA0 = topIn[seedAt0_]; //Atom const& SA1 = topIn[seedAt1_]; //Atom const& SA2 = topIn[seedAt2_]; @@ -684,19 +737,7 @@ int Zmatrix::SetFromFrame_Trace(Frame const& frameIn, Topology const& topIn, int addInternalCoordForAtom(seedAt0_, frameIn, topIn); addInternalCoordForAtom(seedAt1_, frameIn, topIn); addInternalCoordForAtom(seedAt2_, frameIn, topIn); -/* if (SA2.Nbonds() < 2) - mprintf("Warning: Third seed atom has only one bond. Cannot create full IC for seed 0.\n"); - else { - int at3; - for (Atom::bond_iterator bat = SA2.bondbegin(); bat != SA2.bondend(); ++bat) { - if (*bat != seedAt1_ && *bat != seedAt0_) { - at3 = *bat; - break; - } - } - addIc( seedAt0_, seedAt1_, seedAt2_, at3, frameIn.XYZ(seedAt0_), frameIn.XYZ(seedAt1_), frameIn.XYZ(seedAt2_), frameIn.XYZ(at3) ); - }*/ - } + }*/ return 0; } @@ -1039,16 +1080,45 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { // if (debug_ > 0) mprintf("DEBUG: Lowest unused IC: %u\n", lowestUnusedIC+1); // Out of the remaining ICs, count which ones do not have positions set. - unsigned int remainingPositionsToSet = 0; + Iarray positionsToSet; + //unsigned int remainingPositionsToSet = 0; for (unsigned int icIdx = 0; icIdx != IC_.size(); ++icIdx) { if (!isUsed[icIdx] && !hasPosition[IC_[icIdx].AtI()]) { - remainingPositionsToSet++; - mprintf("DEBUG:\t\tAtom %i needs its position set.\n", IC_[icIdx].AtI()+1); + Iarray::const_iterator it = std::find(positionsToSet.begin(), positionsToSet.end(), IC_[icIdx].AtI()); + if (it == positionsToSet.end()) { + positionsToSet.push_back( IC_[icIdx].AtI() ); + mprintf("DEBUG:\t\tAtom %i needs its position set.\n", IC_[icIdx].AtI()+1); + } } } - mprintf("DEBUG: %u positions to set.\n", remainingPositionsToSet); + mprintf("DEBUG: %zu positions to set.\n", positionsToSet.size()); - while (remainingPositionsToSet > 0 && Nused < IC_.size()) { + //while (remainingPositionsToSet > 0 && Nused < IC_.size()) { + Iarray::const_iterator at_with_unset_pos = positionsToSet.begin(); + while (Nused < IC_.size()) { + // Get next atom that needs its position set + for (; at_with_unset_pos != positionsToSet.end(); ++at_with_unset_pos) + if (!hasPosition[*at_with_unset_pos]) break; + if (at_with_unset_pos == positionsToSet.end()) { + mprintf("DEBUG: No more positions to set.\n"); + break; + } + mprintf("DEBUG: Setting position of atom %i\n", (*at_with_unset_pos) + 1); + // Get IC that corresponds to this atom + int icIdx = -1; + for (unsigned int idx = 0; idx != IC_.size(); ++idx) { + if (IC_[idx].AtI() == *at_with_unset_pos) { + // All 3 of the connecting atoms must be set + if (hasPosition[ IC_[idx].AtJ() ] && + hasPosition[ IC_[idx].AtK() ] && + hasPosition[ IC_[idx].AtL() ]) + { + icIdx = (int)idx; + break; + } + } + } +/* // Get the next IC with a position to set int icIdx = -1; for (unsigned int idx = 0; idx != IC_.size(); ++idx) { @@ -1064,10 +1134,15 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { mprintf("DEBUG:\t\tIC %u is missing atoms.\n", idx+1); } } - } + }*/ if (icIdx < 0) { - mprinterr("Error: Could not find next IC to use.\n"); - return 1; + mprintf("DEBUG: Could not find complete IC yet.\n"); + ++at_with_unset_pos; + if (at_with_unset_pos == positionsToSet.end()) { + mprinterr("Error: Could not find next IC to use.\n"); + return 1; + } + continue; // FIXME } if (debug_ > 0) mprintf("DEBUG: Next IC to use is %i\n", icIdx+1); InternalCoords const& ic = IC_[icIdx]; @@ -1075,8 +1150,10 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { frameOut.SetXYZ( ic.AtI(), posI ); hasPosition[ ic.AtI() ] = true; - remainingPositionsToSet--; + //remainingPositionsToSet--; MARK(icIdx, isUsed, Nused); + // Go back to start, new ICs may now be enabled + at_with_unset_pos = positionsToSet.begin(); } // END loop over remaining positions /* // Loop over remaining ICs diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index f177758dad..3fbbf56f95 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -38,9 +38,11 @@ class Zmatrix { /// Set seed atoms from frame/top int SetSeedPositions(Frame const&, Topology const&, int, int, int); - /// Set seed atoms as 3 consecutive atoms with known positions for specified residue # + /// Set seed atoms as 3 consecutive atoms with known positions for specified residue # TODO deprecate? int AutoSetSeedsWithPositions(Frame const&, Topology const&, int, Barray const&); + /// Try to generate complete ICs from bonds + int SetFromFrameAndBonds(Frame const&, Topology const&, int); /// Convert specifed molecule of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&, int); /// Convert molecule 0 of Frame/Topology to internal coordinates array @@ -78,7 +80,9 @@ class Zmatrix { /// Simple version of auto set seeds based on connectivity only int autoSetSeeds_simple(Frame const&, Topology const&, Molecule const&); /// Calculate and add an internal coordinate given indices and Cartesian coords. - void addIc(int,int,int,int,const double*,const double*,const double*,const double*); + inline void addIc(int,int,int,int,const double*,const double*,const double*,const double*); + /// Calculate and add an internal coordinate given indices and Cartesian coords. + inline void addIc(int,int,int,int,Frame const&); /// Add internal coordinates by tracing a molecule int traceMol(int, int, int, Frame const&, Topology const&, unsigned int, unsigned int&, Barray&); /// Add internal coordinate for given atom From e65d3144da5f66b84ec62d6349dc92c62d222836 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 11 Jan 2024 15:33:35 -0500 Subject: [PATCH 0317/1492] Set zmatrix from bonds/torsions. Do not bother setting seeds --- src/Exec_Build.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 6310c4b18c..aeb7e99c1c 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -247,7 +247,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); - if (zmatrix->SetFromFrame( templateFrame, resTemplate->Top(), 0 )) { + if (zmatrix->SetFromFrameAndBonds( templateFrame, resTemplate->Top(), 0 )) { mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } @@ -312,10 +312,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); // Update zmatrix seeds - if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { - mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); - buildFailed = true; - } else { + //if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { + // mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); + // buildFailed = true; + //} else { mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); zmatrix->print(&topOut); @@ -325,7 +325,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; } - } + //} } } From 413a040ae4447fca45b98a6a092eda19f6c91515 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 09:08:53 -0500 Subject: [PATCH 0318/1492] Protect against invalid NB params in amber topology --- src/Parm_Amber.cpp | 18 +++++++++++++++--- src/Parm_Amber.h | 2 ++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Parm_Amber.cpp b/src/Parm_Amber.cpp index 9552a3e141..40b8d68ea1 100644 --- a/src/Parm_Amber.cpp +++ b/src/Parm_Amber.cpp @@ -167,7 +167,8 @@ Parm_Amber::Parm_Amber() : N_impTerms_(0), writeChamber_(true), writeEmptyArrays_(false), - writePdbInfo_(true) + writePdbInfo_(true), + has_valid_nonbond_params_(true) { UB_count_[0] = 0; UB_count_[1] = 0; @@ -248,6 +249,11 @@ int Parm_Amber::ReadParm(FileName const& fname, Topology& TopIn ) { else err = ReadNewParm( TopIn ); if (err != 0) return 1; + // If nonbond info is invalid, clear it + if (!has_valid_nonbond_params_) { + mprintf("Warning: Topology '%s' has invalid nonbond parameters. Clearing.\n", fname.full()); + TopIn.SetNonbond().Clear(); + } // Determine Atom elements if (atomicNums_.empty()) { mprintf("\tThis Amber topology does not include atomic numbers.\n" @@ -737,8 +743,14 @@ int Parm_Amber::ReadAtomicMass(Topology& TopIn, FortranData const& FMT) { */ int Parm_Amber::ReadAtomTypeIndex(Topology& TopIn, FortranData const& FMT) { if (SetupBuffer(F_ATYPEIDX, values_[NATOM], FMT)) return 1; - for (int idx = 0; idx != values_[NATOM]; idx++) - TopIn.SetAtom(idx).SetTypeIndex( atoi(file_.NextElement()) - 1 ); + for (int idx = 0; idx != values_[NATOM]; idx++) { + int atypeIdx = atoi(file_.NextElement()); + if (atypeIdx < 1) { + mprintf("Warning: Bad atom type index < 1 (%i) for atom %i\n", atypeIdx, idx+1); + has_valid_nonbond_params_ = false; + } + TopIn.SetAtom(idx).SetTypeIndex( atypeIdx - 1 ); + } return 0; } diff --git a/src/Parm_Amber.h b/src/Parm_Amber.h index 7a6332ac4d..443fe1a2c1 100644 --- a/src/Parm_Amber.h +++ b/src/Parm_Amber.h @@ -191,6 +191,8 @@ class Parm_Amber : public ParmIO { bool writeChamber_; ///< If true write CHAMBER info bool writeEmptyArrays_; ///< If true try to write TREE, IROTATE, JOIN even if not present bool writePdbInfo_; ///< If true write chain IDs etc + + bool has_valid_nonbond_params_; ///< Will set to false if invalid nonbonds detected on read }; // ----------------------------------------------------------------------------- class Parm_Amber::FortranData { From 538ac941ee1cc57ee7f10147420d2a74806cb145 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 09:31:31 -0500 Subject: [PATCH 0319/1492] Do not rely on connectivity to determine terminal status, may not be accurate, especially for PDBs --- src/Exec_Build.cpp | 51 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index aeb7e99c1c..19916768dc 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -48,10 +48,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, Topology const& topIn, Frame const& frameIn) { - typedef std::vector Iarray; - typedef std::vector IIarray; - // Determine which residues are terminal - IIarray molTermResidues( topIn.Nmol() ); + // Residue terminal status + enum TermType { BEG_TERMINAL = 0, REGULAR, END_TERMINAL }; + + // Track which residues are terminal + //typedef std::vector Iarray; + //typedef std::vector IIarray; + //IIarray molTermResidues; +/* // Track residue connections IIarray resConnections( topIn.Nres() ); for (int ires = 0; ires != topIn.Nres(); ires++) @@ -85,8 +89,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf(" %s", topIn.TruncResNameOnumId( *it ).c_str()); mprintf("\n"); } - // Set residue terminal status - enum TermType { BEG_TERMINAL = 0, REGULAR, END_TERMINAL }; typedef std::vector Tarray; Tarray residueTerminalStatus( topIn.Nres(), REGULAR ); mprintf("\tTerminal residues:\n"); @@ -103,7 +105,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } mprintf("\n"); } - +*/ + // ----------------------------------- // Array of templates for each residue std::vector ResTemplates; ResTemplates.reserve( topIn.Nres() ); @@ -111,8 +114,26 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int newNatom = 0; for (int ires = 0; ires != topIn.Nres(); ires++) { - // Identify a template based on the residue name. Residue const& currentRes = topIn.Res(ires); + mprintf("DEBUG: ---------- Processing Residue %s ---------- \n", topIn.TruncResNameNum(ires).c_str()); + int pres = ires - 1; + int nres = ires + 1; + // Determine if this is a terminal residue + TermType resTermType; + if (ires == 0 && topIn.Nres() > 1) { + resTermType = BEG_TERMINAL; + } else if (currentRes.IsTerminal()) { + resTermType = END_TERMINAL; + } else if (pres > -1 && topIn.Res(pres).IsTerminal()) { + resTermType = BEG_TERMINAL; + } else if (nres < topIn.Nres() && topIn.Res(nres).ChainId() != currentRes.ChainId()) { + resTermType = END_TERMINAL; + } else { + resTermType = REGULAR; + } + static const char* TermTypeStr[] = { "Begin", "Regular", "End" }; + mprintf("DEBUG: Residue type: %s\n", TermTypeStr[resTermType]); + // Identify a template based on the residue name. DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name()); if (resTemplate == 0) { mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameOnumId(ires).c_str()); @@ -129,6 +150,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // Clear frame so that AddXYZ can be used frameOut.ClearAtoms(); + // ----------------------------------- // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building Cpptraj::Structure::Zmatrix::Barray hasPosition; hasPosition.reserve( newNatom ); @@ -255,11 +277,11 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); zmatrix->print( &topOut ); - for (Iarray::const_iterator jres = resConnections[ires].begin(); - jres != resConnections[ires].end(); ++jres) - { - mprintf("DEBUG:\t\tConnected residue %s\n", topIn.TruncResNameOnumId(*jres).c_str()); - } + //for (Iarray::const_iterator jres = resConnections[ires].begin(); + // jres != resConnections[ires].end(); ++jres) + //{ + // mprintf("DEBUG:\t\tConnected residue %s\n", topIn.TruncResNameOnumId(*jres).c_str()); + //} } else ResZmatrices.push_back( 0 ); } // END template exists @@ -272,6 +294,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AddBond(it->first, it->second); } } // END loop over source residues + + // ----------------------------------- // Add inter-residue bonds for (ResAtArray::const_iterator it = interResBonds.begin(); it != interResBonds.end(); ++it) { @@ -303,6 +327,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, return 1; } + // ----------------------------------- // Build using internal coords if needed. bool buildFailed = false; for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) From 12f295655472aa997f080e07cd2c3e18180bb2b3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 09:57:25 -0500 Subject: [PATCH 0320/1492] Read hybridizations from addAtomTypes --- src/DataIO_LeapRC.cpp | 70 +++++++++++++++++++++++++++++++++++++++++++ src/DataIO_LeapRC.h | 5 ++++ 2 files changed, 75 insertions(+) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index 3ee24cd38e..ee56fafad6 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -94,6 +94,73 @@ int DataIO_LeapRC::LoadAmberPrep(std::string const& filename, DataSetList& dsl, return 0; } +/** LEaP addAtomTypes command. */ +int DataIO_LeapRC::AddAtomTypes(NHarrayType& atomHybridizations, BufferedLine& infile) +const +{ + int bracketCount = 0; + // First line should contain the command + const char* line = infile.CurrentLine(); + while (line != 0) { + // Process the line + std::string tmp; + for (const char* ptr = line; *ptr != '\0'; ++ptr) + { + if (*ptr == '{') + bracketCount++; + else if (*ptr == '}') { + bracketCount--; + if (bracketCount == 1) { + mprintf("DEBUG: addAtomTypes: %s\n", tmp.c_str()); + ArgList aline( tmp ); + // Some entries (like LP and EP) are not required to have elements. + // Set the hybridization index to 1 or 2. + int hidx; + if (aline.Nargs() == 3) + hidx = 2; + else if (aline.Nargs() == 2) + hidx = 1; + else { + mprinterr("Error: Malformed addAtomTypes entry %s\n", tmp.c_str()); + return 1; + } + AtomType::HybridizationType ht; + if (aline[hidx] == "sp3") + ht = AtomType::SP3; + else if (aline[hidx] == "sp2") + ht = AtomType::SP2; + else if (aline[hidx] == "sp") + ht = AtomType::SP; + else { + mprintf("Warning: Unknown hybridization in addAtomTypes entry %s\n", tmp.c_str()); + ht = AtomType::UNKNOWN_HYBRIDIZATION; + } + atomHybridizations.push_back( NHpairType(aline[0], ht) ); + tmp.clear(); + } + } else { + if (bracketCount == 2) + tmp += *ptr; + } + } + if (bracketCount < 0) { + mprinterr("Error: Too many close brackets '}' in addAtomTypes command.\n"); + return 1; + } else if (bracketCount == 0) { + break; + } //else { + //mprintf("DEBUG: addAtomTypes: %s\n", tmp.c_str()); + //} + line = infile.Line(); + } + if (bracketCount != 0) { + mprinterr("Error: Not enough close brackets '}' in addAtomTypes command.\n"); + return 1; + } + mprintf("\tRead %zu atom hybridizations.\n", atomHybridizations.size()); + return 0; +} + // DataIO_LeapRC::ReadData() int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -117,6 +184,7 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string mprinterr("Error: Could not open leaprc file '%s'\n", fname.full()); return 1; } + NHarrayType atomHybridizations; int err = 0; const char* ptr = infile.Line(); while (ptr != 0) { @@ -135,6 +203,8 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string err = LoadAmberPrep( line.GetStringKey("loadAmberPrep"), dsl, dsname ); else if (line.Contains("loadamberprep")) err = LoadAmberPrep( line.GetStringKey("loadamberprep"), dsl, dsname ); + else if (line.Contains("addAtomTypes") || line.Contains("addatomtypes")) + err = AddAtomTypes(atomHybridizations, infile); } if (err != 0) break; ptr = infile.Line(); diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index 8a3aff3fb2..ca6cec6f26 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -1,6 +1,7 @@ #ifndef INC_DATAIO_LEAPRC_H #define INC_DATAIO_LEAPRC_H #include "DataIO.h" +class BufferedLine; /// Read parameters and units from a leap rc file class DataIO_LeapRC : public DataIO { public: @@ -14,9 +15,13 @@ class DataIO_LeapRC : public DataIO { int WriteData(FileName const&, DataSetList const&); bool ID_DataFormat(CpptrajFile&); private: + typedef std::pair NHpairType; + typedef std::vector NHarrayType; + int LoadAmberParams(std::string const&, DataSetList&, std::string const&) const; int LoadOFF(std::string const&, DataSetList&, std::string const&) const; int LoadAmberPrep(std::string const&, DataSetList&, std::string const&) const; + int AddAtomTypes(NHarrayType&, BufferedLine&) const; std::string amberhome_; }; From 6dd85623bed00a0f5cc21444b4fac9ce774f525f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 10:17:25 -0500 Subject: [PATCH 0321/1492] Handle duplicate types. --- src/DataIO_LeapRC.cpp | 14 +++++++++++++- src/DataIO_LeapRC.h | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index ee56fafad6..dd4449b6c8 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -135,7 +135,19 @@ const mprintf("Warning: Unknown hybridization in addAtomTypes entry %s\n", tmp.c_str()); ht = AtomType::UNKNOWN_HYBRIDIZATION; } - atomHybridizations.push_back( NHpairType(aline[0], ht) ); + NameType atype(aline[0]); + NHarrayType::iterator it = atomHybridizations.lower_bound( atype ); + if (it == atomHybridizations.end() || it->first != atype) { + it = atomHybridizations.insert( it, NHpairType(atype, ht) ); + } else { + mprintf("Warning: Duplicate entry for '%s' in addAtomTypes.", *atype); + if (it->second != ht) { + mprintf(" Overwriting.\n"); + mprintf("Warning: Line is %s\n", tmp.c_str()); + it->second = ht; + } else + mprintf("\n"); + } tmp.clear(); } } else { diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index ca6cec6f26..e93972e11e 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -1,6 +1,7 @@ #ifndef INC_DATAIO_LEAPRC_H #define INC_DATAIO_LEAPRC_H #include "DataIO.h" +#include class BufferedLine; /// Read parameters and units from a leap rc file class DataIO_LeapRC : public DataIO { @@ -16,7 +17,7 @@ class DataIO_LeapRC : public DataIO { bool ID_DataFormat(CpptrajFile&); private: typedef std::pair NHpairType; - typedef std::vector NHarrayType; + typedef std::map NHarrayType; int LoadAmberParams(std::string const&, DataSetList&, std::string const&) const; int LoadOFF(std::string const&, DataSetList&, std::string const&) const; From aeb5ef8b5ee94775ee859b5611b94340205ed2c9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 13:03:06 -0500 Subject: [PATCH 0322/1492] Load param/unit sets into separate datasetlists before adding to main --- src/DataIO_LeapRC.cpp | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index dd4449b6c8..3f10f08e00 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -173,6 +173,22 @@ const return 0; } +/// Move sets from paramDSL to dsl +static inline int addSetsToList(DataSetList& dsl, DataSetList& paramDSL) +{ + // Add data sets to the main data set list + for (DataSetList::const_iterator ds = paramDSL.begin(); ds != paramDSL.end(); ++ds) { + DataSet* dtmp = dsl.CheckForSet( (*ds)->Meta() ); + if (dtmp != 0) { + mprinterr("Error: Set '%s' already exists.\n", (*ds)->legend()); + return 1; + } + dsl.AddSet( *ds ); + } + paramDSL.SetHasCopies( true ); + return 0; +} + // DataIO_LeapRC::ReadData() int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string const& dsname) { @@ -196,6 +212,8 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string mprinterr("Error: Could not open leaprc file '%s'\n", fname.full()); return 1; } + DataSetList paramDSL; + DataSetList unitDSL; NHarrayType atomHybridizations; int err = 0; const char* ptr = infile.Line(); @@ -204,17 +222,17 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string ArgList line( ptr, " \t" ); std::string param_fname; if (line.Contains("loadAmberParams")) - err = LoadAmberParams( line.GetStringKey("loadAmberParams"), dsl, dsname ); + err = LoadAmberParams( line.GetStringKey("loadAmberParams"), paramDSL, dsname ); else if (line.Contains("loadamberparams")) - err = LoadAmberParams( line.GetStringKey("loadamberparams"), dsl, dsname ); + err = LoadAmberParams( line.GetStringKey("loadamberparams"), paramDSL, dsname ); else if (line.Contains("loadOff")) - err = LoadOFF( line.GetStringKey("loadOff"), dsl, dsname ); + err = LoadOFF( line.GetStringKey("loadOff"), unitDSL, dsname ); else if (line.Contains("loadoff")) - err = LoadOFF( line.GetStringKey("loadoff"), dsl, dsname ); + err = LoadOFF( line.GetStringKey("loadoff"), unitDSL, dsname ); else if (line.Contains("loadAmberPrep")) - err = LoadAmberPrep( line.GetStringKey("loadAmberPrep"), dsl, dsname ); + err = LoadAmberPrep( line.GetStringKey("loadAmberPrep"), unitDSL, dsname ); else if (line.Contains("loadamberprep")) - err = LoadAmberPrep( line.GetStringKey("loadamberprep"), dsl, dsname ); + err = LoadAmberPrep( line.GetStringKey("loadamberprep"), unitDSL, dsname ); else if (line.Contains("addAtomTypes") || line.Contains("addatomtypes")) err = AddAtomTypes(atomHybridizations, infile); } @@ -222,6 +240,12 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string ptr = infile.Line(); } infile.CloseFile(); + + // Add data sets to the main data set list + if (addSetsToList(dsl, paramDSL)) return err+1; + + if (addSetsToList(dsl, unitDSL)) return err+1; + return err; } From 115c7192d852eb7d44a26b880770cd27d2ba8d6b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 14:26:40 -0500 Subject: [PATCH 0323/1492] Set atom hybridizations from leap rc file --- src/AtomType.h | 2 ++ src/DataIO_LeapRC.cpp | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/AtomType.h b/src/AtomType.h index 0af047fc74..7ac4295c71 100644 --- a/src/AtomType.h +++ b/src/AtomType.h @@ -46,6 +46,8 @@ class AtomType { } /// Used to modify LJ params LJparmType& SetLJ() { return lj_; } + /// Set atom hybridization + void SetHybridization(HybridizationType h) { hybrid_ = h; } /// \return data size (2 double for LJparmType) static size_t DataSize() { return (4*sizeof(double)) + sizeof(int); } private: diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index 3f10f08e00..d95594d8bc 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -5,6 +5,7 @@ #include "DataIO_AmberFrcmod.h" #include "DataIO_AmberLib.h" #include "DataIO_AmberPrep.h" +#include "DataSet_Parameters.h" #include //getenv /// CONSTRUCTOR @@ -241,6 +242,24 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string } infile.CloseFile(); + // Update hybridizations for parameter atom types + for (DataSetList::const_iterator ds = paramDSL.begin(); ds != paramDSL.end(); ++ds) + { + if ( (*ds)->Type() == DataSet::PARAMETERS ) { + DataSet_Parameters& param = static_cast( *(*ds) ); + mprintf("\tUpdating atom hybridizations in set %s\n", param.legend()); + for (ParmHolder::iterator it = param.AT().begin(); + it != param.AT().end(); ++it) + { + NHarrayType::const_iterator ah = atomHybridizations.find( it->first[0] ); + if (ah == atomHybridizations.end()) + mprintf("Warning: No hybridization set for atom type '%s'\n", *(it->first[0])); + else + it->second.SetHybridization( ah->second ); + } + } + } + // Add data sets to the main data set list if (addSetsToList(dsl, paramDSL)) return err+1; From 86717d23f249668e7e916b7b892e4c662b1073aa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 15:01:47 -0500 Subject: [PATCH 0324/1492] Start addpdbresmap command support --- src/DataIO_LeapRC.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++ src/DataIO_LeapRC.h | 1 + 2 files changed, 46 insertions(+) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index d95594d8bc..6b511f3c59 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -174,6 +174,49 @@ const return 0; } +/** LEaP addPdbResMap command. */ +int DataIO_LeapRC::AddPdbResMap(BufferedLine& infile) +const +{ + int bracketCount = 0; + // First line should contain the command + const char* line = infile.CurrentLine(); + while (line != 0) { + // Process the line + std::string tmp; + for (const char* ptr = line; *ptr != '\0'; ++ptr) + { + if (*ptr == '{') + bracketCount++; + else if (*ptr == '}') { + bracketCount--; + if (bracketCount == 1) { + mprintf("DEBUG: addPdbResMap: %s\n", tmp.c_str()); + ArgList aline( tmp ); + tmp.clear(); + } + } else { + if (bracketCount == 2) + tmp += *ptr; + } + } + if (bracketCount < 0) { + mprinterr("Error: Too many close brackets '}' in addPdbResMap command.\n"); + return 1; + } else if (bracketCount == 0) { + break; + } //else { + //mprintf("DEBUG: addPdbResMap: %s\n", tmp.c_str()); + //} + line = infile.Line(); + } + if (bracketCount != 0) { + mprinterr("Error: Not enough close brackets '}' in addPdbResMap command.\n"); + return 1; + } + return 0; +} + /// Move sets from paramDSL to dsl static inline int addSetsToList(DataSetList& dsl, DataSetList& paramDSL) { @@ -236,6 +279,8 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string err = LoadAmberPrep( line.GetStringKey("loadamberprep"), unitDSL, dsname ); else if (line.Contains("addAtomTypes") || line.Contains("addatomtypes")) err = AddAtomTypes(atomHybridizations, infile); + else if (line.Contains("addPdbResMap") || line.Contains("addpdbresmap")) + err = AddPdbResMap(infile); } if (err != 0) break; ptr = infile.Line(); diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index e93972e11e..06e95135a1 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -23,6 +23,7 @@ class DataIO_LeapRC : public DataIO { int LoadOFF(std::string const&, DataSetList&, std::string const&) const; int LoadAmberPrep(std::string const&, DataSetList&, std::string const&) const; int AddAtomTypes(NHarrayType&, BufferedLine&) const; + int AddPdbResMap(BufferedLine&) const; std::string amberhome_; }; From 262a0c3620998f6849bedf847ab0c8262886ac26 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 15:24:32 -0500 Subject: [PATCH 0325/1492] Move terminal type to Structure namespace --- src/Exec_Build.cpp | 18 ++++++++---------- src/Structure/StructureEnum.cpp | 10 ++++++++++ src/Structure/StructureEnum.h | 5 +++++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 19916768dc..3fd57358fe 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -49,8 +49,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Topology const& topIn, Frame const& frameIn) { // Residue terminal status - enum TermType { BEG_TERMINAL = 0, REGULAR, END_TERMINAL }; - + // Track which residues are terminal //typedef std::vector Iarray; //typedef std::vector IIarray; @@ -119,20 +118,19 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int pres = ires - 1; int nres = ires + 1; // Determine if this is a terminal residue - TermType resTermType; + Cpptraj::Structure::TerminalType resTermType; if (ires == 0 && topIn.Nres() > 1) { - resTermType = BEG_TERMINAL; + resTermType = Cpptraj::Structure::BEG_TERMINAL; } else if (currentRes.IsTerminal()) { - resTermType = END_TERMINAL; + resTermType = Cpptraj::Structure::END_TERMINAL; } else if (pres > -1 && topIn.Res(pres).IsTerminal()) { - resTermType = BEG_TERMINAL; + resTermType = Cpptraj::Structure::BEG_TERMINAL; } else if (nres < topIn.Nres() && topIn.Res(nres).ChainId() != currentRes.ChainId()) { - resTermType = END_TERMINAL; + resTermType = Cpptraj::Structure::END_TERMINAL; } else { - resTermType = REGULAR; + resTermType = Cpptraj::Structure::NON_TERMINAL; } - static const char* TermTypeStr[] = { "Begin", "Regular", "End" }; - mprintf("DEBUG: Residue type: %s\n", TermTypeStr[resTermType]); + mprintf("DEBUG: Residue type: %s\n", Cpptraj::Structure::terminalStr(resTermType)); // Identify a template based on the residue name. DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name()); if (resTemplate == 0) { diff --git a/src/Structure/StructureEnum.cpp b/src/Structure/StructureEnum.cpp index 1ef86d24f8..17e4711c7e 100644 --- a/src/Structure/StructureEnum.cpp +++ b/src/Structure/StructureEnum.cpp @@ -10,3 +10,13 @@ const char* Cpptraj::Structure::chiralStr(ChiralType ct) { } return 0; } + +/** return string corresponding to TerminalType */ +const char* Cpptraj::Structure::terminalStr(TerminalType tt) { + switch (tt) { + case BEG_TERMINAL : return "Begin"; + case NON_TERMINAL : return "Non"; + case END_TERMINAL : return "End"; + } + return 0; +} diff --git a/src/Structure/StructureEnum.h b/src/Structure/StructureEnum.h index 311767921a..3014a56b0b 100644 --- a/src/Structure/StructureEnum.h +++ b/src/Structure/StructureEnum.h @@ -7,6 +7,11 @@ enum ChiralType { CHIRALITY_ERR = 0, IS_S, IS_R, IS_UNKNOWN_CHIRALITY }; /// \return String corresponding to ChiralType const char* chiralStr(ChiralType); +/// Residue terminal type +enum TerminalType { BEG_TERMINAL = 0, NON_TERMINAL, END_TERMINAL }; +/// \return String corresponding to TerminalType +const char* terminalStr(TerminalType); + } } #endif From ed9f76d3e79208c7a5c8304a3d91c02248693502 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 15:40:11 -0500 Subject: [PATCH 0326/1492] Save the pdb res map --- src/DataIO_LeapRC.cpp | 32 +++++++++++++++++++++++++++++--- src/DataIO_LeapRC.h | 10 +++++++++- src/cpptrajdepend | 4 ++-- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index 6b511f3c59..c36cd0212b 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -175,7 +175,7 @@ const } /** LEaP addPdbResMap command. */ -int DataIO_LeapRC::AddPdbResMap(BufferedLine& infile) +int DataIO_LeapRC::AddPdbResMap(PdbResMapArray& pdbResMap, BufferedLine& infile) const { int bracketCount = 0; @@ -193,6 +193,25 @@ const if (bracketCount == 1) { mprintf("DEBUG: addPdbResMap: %s\n", tmp.c_str()); ArgList aline( tmp ); + // 3 tokens: terminal type (0=beg 1=end), PDB name, unit name + if (aline.Nargs() != 3) { + mprinterr("Error: Malformed entry in addPdbResMap: %s\n", tmp.c_str()); + return 1; + } + Cpptraj::Structure::TerminalType termType = Cpptraj::Structure::NON_TERMINAL; + if (aline[0] == "0") + termType = Cpptraj::Structure::BEG_TERMINAL; + else if (aline[0] == "1") + termType = Cpptraj::Structure::END_TERMINAL; + else + mprintf("Warning: Unrecognized terminal type in addPdbResMap: %s\n", aline[0].c_str()); + if (termType != Cpptraj::Structure::NON_TERMINAL) { + PdbResMapType prm; + prm.termType_ = termType; + prm.pdbName_ = aline[1]; + prm.unitName_ = aline[2]; + pdbResMap.push_back( prm ); + } tmp.clear(); } } else { @@ -259,6 +278,7 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string DataSetList paramDSL; DataSetList unitDSL; NHarrayType atomHybridizations; + PdbResMapArray pdbResMap; int err = 0; const char* ptr = infile.Line(); while (ptr != 0) { @@ -280,7 +300,7 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string else if (line.Contains("addAtomTypes") || line.Contains("addatomtypes")) err = AddAtomTypes(atomHybridizations, infile); else if (line.Contains("addPdbResMap") || line.Contains("addpdbresmap")) - err = AddPdbResMap(infile); + err = AddPdbResMap(pdbResMap, infile); } if (err != 0) break; ptr = infile.Line(); @@ -304,7 +324,13 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string } } } - +// // Find the unit in unit DSL +// DataSet* ds = unitDSL.CheckForSet( MetaData(dsname, aline[2]) ); +// if (ds == 0) { +// mprintf("Warning: Unit '%s' was not found among loaded units.\n", aline[2].c_str()); +// } else { +// mprintf("DEBUG: Found unit %s\n", ds->legend()); +// } // Add data sets to the main data set list if (addSetsToList(dsl, paramDSL)) return err+1; diff --git a/src/DataIO_LeapRC.h b/src/DataIO_LeapRC.h index 06e95135a1..f7fa009bd4 100644 --- a/src/DataIO_LeapRC.h +++ b/src/DataIO_LeapRC.h @@ -1,6 +1,7 @@ #ifndef INC_DATAIO_LEAPRC_H #define INC_DATAIO_LEAPRC_H #include "DataIO.h" +#include "Structure/StructureEnum.h" #include class BufferedLine; /// Read parameters and units from a leap rc file @@ -19,11 +20,18 @@ class DataIO_LeapRC : public DataIO { typedef std::pair NHpairType; typedef std::map NHarrayType; + struct PdbResMapType { + std::string unitName_; + NameType pdbName_; + Cpptraj::Structure::TerminalType termType_; + }; + typedef std::vector PdbResMapArray; + int LoadAmberParams(std::string const&, DataSetList&, std::string const&) const; int LoadOFF(std::string const&, DataSetList&, std::string const&) const; int LoadAmberPrep(std::string const&, DataSetList&, std::string const&) const; int AddAtomTypes(NHarrayType&, BufferedLine&) const; - int AddPdbResMap(BufferedLine&) const; + int AddPdbResMap(PdbResMapArray&, BufferedLine&) const; std::string amberhome_; }; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 7ef4cb6e0b..92c176089c 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -200,7 +200,7 @@ CpptrajFile.o : CpptrajFile.cpp CpptrajFile.h CpptrajStdio.h FileIO.h FileIO_Bzi CpptrajState.o : CpptrajState.cpp Action.h ActionList.h ActionState.h Action_CreateCrd.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CompactFrameArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_Coords_TRJ.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleNavigator.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h Frame.h FrameArray.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Random.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajFrameIndex.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h CpptrajStdio.o : CpptrajStdio.cpp Parallel.h CurveFit.o : CurveFit.cpp CurveFit.h -DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_LeapRC.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h +DataFile.o : DataFile.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Cluster/Cframes.h Cluster/Cmatrix_NC.h Constants.h CoordinateInfo.h Cph.h CpptrajFile.h CpptrajStdio.h DataFile.h DataIO.h DataIO_AmberEne.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_CCP4.h DataIO_CharmmFastRep.h DataIO_CharmmOutput.h DataIO_CharmmRepLog.h DataIO_CharmmRtfPrm.h DataIO_Cmatrix_Binary.h DataIO_Cmatrix_NC.h DataIO_Cpout.h DataIO_Evecs.h DataIO_Gnuplot.h DataIO_Grace.h DataIO_LeapRC.h DataIO_Mdout.h DataIO_NetCDF.h DataIO_Numpy.h DataIO_OpenDx.h DataIO_Peaks.h DataIO_RemLog.h DataIO_Std.h DataIO_VecTraj.h DataIO_XVG.h DataIO_Xplor.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Unit.h Vec3.h DataFileList.o : DataFileList.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PDBfile.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataFilter.o : DataFilter.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO.o : DataIO.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -220,7 +220,7 @@ DataIO_Cpout.o : DataIO_Cpout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_Evecs.o : DataIO_Evecs.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Evecs.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Gnuplot.o : DataIO_Gnuplot.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Gnuplot.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Grace.o : DataIO_Grace.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Grace.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Mdout.o : DataIO_Mdout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Mdout.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_NetCDF.o : DataIO_NetCDF.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_NetCDF.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Modes.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_Vector_Scalar.h DataSet_string.h DataSet_unsignedInt.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Version.h DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Numpy.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h libnpy/npy.hpp From 95ebd435c662bb6cdb98cf8e9e33c162d16ce578 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 12 Jan 2024 15:46:34 -0500 Subject: [PATCH 0327/1492] Identify equals sign --- src/DataIO_LeapRC.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index c36cd0212b..f14af36dab 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -284,7 +284,6 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string while (ptr != 0) { if (ptr[0] != '\0' && ptr[0] != '#') { ArgList line( ptr, " \t" ); - std::string param_fname; if (line.Contains("loadAmberParams")) err = LoadAmberParams( line.GetStringKey("loadAmberParams"), paramDSL, dsname ); else if (line.Contains("loadamberparams")) @@ -301,6 +300,23 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string err = AddAtomTypes(atomHybridizations, infile); else if (line.Contains("addPdbResMap") || line.Contains("addpdbresmap")) err = AddPdbResMap(pdbResMap, infile); + else { + // Does this line contain an equals sign? + bool has_equals = false; + for (const char* p = ptr; *p != '\0'; ++p) { + if (*p == '=') { + has_equals = true; + break; + } + } + // See if this is a unit alias + if (has_equals) { + ArgList equals(ptr, " =\t"); + if (equals.Nargs() == 2) { + mprintf("DEBUG: %s = %s\n", equals[0].c_str(), equals[1].c_str()); + } + } + } } if (err != 0) break; ptr = infile.Line(); From 5baa967fe858f15a0df3b7c5d9b1782646b2d45e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 14:08:16 -0500 Subject: [PATCH 0328/1492] Add AssociatedData_ResId class --- src/AssociatedData_ResId.cpp | 15 +++++++++++++++ src/AssociatedData_ResId.h | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/AssociatedData_ResId.cpp create mode 100644 src/AssociatedData_ResId.h diff --git a/src/AssociatedData_ResId.cpp b/src/AssociatedData_ResId.cpp new file mode 100644 index 0000000000..7cf3205f1a --- /dev/null +++ b/src/AssociatedData_ResId.cpp @@ -0,0 +1,15 @@ +#include "AssociatedData_ResId.h" +#include "CpptrajStdio.h" + +/** Help text */ +const char* AssociatedData_ResId::HelpText = "\0"; + +/** Process Args */ +int AssociatedData_ResId::ProcessAdataArgs(ArgList& argIn) { + return 0; +} + +/** Print info */ +void AssociatedData_ResId::Ainfo() const { + mprintf(" (Res name %s termType %s)", *resName_, Cpptraj::Structure::terminalStr(termType_)); +} diff --git a/src/AssociatedData_ResId.h b/src/AssociatedData_ResId.h new file mode 100644 index 0000000000..300891e5e4 --- /dev/null +++ b/src/AssociatedData_ResId.h @@ -0,0 +1,22 @@ +#ifndef INC_ASSOCIATEDDATA_RESID_H +#define INC_ASSOCIATEDDATA_RESID_H +#include "AssociatedData.h" +#include "NameType.h" +#include "Structure/StructureEnum.h" +class NameType; +/// Used to identify what residues a residue template matches +class AssociatedData_ResId : public AssociatedData { + public: + /// CONSTRUCTOR + AssociatedData_ResId() : AssociatedData(RESID), termType_(Cpptraj::Structure::NON_TERMINAL) {} + // ----- Inherited functions ------- + static const char* HelpText; + int ProcessAdataArgs(ArgList&); + AssociatedData* Copy() const { return new AssociatedData_ResId(*this); } + void Ainfo() const; + // --------------------------------- + private: + NameType resName_; ///< Target residue name + Cpptraj::Structure::TerminalType termType_; ///< Target residue terminal type +}; +#endif From 933160e281c959dda329b26f87f5c98e0002f9b3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 14:14:22 -0500 Subject: [PATCH 0329/1492] Update depends --- src/AssociatedData.h | 2 +- src/cpptrajdepend | 1 + src/cpptrajfiles | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AssociatedData.h b/src/AssociatedData.h index f37af22d7c..9341769c49 100644 --- a/src/AssociatedData.h +++ b/src/AssociatedData.h @@ -6,7 +6,7 @@ class AssociatedData { /// Destructor. Virtual since this class is inherited. virtual ~AssociatedData() {} /// Associated data types - enum AssociatedType { NOE = 0, CONNECT }; + enum AssociatedType { NOE = 0, CONNECT, RESID }; /// CONSTRUCTOR - take associated data type AssociatedData(AssociatedType t) : type_(t) {} /// \return Associated data type diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 92c176089c..a17b23d1ed 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -140,6 +140,7 @@ ArgList.o : ArgList.cpp ArgList.h CpptrajStdio.h StringRoutines.h Array1D.o : Array1D.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h AssociatedData_Connect.o : AssociatedData_Connect.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h CpptrajStdio.h AssociatedData_NOE.o : AssociatedData_NOE.cpp ArgList.h AssociatedData.h AssociatedData_NOE.h CpptrajStdio.h +AssociatedData_ResId.o : AssociatedData_ResId.cpp AssociatedData.h AssociatedData_ResId.h CpptrajStdio.h NameType.h Structure/StructureEnum.h Atom.o : Atom.cpp Atom.h CpptrajStdio.h NameType.h SymbolExporting.h AtomMap.o : AtomMap.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h AtomMask.o : AtomMask.cpp Atom.h AtomMask.h CpptrajStdio.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h SymbolExporting.h Unit.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index fbf1907ef3..31eeeb7ad4 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -143,6 +143,7 @@ COMMON_SOURCES= \ Array1D.cpp \ AssociatedData_Connect.cpp \ AssociatedData_NOE.cpp \ + AssociatedData_ResId.cpp \ Atom.cpp \ AtomMap.cpp \ AtomMask.cpp \ From 454078460d7af915f700bf62ebc7993491ec2b88 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 14:20:49 -0500 Subject: [PATCH 0330/1492] Save unit aliases --- src/DataIO_LeapRC.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index f14af36dab..03788fc7db 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -279,6 +279,9 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string DataSetList unitDSL; NHarrayType atomHybridizations; PdbResMapArray pdbResMap; + typedef std::pair AUpair; + typedef std::vector AUarray; + AUarray unitAliases; int err = 0; const char* ptr = infile.Line(); while (ptr != 0) { @@ -309,11 +312,12 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string break; } } - // See if this is a unit alias + // See if this is a unit alias (interpret as 'alias = unit') if (has_equals) { ArgList equals(ptr, " =\t"); if (equals.Nargs() == 2) { mprintf("DEBUG: %s = %s\n", equals[0].c_str(), equals[1].c_str()); + unitAliases.push_back( AUpair(equals[0], equals[1]) ); } } } From 94401461e2a1e0ab95f413e10190761079365aca Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 15:42:05 -0500 Subject: [PATCH 0331/1492] Actually copy the units to match leap behavior. Ensure associated data is copied. --- src/DataIO_LeapRC.cpp | 30 ++++++++++++++++++++++++++---- src/DataSet.cpp | 7 +++++++ src/DataSet.h | 2 ++ 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index 03788fc7db..bd9564c00c 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -279,9 +279,6 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string DataSetList unitDSL; NHarrayType atomHybridizations; PdbResMapArray pdbResMap; - typedef std::pair AUpair; - typedef std::vector AUarray; - AUarray unitAliases; int err = 0; const char* ptr = infile.Line(); while (ptr != 0) { @@ -317,7 +314,32 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string ArgList equals(ptr, " =\t"); if (equals.Nargs() == 2) { mprintf("DEBUG: %s = %s\n", equals[0].c_str(), equals[1].c_str()); - unitAliases.push_back( AUpair(equals[0], equals[1]) ); + // Find the unit to make a copy of + DataSet* ds0 = unitDSL.CheckForSet( MetaData(dsname, equals[1]) ); + if (ds0 == 0) { + mprinterr("Error: Could not find unit '%s' to copy to '%s'\n", equals[1].c_str(), equals[0].c_str()); + return 1; + } + DataSet_Coords& crd0 = static_cast( *ds0 ); + // Allocate copy + DataSet* ds1 = unitDSL.AddSet( DataSet::COORDS, MetaData(dsname, equals[0]) ); + if (ds1 == 0) { + mprinterr("Error: Could not allocate unit '%s' for '%s'\n", equals[0].c_str(), equals[1].c_str()); + return 1; + } + DataSet_Coords& crd1 = static_cast( *ds1 ); + if (crd1.CoordsSetup( crd0.Top(), crd0.CoordsInfo() )) { + mprinterr("Error: Could not set up unit '%s' for '%s'\n", equals[0].c_str(), equals[1].c_str()); + return 1; + } + crd1.Allocate( DataSet::SizeArray(1, 1) ); + // Copy + Frame tmpFrm = crd0.AllocateFrame(); + crd0.GetFrame(0, tmpFrm); + crd1.SetCRD(0, tmpFrm ); + // Copy associated data + crd1.CopyAssociatedDataFrom( crd0 ); + mprintf("DEBUG: Created unit set %s\n", crd1.legend()); } } } diff --git a/src/DataSet.cpp b/src/DataSet.cpp index b9e0d5b797..54f1f11372 100644 --- a/src/DataSet.cpp +++ b/src/DataSet.cpp @@ -89,6 +89,13 @@ void DataSet::ClearAssociatedData() { associatedData_.clear(); } +/** Copy all assocated data from the given data set. */ +void DataSet::CopyAssociatedDataFrom(DataSet const& dsIn) { + for (AdataArray::const_iterator ad = dsIn.associatedData_.begin(); + ad != dsIn.associatedData_.end(); ++ad) + associatedData_.push_back( (*ad)->Copy() ); +} + // DESTRUCTOR DataSet::~DataSet() { ClearAssociatedData(); } diff --git a/src/DataSet.h b/src/DataSet.h index f619652f4d..9413d8d33a 100644 --- a/src/DataSet.h +++ b/src/DataSet.h @@ -86,6 +86,8 @@ class DataSet { // ----------------------------------------------------- /// Associate additional data with this set. void AssociateData(AssociatedData const* a) { associatedData_.push_back( a->Copy() ); } + /// Copy associated data from given set to this set. + void CopyAssociatedDataFrom(DataSet const&); /// Set DataSet MetaData int SetMeta(MetaData const&); /// Set DataSet ensemble number. From a1318704d3557195f16760bebba3f31dd87d0600 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 15:47:25 -0500 Subject: [PATCH 0332/1492] Start finding units for pdb res map --- src/DataIO_LeapRC.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index bd9564c00c..f6a11420c6 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -366,13 +366,23 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string } } } -// // Find the unit in unit DSL -// DataSet* ds = unitDSL.CheckForSet( MetaData(dsname, aline[2]) ); -// if (ds == 0) { -// mprintf("Warning: Unit '%s' was not found among loaded units.\n", aline[2].c_str()); -// } else { -// mprintf("DEBUG: Found unit %s\n", ds->legend()); -// } + // Update units with pdb residue map info + //for (DataSetList::const_iterator ds = unitDSL.begin(); ds != paramDSL.end(); ++ds) + //{ + // if ( (*ds)->Group() == DataSet::COORDINATES ) { + // DataSet_Coords& crd = static_cast( *(*ds) ); + for (PdbResMapArray::const_iterator it = pdbResMap.begin(); + it != pdbResMap.end(); ++it) + { + // Find the unit in unit DSL + DataSet* ds = unitDSL.CheckForSet( MetaData(dsname, it->unitName_) ); + if (ds == 0) { + mprintf("Warning: Unit '%s' was not found among loaded units.\n", it->unitName_.c_str()); + } else { + mprintf("DEBUG: Found unit %s\n", ds->legend()); + } + } + // Add data sets to the main data set list if (addSetsToList(dsl, paramDSL)) return err+1; From f843076b80d10de19be1152b7a76e92784519049 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 15:53:23 -0500 Subject: [PATCH 0333/1492] Associate pdb res map info with appropriate unit set --- src/AssociatedData_ResId.h | 3 +++ src/DataIO_LeapRC.cpp | 9 +++++++-- src/cpptrajdepend | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/AssociatedData_ResId.h b/src/AssociatedData_ResId.h index 300891e5e4..192e6ed9c4 100644 --- a/src/AssociatedData_ResId.h +++ b/src/AssociatedData_ResId.h @@ -9,6 +9,9 @@ class AssociatedData_ResId : public AssociatedData { public: /// CONSTRUCTOR AssociatedData_ResId() : AssociatedData(RESID), termType_(Cpptraj::Structure::NON_TERMINAL) {} + /// CONSTRUCTOR - Pdb name, terminal type + AssociatedData_ResId(NameType const& n, Cpptraj::Structure::TerminalType t) : + AssociatedData(RESID), resName_(n), termType_(t) {} // ----- Inherited functions ------- static const char* HelpText; int ProcessAdataArgs(ArgList&); diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index f6a11420c6..724a2c8388 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -1,4 +1,5 @@ #include "DataIO_LeapRC.h" +#include "AssociatedData_ResId.h" #include "CpptrajStdio.h" #include "BufferedLine.h" #include "DataIO_AmberFF.h" @@ -370,7 +371,6 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string //for (DataSetList::const_iterator ds = unitDSL.begin(); ds != paramDSL.end(); ++ds) //{ // if ( (*ds)->Group() == DataSet::COORDINATES ) { - // DataSet_Coords& crd = static_cast( *(*ds) ); for (PdbResMapArray::const_iterator it = pdbResMap.begin(); it != pdbResMap.end(); ++it) { @@ -379,7 +379,12 @@ int DataIO_LeapRC::ReadData(FileName const& fname, DataSetList& dsl, std::string if (ds == 0) { mprintf("Warning: Unit '%s' was not found among loaded units.\n", it->unitName_.c_str()); } else { - mprintf("DEBUG: Found unit %s\n", ds->legend()); + DataSet_Coords& crd = static_cast( *ds ); + AssociatedData_ResId resid( it->pdbName_, it->termType_ ); + crd.AssociateData( &resid ); + mprintf("DEBUG: Found unit %s", crd.legend()); + resid.Ainfo(); + mprintf("\n"); } } diff --git a/src/cpptrajdepend b/src/cpptrajdepend index a17b23d1ed..06237af11d 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -221,7 +221,7 @@ DataIO_Cpout.o : DataIO_Cpout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h A DataIO_Evecs.o : DataIO_Evecs.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedFrame.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Evecs.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Gnuplot.o : DataIO_Gnuplot.cpp ArgList.h Array1D.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Gnuplot.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Grace.o : DataIO_Grace.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Grace.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_string.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_LeapRC.o : DataIO_LeapRC.cpp ArgList.h AssociatedData.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataIO_AmberFrcmod.h DataIO_AmberLib.h DataIO_AmberPrep.h DataIO_LeapRC.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_Mdout.o : DataIO_Mdout.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Mdout.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_NetCDF.o : DataIO_NetCDF.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cluster/Cframes.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_NetCDF.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Modes.h DataSet_PairwiseCache.h DataSet_PairwiseCache_MEM.h DataSet_Vector.h DataSet_Vector_Scalar.h DataSet_string.h DataSet_unsignedInt.h Dimension.h FileIO.h FileName.h Frame.h GridBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Version.h DataIO_Numpy.o : DataIO_Numpy.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_Numpy.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h libnpy/npy.hpp From 40ce0191b4cb527659f7d4dcdf1b0ced7a9c2187 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 16:02:30 -0500 Subject: [PATCH 0334/1492] ID terminal templates --- src/AssociatedData_ResId.h | 2 ++ src/Exec_Build.cpp | 34 +++++++++++++++++++++++++++------- src/Exec_Build.h | 3 ++- src/cpptrajdepend | 4 ++-- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/AssociatedData_ResId.h b/src/AssociatedData_ResId.h index 192e6ed9c4..a46aea9d45 100644 --- a/src/AssociatedData_ResId.h +++ b/src/AssociatedData_ResId.h @@ -18,6 +18,8 @@ class AssociatedData_ResId : public AssociatedData { AssociatedData* Copy() const { return new AssociatedData_ResId(*this); } void Ainfo() const; // --------------------------------- + NameType const& ResName() const { return resName_; } + Cpptraj::Structure::TerminalType TermType() const { return termType_; } private: NameType resName_; ///< Target residue name Cpptraj::Structure::TerminalType termType_; ///< Target residue terminal type diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 3fd57358fe..315e738300 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -4,18 +4,38 @@ #include "Structure/GenerateConnectivityArrays.h" #include "Structure/Zmatrix.h" #include "Parm/GB_Params.h" +#include "AssociatedData_ResId.h" +/** Try to identify residue template DataSet from the given residue + * name (from e.g. the PDB/Mol2/etc file). + */ DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, - NameType const& rname) + NameType const& rname, + Cpptraj::Structure::TerminalType termType) { DataSet_Coords* out = 0; - // Assume Coords set aspect is what we need - for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { - if ( rname == NameType( (*it)->Meta().Aspect() ) ) { - out = *it; - break; + if (termType == Cpptraj::Structure::NON_TERMINAL) { + // Assume Coords set aspect is what we need + for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { + if ( rname == NameType( (*it)->Meta().Aspect() ) ) { + out = *it; + break; + } + } + } else { + // Looking for a terminal residue. Need to get sets with AssociatedData_ResId + for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { + AssociatedData* ad = (*it)->GetAssociatedData( AssociatedData::RESID ); + if (ad != 0) { + AssociatedData_ResId const& resid = static_cast( *ad ); + if (rname == resid.ResName() && termType == resid.TermType()) { + out = *it; + break; + } + } } } + return out; } @@ -132,7 +152,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } mprintf("DEBUG: Residue type: %s\n", Cpptraj::Structure::terminalStr(resTermType)); // Identify a template based on the residue name. - DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name()); + DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name(), resTermType); if (resTemplate == 0) { mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameOnumId(ires).c_str()); newNatom += currentRes.NumAtoms(); diff --git a/src/Exec_Build.h b/src/Exec_Build.h index c96aad7e69..d25edf4b24 100644 --- a/src/Exec_Build.h +++ b/src/Exec_Build.h @@ -1,6 +1,7 @@ #ifndef INC_EXEC_BUILD_H #define INC_EXEC_BUILD_H #include "Exec.h" +#include "Structure/StructureEnum.h" /// Used to build a structure class Exec_Build : public Exec { public: @@ -12,7 +13,7 @@ class Exec_Build : public Exec { typedef std::vector Carray; /// Identify residue template from residue name - static DataSet_Coords* IdTemplateFromName(Carray const&, NameType const&); + static DataSet_Coords* IdTemplateFromName(Carray const&, NameType const&, Cpptraj::Structure::TerminalType); /// Create new topology/frame using templates static int FillAtomsWithTemplates(Topology&, Frame&, Carray const&, Topology const&, Frame const&); /// Map atoms in topology to template diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 06237af11d..ee25a9af47 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -188,7 +188,7 @@ ClusterMap.o : ClusterMap.cpp AssociatedData.h ClusterMap.h Constants.h CpptrajF Cmd.o : Cmd.cpp Cmd.h DispatchObject.h CmdInput.o : CmdInput.cpp CmdInput.h StringRoutines.h CmdList.o : CmdList.cpp Cmd.h CmdList.h DispatchObject.h -Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h ActionTopWriter.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_AvgBox.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_Keep.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiPucker.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_ToroidalDiffusion.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_CalcDiffusion.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_TICA.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BoxArgs.h BufferedLine.h CharMask.h Cluster/Algorithm.h Cluster/BestReps.h Cluster/CentroidArray.h Cluster/Cframes.h Cluster/Control.h Cluster/DrawGraph.h Cluster/List.h Cluster/Metric.h Cluster/MetricArray.h Cluster/Node.h Cluster/Sieve.h Cluster/Silhouette.h ClusterMap.h Cmd.h CmdInput.h CmdList.h Command.h CompactFrameArray.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DiffusionResults.h DihedralSearch.h Dimension.h DispatchObject.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Ewald.h EwaldOptions.h Ewald_ParticleMesh.h ExclusionArray.h Exec.h Exec_AddMissingRes.h Exec_Analyze.h Exec_Build.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareClusters.h Exec_CompareEnergy.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CrdTransform.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_Desc.h Exec_Emin.h Exec_ExtendedComparison.h Exec_Flatten.h Exec_GenerateAmberRst.h Exec_Graft.h Exec_Help.h Exec_HmassRepartition.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_ParseTiming.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrepareForLeap.h Exec_PrintData.h Exec_Random.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_Sequence.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h Exec_Zmatrix.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h GIST_PME.h Grid.h GridAction.h GridBin.h GridMover.h HistBin.h Hungarian.h ImageOption.h ImageTypes.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Pucker.h Pucker_PuckerMask.h Pucker_PuckerSearch.h Pucker_PuckerToken.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h SplineFxnTable.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/GistCudaSetup.cuh helpme_standalone.h molsurf.h +Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h ActionTopWriter.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_AvgBox.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_Keep.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiPucker.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_ToroidalDiffusion.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_CalcDiffusion.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_TICA.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BoxArgs.h BufferedLine.h CharMask.h Cluster/Algorithm.h Cluster/BestReps.h Cluster/CentroidArray.h Cluster/Cframes.h Cluster/Control.h Cluster/DrawGraph.h Cluster/List.h Cluster/Metric.h Cluster/MetricArray.h Cluster/Node.h Cluster/Sieve.h Cluster/Silhouette.h ClusterMap.h Cmd.h CmdInput.h CmdList.h Command.h CompactFrameArray.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataFilter.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DiffusionResults.h DihedralSearch.h Dimension.h DispatchObject.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Ewald.h EwaldOptions.h Ewald_ParticleMesh.h ExclusionArray.h Exec.h Exec_AddMissingRes.h Exec_Analyze.h Exec_Build.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareClusters.h Exec_CompareEnergy.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CrdTransform.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_Desc.h Exec_Emin.h Exec_ExtendedComparison.h Exec_Flatten.h Exec_GenerateAmberRst.h Exec_Graft.h Exec_Help.h Exec_HmassRepartition.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_ParseTiming.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrepareForLeap.h Exec_PrintData.h Exec_Random.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_Sequence.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h Exec_Zmatrix.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h GIST_PME.h Grid.h GridAction.h GridBin.h GridMover.h HistBin.h Hungarian.h ImageOption.h ImageTypes.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NC_Routines.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Pucker.h Pucker_PuckerMask.h Pucker_PuckerSearch.h Pucker_PuckerToken.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Spline.h SplineFxnTable.h Structure/StructureEnum.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/GistCudaSetup.cuh helpme_standalone.h molsurf.h CompactFrameArray.o : CompactFrameArray.cpp Box.h CompactFrameArray.h CoordinateInfo.h CpptrajStdio.h Matrix_3x3.h Parallel.h ReplicaDimArray.h Vec3.h ComplexArray.o : ComplexArray.cpp ArrayIterator.h ComplexArray.h Constraints.o : Constraints.cpp ArgList.h Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h Constraints.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -290,7 +290,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From 6e9e67eba8094a7bcd29f0502c17c65391457ade Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jan 2024 19:06:21 -0500 Subject: [PATCH 0335/1492] If a specific terminal version of a res is not found, fall back to regular res --- src/Exec_Build.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 315e738300..0731d67377 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -14,15 +14,7 @@ DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, Cpptraj::Structure::TerminalType termType) { DataSet_Coords* out = 0; - if (termType == Cpptraj::Structure::NON_TERMINAL) { - // Assume Coords set aspect is what we need - for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { - if ( rname == NameType( (*it)->Meta().Aspect() ) ) { - out = *it; - break; - } - } - } else { + if (termType != Cpptraj::Structure::NON_TERMINAL) { // Looking for a terminal residue. Need to get sets with AssociatedData_ResId for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { AssociatedData* ad = (*it)->GetAssociatedData( AssociatedData::RESID ); @@ -35,6 +27,18 @@ DataSet_Coords* Exec_Build::IdTemplateFromName(Carray const& Templates, } } } + if (out == 0) { + // Terminal residue not found or non-terminal residue. + if (termType != Cpptraj::Structure::NON_TERMINAL) + mprintf("Warning: No terminal residue found for '%s'\n", *rname); + // Assume Coords set aspect is what we need + for (Carray::const_iterator it = Templates.begin(); it != Templates.end(); ++it) { + if ( rname == NameType( (*it)->Meta().Aspect() ) ) { + out = *it; + break; + } + } + } return out; } From 5f991a71e57604e37e9e40ef5b71029396f76872 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 14 Jan 2024 15:06:04 -0500 Subject: [PATCH 0336/1492] Leap turns the dihedral around when k or l == 0 even for "normal" dihedrals --- src/Parm_Amber.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parm_Amber.cpp b/src/Parm_Amber.cpp index 40b8d68ea1..c012e2278a 100644 --- a/src/Parm_Amber.cpp +++ b/src/Parm_Amber.cpp @@ -1630,7 +1630,7 @@ int Parm_Amber::WriteDihedrals(FlagType flag, DihedralArray const& DIH) { if (BufferAlloc(flag, DIH.size()*5)) return 1; for (DihedralArray::const_iterator it = DIH.begin(); it != DIH.end(); ++it) { int dihIdxs[4]; - if (it->Type() != DihedralType::NORMAL && (it->A3() == 0 || it->A4() == 0)) { + if (it->A3() == 0 || it->A4() == 0) { mprintf("Warning: Had to turn torsion around to avoid K,L == 0\n"); mprintf("Warning: Old order (i j k l): %i %i %i %i\n", it->A1(), it->A2(), it->A3(), it->A4()); dihIdxs[0] = it->A4()*3; From 41583eb26f2502dc412d43d519da399425d92b3a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 15 Jan 2024 10:16:35 -0500 Subject: [PATCH 0337/1492] Start function to update ICs --- src/Structure/Zmatrix.cpp | 35 ++++++++++++++++++++++++++++------- src/Structure/Zmatrix.h | 8 +++++--- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 14b29f6c2d..c9231782fd 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -179,21 +179,24 @@ static inline void MARK(int i, std::vector& isUsed, unsigned int& Nused) { } } -/** Calculate and add an internal coordinate given atom indices +/** Calculate an internal coordinate given atom indices * and corresponding Cartesian coordinates. */ -void Zmatrix::addIc(int at0, int at1, int at2, int at3, +static inline InternalCoords calcIc(int at0, int at1, int at2, int at3, const double* xyz0, const double* xyz1, const double* xyz2, const double* xyz3) { - IC_.push_back( InternalCoords(at0, at1, at2, at3, + return InternalCoords(at0, at1, at2, at3, sqrt(DIST2_NoImage(xyz0, xyz1)), CalcAngle(xyz0, xyz1, xyz2) * Constants::RADDEG, - Torsion(xyz0, xyz1, xyz2, xyz3) * Constants::RADDEG) ); + Torsion(xyz0, xyz1, xyz2, xyz3) * Constants::RADDEG); } +/** Calculate and add an internal coordinate given atom indices + * and corresponding Cartesian coordinates. + */ void Zmatrix::addIc(int at0, int at1, int at2, int at3, Frame const& frameIn) { - addIc(at0, at1, at2, at3, frameIn.XYZ(at0), frameIn.XYZ(at1), frameIn.XYZ(at2), frameIn.XYZ(at3)); + IC_.push_back( calcIc(at0, at1, at2, at3, frameIn.XYZ(at0), frameIn.XYZ(at1), frameIn.XYZ(at2), frameIn.XYZ(at3)) ); } /** Set seeds as 3 consecutive atoms from mol 0 for which positions are known. */ @@ -585,10 +588,28 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con return 0; } +/** For existing torsions, see if all coordinates in that torsion + * exist. If so, update the IC from the existing coordinates. + */ +int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Barray const& hasPosition) +{ + for (ICarray::iterator ic = IC_.begin(); ic != IC_.end(); ++ic) + { + if (hasPosition[ic->AtI()] && + hasPosition[ic->AtJ()] && + hasPosition[ic->AtK()] && + hasPosition[ic->AtL()]) + { + mprintf("DEBUG: Updating IC %i %i %i %i\n", ic->AtI()+1, ic->AtJ()+1, ic->AtK()+1, ic->AtL()+1); + } + } + return 0; +} + /** Set up Zmatrix from Cartesian coordinates and topology. - * Use torsions based on bonds to create a complete set of ICs. + * Use torsions based on connectivity to create a complete set of ICs. */ -int Zmatrix::SetFromFrameAndBonds(Frame const& frameIn, Topology const& topIn, int molnum) +int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn, int molnum) { if (molnum < 0) { mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 3fbbf56f95..5c9a0d0c3e 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -41,8 +41,10 @@ class Zmatrix { /// Set seed atoms as 3 consecutive atoms with known positions for specified residue # TODO deprecate? int AutoSetSeedsWithPositions(Frame const&, Topology const&, int, Barray const&); - /// Try to generate complete ICs from bonds - int SetFromFrameAndBonds(Frame const&, Topology const&, int); + /// Try to generate complete ICs from atom connectivity + int SetFromFrameAndConnect(Frame const&, Topology const&, int); + /// Update ICs from existing coords + int UpdateICsFromFrame(Frame const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&, int); /// Convert molecule 0 of Frame/Topology to internal coordinates array @@ -80,7 +82,7 @@ class Zmatrix { /// Simple version of auto set seeds based on connectivity only int autoSetSeeds_simple(Frame const&, Topology const&, Molecule const&); /// Calculate and add an internal coordinate given indices and Cartesian coords. - inline void addIc(int,int,int,int,const double*,const double*,const double*,const double*); + //inline void addIc(int,int,int,int,const double*,const double*,const double*,const double*); /// Calculate and add an internal coordinate given indices and Cartesian coords. inline void addIc(int,int,int,int,Frame const&); /// Add internal coordinates by tracing a molecule From c8d3e8cbe1d52cb7d8ba5da49fc07565fa4fc3ac Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 15 Jan 2024 10:18:54 -0500 Subject: [PATCH 0338/1492] Update the IC --- src/Structure/Zmatrix.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index c9231782fd..03d2d0e853 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -601,6 +601,7 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Barray const& hasPosition) hasPosition[ic->AtL()]) { mprintf("DEBUG: Updating IC %i %i %i %i\n", ic->AtI()+1, ic->AtJ()+1, ic->AtK()+1, ic->AtL()+1); + *ic = calcIc(ic->AtI(), ic->AtJ(), ic->AtK(), ic->AtL(), frameIn.XYZ(ic->AtI()), frameIn.XYZ(ic->AtJ()), frameIn.XYZ(ic->AtK()), frameIn.XYZ(ic->AtL())); } } return 0; From 2162e8647aef49a503d9d7294e3076dcfca5a0bd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 15 Jan 2024 13:55:06 -0500 Subject: [PATCH 0339/1492] Rework the function so it is looking at all ICs that share a central bond. Pass in topology for debugging. --- src/Exec_Build.cpp | 7 ++++- src/Structure/Zmatrix.cpp | 55 +++++++++++++++++++++++++++++++-------- src/Structure/Zmatrix.h | 2 +- 3 files changed, 51 insertions(+), 13 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 0731d67377..cb0579ce12 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -291,7 +291,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); - if (zmatrix->SetFromFrameAndBonds( templateFrame, resTemplate->Top(), 0 )) { + if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top(), 0 )) { mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } @@ -358,6 +358,11 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); + // Update internal coords from known positions + if (zmatrix->UpdateICsFromFrame( frameOut, topOut, hasPosition )) { + mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); + return 1; + } // Update zmatrix seeds //if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { // mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 03d2d0e853..6b1f024874 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -591,19 +591,52 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con /** For existing torsions, see if all coordinates in that torsion * exist. If so, update the IC from the existing coordinates. */ -int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Barray const& hasPosition) +int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { - for (ICarray::iterator ic = IC_.begin(); ic != IC_.end(); ++ic) - { - if (hasPosition[ic->AtI()] && - hasPosition[ic->AtJ()] && - hasPosition[ic->AtK()] && - hasPosition[ic->AtL()]) - { - mprintf("DEBUG: Updating IC %i %i %i %i\n", ic->AtI()+1, ic->AtJ()+1, ic->AtK()+1, ic->AtL()+1); - *ic = calcIc(ic->AtI(), ic->AtJ(), ic->AtK(), ic->AtL(), frameIn.XYZ(ic->AtI()), frameIn.XYZ(ic->AtJ()), frameIn.XYZ(ic->AtK()), frameIn.XYZ(ic->AtL())); + Barray isUsed( IC_.size(), false ); + unsigned int Nused = 0; + while (Nused < IC_.size()) { + unsigned int idx = 0; + while (idx < IC_.size() && isUsed[idx]) idx++; + if (idx >= IC_.size()) break; + // Unused IC. Find all other ICs that share atoms J-K + MARK(idx, isUsed, Nused); + Iarray bondICs(1, idx); + for (unsigned int jdx = idx + 1; jdx < IC_.size(); jdx++) { + if ( IC_[idx].AtJ() == IC_[jdx].AtJ() && + IC_[idx].AtK() == IC_[jdx].AtK() ) + { + bondICs.push_back( jdx ); + MARK(jdx, isUsed, Nused); + } } - } + mprintf("DEBUG: Looking at %zu ICs involving %s - %s\n", bondICs.size(), + topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), + topIn.AtomMaskName(IC_[idx].AtK()).c_str()); + bool needsUpdate = false; + double tDiff = 0; + for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) + { + InternalCoords const& thisIc = IC_[*it]; + if (hasPosition[thisIc.AtI()] && + hasPosition[thisIc.AtJ()] && + hasPosition[thisIc.AtK()] && + hasPosition[thisIc.AtL()]) + { + mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), + frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), + frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", frameIc.Phi(), thisIc.Phi()); + tDiff = frameIc.Phi() - thisIc.Phi(); + needsUpdate = true; + } + } // END loop over ICs sharing J-K bond + } // END loop over ICs return 0; } diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 5c9a0d0c3e..a02743285d 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -44,7 +44,7 @@ class Zmatrix { /// Try to generate complete ICs from atom connectivity int SetFromFrameAndConnect(Frame const&, Topology const&, int); /// Update ICs from existing coords - int UpdateICsFromFrame(Frame const&, Barray const&); + int UpdateICsFromFrame(Frame const&, Topology const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&, int); /// Convert molecule 0 of Frame/Topology to internal coordinates array From 548f0a31eea022cc2f477f7b793a0b48c1267875 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 15 Jan 2024 14:23:59 -0500 Subject: [PATCH 0340/1492] Try to update internals --- src/Structure/InternalCoords.h | 2 ++ src/Structure/Zmatrix.cpp | 27 ++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/Structure/InternalCoords.h b/src/Structure/InternalCoords.h index 7494d2f9d2..e655ce94a5 100644 --- a/src/Structure/InternalCoords.h +++ b/src/Structure/InternalCoords.h @@ -43,6 +43,8 @@ class InternalCoords { //void RemapIndices(std::vector const&); /// Offset internal indices by given offset void OffsetIndices(int); + /// Set the value of Phi + void SetPhi(double p) { val_[2] = p; } private: int ati_; ///< Atom I index int idx_[3]; ///< Atom indices for distance, angle, torsion diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 6b1f024874..c4a59960fc 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -631,11 +631,32 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Bar InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", frameIc.Phi(), thisIc.Phi()); - tDiff = frameIc.Phi() - thisIc.Phi(); + double dTorsion = frameIc.Phi() * Constants::DEGRAD; + double dInternalValue = thisIc.Phi() * Constants::DEGRAD; + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); + tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; needsUpdate = true; } - } // END loop over ICs sharing J-K bond + } // END calc loop over ICs sharing J-K bond + // If any difference was found, shift all of the torsions + if (needsUpdate) { + mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", + topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), + topIn.AtomMaskName(IC_[idx].AtK()).c_str(), + tDiff); + for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) + { + InternalCoords& thisIc = IC_[*it]; + double dNew = thisIc.Phi() + tDiff; + mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); + thisIc.SetPhi( dNew ); + } + } } // END loop over ICs return 0; } From c2abc9efed02ad647d47e8fd9596fd7f0b66be40 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 16 Jan 2024 18:53:12 -0500 Subject: [PATCH 0341/1492] Start new code to update internals in same order as leap --- src/Exec_Build.cpp | 2 +- src/Structure/Zmatrix.cpp | 85 +++++++++++++++++++++++++++++++++++---- src/Structure/Zmatrix.h | 2 +- 3 files changed, 79 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index cb0579ce12..d6e9ab12d5 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -359,7 +359,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); // Update internal coords from known positions - if (zmatrix->UpdateICsFromFrame( frameOut, topOut, hasPosition )) { + if (zmatrix->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index c4a59960fc..d14b567a17 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -6,6 +6,7 @@ #include "Zmatrix.h" #include "BuildAtom.h" #include "Model.h" +#include "GenerateConnectivityArrays.h" #include "../Frame.h" #include "../CpptrajStdio.h" #include "../Constants.h" @@ -591,8 +592,71 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con /** For existing torsions, see if all coordinates in that torsion * exist. If so, update the IC from the existing coordinates. */ -int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) { + Barray isUsed( IC_.size(), false ); + unsigned int Nused = 0; + // Get list of bonds + BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); + for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) { + if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { + mprintf("DEBUG: Looking at torsions around: %s - %s\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); // Find all ICs that share atoms 1 and 2 (J and K) + Iarray bondICs; + bool needsUpdate = false; + double tDiff = 0; + for (unsigned int idx = 0; idx != IC_.size(); idx++) + { + if (!isUsed[idx]) { + InternalCoords& thisIc = IC_[idx]; + if (bnd->A1() == thisIc.AtJ() && bnd->A2() == thisIc.AtK()) { + // This IC has this bond at the center + bondICs.push_back( idx ); + MARK(idx, isUsed, Nused); + if (hasPosition[thisIc.AtI()] && + hasPosition[thisIc.AtJ()] && + hasPosition[thisIc.AtK()] && + hasPosition[thisIc.AtL()]) + { + mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), + frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), + frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); + double dTorsion = frameIc.Phi() * Constants::DEGRAD; + double dInternalValue = thisIc.Phi() * Constants::DEGRAD; + tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); + thisIc = frameIc; + needsUpdate = true; + } // END all IC coords present + } // END this IC matches current bond + } // END IC is not used + } // END loop searching for ICs matching current bond + // If any difference was found, shift all of the torsions + if (needsUpdate) { + mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", + topIn.AtomMaskName(bnd->A1()).c_str(), + topIn.AtomMaskName(bnd->A2()).c_str(), + tDiff); + for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) + { + InternalCoords& thisIc = IC_[*it]; + double dNew = thisIc.Phi() + tDiff; + mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); + thisIc.SetPhi( dNew ); + } + } // END ICs need update + } // END both bond atoms belong to this residue + } // END loop over bonds +/* Barray isUsed( IC_.size(), false ); unsigned int Nused = 0; while (Nused < IC_.size()) { @@ -614,10 +678,12 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Bar topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), topIn.AtomMaskName(IC_[idx].AtK()).c_str()); bool needsUpdate = false; + Iarray toUpdate; + toUpdate.reserve( bondICs.size() ); double tDiff = 0; - for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) + for (Iarray::iterator it = bondICs.begin(); it != bondICs.end(); ++it) { - InternalCoords const& thisIc = IC_[*it]; + InternalCoords& thisIc = IC_[*it]; if (hasPosition[thisIc.AtI()] && hasPosition[thisIc.AtJ()] && hasPosition[thisIc.AtK()] && @@ -633,9 +699,12 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Bar frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); double dTorsion = frameIc.Phi() * Constants::DEGRAD; double dInternalValue = thisIc.Phi() * Constants::DEGRAD; - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); + thisIc = frameIc; needsUpdate = true; + } else { + toUpdate.push_back( *it ); } } // END calc loop over ICs sharing J-K bond // If any difference was found, shift all of the torsions @@ -644,7 +713,7 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Bar topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), topIn.AtomMaskName(IC_[idx].AtK()).c_str(), tDiff); - for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) + for (Iarray::const_iterator it = toUpdate.begin(); it != toUpdate.end(); ++it) { InternalCoords& thisIc = IC_[*it]; double dNew = thisIc.Phi() + tDiff; @@ -657,7 +726,7 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Bar thisIc.SetPhi( dNew ); } } - } // END loop over ICs + } // END loop over ICs*/ return 0; } @@ -695,10 +764,10 @@ int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn, for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { int iat4 = At3.Bond(bidx3); if (iat4 != iat2 && iat1 < iat4) { - mprintf("DEBUG: DIHEDRAL %i - %i - %i - %i (%i %i %i %i)\n", iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + //mprintf("DEBUG: DIHEDRAL %i - %i - %i - %i (%i %i %i %i)\n", iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); //out.push_back( DihedralType( iat1, iat2, iat3, iat4, -1 ) ); addIc(iat1, iat2, iat3, iat4, frameIn); - addIc(iat4, iat3, iat2, iat1, frameIn); + addIc(iat4, iat3, iat2, iat1, frameIn); // FIXME should the reverse one be put in? } } } diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index a02743285d..0788df4a74 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -44,7 +44,7 @@ class Zmatrix { /// Try to generate complete ICs from atom connectivity int SetFromFrameAndConnect(Frame const&, Topology const&, int); /// Update ICs from existing coords - int UpdateICsFromFrame(Frame const&, Topology const&, Barray const&); + int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&, int); /// Convert molecule 0 of Frame/Topology to internal coordinates array From d8b9596d493647ebfa78275388c0d8dd69478743 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 17 Jan 2024 16:23:13 -0500 Subject: [PATCH 0342/1492] Start building ICs the same way as leap --- src/Exec_Build.cpp | 26 ++++-- src/Exec_Build.h | 2 +- src/Structure/Model.cpp | 167 ++++++++++++++++++++++++++++++++++++++ src/Structure/Model.h | 8 ++ src/Structure/Zmatrix.cpp | 40 +++++++++ src/Structure/Zmatrix.h | 3 + 6 files changed, 236 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index d6e9ab12d5..6417433e9e 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -70,7 +70,8 @@ std::vector Exec_Build::MapAtomsToTemplate(Topology const& topIn, /** Use given templates to construct a final molecule. */ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Carray const& Templates, - Topology const& topIn, Frame const& frameIn) + Topology const& topIn, Frame const& frameIn, + ParameterSet const& mainParmSet) { // Residue terminal status @@ -358,6 +359,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); + // TEST FIXME + Cpptraj::Structure::Zmatrix testZ; + if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { + mprinterr("Error: Failed to create zmatrix from topology.\n"); + return 1; + } // Update internal coords from known positions if (zmatrix->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); @@ -519,14 +526,6 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mprintf("\n"); } - // Fill in atoms with templates - Topology topOut; - Frame frameOut; - if (FillAtomsWithTemplates(topOut, frameOut, Templates, topIn, frameIn)) { - mprinterr("Error: Could not fill in atoms using templates.\n"); - return CpptrajState::ERR; - } - // Get parameter sets. typedef std::vector Parray; Parray ParamSets; @@ -573,6 +572,15 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) mainParmSet->UpdateParamSet( *(*it), UC, State.Debug(), State.Debug() ); // FIXME verbose } + // Fill in atoms with templates + Topology topOut; + Frame frameOut; + if (FillAtomsWithTemplates(topOut, frameOut, Templates, topIn, frameIn, *mainParmSet)) { + mprinterr("Error: Could not fill in atoms using templates.\n"); + return CpptrajState::ERR; + } + + // Assign parameters. This will create the bond/angle/dihedral/improper // arrays as well. Exec::RetType ret = CpptrajState::OK; diff --git a/src/Exec_Build.h b/src/Exec_Build.h index d25edf4b24..4e9b793bf1 100644 --- a/src/Exec_Build.h +++ b/src/Exec_Build.h @@ -15,7 +15,7 @@ class Exec_Build : public Exec { /// Identify residue template from residue name static DataSet_Coords* IdTemplateFromName(Carray const&, NameType const&, Cpptraj::Structure::TerminalType); /// Create new topology/frame using templates - static int FillAtomsWithTemplates(Topology&, Frame&, Carray const&, Topology const&, Frame const&); + static int FillAtomsWithTemplates(Topology&, Frame&, Carray const&, Topology const&, Frame const&, ParameterSet const&); /// Map atoms in topology to template static std::vector MapAtomsToTemplate(Topology const&, int, DataSet_Coords*); }; diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 33b99d4a16..21c7705fb8 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,5 +1,6 @@ #include "Model.h" #include "BuildAtom.h" +#include "Chirality.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../Topology.h" @@ -259,3 +260,169 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in return 0; } + +/** Attempt to assign a reasonable values for phi internal coordinates for + * atoms around a central bond j and k. + */ +int Cpptraj::Structure::Model::AssignPhiAroundBond(std::vector& IC, + ParmHolder const& AT, + int ax, int ay, + Topology const& topIn, Frame const& frameIn, + std::vector const& atomPositionKnown, + int debug) +{ + // Figure out hybridization and chirality of atom j. + //if (debug > 0) + mprintf("DEBUG: AssignPhi for bond %s - %s\n", topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str()); + + // Both need to have more than 1 bond + if (topIn[ax].Nbonds() < 2 || topIn[ay].Nbonds() < 2) { + mprintf("DEBUG: Not possible to make a torsion (%i bonds, %i bonds)\n", topIn[ax].Nbonds(), topIn[ay].Nbonds()); + return 0; + } + // Get hybridization of atoms x and y + ParmHolder::const_iterator atx = AT.GetParam( TypeNameHolder(topIn[ax].Type()) ); + ParmHolder::const_iterator aty = AT.GetParam( TypeNameHolder(topIn[ay].Type()) ); + AtomType::HybridizationType hx, hy; + if (atx != AT.end() && atx->second.Hybridization() == AtomType::UNKNOWN_HYBRIDIZATION) + hx = GuessAtomHybridization( topIn[ax], topIn.Atoms() ); + else + hx = atx->second.Hybridization(); + if (aty != AT.end() && aty->second.Hybridization() == AtomType::UNKNOWN_HYBRIDIZATION) + hy = GuessAtomHybridization( topIn[ax], topIn.Atoms() ); + else + hy = aty->second.Hybridization(); + + int aj, ak; + // Ensure hybridization of atom X is > atom Y + if (hx < hy) { + aj = ay; + ak = ax; + } else { + aj = ax; + ak = ay; + } + mprintf("DEBUG: In hybridization order: %s - %s (%i - %i)\n", topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(ak).c_str(), + (int)hx, (int)hy); + + Atom const& AJ = topIn[aj]; + Atom const& AK = topIn[ak]; + +/* + BuildAtom AtomJ; + if (AJ.Nbonds() > 2) { + Cpptraj::Structure::SetPriority(AtomJ.ModifyPriority(), aj, topIn, frameIn, 0); // FIXME chiralityDebug + } + + +// if (debug > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); +// // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. +// if (AJ.Nbonds() < 3) { +// if (debug > 0) +// mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); +// phi = -180 * Constants::DEGRAD; +// return 0; +// } + + // TODO check that atom i actually ends up on the list? + std::vector const& priority = AtomJ.Priority(); + int ai = + if (debug > 0) { + mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(AtomJ.Chirality())); + mprintf("DEBUG:\t\tPriority around J %s(%i):", + topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); + for (int idx = 0; idx < AJ.Nbonds(); idx++) + mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); + mprintf("\n"); + } + + // Fill in what values we can for known atoms + std::vector knownPhi( AJ.Nbonds() ); + int knownIdx = -1; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak && atomPositionKnown[atnum] && + atomPositionKnown[aj] && + atomPositionKnown[ak] && + atomPositionKnown[al]) + { + knownPhi[idx] = Torsion(frameIn.XYZ(atnum), + frameIn.XYZ(aj), + frameIn.XYZ(ak), + frameIn.XYZ(al)); + if (debug > 0) + mprintf("DEBUG:\t\tKnown phi for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownPhi[idx]*Constants::RADDEG); + if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known + } + } + + // If we have to assign an initial phi, make trans the longer branch + if (knownIdx == -1) { + std::vector visited = atomPositionKnown; + // TODO: Ensure bonded atoms are not yet visited? + visited[aj] = true; + visited[ak] = true; + std::vector depth( AJ.Nbonds() ); + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + int currentDepth = 0; + depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); + if (debug > 0) + mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", + topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth[idx]); + if (knownIdx == -1 && depth[idx] < 3) { + knownIdx = idx; + knownPhi[idx] = 0; + } + } + } + } + + // The interval will be 360 / (number of bonds - 1) + double interval = Constants::TWOPI / (AJ.Nbonds() - 1); + + double startPhi; + if (knownIdx == -1) { + startPhi = -180*Constants::DEGRAD; + if (debug > 0) mprintf("DEBUG:\t\tNo known phi. Setting to %g.\n", startPhi*Constants::RADDEG); + knownIdx = 0; + } else + startPhi = knownPhi[knownIdx]; + + if (AtomJ.Chirality() == IS_R) { + startPhi = -startPhi; + interval = -interval; + } + if (debug > 0) { + mprintf("DEBUG:\t\tStart phi is %g degrees\n", startPhi*Constants::RADDEG); + mprintf("DEBUG:\t\tInterval is %g degrees\n", interval * Constants::RADDEG); + } + + // Forward direction + double currentPhi = startPhi; + for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + if (atnum == ai) phi = currentPhi; + if (debug > 0) + mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); + currentPhi += interval; + currentPhi = wrap360(currentPhi); + } + } + // Reverse direction + currentPhi = startPhi - interval; + for (int idx = knownIdx - 1; idx > -1; idx--) { + int atnum = priority[idx]; + if (atnum != ak) { + if (atnum == ai) phi = currentPhi; + if (debug > 0) + mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); + currentPhi -= interval; + currentPhi = wrap360(currentPhi); + } + } +*/ + return 0; +} diff --git a/src/Structure/Model.h b/src/Structure/Model.h index 240e64875e..0f58f6f260 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -4,9 +4,12 @@ #include "StructureEnum.h" class Topology; class Frame; +class AtomType; +template class ParmHolder; namespace Cpptraj { namespace Structure { class BuildAtom; +class InternalCoords; /// Routines to generate model parameters namespace Model { /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I @@ -14,6 +17,11 @@ int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::v /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&, int); +int AssignPhiAroundBond(std::vector&, ParmHolder const&, + int, int, Topology const&, Frame const&, + std::vector const&, int); + + } // END namespace Model } // END namespace Structure } // END namespace Cpptraj diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index d14b567a17..f36f15b693 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -730,6 +730,46 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& return 0; } +/** Set up Zmatrix in a manner similar to leap. */ +int Zmatrix::BuildZmatrixFromTop(Frame const& frameIn, Topology const& topIn, int ires, ParmHolder const& AT, + Barray const& hasPosition) +{ + if (ires < 0) { + mprinterr("Internal Error: Zmatrix::BuildZmatrixFromTop(): Negative residue index.\n"); + return 1; + } + //if (topIn.Nmol() < 1) { + // mprinterr("Internal Error: Zmatrix::SetFromFrame(): No molecules.\n"); + // return 1; + //} + clear(); + + IC_.clear(); + //Molecule const& currentMol = topIn.Mol(molnum); + //std::vector residues; + //for (Unit::const_iterator seg = currentMol.MolUnit().segBegin(); + // seg != currentMol.MolUnit().segEnd(); ++seg) + //{ + // int r0 = topIn[seg->Begin()].ResNum(); + // int r1 = topIn[seg->End()].ResNum(); + // for (int ridx = r0; ridx <= r1; ridx++) + // residues.push_back( topIn.Res(ridx) ); + //} + BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); + for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) + { + if (Cpptraj::Structure::Model::AssignPhiAroundBond(IC_, AT, bnd->A1(), bnd->A2(), topIn, frameIn, hasPosition, debug_)) + { + mprinterr("Error: Assigning phi around bond %s - %s failed.\n", + topIn.AtomMaskName(bnd->A1()).c_str(), + topIn.AtomMaskName(bnd->A2()).c_str()); + return 1; + } + } + + return 0; +} + /** Set up Zmatrix from Cartesian coordinates and topology. * Use torsions based on connectivity to create a complete set of ICs. */ diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 0788df4a74..1ebdbcaec2 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -6,6 +6,8 @@ class Frame; class Topology; class Molecule; +template class ParmHolder; +class AtomType; namespace Cpptraj { namespace Structure { class BuildAtom; @@ -43,6 +45,7 @@ class Zmatrix { /// Try to generate complete ICs from atom connectivity int SetFromFrameAndConnect(Frame const&, Topology const&, int); + int BuildZmatrixFromTop(Frame const&, Topology const&, int, ParmHolder const&, Barray const&); /// Update ICs from existing coords int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array From 9b56062e9aaca32859e0e44d8023a42773ccdb6d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 08:25:31 -0500 Subject: [PATCH 0343/1492] More debug --- src/Exec_Build.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 6417433e9e..727ecf7101 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -296,10 +296,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } - zmatrix->print( resTemplate->TopPtr() ); +// zmatrix->print( resTemplate->TopPtr() ); zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); - zmatrix->print( &topOut ); +// zmatrix->print( &topOut ); //for (Iarray::const_iterator jres = resConnections[ires].begin(); // jres != resConnections[ires].end(); ++jres) //{ @@ -360,11 +360,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); // TEST FIXME - Cpptraj::Structure::Zmatrix testZ; - if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { - mprinterr("Error: Failed to create zmatrix from topology.\n"); - return 1; - } +// Cpptraj::Structure::Zmatrix testZ; +// if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { +// mprinterr("Error: Failed to create zmatrix from topology.\n"); +// return 1; +// } + mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, + topOut.TruncResNameOnumId(ires).c_str()); + zmatrix->print(&topOut); // Update internal coords from known positions if (zmatrix->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); @@ -375,9 +378,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); // buildFailed = true; //} else { - mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, - topOut.TruncResNameOnumId(ires).c_str()); - zmatrix->print(&topOut); zmatrix->SetDebug( 1 ); // DEBUG if (zmatrix->SetToFrame( frameOut, hasPosition )) { mprinterr("Error: Building residue %s failed.\n", From ee59020d1c8159b67d4bde2d05f95a79db6fd47d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 09:21:32 -0500 Subject: [PATCH 0344/1492] Get rid of BuildZmatrixFromTop --- src/Structure/Zmatrix.cpp | 49 ++++++--------------------------------- src/Structure/Zmatrix.h | 3 --- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index f36f15b693..89f5916188 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -608,7 +608,9 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& { if (!isUsed[idx]) { InternalCoords& thisIc = IC_[idx]; - if (bnd->A1() == thisIc.AtJ() && bnd->A2() == thisIc.AtK()) { + if ( (bnd->A1() == thisIc.AtJ() && bnd->A2() == thisIc.AtK()) || + (bnd->A2() == thisIc.AtJ() && bnd->A1() == thisIc.AtK()) ) + { // This IC has this bond at the center bondICs.push_back( idx ); MARK(idx, isUsed, Nused); @@ -730,46 +732,6 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& return 0; } -/** Set up Zmatrix in a manner similar to leap. */ -int Zmatrix::BuildZmatrixFromTop(Frame const& frameIn, Topology const& topIn, int ires, ParmHolder const& AT, - Barray const& hasPosition) -{ - if (ires < 0) { - mprinterr("Internal Error: Zmatrix::BuildZmatrixFromTop(): Negative residue index.\n"); - return 1; - } - //if (topIn.Nmol() < 1) { - // mprinterr("Internal Error: Zmatrix::SetFromFrame(): No molecules.\n"); - // return 1; - //} - clear(); - - IC_.clear(); - //Molecule const& currentMol = topIn.Mol(molnum); - //std::vector residues; - //for (Unit::const_iterator seg = currentMol.MolUnit().segBegin(); - // seg != currentMol.MolUnit().segEnd(); ++seg) - //{ - // int r0 = topIn[seg->Begin()].ResNum(); - // int r1 = topIn[seg->End()].ResNum(); - // for (int ridx = r0; ridx <= r1; ridx++) - // residues.push_back( topIn.Res(ridx) ); - //} - BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); - for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) - { - if (Cpptraj::Structure::Model::AssignPhiAroundBond(IC_, AT, bnd->A1(), bnd->A2(), topIn, frameIn, hasPosition, debug_)) - { - mprinterr("Error: Assigning phi around bond %s - %s failed.\n", - topIn.AtomMaskName(bnd->A1()).c_str(), - topIn.AtomMaskName(bnd->A2()).c_str()); - return 1; - } - } - - return 0; -} - /** Set up Zmatrix from Cartesian coordinates and topology. * Use torsions based on connectivity to create a complete set of ICs. */ @@ -1329,8 +1291,11 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { } continue; // FIXME } - if (debug_ > 0) mprintf("DEBUG: Next IC to use is %i\n", icIdx+1); InternalCoords const& ic = IC_[icIdx]; + if (debug_ > 0) + mprintf("DEBUG: Next IC to use is %i : %i %i %i %i r=%g theta=%g phi=%g\n", + icIdx+1, ic.AtI()+1, ic.AtJ()+1, ic.AtK()+1, ic.AtL()+1, + ic.Dist(), ic.Theta(), ic.Phi()); Vec3 posI = AtomIposition(ic, frameOut); frameOut.SetXYZ( ic.AtI(), posI ); diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 1ebdbcaec2..0788df4a74 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -6,8 +6,6 @@ class Frame; class Topology; class Molecule; -template class ParmHolder; -class AtomType; namespace Cpptraj { namespace Structure { class BuildAtom; @@ -45,7 +43,6 @@ class Zmatrix { /// Try to generate complete ICs from atom connectivity int SetFromFrameAndConnect(Frame const&, Topology const&, int); - int BuildZmatrixFromTop(Frame const&, Topology const&, int, ParmHolder const&, Barray const&); /// Update ICs from existing coords int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array From 844b573d640dba9157caf25e8dc225a1b3afa54c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 09:27:37 -0500 Subject: [PATCH 0345/1492] Add complete keyword --- src/Exec_Zmatrix.cpp | 23 +++++++++++++++++------ src/Exec_Zmatrix.h | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/Exec_Zmatrix.cpp b/src/Exec_Zmatrix.cpp index 16b643c408..feaa976432 100644 --- a/src/Exec_Zmatrix.cpp +++ b/src/Exec_Zmatrix.cpp @@ -7,14 +7,18 @@ using namespace Cpptraj::Structure; /** Get Zmatrix for specified molecule at specified frame number. */ int Exec_Zmatrix::getZmatrix(DataSet_Coords* CRD, int molnum, int frmidx, - std::string const& dsname, DataFile* outfile, CpptrajState& State) + std::string const& dsname, DataFile* outfile, CpptrajState& State, + bool complete_zmatrix) const { if (CRD == 0) { mprinterr("Error: No COORDS set specified.\n"); return CpptrajState::ERR; } - mprintf("\tGetting Z-matrix from set '%s'\n", CRD->legend()); + if (complete_zmatrix) + mprintf("\tGetting complete Z-matrix from set '%s'\n", CRD->legend()); + else + mprintf("\tGetting minimal Z-matrix from set '%s'\n", CRD->legend()); if (CRD->Size() < 1) { mprinterr("Error: Set '%s' is empty.\n", CRD->legend()); return 1; @@ -41,7 +45,11 @@ const Zmatrix& zmatrix = *(zset->Zptr()); zmatrix.SetDebug( State.Debug() ); - int errStat = zmatrix.SetFromFrame( frmIn, CRD->Top(), molnum ); + int errStat; + if (complete_zmatrix) + errStat = zmatrix.SetFromFrameAndConnect(frmIn, CRD->Top(), molnum); + else + errStat = zmatrix.SetFromFrame( frmIn, CRD->Top(), molnum ); if (debug_ > 0) zmatrix.print(); // DEBUG return errStat; } @@ -108,11 +116,13 @@ const void Exec_Zmatrix::Help() const { mprintf("\t [name ]\n" - "\t{ zset [parm |parmindex <#>] |\n" + "\t{ zset [parm |parmindex <#>] [complete]|\n" "\t [molnum ] [frame ] [out ] }\n" " If 'zset' is specified, use Z-matrix to generate coordinates using\n" " a specified topology or topology from specified COORDS set;\n" - " output is a new COORDS set.\n" + " output is a new COORDS set. If 'complete is specified, generate\n" + " as many internal coordinates as possible, otherwise a minimal\n" + " set (1 internal coordinate per atom) will be generated.\n" " Otherwise calculate Zmatrix for specified molecule/frame of\n" " specified COORDS set; output is a Z-matrix set.\n"); } @@ -123,6 +133,7 @@ Exec::RetType Exec_Zmatrix::Execute(CpptrajState& State, ArgList& argIn) debug_ = State.Debug(); std::string dsname = argIn.GetStringKey("name"); std::string zsetname = argIn.GetStringKey("zset"); + bool complete_zmatrix = argIn.hasKey("complete"); int molnum = -1; int frmidx = -1; DataFile* outfile = 0; @@ -151,7 +162,7 @@ Exec::RetType Exec_Zmatrix::Execute(CpptrajState& State, ArgList& argIn) if (!zsetname.empty()) { errStat = putZmatrix(CRD, topIn, zsetname, dsname, State); } else { - errStat = getZmatrix(CRD, molnum, frmidx, dsname, outfile, State); + errStat = getZmatrix(CRD, molnum, frmidx, dsname, outfile, State, complete_zmatrix); } if (errStat != 0) return CpptrajState::ERR; diff --git a/src/Exec_Zmatrix.h b/src/Exec_Zmatrix.h index 0b89547724..3be172520f 100644 --- a/src/Exec_Zmatrix.h +++ b/src/Exec_Zmatrix.h @@ -9,7 +9,7 @@ class Exec_Zmatrix : public Exec { DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Zmatrix(); } RetType Execute(CpptrajState&, ArgList&); private: - int getZmatrix(DataSet_Coords*, int, int, std::string const&, DataFile*, CpptrajState&) const; + int getZmatrix(DataSet_Coords*, int, int, std::string const&, DataFile*, CpptrajState&,bool) const; int putZmatrix(DataSet_Coords*, Topology*, std::string const&, std::string const&, CpptrajState&) const; int debug_; From 851fc163920a76d81ef586c546d2d781bb6bfed9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 09:27:48 -0500 Subject: [PATCH 0346/1492] Remove code --- src/Structure/Model.cpp | 167 ---------------------------------------- src/Structure/Model.h | 9 --- 2 files changed, 176 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 21c7705fb8..33b99d4a16 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,6 +1,5 @@ #include "Model.h" #include "BuildAtom.h" -#include "Chirality.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../Topology.h" @@ -260,169 +259,3 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in return 0; } - -/** Attempt to assign a reasonable values for phi internal coordinates for - * atoms around a central bond j and k. - */ -int Cpptraj::Structure::Model::AssignPhiAroundBond(std::vector& IC, - ParmHolder const& AT, - int ax, int ay, - Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown, - int debug) -{ - // Figure out hybridization and chirality of atom j. - //if (debug > 0) - mprintf("DEBUG: AssignPhi for bond %s - %s\n", topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str()); - - // Both need to have more than 1 bond - if (topIn[ax].Nbonds() < 2 || topIn[ay].Nbonds() < 2) { - mprintf("DEBUG: Not possible to make a torsion (%i bonds, %i bonds)\n", topIn[ax].Nbonds(), topIn[ay].Nbonds()); - return 0; - } - // Get hybridization of atoms x and y - ParmHolder::const_iterator atx = AT.GetParam( TypeNameHolder(topIn[ax].Type()) ); - ParmHolder::const_iterator aty = AT.GetParam( TypeNameHolder(topIn[ay].Type()) ); - AtomType::HybridizationType hx, hy; - if (atx != AT.end() && atx->second.Hybridization() == AtomType::UNKNOWN_HYBRIDIZATION) - hx = GuessAtomHybridization( topIn[ax], topIn.Atoms() ); - else - hx = atx->second.Hybridization(); - if (aty != AT.end() && aty->second.Hybridization() == AtomType::UNKNOWN_HYBRIDIZATION) - hy = GuessAtomHybridization( topIn[ax], topIn.Atoms() ); - else - hy = aty->second.Hybridization(); - - int aj, ak; - // Ensure hybridization of atom X is > atom Y - if (hx < hy) { - aj = ay; - ak = ax; - } else { - aj = ax; - ak = ay; - } - mprintf("DEBUG: In hybridization order: %s - %s (%i - %i)\n", topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(ak).c_str(), - (int)hx, (int)hy); - - Atom const& AJ = topIn[aj]; - Atom const& AK = topIn[ak]; - -/* - BuildAtom AtomJ; - if (AJ.Nbonds() > 2) { - Cpptraj::Structure::SetPriority(AtomJ.ModifyPriority(), aj, topIn, frameIn, 0); // FIXME chiralityDebug - } - - -// if (debug > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); -// // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. -// if (AJ.Nbonds() < 3) { -// if (debug > 0) -// mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); -// phi = -180 * Constants::DEGRAD; -// return 0; -// } - - // TODO check that atom i actually ends up on the list? - std::vector const& priority = AtomJ.Priority(); - int ai = - if (debug > 0) { - mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(AtomJ.Chirality())); - mprintf("DEBUG:\t\tPriority around J %s(%i):", - topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); - for (int idx = 0; idx < AJ.Nbonds(); idx++) - mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); - mprintf("\n"); - } - - // Fill in what values we can for known atoms - std::vector knownPhi( AJ.Nbonds() ); - int knownIdx = -1; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak && atomPositionKnown[atnum] && - atomPositionKnown[aj] && - atomPositionKnown[ak] && - atomPositionKnown[al]) - { - knownPhi[idx] = Torsion(frameIn.XYZ(atnum), - frameIn.XYZ(aj), - frameIn.XYZ(ak), - frameIn.XYZ(al)); - if (debug > 0) - mprintf("DEBUG:\t\tKnown phi for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownPhi[idx]*Constants::RADDEG); - if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known - } - } - - // If we have to assign an initial phi, make trans the longer branch - if (knownIdx == -1) { - std::vector visited = atomPositionKnown; - // TODO: Ensure bonded atoms are not yet visited? - visited[aj] = true; - visited[ak] = true; - std::vector depth( AJ.Nbonds() ); - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - int currentDepth = 0; - depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); - if (debug > 0) - mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", - topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth[idx]); - if (knownIdx == -1 && depth[idx] < 3) { - knownIdx = idx; - knownPhi[idx] = 0; - } - } - } - } - - // The interval will be 360 / (number of bonds - 1) - double interval = Constants::TWOPI / (AJ.Nbonds() - 1); - - double startPhi; - if (knownIdx == -1) { - startPhi = -180*Constants::DEGRAD; - if (debug > 0) mprintf("DEBUG:\t\tNo known phi. Setting to %g.\n", startPhi*Constants::RADDEG); - knownIdx = 0; - } else - startPhi = knownPhi[knownIdx]; - - if (AtomJ.Chirality() == IS_R) { - startPhi = -startPhi; - interval = -interval; - } - if (debug > 0) { - mprintf("DEBUG:\t\tStart phi is %g degrees\n", startPhi*Constants::RADDEG); - mprintf("DEBUG:\t\tInterval is %g degrees\n", interval * Constants::RADDEG); - } - - // Forward direction - double currentPhi = startPhi; - for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - if (atnum == ai) phi = currentPhi; - if (debug > 0) - mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); - currentPhi += interval; - currentPhi = wrap360(currentPhi); - } - } - // Reverse direction - currentPhi = startPhi - interval; - for (int idx = knownIdx - 1; idx > -1; idx--) { - int atnum = priority[idx]; - if (atnum != ak) { - if (atnum == ai) phi = currentPhi; - if (debug > 0) - mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); - currentPhi -= interval; - currentPhi = wrap360(currentPhi); - } - } -*/ - return 0; -} diff --git a/src/Structure/Model.h b/src/Structure/Model.h index 0f58f6f260..0ceea95c3e 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -4,24 +4,15 @@ #include "StructureEnum.h" class Topology; class Frame; -class AtomType; -template class ParmHolder; namespace Cpptraj { namespace Structure { class BuildAtom; -class InternalCoords; /// Routines to generate model parameters namespace Model { /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&, int); /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&, int); - -int AssignPhiAroundBond(std::vector&, ParmHolder const&, - int, int, Topology const&, Frame const&, - std::vector const&, int); - - } // END namespace Model } // END namespace Structure } // END namespace Cpptraj From c1e307d9c09297fb11c1fc764abb308221ed282a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 09:28:14 -0500 Subject: [PATCH 0347/1492] Update dependencies --- src/Structure/structuredepend | 2 +- src/cpptrajdepend | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index b11ad9e7ba..84e708f424 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -13,4 +13,4 @@ Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Chirality.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index ee25a9af47..7a037c2ed9 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -460,7 +460,7 @@ Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Const Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Chirality.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From dff7ceeac20962fd5511fac0a71b48ec9372d6fe Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 11:28:17 -0500 Subject: [PATCH 0348/1492] Save residue terminal status. Add some comments. Hide some debug. --- src/Exec_Build.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 727ecf7101..cd88dbeba0 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -134,6 +134,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // Array of templates for each residue std::vector ResTemplates; ResTemplates.reserve( topIn.Nres() ); + std::vector ResTypes; + ResTypes.reserve( topIn.Nres() ); // Initial loop to try to match residues to templates int newNatom = 0; for (int ires = 0; ires != topIn.Nres(); ires++) @@ -156,6 +158,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, resTermType = Cpptraj::Structure::NON_TERMINAL; } mprintf("DEBUG: Residue type: %s\n", Cpptraj::Structure::terminalStr(resTermType)); + ResTypes.push_back( resTermType ); // Identify a template based on the residue name. DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name(), resTermType); if (resTemplate == 0) { @@ -203,7 +206,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, typedef std::vector IParray; IParray intraResBonds; if (resTemplate == 0) { - // No template. Just add the atoms. + // ----- No template. Just add the atoms. ------------ ResZmatrices.push_back( 0 ); for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { @@ -212,12 +215,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, int at0 = itgt - currentRes.FirstAtom() + atomOffset; for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { if ( topIn[*bat].ResNum() == ires ) { + // Intra-residue int at1 = *bat - currentRes.FirstAtom() + atomOffset; if (at1 > at0) { - mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); + //mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); intraResBonds.push_back( Ipair(at0, at1) ); } } else { + // Inter-residue. Only record if bonding to the next residue. if (topIn[*bat].ResNum() > ires) { interResBonds.push_back( ResAtPair(ires, sourceAtom.Name()) ); interResBonds.push_back( ResAtPair(topIn[*bat].ResNum(), topIn[*bat].Name()) ); @@ -230,7 +235,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, hasPosition.push_back( true ); } } else { - // A template exists for this residue. + // ----- A template exists for this residue. --------- // Map source atoms to template atoms. std::vector map = MapAtomsToTemplate( topIn, ires, resTemplate ); mprintf("\t Atom map:\n"); @@ -253,13 +258,13 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, //if ( resTemplate->Top()[*bat].ResNum() == ires ) { int at1 = *bat + atomOffset; if (at1 > at0) { - mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, iref+1, *bat + 1); + //mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, iref+1, *bat + 1); intraResBonds.push_back( Ipair(at0, at1) ); } //} } // TODO connect atoms for inter-residue connections - templateAtom.ClearBonds(); + templateAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds topOut.AddTopAtom( templateAtom, currentRes ); if (map[iref] == -1) { frameOut.AddVec3( Vec3(0.0) ); @@ -317,6 +322,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AddBond(it->first, it->second); } } // END loop over source residues + mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); // ----------------------------------- // Add inter-residue bonds @@ -340,7 +346,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } topOut.AddBond(at0, at1); } - mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); + + // ----------------------------------- + // Do some error checking if (hasPosition.size() != (unsigned int)newNatom) { mprinterr("Internal Error: hasPosition size %zu != newNatom size %i\n", hasPosition.size(), newNatom); return 1; From 4a7bc8fb0b1f71222082741af61cf8498f216d25 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 11:50:09 -0500 Subject: [PATCH 0349/1492] Report residue type during build --- src/Exec_Build.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index cd88dbeba0..a9f721f84a 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -134,7 +134,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // Array of templates for each residue std::vector ResTemplates; ResTemplates.reserve( topIn.Nres() ); - std::vector ResTypes; + typedef std::vector TermTypeArray; + TermTypeArray ResTypes; ResTypes.reserve( topIn.Nres() ); // Initial loop to try to match residues to templates int newNatom = 0; @@ -361,12 +362,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // ----------------------------------- // Build using internal coords if needed. bool buildFailed = false; - for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) + TermTypeArray::const_iterator termType = ResTypes.begin(); + for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) { long int ires = it-ResZmatrices.begin(); Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); + mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); // TEST FIXME // Cpptraj::Structure::Zmatrix testZ; // if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { From 913f83b3f0745126a725ac0468468a7f3e7fd032 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 14:58:47 -0500 Subject: [PATCH 0350/1492] Remove FIXME --- src/Structure/Model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 33b99d4a16..658bfb66f8 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -8,7 +8,7 @@ /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. - */ // FIXME use GuessAtomHybridization + */ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, int debug) { // Figure out hybridization and chirality of atom j. From 2ba3a02574e563dc2185f7b3d351a92d9367f709 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 18 Jan 2024 15:27:56 -0500 Subject: [PATCH 0351/1492] Create zmatrix for link between residues --- src/Exec_Build.cpp | 32 +++++++++++++- src/Structure/Builder.cpp | 82 +++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 6 ++- src/Structure/Model.cpp | 13 ++++++ src/Structure/Model.h | 2 + src/Structure/Zmatrix.cpp | 16 +++++-- src/Structure/structuredepend | 2 +- src/cpptrajdepend | 4 +- 8 files changed, 147 insertions(+), 10 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index a9f721f84a..9e8de1ba66 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -1,6 +1,7 @@ #include "Exec_Build.h" #include "CpptrajStdio.h" #include "DataSet_Parameters.h" +#include "Structure/Builder.h" #include "Structure/GenerateConnectivityArrays.h" #include "Structure/Zmatrix.h" #include "Parm/GB_Params.h" @@ -361,6 +362,15 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // ----------------------------------- // Build using internal coords if needed. + std::vector resIsBuilt; // TODO is this needed? + resIsBuilt.reserve( ResZmatrices.size() ); + for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) { + if ( *it == 0 ) + resIsBuilt.push_back( true ); + else + resIsBuilt.push_back( false ); + } + bool buildFailed = false; TermTypeArray::const_iterator termType = ResTypes.begin(); for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) @@ -370,6 +380,25 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); + // Is this residue connected to an earlier residue? + if ( *termType != Cpptraj::Structure::BEG_TERMINAL ) { + for (int at = topOut.Res(ires).FirstAtom(); at != topOut.Res(ires).LastAtom(); ++at) + { + for (Atom::bond_iterator bat = topOut[at].bondbegin(); bat != topOut[at].bondend(); ++bat) + { + if ((long int)topOut[*bat].ResNum() < ires) { + mprintf("DEBUG: Connected to residue %i\n", topOut[*bat].ResNum()); + Cpptraj::Structure::Builder linkBuilder; + linkBuilder.SetDebug( 1 ); // FIXME + if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, hasPosition)) { + mprinterr("Error: Model coords around bond failed between %s and %s\n", + topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); + return 1; + } + } + } + } + } // TEST FIXME // Cpptraj::Structure::Zmatrix testZ; // if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { @@ -394,7 +423,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; - } + } else + resIsBuilt[ires] = true; //} } } diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 4b09556d77..5646d0006d 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -18,6 +18,7 @@ Builder::Builder() : int Builder::Combine(Topology& frag0Top, Frame& frag0frm, Topology const& frag1Top, Frame const& frag1frm, int bondAt0, int bondAt1) +const { int natom0 = frag0Top.Natom(); int newNatom = natom0 + frag1Top.Natom(); @@ -107,3 +108,84 @@ int Builder::Combine(Topology& frag0Top, Frame& frag0frm, return 0; } + +static inline int known_count(int ires, Topology const& topIn, std::vector const& hasPosition) +{ + int count = 0; + for (int at = topIn.Res(ires).FirstAtom(); at != topIn.Res(ires).LastAtom(); at++) + if (hasPosition[at]) + count++; + return count; +} + +/** Model the coordinates around a bond */ +int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bondAt0, int bondAt1, Barray& hasPosition) const { + mprintf("DEBUG: Model coords around bond %s - %s\n", topIn.AtomMaskName(bondAt0).c_str(), topIn.AtomMaskName(bondAt1).c_str()); + int res0 = topIn[bondAt0].ResNum(); + int res1 = topIn[bondAt1].ResNum(); + if (res0 == res1) { + mprinterr("Internal Error: ModelCoordsAroundBond(): Atoms are in the same residue.\n"); + return 1; + } + // Determine which "direction" we will be combining the fragments. + // Make atA belong to the less-known fragment. atB fragment will be "known". + int known0 = known_count(res0, topIn, hasPosition); + int known1 = known_count(res1, topIn, hasPosition); + int atA, atB; + + if (known0 < known1) { + // Fragment 1 is better-known + atA = bondAt0; + atB = bondAt1; + } else { + // Fragment 0 is better or equally known + atA = bondAt1; + atB = bondAt0; + } + + mprintf("DEBUG: More well-known atom: %s\n", topIn.AtomMaskName(atB).c_str()); + mprintf("DEBUG: Less well-known atom: %s\n", topIn.AtomMaskName(atA).c_str()); + + int chiralityDebug; + if (debug_ < 1) + chiralityDebug = 0; + else + chiralityDebug = debug_ - 1; + + // Get the chirality around each atom before the bond is added. + // Determine priorities + BuildAtom AtomA; + if (topIn[atA].Nbonds() > 2) { + AtomA.SetChirality( DetermineChirality(atA, topIn, frameIn, chiralityDebug) ); + SetPriority(AtomA.ModifyPriority(), atA, topIn, frameIn, chiralityDebug); + } + if (debug_ > 0) + mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); + BuildAtom AtomB; + if (topIn[atB].Nbonds() > 2) { + AtomB.SetChirality( DetermineChirality(atB, topIn, frameIn, chiralityDebug) ); + SetPriority(AtomB.ModifyPriority(), atB, topIn, frameIn, chiralityDebug); + } + if (debug_ > 0) + mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); + + // Generate Zmatrix only for ICs involving bonded atoms + Zmatrix bondZmatrix; + + bondZmatrix.SetDebug( debug_ ); + if (bondZmatrix.SetupICsAroundBond(atA, atB, frameIn, topIn, hasPosition, AtomA, AtomB)) { + mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", + topIn.AtomMaskName(atA).c_str(), + topIn.AtomMaskName(atB).c_str()); + return 1; + } + if (debug_ > 0) + bondZmatrix.print(&topIn); + if (bondZmatrix.SetToFrame( frameIn, hasPosition )) { + mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); + return 1; + } + + return 0; +} + diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 86087d0bec..705902f005 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -7,15 +7,17 @@ namespace Cpptraj { namespace Structure { /// Used to attach different topology/frame combos using internal coordinates class Builder { + typedef std::vector Barray; public: /// CONSTRUCTOR Builder(); /// Combine second fragment into first fragment and bond - int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int); + int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; + /// Model the coordinates around a bond given only some coordinates are known + int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Barray&) const; /// Set debug void SetDebug(int d) { debug_ = d; } private: - typedef std::vector Barray; int debug_; }; diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 658bfb66f8..4a0067e2d7 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -4,7 +4,20 @@ #include "../GuessAtomHybridization.h" #include "../Topology.h" #include "../TorsionRoutines.h" +#include "../DistRoutines.h" #include "../Constants.h" +#include + +/** Assign reasonable value for bond distance. */ +int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, int debug) +{ + if (atomPositionKnown[ai] && atomPositionKnown[aj]) + dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); + else + // One or both positions unknown. Use bond length. TODO use parameters + dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); + return 0; +} /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. diff --git a/src/Structure/Model.h b/src/Structure/Model.h index 0ceea95c3e..9a6452d53f 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -9,6 +9,8 @@ namespace Structure { class BuildAtom; /// Routines to generate model parameters namespace Model { +/// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known +int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&, int); /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&, int); /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 89f5916188..932741398c 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -977,7 +977,11 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- if (debug_ > 0) mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); - double newDist = Atom::GetBondLength( topIn[atA].Element(), topIn[atB].Element() ); + double newDist = 0; + if (Cpptraj::Structure::Model::AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown, modelDebug)) { + mprinterr("Error: length (i j) assignment failed.\n"); + return 1; + } if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); double newTheta = 0; if (Cpptraj::Structure::Model::AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown, modelDebug)) { @@ -1008,8 +1012,11 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology { if (*iat != atB) { if (ati == -1) ati = *iat; - // Use existing dist - newDist = sqrt( DIST2_NoImage(frameIn.XYZ(*iat), frameIn.XYZ(atA)) ); + // Set bond dist + if (Cpptraj::Structure::Model::AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown, modelDebug)) { + mprinterr("Error: length (j k) assignment failed.\n"); + return 1; + } // Set theta for I atA atB newTheta = 0; if (Cpptraj::Structure::Model::AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown, modelDebug)) { @@ -1062,6 +1069,7 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology } */ } } +/* // Handle remaining atoms. if (AJ1.Nbonds() > 1) { if (AJ1.Nbonds() == 2) { @@ -1099,7 +1107,7 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology } } } - +*/ return 0; } diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 84e708f424..ccf6cce6e9 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -6,7 +6,7 @@ FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h .. GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h -Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h +Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 7a037c2ed9..a9da180829 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -290,7 +290,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -453,7 +453,7 @@ Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h At Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h GuessAtomHybridization.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/StructureEnum.o : Structure/StructureEnum.cpp Structure/StructureEnum.h Structure/StructureRoutines.o : Structure/StructureRoutines.cpp Atom.h CpptrajStdio.h NameType.h Residue.h Structure/StructureRoutines.h SymbolExporting.h Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From f17c846ce1178e91db16f1cc9c680614ee32e82b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:00:49 -0500 Subject: [PATCH 0352/1492] Change into a class --- src/Structure/Model.cpp | 30 +++++++++++++++--------------- src/Structure/Model.h | 26 ++++++++++++++++---------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 4a0067e2d7..ea268652c3 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -9,7 +9,7 @@ #include /** Assign reasonable value for bond distance. */ -int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, int debug) +int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) { if (atomPositionKnown[ai] && atomPositionKnown[aj]) dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); @@ -22,16 +22,16 @@ int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topolo /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. */ -int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, int debug) +int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) { // Figure out hybridization and chirality of atom j. - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); //enum HybridizationType { SP = 0, SP2, SP3, UNKNOWN_HYBRIDIZATION }; Atom const& AJ = topIn[aj]; - if (debug > 0) { + if (debug_ > 0) { mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); @@ -155,17 +155,17 @@ static inline double wrap360(double phi) { int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, int al, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, - BuildAtom const& AtomJ, int debug) + BuildAtom const& AtomJ) { // Figure out hybridization and chirality of atom j. - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG: AssignPhi for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); Atom const& AJ = topIn[aj]; - if (debug > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); + if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. if (AJ.Nbonds() < 3) { - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); phi = -180 * Constants::DEGRAD; return 0; @@ -173,7 +173,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in // TODO check that atom i actually ends up on the list? std::vector const& priority = AtomJ.Priority(); - if (debug > 0) { + if (debug_ > 0) { mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(AtomJ.Chirality())); mprintf("DEBUG:\t\tPriority around J %s(%i):", topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); @@ -196,7 +196,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(al)); - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG:\t\tKnown phi for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownPhi[idx]*Constants::RADDEG); if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known } @@ -214,7 +214,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in if (atnum != ak) { int currentDepth = 0; depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth[idx]); if (knownIdx == -1 && depth[idx] < 3) { @@ -231,7 +231,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in double startPhi; if (knownIdx == -1) { startPhi = -180*Constants::DEGRAD; - if (debug > 0) mprintf("DEBUG:\t\tNo known phi. Setting to %g.\n", startPhi*Constants::RADDEG); + if (debug_ > 0) mprintf("DEBUG:\t\tNo known phi. Setting to %g.\n", startPhi*Constants::RADDEG); knownIdx = 0; } else startPhi = knownPhi[knownIdx]; @@ -240,7 +240,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in startPhi = -startPhi; interval = -interval; } - if (debug > 0) { + if (debug_ > 0) { mprintf("DEBUG:\t\tStart phi is %g degrees\n", startPhi*Constants::RADDEG); mprintf("DEBUG:\t\tInterval is %g degrees\n", interval * Constants::RADDEG); } @@ -251,7 +251,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in int atnum = priority[idx]; if (atnum != ak) { if (atnum == ai) phi = currentPhi; - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); currentPhi += interval; currentPhi = wrap360(currentPhi); @@ -263,7 +263,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in int atnum = priority[idx]; if (atnum != ak) { if (atnum == ai) phi = currentPhi; - if (debug > 0) + if (debug_ > 0) mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); currentPhi -= interval; currentPhi = wrap360(currentPhi); diff --git a/src/Structure/Model.h b/src/Structure/Model.h index 9a6452d53f..30befeda63 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -1,21 +1,27 @@ #ifndef INC_STRUCTURE_MODEL_H #define INC_STRUCTURE_MODEL_H #include -#include "StructureEnum.h" +//#incl ude "StructureEnum.h" class Topology; class Frame; namespace Cpptraj { namespace Structure { class BuildAtom; -/// Routines to generate model parameters -namespace Model { -/// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known -int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&, int); -/// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I -int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&, int); -/// Given atoms J and K, attempt to assign a reasonable value for theta for atom I -int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&, int); -} // END namespace Model +/// Routines to create a model for missing bond/angle/torsion parameters +class Model { + public: + Model() : debug_(0) {} + /// Set debug level + void SetDebug(int d) { debug_ = d; } + /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known + int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&); + /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I + int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&); + /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I + int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&); + private: + int debug_; +}; } // END namespace Structure } // END namespace Cpptraj #endif From e61964fdc034e29dd73bdbbc71266037280d8eae Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:01:12 -0500 Subject: [PATCH 0353/1492] Update depends --- src/Structure/structuredepend | 2 +- src/cpptrajdepend | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index ccf6cce6e9..ed0a465379 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -13,4 +13,4 @@ Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Chirality.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index a9da180829..dc4ddeb557 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -460,7 +460,7 @@ Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Const Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Chirality.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Chirality.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 412b20578365d78c42780fbff483dae5b9ad70bc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:04:49 -0500 Subject: [PATCH 0354/1492] SetFromFrameAndConnect now does all atoms. Test some code for determining KL pair parameters around bond IJ. --- src/Structure/Zmatrix.cpp | 123 +++++++++++++++++++++++++++++--------- src/Structure/Zmatrix.h | 2 +- 2 files changed, 96 insertions(+), 29 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 932741398c..b1e1ad4665 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -7,6 +7,7 @@ #include "BuildAtom.h" #include "Model.h" #include "GenerateConnectivityArrays.h" +#include "Chirality.h" #include "../Frame.h" #include "../CpptrajStdio.h" #include "../Constants.h" @@ -735,25 +736,26 @@ int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& /** Set up Zmatrix from Cartesian coordinates and topology. * Use torsions based on connectivity to create a complete set of ICs. */ -int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn, int molnum) +int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn) //, int molnum) { - if (molnum < 0) { - mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); - return 1; - } - if (topIn.Nmol() < 1) { - mprinterr("Internal Error: Zmatrix::SetFromFrame(): No molecules.\n"); - return 1; - } +// if (molnum < 0) { +// mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); +// return 1; +// } +// if (topIn.Nmol() < 1) { +// mprinterr("Internal Error: Zmatrix::SetFromFrame(): No molecules.\n"); +// return 1; +// } clear(); IC_.clear(); - Molecule const& currentMol = topIn.Mol(molnum); +// Molecule const& currentMol = topIn.Mol(molnum); - for (Unit::const_iterator seg = currentMol.MolUnit().segBegin(); - seg != currentMol.MolUnit().segEnd(); ++seg) - { - for (int iat1 = seg->Begin(); iat1 != seg->End(); ++iat1) +// for (Unit::const_iterator seg = currentMol.MolUnit().segBegin(); +// seg != currentMol.MolUnit().segEnd(); ++seg) +// { +// for (int iat1 = seg->Begin(); iat1 != seg->End(); ++iat1) + for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) { Atom const& At1 = topIn[iat1]; for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { @@ -776,6 +778,49 @@ int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn, } } } + //} + if (IC_.empty()) { + // Either 4-5 atoms in a tetrahedral configuration or else + // some other strange configuration. + mprintf("Warning: No ICs created for %s\n", topIn.c_str()); +/* + // Create ICs using 1st 3 heaviest atoms. + if (topIn.Natom() > 3) { + typedef std::pair MIpair; + // Used to sort mass descending). + struct MassCmp { + inline bool operator()(MIpair const& lhs, MIpair const& rhs) const { + if (lhs.first == rhs.first) + return lhs.second < rhs.second; + else + return lhs.first > rhs.first; + } + }; + + std::vector MassIndices; + MassIndices.reserve( topIn.Natom() ); + for (int iat = 0; iat < topIn.Natom(); iat++) + MassIndices.push_back( MIpair(topIn[iat].Mass(), iat) ); + // Sort by mass + std::sort( MassIndices.begin(), MassIndices.end(), MassCmp() ); + mprintf("Sorted:"); + for (std::vector::const_iterator it = MassIndices.begin(); it != MassIndices.end(); ++it) + mprintf(" %s", topIn.AtomMaskName(it->second).c_str()); + mprintf("\n"); + // Set up ICs + for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) { + std::vector iats; + iats.reserve(3); + for (std::vector::const_iterator it = MassIndices.begin(); it != MassIndices.end(); ++it) + { + if (it->second != iat1) + iats.push_back( it->second ); + if (iats.size() == 3) break; + } + addIc(iat1, iats[0], iats[1], iats[2], frameIn); + } + } +*/ } return 0; @@ -1042,31 +1087,53 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology } MARK( *iat, hasIC, nHasIC ); // ----- K L: Set up ICs for X iat atA atB --------------------- - /*Atom const& AJ2 = topIn[*iat]; + Atom const& AJ2 = topIn[*iat]; for (Atom::bond_iterator i2at = AJ2.bondbegin(); i2at != AJ2.bondend(); ++i2at) { if (*i2at != atA && *i2at != atB && !hasIC[*i2at]) { - // Use existing dist and theta - newDist = sqrt( DIST2_NoImage(frameIn.XYZ(*i2at), frameIn.XYZ(*iat)) ); - newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); + mprintf("DEBUG: MODEL K L IC: %s %s %s %s %i %i %i %i\n", + topIn.AtomMaskName(*i2at).c_str(), + topIn.AtomMaskName(*iat).c_str(), + topIn.AtomMaskName(atA).c_str(), + topIn.AtomMaskName(atB).c_str(), + *i2at+1, *iat+1, atA+1, atB+1); + if (Cpptraj::Structure::Model::AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown, modelDebug)) { + mprinterr("Error: length (k l) assignment failed.\n"); + return 1; + } + mprintf("DEBUG: K L distance= %g\n", newDist); + //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); + if (Cpptraj::Structure::Model::AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown, modelDebug)) { + mprinterr("Error: theta (k l) assignment failed.\n"); + return 1; + } + mprintf("DEBUG: K L angle= %g\n", newTheta*Constants::RADDEG); // Set phi for X iat atA atB + BuildAtom AtomC; + if (topIn[*iat].Nbonds() > 2) { + AtomC.SetChirality( DetermineChirality(*iat, topIn, frameIn, modelDebug) ); + SetPriority(AtomC.ModifyPriority(), *iat, topIn, frameIn, modelDebug); + } newPhi = 0; - if (Cpptraj::Structure::Model::AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, atomPositionKnown, atomChirality)) { + if (Cpptraj::Structure::Model::AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, + atomPositionKnown, AtomC, 1)) // FIXME debug level + { mprinterr("Error: phi (k l) assignment failed.\n"); return 1; } - mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - mprintf("DEBUG: MODEL K L IC: "); - IC_.back().printIC(topIn); - MARK( *i2at, hasIC, nHasIC ); + mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); + //IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); + //mprintf("DEBUG: MODEL K L IC: "); + //IC_.back().printIC(topIn); + //MARK( *i2at, hasIC, nHasIC ); // Trace from atA *iat *i2at outwards - ToTrace.push_back(atA); - ToTrace.push_back(*iat); - ToTrace.push_back(*i2at); + //ToTrace.push_back(atA); + //ToTrace.push_back(*iat); + //ToTrace.push_back(*i2at); //if (traceMol(atA, *iat, *i2at, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) return 1; + } - } */ + } } } /* diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 0788df4a74..d60ff50ddd 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -42,7 +42,7 @@ class Zmatrix { int AutoSetSeedsWithPositions(Frame const&, Topology const&, int, Barray const&); /// Try to generate complete ICs from atom connectivity - int SetFromFrameAndConnect(Frame const&, Topology const&, int); + int SetFromFrameAndConnect(Frame const&, Topology const&);//, int); /// Update ICs from existing coords int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array From c5988f7bcccb2835a5f223d26ca0c9467e312506 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:06:02 -0500 Subject: [PATCH 0355/1492] No need to specify molecule number to SetFromFrameAndConnect --- src/Exec_Build.cpp | 2 +- src/Exec_Zmatrix.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 9e8de1ba66..39afa8a282 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -299,7 +299,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); - if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top(), 0 )) { + if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } diff --git a/src/Exec_Zmatrix.cpp b/src/Exec_Zmatrix.cpp index feaa976432..c4e8158e9e 100644 --- a/src/Exec_Zmatrix.cpp +++ b/src/Exec_Zmatrix.cpp @@ -47,7 +47,7 @@ const zmatrix.SetDebug( State.Debug() ); int errStat; if (complete_zmatrix) - errStat = zmatrix.SetFromFrameAndConnect(frmIn, CRD->Top(), molnum); + errStat = zmatrix.SetFromFrameAndConnect(frmIn, CRD->Top()); else errStat = zmatrix.SetFromFrame( frmIn, CRD->Top(), molnum ); if (debug_ > 0) zmatrix.print(); // DEBUG From 4758054590d43241a4f1a4fb5c47c3d4849bab78 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:23:59 -0500 Subject: [PATCH 0356/1492] Start new assign phi routine --- src/Structure/Model.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/Structure/Model.h | 10 +++++++--- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index ea268652c3..afe3073e68 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -10,6 +10,7 @@ /** Assign reasonable value for bond distance. */ int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) +const { if (atomPositionKnown[ai] && atomPositionKnown[aj]) dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); @@ -23,6 +24,7 @@ int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topolo * atom i given that atoms j and k have known positions. */ int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) +const { // Figure out hybridization and chirality of atom j. if (debug_ > 0) @@ -156,6 +158,7 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, BuildAtom const& AtomJ) +const { // Figure out hybridization and chirality of atom j. if (debug_ > 0) @@ -272,3 +275,41 @@ int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, in return 0; } + +static inline AtomType::HybridizationType getAtomHybridization(ParmHolder const& AT, Topology const& topIn, int ix) +{ + AtomType::HybridizationType hx; + ParmHolder::const_iterator itx = AT.GetParam( TypeNameHolder( topIn[ix].Type() ) ); + if (itx == AT.end()) + hx = Cpptraj::GuessAtomHybridization(topIn[ix], topIn.Atoms()); + else + hx = itx->second.Hybridization(); + return hx; +} + +/** Assign phi values around a bond. */ +int Cpptraj::Structure::Model::AssignPhiAroundBond(int ix, int iy, Topology const& topIn, Frame const& frameIn, + std::vector const& atomPositionKnown, + ParmHolder const& AT) +const +{ + // Order atoms by hybridization; AX > AY + int ax, ay; + AtomType::HybridizationType hx = getAtomHybridization(AT, topIn, ix); + AtomType::HybridizationType hy = getAtomHybridization(AT, topIn, iy); + if (hx < hy) { + ax = iy; + ay = ix; + } else { + ax = ix; + ay = iy; + } + mprintf("DEBUG: Assign torsions around %s (%i) - %s (%i)\n", + topIn.AtomMaskName(ix).c_str(), (int)hx, + topIn.AtomMaskName(iy).c_str(), (int)hy); + mprintf("DEBUG: Ordered by hybridization: %s %s\n", + topIn.AtomMaskName(ax).c_str(), + topIn.AtomMaskName(ay).c_str()); + + return 0; +} diff --git a/src/Structure/Model.h b/src/Structure/Model.h index 30befeda63..d93d1bc24b 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -4,6 +4,8 @@ //#incl ude "StructureEnum.h" class Topology; class Frame; +template class ParmHolder; +class AtomType; namespace Cpptraj { namespace Structure { class BuildAtom; @@ -14,11 +16,13 @@ class Model { /// Set debug level void SetDebug(int d) { debug_ = d; } /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known - int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&); + int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I - int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&); + int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I - int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&); + int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; + /// Assign phi around bond + int AssignPhiAroundBond(int, int, Topology const&, Frame const&, std::vector const&, ParmHolder const&) const; private: int debug_; }; From a72a343465b9f2dd67afa50875b6db32258bd487 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:27:42 -0500 Subject: [PATCH 0357/1492] Use class instead of namespace --- src/Structure/Zmatrix.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index b1e1ad4665..9ad2fbdd9c 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1019,24 +1019,26 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology topIn.AtomMaskName(atl0).c_str()); modelDebug = debug_ - 1; } + Cpptraj::Structure::Model model; + model.SetDebug( modelDebug ); // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- if (debug_ > 0) mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); double newDist = 0; - if (Cpptraj::Structure::Model::AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown, modelDebug)) { + if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: length (i j) assignment failed.\n"); return 1; } if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); double newTheta = 0; - if (Cpptraj::Structure::Model::AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown, modelDebug)) { + if (model.AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: theta (i j) assignment failed.\n"); return 1; } if (debug_ > 0) mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); double newPhi = 0; - if (Cpptraj::Structure::Model::AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, - atomPositionKnown, AtomB, modelDebug)) + if (model.AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, + atomPositionKnown, AtomB)) { mprinterr("Error: phi (i j) assignment failed.\n"); return 1; @@ -1058,13 +1060,13 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology if (*iat != atB) { if (ati == -1) ati = *iat; // Set bond dist - if (Cpptraj::Structure::Model::AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown, modelDebug)) { + if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: length (j k) assignment failed.\n"); return 1; } // Set theta for I atA atB newTheta = 0; - if (Cpptraj::Structure::Model::AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown, modelDebug)) { + if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: theta (j k) assignment failed.\n"); return 1; } @@ -1072,8 +1074,8 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); // Set phi for I atA atB K newPhi = 0; - if (Cpptraj::Structure::Model::AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, - atomPositionKnown, AtomA, modelDebug)) + if (model.AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, + atomPositionKnown, AtomA)) { mprinterr("Error: phi (j k) assignment failed.\n"); return 1; @@ -1097,13 +1099,13 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology topIn.AtomMaskName(atA).c_str(), topIn.AtomMaskName(atB).c_str(), *i2at+1, *iat+1, atA+1, atB+1); - if (Cpptraj::Structure::Model::AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown, modelDebug)) { + if (model.AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: length (k l) assignment failed.\n"); return 1; } mprintf("DEBUG: K L distance= %g\n", newDist); //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); - if (Cpptraj::Structure::Model::AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown, modelDebug)) { + if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: theta (k l) assignment failed.\n"); return 1; } @@ -1115,8 +1117,8 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology SetPriority(AtomC.ModifyPriority(), *iat, topIn, frameIn, modelDebug); } newPhi = 0; - if (Cpptraj::Structure::Model::AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, - atomPositionKnown, AtomC, 1)) // FIXME debug level + if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, + atomPositionKnown, AtomC)) // FIXME debug level { mprinterr("Error: phi (k l) assignment failed.\n"); return 1; From 8ea683d90dd34cbc5d7a7f06db3c0388f9d7fe15 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 09:41:24 -0500 Subject: [PATCH 0358/1492] Try using SetFromFrameAndConnect --- src/Structure/Builder.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 5646d0006d..3f65896a84 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -20,6 +20,9 @@ int Builder::Combine(Topology& frag0Top, Frame& frag0frm, int bondAt0, int bondAt1) const { + mprintf("DEBUG: Calling COMBINE between %s and %s\n", + frag0Top.AtomMaskName(bondAt0).c_str(), + frag1Top.AtomMaskName(bondAt1).c_str()); int natom0 = frag0Top.Natom(); int newNatom = natom0 + frag1Top.Natom(); @@ -28,23 +31,28 @@ const // Ensure atB index is what it will be after fragments are combined. Barray posKnown( newNatom, false ); int atA, atB; + Zmatrix zmatrixA; if (frag0Top.HeavyAtomCount() < frag1Top.HeavyAtomCount()) { // Fragment 1 is larger atA = bondAt0; atB = bondAt1 + natom0; for (int at = frag0Top.Natom(); at != newNatom; at++) posKnown[at] = true; + zmatrixA.SetFromFrameAndConnect( frag0frm, frag0Top ); } else { // Fragment 0 is larger or equal atA = bondAt1 + natom0; atB = bondAt0; for (int at = 0; at != natom0; at++) posKnown[at] = true; + zmatrixA.SetFromFrameAndConnect( frag1frm, frag1Top ); + zmatrixA.OffsetIcIndices( natom0 ); } // Combine fragment1 into fragment 0 topology Topology& combinedTop = frag0Top; combinedTop.AppendTop( frag1Top ); + zmatrixA.print( &combinedTop ); // Combined fragment1 into fragment 0 coords. // Need to save the original coords in frame0 since SetupFrameV does not preserve. double* tmpcrd0 = new double[natom0*3]; @@ -92,19 +100,24 @@ const // Generate Zmatrix only for ICs involving bonded atoms Zmatrix bondZmatrix; - bondZmatrix.SetDebug( debug_ ); + //bondZmatrix.SetDebug( debug_ ); + bondZmatrix.SetDebug( 1 ); // FIXME if (bondZmatrix.SetupICsAroundBond(atA, atB, CombinedFrame, combinedTop, posKnown, AtomA, AtomB)) { mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", combinedTop.AtomMaskName(atA).c_str(), combinedTop.AtomMaskName(atB).c_str()); return 1; } - if (debug_ > 0) + //if (debug_ > 0) bondZmatrix.print(&combinedTop); if (bondZmatrix.SetToFrame( CombinedFrame, posKnown )) { mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); return 1; } + if (zmatrixA.SetToFrame( CombinedFrame, posKnown )) { + mprinterr("Error: Conversion from zmatrixA to Cartesian coords failed.\n"); + return 1; + } return 0; } From af5e3d04595d3b820b18d83a6dd373444bd32b5f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 14:23:05 -0500 Subject: [PATCH 0359/1492] Fix assigning phi with priority --- src/Structure/Model.cpp | 85 ++++++++++++++++++++++++++++++++--------- src/Structure/Model.h | 6 +-- 2 files changed, 71 insertions(+), 20 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index afe3073e68..e47d45473d 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -178,7 +178,7 @@ const std::vector const& priority = AtomJ.Priority(); if (debug_ > 0) { mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(AtomJ.Chirality())); - mprintf("DEBUG:\t\tPriority around J %s(%i):", + mprintf("DEBUG:\t\tPriority around J %s(%i) is", topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); for (int idx = 0; idx < AJ.Nbonds(); idx++) mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); @@ -187,6 +187,7 @@ const // Fill in what values we can for known atoms std::vector knownPhi( AJ.Nbonds() ); + std::vector isKnown( AJ.Nbonds(), false ); int knownIdx = -1; for (int idx = 0; idx < AJ.Nbonds(); idx++) { int atnum = priority[idx]; @@ -199,8 +200,9 @@ const frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(al)); + isKnown[idx] = true; if (debug_ > 0) - mprintf("DEBUG:\t\tKnown phi for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownPhi[idx]*Constants::RADDEG); + mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known } } @@ -211,26 +213,79 @@ const // TODO: Ensure bonded atoms are not yet visited? visited[aj] = true; visited[ak] = true; - std::vector depth( AJ.Nbonds() ); + //std::vector depth( AJ.Nbonds() ); + int max_depth = 0; + int max_idx = -1; for (int idx = 0; idx < AJ.Nbonds(); idx++) { int atnum = priority[idx]; if (atnum != ak) { int currentDepth = 0; - depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); + //depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); + int depth = atom_depth(currentDepth, atnum, topIn, visited, 10); if (debug_ > 0) mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", - topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth[idx]); - if (knownIdx == -1 && depth[idx] < 3) { - knownIdx = idx; - knownPhi[idx] = 0; + topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth); + //if (knownIdx == -1 && depth[idx] < 3) { + // knownIdx = idx; + // knownPhi[idx] = 0; + //} + if (max_idx == -1 || depth > max_depth) { + max_depth = depth; + max_idx = idx; } } } + mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); + knownIdx = max_idx; + knownPhi[max_idx] = -180 * Constants::DEGRAD; + isKnown[max_idx] = true; + } + + // Sanity check + if (knownIdx < 0) { + mprinterr("Internal Error: AssignPhi(): knownIdx is < 0\n"); + return 1; } // The interval will be 360 / (number of bonds - 1) double interval = Constants::TWOPI / (AJ.Nbonds() - 1); + if (AtomJ.Chirality() == IS_S || AtomJ.Chirality() == IS_UNKNOWN_CHIRALITY) + interval = -interval; + + if (debug_ > 0) { + mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); + mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(AtomJ.Chirality())); + } + // Forwards from the known index + double currentPhi = knownPhi[knownIdx]; + for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + if (isKnown[idx]) + currentPhi = knownPhi[idx]; + else + currentPhi = wrap360(currentPhi + interval); + if (atnum == ai) phi = currentPhi; + if (debug_ > 0) + mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); + } + } + // Backwards from the known index + currentPhi = knownPhi[knownIdx]; + for (int idx = knownIdx - 1; idx > -1; idx--) { + int atnum = priority[idx]; + if (atnum != ak) { + if (isKnown[idx]) + currentPhi = knownPhi[idx]; + else + currentPhi = wrap360(currentPhi - interval); + if (atnum == ai) phi = currentPhi; + if (debug_ > 0) + mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); + } + } +/* double startPhi; if (knownIdx == -1) { startPhi = -180*Constants::DEGRAD; @@ -243,10 +298,6 @@ const startPhi = -startPhi; interval = -interval; } - if (debug_ > 0) { - mprintf("DEBUG:\t\tStart phi is %g degrees\n", startPhi*Constants::RADDEG); - mprintf("DEBUG:\t\tInterval is %g degrees\n", interval * Constants::RADDEG); - } // Forward direction double currentPhi = startPhi; @@ -272,10 +323,10 @@ const currentPhi = wrap360(currentPhi); } } - +*/ return 0; } - +/* static inline AtomType::HybridizationType getAtomHybridization(ParmHolder const& AT, Topology const& topIn, int ix) { AtomType::HybridizationType hx; @@ -286,9 +337,9 @@ static inline AtomType::HybridizationType getAtomHybridization(ParmHoldersecond.Hybridization(); return hx; } - +*/ /** Assign phi values around a bond. */ -int Cpptraj::Structure::Model::AssignPhiAroundBond(int ix, int iy, Topology const& topIn, Frame const& frameIn, +/*int Cpptraj::Structure::Model::AssignPhiAroundBond(int ix, int iy, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, ParmHolder const& AT) const @@ -312,4 +363,4 @@ const topIn.AtomMaskName(ay).c_str()); return 0; -} +}*/ diff --git a/src/Structure/Model.h b/src/Structure/Model.h index d93d1bc24b..b46d863815 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -4,8 +4,8 @@ //#incl ude "StructureEnum.h" class Topology; class Frame; -template class ParmHolder; -class AtomType; +//template class ParmHolder; +//class AtomType; namespace Cpptraj { namespace Structure { class BuildAtom; @@ -22,7 +22,7 @@ class Model { /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; /// Assign phi around bond - int AssignPhiAroundBond(int, int, Topology const&, Frame const&, std::vector const&, ParmHolder const&) const; + //int AssignPhiAroundBond(int, int, Topology const&, Frame const&, std::vector const&, ParmHolder const&) const; private: int debug_; }; From 92a7018ed68586c6ffaa2d92e084656ab1d10044 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 14:42:51 -0500 Subject: [PATCH 0360/1492] Start refactoring AssignPhi so it can be called once for a group of 3 connected atoms and chirality does not have to be passed in. --- src/Structure/Model.cpp | 36 ++++++++++++++++++++++++++++-------- src/Structure/Model.h | 2 ++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index e47d45473d..23ea3e3452 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,5 +1,7 @@ #include "Model.h" #include "BuildAtom.h" +#include "InternalCoords.h" +#include "Chirality.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../Topology.h" @@ -148,36 +150,52 @@ static inline double wrap360(double phi) { return phi; } -/** Attempt to assign a reasonable value for phi internal coordinate for atom i - * given that atoms j k and l have known positions. +/** Attempt to assign reasonable values for phi internal coordinates for atoms + * bonded to atom j given that atoms j k and l have known positions. * j - k * / \ * i l */ +//int Cpptraj::Structure::Model::AssignPhi(std::vector& IC, int aj, int ak, int al, int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, int al, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, BuildAtom const& AtomJ) const { + Atom const& AJ = topIn[aj]; + // If atom J has only 1 bond this is not needed. + if (AJ.Nbonds() < 2) return 0; + // Figure out hybridization and chirality of atom j. if (debug_ > 0) mprintf("DEBUG: AssignPhi for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); + std::vector priority; + int chiralDebug = debug_; + if (chiralDebug > 0) + chiralDebug--; + ChiralType chirality = SetPriority(priority, aj, topIn, frameIn, chiralDebug); - Atom const& AJ = topIn[aj]; if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. if (AJ.Nbonds() < 3) { if (debug_ > 0) mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); - phi = -180 * Constants::DEGRAD; + double currentPhi = -180 * Constants::DEGRAD; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + if (AJ.Bond(idx) != ak) { + //IC.push_back( InternalCoords(AJ.Bond(idx), aj, ak, al, 0, 0, currentPhi) ); + phi = currentPhi; + break; + } + } return 0; } // TODO check that atom i actually ends up on the list? - std::vector const& priority = AtomJ.Priority(); + //std::vector const& priority = AtomJ.Priority(); if (debug_ > 0) { - mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(AtomJ.Chirality())); + mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); mprintf("DEBUG:\t\tPriority around J %s(%i) is", topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); for (int idx = 0; idx < AJ.Nbonds(); idx++) @@ -249,12 +267,12 @@ const // The interval will be 360 / (number of bonds - 1) double interval = Constants::TWOPI / (AJ.Nbonds() - 1); - if (AtomJ.Chirality() == IS_S || AtomJ.Chirality() == IS_UNKNOWN_CHIRALITY) + if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) interval = -interval; if (debug_ > 0) { mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); - mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(AtomJ.Chirality())); + mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); } // Forwards from the known index @@ -267,6 +285,7 @@ const else currentPhi = wrap360(currentPhi + interval); if (atnum == ai) phi = currentPhi; + //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); if (debug_ > 0) mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); } @@ -281,6 +300,7 @@ const else currentPhi = wrap360(currentPhi - interval); if (atnum == ai) phi = currentPhi; + //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); if (debug_ > 0) mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); } diff --git a/src/Structure/Model.h b/src/Structure/Model.h index b46d863815..d820c5e1e3 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -9,6 +9,7 @@ class Frame; namespace Cpptraj { namespace Structure { class BuildAtom; +class InternalCoords; /// Routines to create a model for missing bond/angle/torsion parameters class Model { public: @@ -20,6 +21,7 @@ class Model { /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I + //int AssignPhi(std::vector&, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; /// Assign phi around bond //int AssignPhiAroundBond(int, int, Topology const&, Frame const&, std::vector const&, ParmHolder const&) const; From 5fac17cc8ff8f60071af00cadbb5c984b6d4d286 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 15:17:02 -0500 Subject: [PATCH 0361/1492] No need to figure out chirality when less than 3 bonds --- src/Structure/Model.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 23ea3e3452..d2d6c1670f 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -167,15 +167,6 @@ const // If atom J has only 1 bond this is not needed. if (AJ.Nbonds() < 2) return 0; - // Figure out hybridization and chirality of atom j. - if (debug_ > 0) - mprintf("DEBUG: AssignPhi for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); - std::vector priority; - int chiralDebug = debug_; - if (chiralDebug > 0) - chiralDebug--; - ChiralType chirality = SetPriority(priority, aj, topIn, frameIn, chiralDebug); - if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. if (AJ.Nbonds() < 3) { @@ -191,6 +182,15 @@ const } return 0; } + // Figure out hybridization and chirality of atom j. + if (debug_ > 0) + mprintf("DEBUG: AssignPhi for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); + std::vector priority; + int chiralDebug = debug_; + if (chiralDebug > 0) + chiralDebug--; + ChiralType chirality = SetPriority(priority, aj, topIn, frameIn, chiralDebug); + // TODO check that atom i actually ends up on the list? //std::vector const& priority = AtomJ.Priority(); From 31c0eea1a1f552de46f876960ceca84319915cbc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 15:26:36 -0500 Subject: [PATCH 0362/1492] Use passed-in priority for now --- src/Structure/Model.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index d2d6c1670f..626ee482a6 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -185,15 +185,16 @@ const // Figure out hybridization and chirality of atom j. if (debug_ > 0) mprintf("DEBUG: AssignPhi for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); - std::vector priority; - int chiralDebug = debug_; - if (chiralDebug > 0) - chiralDebug--; - ChiralType chirality = SetPriority(priority, aj, topIn, frameIn, chiralDebug); +// std::vector priority; +// int chiralDebug = debug_; +// if (chiralDebug > 0) +// chiralDebug--; +// ChiralType chirality = SetPriority(priority, aj, topIn, frameIn, chiralDebug); // TODO check that atom i actually ends up on the list? - //std::vector const& priority = AtomJ.Priority(); + std::vector const& priority = AtomJ.Priority(); + ChiralType chirality = AtomJ.Chirality(); if (debug_ > 0) { mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); mprintf("DEBUG:\t\tPriority around J %s(%i) is", From 4f1351d0823bd1b7ddf118d24ddd7fd9b599c201 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 15:27:29 -0500 Subject: [PATCH 0363/1492] Comment out unused includes --- src/Structure/Model.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 626ee482a6..e2befb15f7 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,7 +1,7 @@ #include "Model.h" #include "BuildAtom.h" -#include "InternalCoords.h" -#include "Chirality.h" +//#incl ude "InternalCoords.h" +//#incl ude "Chirality.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../Topology.h" From b48137e08ca43ace1b929366123c04538d6b6bf9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 15:29:50 -0500 Subject: [PATCH 0364/1492] Enable adding IC for K L around bond I J --- src/Structure/Zmatrix.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 9ad2fbdd9c..ddddcf2566 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1117,17 +1117,18 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology SetPriority(AtomC.ModifyPriority(), *iat, topIn, frameIn, modelDebug); } newPhi = 0; + //model.SetDebug( 1 ); // FIXME if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, - atomPositionKnown, AtomC)) // FIXME debug level + atomPositionKnown, AtomC)) { mprinterr("Error: phi (k l) assignment failed.\n"); return 1; } mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); - //IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - //mprintf("DEBUG: MODEL K L IC: "); - //IC_.back().printIC(topIn); - //MARK( *i2at, hasIC, nHasIC ); + IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); + mprintf("DEBUG: MODEL K L IC: "); + IC_.back().printIC(topIn); + MARK( *i2at, hasIC, nHasIC ); // Trace from atA *iat *i2at outwards //ToTrace.push_back(atA); //ToTrace.push_back(*iat); From 0fa1aee0d8818b8054967bd0c8533caa3bd7f50f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 19 Jan 2024 16:39:47 -0500 Subject: [PATCH 0365/1492] Try to handle cases where a known interval can be calculated --- src/Structure/Model.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index e2befb15f7..32162bb204 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -208,6 +208,8 @@ const std::vector knownPhi( AJ.Nbonds() ); std::vector isKnown( AJ.Nbonds(), false ); int knownIdx = -1; + double knownInterval = 0; + bool hasKnownInterval = false; for (int idx = 0; idx < AJ.Nbonds(); idx++) { int atnum = priority[idx]; if (atnum != ak && atomPositionKnown[atnum] && @@ -223,8 +225,14 @@ const if (debug_ > 0) mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known + if (idx > 0 && isKnown[idx-1] && isKnown[idx]) { + knownInterval = wrap360(knownPhi[idx] - knownPhi[idx-1]); + hasKnownInterval = true; + } } } + if (hasKnownInterval) + mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); // If we have to assign an initial phi, make trans the longer branch if (knownIdx == -1) { @@ -268,8 +276,24 @@ const // The interval will be 360 / (number of bonds - 1) double interval = Constants::TWOPI / (AJ.Nbonds() - 1); + if (hasKnownInterval) { + if (chirality == IS_UNKNOWN_CHIRALITY) { + mprintf("DEBUG: Setting chirality from known interval.\n"); + if (knownInterval < 0) + chirality = IS_S; + else + chirality = IS_R; + } else if (chirality == IS_S) { + if (knownInterval > 0) + mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); + } else if (chirality == IS_R) { + if (knownInterval < 0) + mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); + } + } if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) interval = -interval; + if (debug_ > 0) { mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); From 607978361fe54a40366682eb05ae95c188f70513 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 21 Jan 2024 15:19:58 -0500 Subject: [PATCH 0366/1492] Add some debug code --- src/Action_CheckChirality.cpp | 9 +++++++++ src/Action_CheckChirality.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/Action_CheckChirality.cpp b/src/Action_CheckChirality.cpp index b877d305b0..10ce49e645 100644 --- a/src/Action_CheckChirality.cpp +++ b/src/Action_CheckChirality.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "TorsionRoutines.h" #include "DataSet_Mesh.h" +//#inc lude "Structure/Chirality.h" // DEBUG void Action_CheckChirality::Help() const { mprintf("\t[] [] [out ]\n" @@ -48,6 +49,7 @@ Action::RetType Action_CheckChirality::Init(ArgList& actionArgs, ActionInit& ini // Action_CheckChirality::Setup() /** Set angle up for this parmtop. Get masks etc. */ Action::RetType Action_CheckChirality::Setup(ActionSetup& setup) { +// top_ = setup.TopAddress(); // DEBUG if (setup.Top().SetupCharMask(Mask1_)) return Action::ERR; if (Mask1_.None()) { mprinterr("Warning: Mask '%s' selects no atoms.\n", Mask1_.MaskString()); @@ -139,6 +141,13 @@ Action::RetType Action_CheckChirality::DoAction(int frameNum, ActionFrame& frm) ri->N_L_++; else ri->N_D_++; +// DEBUG +// int at = ri->ca_ / 3; +// Cpptraj::Structure::ChiralType chirality = Cpptraj::Structure::IS_UNKNOWN_CHIRALITY; +// if (top_->Atoms()[at].Nbonds() > 2) +// chirality = Cpptraj::Structure::DetermineChirality(at, *top_, frm.Frm(), 0); +// mprintf("Chirality around %s is %s\n", top_->AtomMaskName(at).c_str(), Cpptraj::Structure::chiralStr(chirality)); +// DEBUG } return Action::OK; diff --git a/src/Action_CheckChirality.h b/src/Action_CheckChirality.h index b145703501..861f3801d3 100644 --- a/src/Action_CheckChirality.h +++ b/src/Action_CheckChirality.h @@ -36,5 +36,6 @@ class Action_CheckChirality: public Action { DataSet* data_D_; ///< Hold number of times each residue was D std::string setname_; ///< Data set name ActionInit Init_; ///< Master DSL/DFL +// Topology* top_; // DEBUG }; #endif From e804e8dad3488b55a407f24848cba612090e7026 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 09:40:14 -0500 Subject: [PATCH 0367/1492] Update test save with new modeled coords --- test/Test_Sequence/Mol.mol2.save | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Test_Sequence/Mol.mol2.save b/test/Test_Sequence/Mol.mol2.save index d15e8643b6..482c8198c5 100644 --- a/test/Test_Sequence/Mol.mol2.save +++ b/test/Test_Sequence/Mol.mol2.save @@ -6,10 +6,10 @@ USER_CHARGES @ATOM - 1 C1 -1.8623 -1.2984 -0.5952 CT 1 MOC 1.387300 - 2 H2 -2.2353 -2.1775 -1.1026 H1 1 MOC -0.288000 - 3 H3 -2.2811 -0.4130 -1.0709 H1 1 MOC -0.288000 - 4 H4 -2.1956 -1.3220 0.4412 H1 1 MOC -0.288000 + 1 C1 -1.9010 -1.2979 -0.5927 CT 1 MOC 1.387300 + 2 H2 -2.3121 -2.1475 -1.1378 H1 1 MOC -0.288000 + 3 H3 -2.2811 -0.3718 -1.0240 H1 1 MOC -0.288000 + 4 H4 -2.1989 -1.3598 0.4539 H1 1 MOC -0.288000 5 O5 -0.4741 -1.3169 -0.6848 OS 1 MOC -0.523200 6 N 0.0540 -0.2256 0.0153 N 2 CNALA -0.570310 7 H -0.4149 0.5139 0.5357 H 2 CNALA 0.364710 From 272edf0344437dda6e39ac2ea8553f650dbd7311 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 10:29:55 -0500 Subject: [PATCH 0368/1492] Start refactoring chiral routines. --- src/Structure/BuildAtom.h | 35 ++++++++++++++++-------- src/Structure/Builder.cpp | 12 ++++----- src/Structure/Chirality.cpp | 53 ++++++++++++++++++++++++++----------- src/Structure/Chirality.h | 12 +++++---- 4 files changed, 74 insertions(+), 38 deletions(-) diff --git a/src/Structure/BuildAtom.h b/src/Structure/BuildAtom.h index 1515d2ce9f..b576290058 100644 --- a/src/Structure/BuildAtom.h +++ b/src/Structure/BuildAtom.h @@ -1,28 +1,41 @@ #ifndef INC_STRUCTURE_BUILDATOM_H #define INC_STRUCTURE_BUILDATOM_H #include "StructureEnum.h" +#include namespace Cpptraj { namespace Structure { -/// Hold information for an atom used when building/modelling new coordinates. +/// Hold chirality/orientation information for an atom. Used when building/modelling new coordinates. class BuildAtom { public: - BuildAtom() : ctype_(IS_UNKNOWN_CHIRALITY) {} + /// Blank constructor + BuildAtom() : tors_(0), ctype_(IS_UNKNOWN_CHIRALITY), orientation_(IS_UNKNOWN_CHIRALITY) {} + /// CONSTRUCTOR - Take only chiral type. Usually used to indicate an error + BuildAtom(ChiralType e) : tors_(0), ctype_(e), orientation_(e) {} + /// CONSTRUCTOR - torsion, chirality, orientation, priority array + BuildAtom(double t, ChiralType c, ChiralType o, std::vector const& p) : + tors_(t), ctype_(c), orientation_(o), priority_(p) {} + /// Update the priority array + void SetPriority(std::vector const& p) { priority_ = p; } /// Set chirality - void SetChirality(ChiralType c) { ctype_ = c; } - /// Set size of priority array based on number of bonds - //void SetNbonds(int n) { priority_.assign(n, -1); } - /// \return Pointer to priority array - //int* PriorityPtr() { return &(priority_[0]); } + //void SetChirality(ChiralType c) { ctype_ = c; } /// Used to modify the priority array - std::vector& ModifyPriority() { return priority_; } + //std::vector& ModifyPriority() { return priority_; } /// \return Atom chirality - ChiralType Chirality() const { return ctype_; } + ChiralType Chirality() const { return ctype_; } + /// \return Orientation around atom + ChiralType Orientation() const { return orientation_; } /// \return Priority array std::vector const& Priority() const { return priority_; } + /// \return Value of the orientation torsion around atom (in radians). + double TorsionVal() const { return tors_; } + /// \return True if an error occurred determining chirality + bool ChiralError() const { return (ctype_ == CHIRALITY_ERR) || priority_.empty(); } private: - ChiralType ctype_; ///< Chirality around atom - std::vector priority_; ///< Indices of bonded atoms, sorted by priority + double tors_; ///< Torsion around the atom in radians (via priority, 1-2-3-0, where 0 is this atom). + ChiralType ctype_; ///< Chirality around atom. + ChiralType orientation_; ///< Orientation when chirality cannot be determined. + std::vector priority_; ///< Indices of bonded atoms, sorted by priority. }; } } diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 3f65896a84..c4cb4305af 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -71,12 +71,12 @@ const // Get the chirality around each atom before the bond is added. BuildAtom AtomA; if (combinedTop[atA].Nbonds() > 2) - AtomA.SetChirality( DetermineChirality(atA, combinedTop, CombinedFrame, chiralityDebug) ); + AtomA = DetermineChirality(atA, combinedTop, CombinedFrame, chiralityDebug); if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", combinedTop.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); BuildAtom AtomB; if (combinedTop[atB].Nbonds() > 2) - AtomB.SetChirality( DetermineChirality(atB, combinedTop, CombinedFrame, chiralityDebug) ); + AtomB = DetermineChirality(atB, combinedTop, CombinedFrame, chiralityDebug); if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", combinedTop.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); @@ -87,7 +87,7 @@ const // // Regenerate the molecule info FIXME should Topology just do this? if (combinedTop.DetermineMolecules()) return 1; - // Determine priorities + // Determine new priorities around atoms that were just bonded if (combinedTop[atA].Nbonds() > 2) { //AtomA.SetNbonds(combinedTop[atA].Nbonds()); SetPriority(AtomA.ModifyPriority(), atA, combinedTop, CombinedFrame, chiralityDebug); @@ -169,15 +169,13 @@ int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bo // Determine priorities BuildAtom AtomA; if (topIn[atA].Nbonds() > 2) { - AtomA.SetChirality( DetermineChirality(atA, topIn, frameIn, chiralityDebug) ); - SetPriority(AtomA.ModifyPriority(), atA, topIn, frameIn, chiralityDebug); + AtomA = DetermineChirality(atA, topIn, frameIn, chiralityDebug); } if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); BuildAtom AtomB; if (topIn[atB].Nbonds() > 2) { - AtomB.SetChirality( DetermineChirality(atB, topIn, frameIn, chiralityDebug) ); - SetPriority(AtomB.ModifyPriority(), atB, topIn, frameIn, chiralityDebug); + AtomB = DetermineChirality(atB, topIn, frameIn, chiralityDebug); } if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); diff --git a/src/Structure/Chirality.cpp b/src/Structure/Chirality.cpp index c7da6d0b62..10ea534a79 100644 --- a/src/Structure/Chirality.cpp +++ b/src/Structure/Chirality.cpp @@ -1,4 +1,5 @@ #include "Chirality.h" +#include "BuildAtom.h" #include "../Constants.h" #include "../CpptrajStdio.h" #include "../Frame.h" @@ -76,24 +77,24 @@ class priority_element { * 1-2-3-0 * where 0 is the chiral center. Negative is S, positive is R. */ -Cpptraj::Structure::ChiralType - Cpptraj::Structure::DetermineChirality(double& tors, int* AtomIndices, +Cpptraj::Structure::BuildAtom + Cpptraj::Structure::DetermineChirality(//double& tors, int* AtomIndices, int atnum, Topology const& topIn, Frame const& frameIn, int debugIn) { - tors = 0.0; Atom const& atom = topIn[atnum]; if (atom.Nbonds() < 3) { mprinterr("Error: CalcChiralAtomTorsion called for atom %s with less than 3 bonds.\n", topIn.AtomMaskName(atnum).c_str()); - return CHIRALITY_ERR; + return BuildAtom(CHIRALITY_ERR); } // Calculate a priority score for each bonded atom. // First just use the atomic number. if (debugIn > 0) mprintf("DEBUG: Determining priorities around atom %s\n", topIn.AtomMaskName(atnum).c_str()); std::vector priority; + priority.reserve( atom.Nbonds() ); for (int idx = 0; idx != atom.Nbonds(); idx++) { priority.push_back( priority_element(atom.Bond(idx), topIn[atom.Bond(idx)].AtomicNumber()) ); if (debugIn > 0) @@ -144,18 +145,20 @@ Cpptraj::Structure::ChiralType mprintf("\n"); } - if (AtomIndices != 0) { + std::vector AtomIndices( atom.Nbonds() ); + //if (AtomIndices != 0) { for (unsigned int ip = 0; ip != priority.size(); ++ip) AtomIndices[ip] = priority[ip].AtNum(); - } - if (depth_limit_hit) return IS_UNKNOWN_CHIRALITY; + //} + //if (depth_limit_hit) return IS_UNKNOWN_CHIRALITY; - tors = Torsion( frameIn.XYZ(priority[0].AtNum()), - frameIn.XYZ(priority[1].AtNum()), - frameIn.XYZ(priority[2].AtNum()), - frameIn.XYZ(atnum) ); + double tors = Torsion( frameIn.XYZ(priority[0].AtNum()), + frameIn.XYZ(priority[1].AtNum()), + frameIn.XYZ(priority[2].AtNum()), + frameIn.XYZ(atnum) ); if (debugIn > 0) mprintf("DEBUG: Torsion around '%s' is %f", topIn.AtomMaskName(atnum).c_str(), tors*Constants::RADDEG); + ChiralType ret; if (tors < 0) { ret = IS_S; @@ -164,21 +167,29 @@ Cpptraj::Structure::ChiralType ret = IS_R; if (debugIn > 0) mprintf(" (R)\n"); } - return ret; + BuildAtom out; + if (depth_limit_hit) { + // No real chirality; just store orientation. + out = BuildAtom(tors, IS_UNKNOWN_CHIRALITY, ret, AtomIndices); + } else { + // Chirality determined. + out = BuildAtom(tors, ret, ret, AtomIndices); + } + return out; } /** Determine chirality around specified atom. */ -Cpptraj::Structure::ChiralType +/*Cpptraj::Structure::ChiralType Cpptraj::Structure::DetermineChirality(int atnum, Topology const& topIn, Frame const& frameIn, int debugIn) { double tors; return DetermineChirality(tors, 0, atnum, topIn, frameIn, debugIn); -} +}*/ /** Set priority around a specified atom. */ -Cpptraj::Structure::ChiralType +/*Cpptraj::Structure::ChiralType Cpptraj::Structure::SetPriority(std::vector& priority, int atnum, Topology const& topIn, Frame const& frameIn, int debugIn) @@ -186,4 +197,16 @@ Cpptraj::Structure::ChiralType priority.resize( topIn[atnum].Nbonds() ); double tors; return DetermineChirality(tors, &priority[0], atnum, topIn, frameIn, debugIn); +}*/ + +/** Only set the priority around a specified atom. */ +int Cpptraj::Structure::UpdatePriority(BuildAtom& atomIn, int atnum, Topology const& topIn, Frame const& frameIn, int debugIn) +{ + BuildAtom tmpAtom = DetermineChirality(atnum, topIn, frameIn, debugIn); + if (tmpAtom.ChiralError()) { + mprinterr("Error: Could not update priority for atom %s\n", topIn.AtomMaskName(atnum).c_str()); + return 1; + } + atomIn.SetPriority( tmpAtom.Priority() ); + return 0; } diff --git a/src/Structure/Chirality.h b/src/Structure/Chirality.h index e895352409..2fafd960f5 100644 --- a/src/Structure/Chirality.h +++ b/src/Structure/Chirality.h @@ -1,18 +1,20 @@ #ifndef INC_STRUCTURE_CHIRALITY_H #define INC_STRUCTURE_CHIRALITY_H -#include #include "StructureEnum.h" class Topology; class Frame; namespace Cpptraj { namespace Structure { - +class BuildAtom; /// \return Chirality at specified atom, set torsion value -ChiralType DetermineChirality(double&, int*, int, Topology const&, Frame const&, int); +BuildAtom DetermineChirality(int, Topology const&, Frame const&, int); +//ChiralType DetermineChirality(double&, int*, int, Topology const&, Frame const&, int); /// \return Chirality at specified atom -ChiralType DetermineChirality(int, Topology const&, Frame const&, int); +//ChiralType DetermineChirality(int, Topology const&, Frame const&, int); /// \return Chirality at specified atom, set priority -ChiralType SetPriority(std::vector&, int, Topology const&, Frame const&, int); +//ChiralType SetPriority(std::vector&, int, Topology const&, Frame const&, int); +/// Only update priority around atom. Useful when orientation around atom is not known/correct. +int UpdatePriority(BuildAtom&, int, Topology const&, Frame const&, int); } } #endif From ef2ffdba9a8f708588c6bc56e3bf8d66844e8eab Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 10:55:54 -0500 Subject: [PATCH 0369/1492] Move chirality routines into BuildAtom --- src/Structure/BuildAtom.cpp | 193 ++++++++++++++++++++++++++++++++++ src/Structure/BuildAtom.h | 19 ++-- src/Structure/CMakeLists.txt | 1 + src/Structure/structuredepend | 3 +- src/Structure/structurefiles | 1 + 5 files changed, 209 insertions(+), 8 deletions(-) create mode 100644 src/Structure/BuildAtom.cpp diff --git a/src/Structure/BuildAtom.cpp b/src/Structure/BuildAtom.cpp new file mode 100644 index 0000000000..2bfb86527e --- /dev/null +++ b/src/Structure/BuildAtom.cpp @@ -0,0 +1,193 @@ +#include "BuildAtom.h" +#include "../Constants.h" +#include "../CpptrajStdio.h" +#include "../Frame.h" +#include "../Topology.h" +#include "../TorsionRoutines.h" +#include // std::sort + +/// \return Total priority (i.e. sum of atomic numbers) of atoms bonded to given atom. +int Cpptraj::Structure::BuildAtom::totalPriority(Topology const& topIn, int atnum, int rnum, + int depth, int tgtdepth, std::vector& Visited) +{ + if (Visited[atnum] || depth == tgtdepth) return 0; + Visited[atnum] = true; + if (topIn[atnum].ResNum() != rnum) { + if (depth == 0) + // Atom in another residue bonded to chiral atom (e.g. O to C1) + return topIn[atnum].AtomicNumber(); + else + // Atom in another residue bonded to atom bonded to chiral atom + return 0; + } + int sum = 0; + Atom const& atom = topIn[atnum]; + for (Atom::bond_iterator bat = atom.bondbegin(); bat != atom.bondend(); ++bat) + sum += topIn[*bat].AtomicNumber() + totalPriority(topIn, *bat, rnum, depth+1, tgtdepth, Visited); + return sum; +} + +/// Used to determine priority of moieties bonded to an atom +class priority_element { + public: + /// CONSTRUCT from atom number and initial priority + priority_element(int a, int p1) : atnum_(a), priority1_(p1), priority2_(-1) {} + /// Set priority 2 + void SetPriority2(int p2) { priority2_ = p2; } + /// \return Atom number + int AtNum() const { return atnum_; } + /// \return Priority 1 + int Priority1() const { return priority1_; } + /// \return Priority 2 + int Priority2() const { return priority2_; } + /// Sort on priority 1, then priority 2 + bool operator<(const priority_element& rhs) const { + if (*this != rhs) { + if (priority1_ == rhs.priority1_) { + return (priority2_ > rhs.priority2_); + } else { + return (priority1_ > rhs.priority1_); + } + } else + return false; + } + /// \return true if priorities are identical + bool operator==(const priority_element& rhs) const { + return (priority1_ == rhs.priority1_) && (priority2_ == rhs.priority2_); + } + /// \return true if priorities are not equal + bool operator!=(const priority_element& rhs) const { + if (priority2_ != rhs.priority2_ || + priority1_ != rhs.priority1_) return true; + return false; + } + private: + int atnum_; + int priority1_; + int priority2_; +}; + +/** Given an atom that is a chiral center, attempt to calculate a + * torsion that will help determine R vs S. Priorities will be + * assigned to bonded atoms as 1, 2, 3, and optionally 4. The + * torsion will then be calculated as + * 1-2-3-0 + * where 0 is the chiral center. Negative is S, positive is R. + */ +int Cpptraj::Structure::BuildAtom::determineChirality(int atnum, Topology const& topIn, + Frame const& frameIn, int debugIn, + bool set_priority_only) +{ + priority_.clear(); + Atom const& atom = topIn[atnum]; + if (atom.Nbonds() < 3) { + mprinterr("Error: CalcChiralAtomTorsion called for atom %s with less than 3 bonds.\n", + topIn.AtomMaskName(atnum).c_str()); + ctype_ = CHIRALITY_ERR; + orientation_ = CHIRALITY_ERR; + return 1; + } +// ctype_ = IS_UNKNOWN_CHIRALITY; +// orientation_ = IS_UNKNOWN_CHIRALITY; +// tors_ = 0; + // Calculate a priority score for each bonded atom. + // First just use the atomic number. + if (debugIn > 0) + mprintf("DEBUG: Determining priorities around atom %s\n", topIn.AtomMaskName(atnum).c_str()); + std::vector atomPriorities; + atomPriorities.reserve( atom.Nbonds() ); + for (int idx = 0; idx != atom.Nbonds(); idx++) { + atomPriorities.push_back( priority_element(atom.Bond(idx), topIn[atom.Bond(idx)].AtomicNumber()) ); + if (debugIn > 0) + mprintf("DEBUG:\t\t%i Priority for %s is %i\n", idx, topIn.AtomMaskName(atom.Bond(idx)).c_str(), atomPriorities.back().Priority1()); + } + // For any identical priorities, need to check who they are bonded to. + bool depth_limit_hit = false; + for (int idx1 = 0; idx1 != atom.Nbonds(); idx1++) { + for (int idx2 = idx1+1; idx2 != atom.Nbonds(); idx2++) { + if (atomPriorities[idx1] == atomPriorities[idx2]) { + bool identical_priorities = true; + int depth = 1; + while (identical_priorities) { + if (debugIn > 0) + mprintf("DEBUG: Priority of index %i == %i, depth %i\n", idx1, idx2, depth); + std::vector Visited(topIn.Natom(), false); + Visited[atnum] = true; + atomPriorities[idx1].SetPriority2(totalPriority(topIn, atom.Bond(idx1), atom.ResNum(), 0, depth, Visited)); + if (debugIn > 0) + mprintf("DEBUG:\tPriority2 of %i is %i\n", idx1, atomPriorities[idx1].Priority2()); + + Visited.assign(topIn.Natom(), false); + Visited[atnum] = true; + atomPriorities[idx2].SetPriority2(totalPriority(topIn, atom.Bond(idx2), atom.ResNum(), 0, depth, Visited)); + if (debugIn > 0) + mprintf("DEBUG:\tPriority2 of %i is %i\n", idx2, atomPriorities[idx2].Priority2()); + if (atomPriorities[idx1] != atomPriorities[idx2]) { + identical_priorities = false; + break; + } + if (depth == 10) { + mprintf("Warning: Could not determine priority around '%s'\n", + topIn.AtomMaskName(atnum).c_str()); + depth_limit_hit = true; + break; + } + depth++; + } // END while identical priorities + } + } + } + std::sort(atomPriorities.begin(), atomPriorities.end()); + if (debugIn > 0) { + mprintf("DEBUG: Sorted by priority:"); + for (std::vector::const_iterator it = atomPriorities.begin(); + it != atomPriorities.end(); ++it) + mprintf(" %s", topIn.AtomMaskName(it->AtNum()).c_str()); + mprintf("\n"); + } + + priority_ = std::vector( atom.Nbonds() ); + for (unsigned int ip = 0; ip != atomPriorities.size(); ++ip) + priority_[ip] = atomPriorities[ip].AtNum(); + + if (set_priority_only) return 0; + + tors_ = Torsion( frameIn.XYZ(atomPriorities[0].AtNum()), + frameIn.XYZ(atomPriorities[1].AtNum()), + frameIn.XYZ(atomPriorities[2].AtNum()), + frameIn.XYZ(atnum) ); + if (debugIn > 0) + mprintf("DEBUG: Torsion around '%s' is %f", topIn.AtomMaskName(atnum).c_str(), tors_*Constants::RADDEG); + + ChiralType ret; + if (tors_ < 0) { + ret = IS_S; + if (debugIn > 0) mprintf(" (S)\n"); + } else { + ret = IS_R; + if (debugIn > 0) mprintf(" (R)\n"); + } + if (depth_limit_hit) { + // No real chirality; just store orientation. + orientation_ = ret; + } else { + // Chirality determined. + ctype_ = ret; + orientation_ = ret; + } + return 0; +} + +/** Determine chirality and priority around an atom. */ +int Cpptraj::Structure::BuildAtom::DetermineChirality(int atnum, Topology const& topIn, + Frame const& frameIn, int debugIn) +{ + return determineChirality(atnum, topIn, frameIn, debugIn, false); +} + +/** Determine only priority around an atom. */ +int Cpptraj::Structure::BuildAtom::SetPriority(int atnum, Topology const& topIn, + Frame const& frameIn, int debugIn) +{ + return determineChirality(atnum, topIn, frameIn, debugIn, true); +} diff --git a/src/Structure/BuildAtom.h b/src/Structure/BuildAtom.h index b576290058..891c578fac 100644 --- a/src/Structure/BuildAtom.h +++ b/src/Structure/BuildAtom.h @@ -2,6 +2,8 @@ #define INC_STRUCTURE_BUILDATOM_H #include "StructureEnum.h" #include +class Topology; +class Frame; namespace Cpptraj { namespace Structure { /// Hold chirality/orientation information for an atom. Used when building/modelling new coordinates. @@ -14,12 +16,10 @@ class BuildAtom { /// CONSTRUCTOR - torsion, chirality, orientation, priority array BuildAtom(double t, ChiralType c, ChiralType o, std::vector const& p) : tors_(t), ctype_(c), orientation_(o), priority_(p) {} - /// Update the priority array - void SetPriority(std::vector const& p) { priority_ = p; } - /// Set chirality - //void SetChirality(ChiralType c) { ctype_ = c; } - /// Used to modify the priority array - //std::vector& ModifyPriority() { return priority_; } + /// Set chirality, orientation, and priority around specified atom + int DetermineChirality(int, Topology const&, Frame const&, int); + /// Only set the priority around specified atom + int SetPriority(int, Topology const&, Frame const&, int); /// \return Atom chirality ChiralType Chirality() const { return ctype_; } @@ -30,8 +30,13 @@ class BuildAtom { /// \return Value of the orientation torsion around atom (in radians). double TorsionVal() const { return tors_; } /// \return True if an error occurred determining chirality - bool ChiralError() const { return (ctype_ == CHIRALITY_ERR) || priority_.empty(); } + bool ChiralError() const { return (ctype_ == CHIRALITY_ERR);} private: + /// Total priority (i.e. sum of atomic numbers) of atoms bonded to given atom. + static int totalPriority(Topology const&, int, int, int, int, std::vector&); + /// Determine priority and optionally chirality as well + int determineChirality(int, Topology const&, Frame const&, int, bool); + double tors_; ///< Torsion around the atom in radians (via priority, 1-2-3-0, where 0 is this atom). ChiralType ctype_; ///< Chirality around atom. ChiralType orientation_; ///< Orientation when chirality cannot be determined. diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index f6ec6cc9f6..5f8b3a9644 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -1,5 +1,6 @@ #CMake buildfile for CPPTRAJ Structure subdirectory. target_sources(cpptraj_common_obj PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/BuildAtom.cpp ${CMAKE_CURRENT_LIST_DIR}/Builder.cpp ${CMAKE_CURRENT_LIST_DIR}/Chirality.cpp ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index ed0a465379..3aaad0dfd4 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,5 +1,6 @@ +BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h Chirality.h InternalCoords.h StructureEnum.h Zmatrix.h -Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Chirality.h StructureEnum.h +Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Chirality.h StructureEnum.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index d5c54bfca2..39f1222bf8 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -1,5 +1,6 @@ # Files for Structure subdirectory. STRUCTURE_SOURCES= \ + BuildAtom.cpp \ Builder.cpp \ Chirality.cpp \ Disulfide.cpp \ From ecfa5cf4b77db7dbd36d3b7f5b8400cbeedf03df Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 10:59:49 -0500 Subject: [PATCH 0370/1492] Get rid of CHIRALITY_ERR since DetermineChirality/SetPriority return an int now --- src/Structure/BuildAtom.cpp | 2 -- src/Structure/BuildAtom.h | 2 -- src/Structure/StructureEnum.cpp | 1 - src/Structure/StructureEnum.h | 2 +- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Structure/BuildAtom.cpp b/src/Structure/BuildAtom.cpp index 2bfb86527e..b53b7b58b4 100644 --- a/src/Structure/BuildAtom.cpp +++ b/src/Structure/BuildAtom.cpp @@ -83,8 +83,6 @@ int Cpptraj::Structure::BuildAtom::determineChirality(int atnum, Topology const& if (atom.Nbonds() < 3) { mprinterr("Error: CalcChiralAtomTorsion called for atom %s with less than 3 bonds.\n", topIn.AtomMaskName(atnum).c_str()); - ctype_ = CHIRALITY_ERR; - orientation_ = CHIRALITY_ERR; return 1; } // ctype_ = IS_UNKNOWN_CHIRALITY; diff --git a/src/Structure/BuildAtom.h b/src/Structure/BuildAtom.h index 891c578fac..ae9583ce7a 100644 --- a/src/Structure/BuildAtom.h +++ b/src/Structure/BuildAtom.h @@ -29,8 +29,6 @@ class BuildAtom { std::vector const& Priority() const { return priority_; } /// \return Value of the orientation torsion around atom (in radians). double TorsionVal() const { return tors_; } - /// \return True if an error occurred determining chirality - bool ChiralError() const { return (ctype_ == CHIRALITY_ERR);} private: /// Total priority (i.e. sum of atomic numbers) of atoms bonded to given atom. static int totalPriority(Topology const&, int, int, int, int, std::vector&); diff --git a/src/Structure/StructureEnum.cpp b/src/Structure/StructureEnum.cpp index 17e4711c7e..b158ff2838 100644 --- a/src/Structure/StructureEnum.cpp +++ b/src/Structure/StructureEnum.cpp @@ -3,7 +3,6 @@ /** \return string corresponding to ChiralType */ const char* Cpptraj::Structure::chiralStr(ChiralType ct) { switch (ct) { - case CHIRALITY_ERR : return "Error"; case IS_S : return "S"; case IS_R : return "R"; case IS_UNKNOWN_CHIRALITY : return "Unknown"; diff --git a/src/Structure/StructureEnum.h b/src/Structure/StructureEnum.h index 3014a56b0b..9063a4ed91 100644 --- a/src/Structure/StructureEnum.h +++ b/src/Structure/StructureEnum.h @@ -3,7 +3,7 @@ namespace Cpptraj { namespace Structure { -enum ChiralType { CHIRALITY_ERR = 0, IS_S, IS_R, IS_UNKNOWN_CHIRALITY }; +enum ChiralType { IS_S = 0, IS_R, IS_UNKNOWN_CHIRALITY }; /// \return String corresponding to ChiralType const char* chiralStr(ChiralType); From 3c9e813fbceb84c63be64370ddb81f3a8bdc9f3f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:00:55 -0500 Subject: [PATCH 0371/1492] Remove Chirality routines which have been moved into BuildAtom --- src/Structure/CMakeLists.txt | 1 - src/Structure/Chirality.cpp | 212 ---------------------------------- src/Structure/Chirality.h | 20 ---- src/Structure/structuredepend | 3 +- src/Structure/structurefiles | 1 - 5 files changed, 1 insertion(+), 236 deletions(-) delete mode 100644 src/Structure/Chirality.cpp delete mode 100644 src/Structure/Chirality.h diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index 5f8b3a9644..ffdd80270f 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -2,7 +2,6 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/BuildAtom.cpp ${CMAKE_CURRENT_LIST_DIR}/Builder.cpp - ${CMAKE_CURRENT_LIST_DIR}/Chirality.cpp ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp diff --git a/src/Structure/Chirality.cpp b/src/Structure/Chirality.cpp deleted file mode 100644 index 10ea534a79..0000000000 --- a/src/Structure/Chirality.cpp +++ /dev/null @@ -1,212 +0,0 @@ -#include "Chirality.h" -#include "BuildAtom.h" -#include "../Constants.h" -#include "../CpptrajStdio.h" -#include "../Frame.h" -#include "../Topology.h" -#include "../TorsionRoutines.h" -#include -#include // sort - -/// \return Total priority (i.e. sum of atomic numbers) of atoms bonded to given atom. -static int totalPriority(Topology const& topIn, int atnum, int rnum, - int depth, int tgtdepth, std::vector& Visited) -{ - if (Visited[atnum] || depth == tgtdepth) return 0; - Visited[atnum] = true; - if (topIn[atnum].ResNum() != rnum) { - if (depth == 0) - // Atom in another residue bonded to chiral atom (e.g. O to C1) - return topIn[atnum].AtomicNumber(); - else - // Atom in another residue bonded to atom bonded to chiral atom - return 0; - } - int sum = 0; - Atom const& atom = topIn[atnum]; - for (Atom::bond_iterator bat = atom.bondbegin(); bat != atom.bondend(); ++bat) - sum += topIn[*bat].AtomicNumber() + totalPriority(topIn, *bat, rnum, depth+1, tgtdepth, Visited); - return sum; -} - -/// Used to determine priority of moieties bonded to an atom -class priority_element { - public: - /// CONSTRUCT from atom number and initial priority - priority_element(int a, int p1) : atnum_(a), priority1_(p1), priority2_(-1) {} - /// Set priority 2 - void SetPriority2(int p2) { priority2_ = p2; } - /// \return Atom number - int AtNum() const { return atnum_; } - /// \return Priority 1 - int Priority1() const { return priority1_; } - /// \return Priority 2 - int Priority2() const { return priority2_; } - /// Sort on priority 1, then priority 2 - bool operator<(const priority_element& rhs) const { - if (*this != rhs) { - if (priority1_ == rhs.priority1_) { - return (priority2_ > rhs.priority2_); - } else { - return (priority1_ > rhs.priority1_); - } - } else - return false; - } - /// \return true if priorities are identical - bool operator==(const priority_element& rhs) const { - return (priority1_ == rhs.priority1_) && (priority2_ == rhs.priority2_); - } - /// \return true if priorities are not equal - bool operator!=(const priority_element& rhs) const { - if (priority2_ != rhs.priority2_ || - priority1_ != rhs.priority1_) return true; - return false; - } - private: - int atnum_; - int priority1_; - int priority2_; -}; - - -/** Given an atom that is a chiral center, attempt to calculate a - * torsion that will help determine R vs S. Priorities will be - * assigned to bonded atoms as 1, 2, 3, and optionally 4. The - * torsion will then be calculated as - * 1-2-3-0 - * where 0 is the chiral center. Negative is S, positive is R. - */ -Cpptraj::Structure::BuildAtom - Cpptraj::Structure::DetermineChirality(//double& tors, int* AtomIndices, - int atnum, - Topology const& topIn, - Frame const& frameIn, int debugIn) -{ - Atom const& atom = topIn[atnum]; - if (atom.Nbonds() < 3) { - mprinterr("Error: CalcChiralAtomTorsion called for atom %s with less than 3 bonds.\n", - topIn.AtomMaskName(atnum).c_str()); - return BuildAtom(CHIRALITY_ERR); - } - // Calculate a priority score for each bonded atom. - // First just use the atomic number. - if (debugIn > 0) - mprintf("DEBUG: Determining priorities around atom %s\n", topIn.AtomMaskName(atnum).c_str()); - std::vector priority; - priority.reserve( atom.Nbonds() ); - for (int idx = 0; idx != atom.Nbonds(); idx++) { - priority.push_back( priority_element(atom.Bond(idx), topIn[atom.Bond(idx)].AtomicNumber()) ); - if (debugIn > 0) - mprintf("DEBUG:\t\t%i Priority for %s is %i\n", idx, topIn.AtomMaskName(atom.Bond(idx)).c_str(), priority.back().Priority1()); - } - // For any identical priorities, need to check who they are bonded to. - bool depth_limit_hit = false; - for (int idx1 = 0; idx1 != atom.Nbonds(); idx1++) { - for (int idx2 = idx1+1; idx2 != atom.Nbonds(); idx2++) { - if (priority[idx1] == priority[idx2]) { - bool identical_priorities = true; - int depth = 1; - while (identical_priorities) { - if (debugIn > 0) - mprintf("DEBUG: Priority of index %i == %i, depth %i\n", idx1, idx2, depth); - std::vector Visited(topIn.Natom(), false); - Visited[atnum] = true; - priority[idx1].SetPriority2(totalPriority(topIn, atom.Bond(idx1), atom.ResNum(), 0, depth, Visited)); - if (debugIn > 0) - mprintf("DEBUG:\tPriority2 of %i is %i\n", idx1, priority[idx1].Priority2()); - - Visited.assign(topIn.Natom(), false); - Visited[atnum] = true; - priority[idx2].SetPriority2(totalPriority(topIn, atom.Bond(idx2), atom.ResNum(), 0, depth, Visited)); - if (debugIn > 0) - mprintf("DEBUG:\tPriority2 of %i is %i\n", idx2, priority[idx2].Priority2()); - if (priority[idx1] != priority[idx2]) { - identical_priorities = false; - break; - } - if (depth == 10) { - mprintf("Warning: Could not determine priority around '%s'\n", - topIn.AtomMaskName(atnum).c_str()); - depth_limit_hit = true; - break; - } - depth++; - } // END while identical priorities - } - } - } - std::sort(priority.begin(), priority.end()); - if (debugIn > 0) { - mprintf("DEBUG: Sorted by priority:"); - for (std::vector::const_iterator it = priority.begin(); - it != priority.end(); ++it) - mprintf(" %s", topIn.AtomMaskName(it->AtNum()).c_str()); - mprintf("\n"); - } - - std::vector AtomIndices( atom.Nbonds() ); - //if (AtomIndices != 0) { - for (unsigned int ip = 0; ip != priority.size(); ++ip) - AtomIndices[ip] = priority[ip].AtNum(); - //} - //if (depth_limit_hit) return IS_UNKNOWN_CHIRALITY; - - double tors = Torsion( frameIn.XYZ(priority[0].AtNum()), - frameIn.XYZ(priority[1].AtNum()), - frameIn.XYZ(priority[2].AtNum()), - frameIn.XYZ(atnum) ); - if (debugIn > 0) - mprintf("DEBUG: Torsion around '%s' is %f", topIn.AtomMaskName(atnum).c_str(), tors*Constants::RADDEG); - - ChiralType ret; - if (tors < 0) { - ret = IS_S; - if (debugIn > 0) mprintf(" (S)\n"); - } else { - ret = IS_R; - if (debugIn > 0) mprintf(" (R)\n"); - } - BuildAtom out; - if (depth_limit_hit) { - // No real chirality; just store orientation. - out = BuildAtom(tors, IS_UNKNOWN_CHIRALITY, ret, AtomIndices); - } else { - // Chirality determined. - out = BuildAtom(tors, ret, ret, AtomIndices); - } - return out; -} - -/** Determine chirality around specified atom. */ -/*Cpptraj::Structure::ChiralType - Cpptraj::Structure::DetermineChirality(int atnum, - Topology const& topIn, - Frame const& frameIn, int debugIn) -{ - double tors; - return DetermineChirality(tors, 0, atnum, topIn, frameIn, debugIn); -}*/ - -/** Set priority around a specified atom. */ -/*Cpptraj::Structure::ChiralType - Cpptraj::Structure::SetPriority(std::vector& priority, - int atnum, Topology const& topIn, - Frame const& frameIn, int debugIn) -{ - priority.resize( topIn[atnum].Nbonds() ); - double tors; - return DetermineChirality(tors, &priority[0], atnum, topIn, frameIn, debugIn); -}*/ - -/** Only set the priority around a specified atom. */ -int Cpptraj::Structure::UpdatePriority(BuildAtom& atomIn, int atnum, Topology const& topIn, Frame const& frameIn, int debugIn) -{ - BuildAtom tmpAtom = DetermineChirality(atnum, topIn, frameIn, debugIn); - if (tmpAtom.ChiralError()) { - mprinterr("Error: Could not update priority for atom %s\n", topIn.AtomMaskName(atnum).c_str()); - return 1; - } - atomIn.SetPriority( tmpAtom.Priority() ); - return 0; -} diff --git a/src/Structure/Chirality.h b/src/Structure/Chirality.h deleted file mode 100644 index 2fafd960f5..0000000000 --- a/src/Structure/Chirality.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef INC_STRUCTURE_CHIRALITY_H -#define INC_STRUCTURE_CHIRALITY_H -#include "StructureEnum.h" -class Topology; -class Frame; -namespace Cpptraj { -namespace Structure { -class BuildAtom; -/// \return Chirality at specified atom, set torsion value -BuildAtom DetermineChirality(int, Topology const&, Frame const&, int); -//ChiralType DetermineChirality(double&, int*, int, Topology const&, Frame const&, int); -/// \return Chirality at specified atom -//ChiralType DetermineChirality(int, Topology const&, Frame const&, int); -/// \return Chirality at specified atom, set priority -//ChiralType SetPriority(std::vector&, int, Topology const&, Frame const&, int); -/// Only update priority around atom. Useful when orientation around atom is not known/correct. -int UpdatePriority(BuildAtom&, int, Topology const&, Frame const&, int); -} -} -#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 3aaad0dfd4..cd95014981 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,6 +1,5 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h Chirality.h InternalCoords.h StructureEnum.h Zmatrix.h -Chirality.o : Chirality.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Chirality.h StructureEnum.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h @@ -11,7 +10,7 @@ Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h -SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Chirality.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h +SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Chirality.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 39f1222bf8..d609540255 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -2,7 +2,6 @@ STRUCTURE_SOURCES= \ BuildAtom.cpp \ Builder.cpp \ - Chirality.cpp \ Disulfide.cpp \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ From 9e97630c3853f64210040eafb83259ba672464c3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:04:53 -0500 Subject: [PATCH 0372/1492] Fix debug messages. Ensure unknown chirality is set. --- src/Structure/BuildAtom.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Structure/BuildAtom.cpp b/src/Structure/BuildAtom.cpp index b53b7b58b4..7f0295d570 100644 --- a/src/Structure/BuildAtom.cpp +++ b/src/Structure/BuildAtom.cpp @@ -158,20 +158,21 @@ int Cpptraj::Structure::BuildAtom::determineChirality(int atnum, Topology const& mprintf("DEBUG: Torsion around '%s' is %f", topIn.AtomMaskName(atnum).c_str(), tors_*Constants::RADDEG); ChiralType ret; - if (tors_ < 0) { + if (tors_ < 0) ret = IS_S; - if (debugIn > 0) mprintf(" (S)\n"); - } else { + else ret = IS_R; - if (debugIn > 0) mprintf(" (R)\n"); - } + if (depth_limit_hit) { // No real chirality; just store orientation. + ctype_ = IS_UNKNOWN_CHIRALITY; orientation_ = ret; + if (debugIn > 0) mprintf(", orientation is (%s)\n", chiralStr(ret)); } else { // Chirality determined. ctype_ = ret; orientation_ = ret; + if (debugIn > 0) mprintf(", chirality is (%s)\n", chiralStr(ret)); } return 0; } From 7914bd0a0d8b0abe15cc6ee523ef783a1e915092 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:07:43 -0500 Subject: [PATCH 0373/1492] Remove dependence on old Chirality --- src/Structure/Builder.cpp | 21 ++++++++++----------- src/Structure/structuredepend | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index c4cb4305af..cb52e25591 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1,6 +1,5 @@ #include "Builder.h" #include "BuildAtom.h" -#include "Chirality.h" #include "Zmatrix.h" #include "../CpptrajStdio.h" #include "../Frame.h" @@ -70,13 +69,15 @@ const chiralityDebug = debug_ - 1; // Get the chirality around each atom before the bond is added. BuildAtom AtomA; - if (combinedTop[atA].Nbonds() > 2) - AtomA = DetermineChirality(atA, combinedTop, CombinedFrame, chiralityDebug); + if (combinedTop[atA].Nbonds() > 2) { + if (AtomA.DetermineChirality(atA, combinedTop, CombinedFrame, chiralityDebug)) return 1; + } if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", combinedTop.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); BuildAtom AtomB; - if (combinedTop[atB].Nbonds() > 2) - AtomB = DetermineChirality(atB, combinedTop, CombinedFrame, chiralityDebug); + if (combinedTop[atB].Nbonds() > 2) { + if (AtomB.DetermineChirality(atB, combinedTop, CombinedFrame, chiralityDebug)) return 1; + } if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", combinedTop.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); @@ -89,12 +90,10 @@ const // Determine new priorities around atoms that were just bonded if (combinedTop[atA].Nbonds() > 2) { - //AtomA.SetNbonds(combinedTop[atA].Nbonds()); - SetPriority(AtomA.ModifyPriority(), atA, combinedTop, CombinedFrame, chiralityDebug); + if (AtomA.SetPriority(atA, combinedTop, CombinedFrame, chiralityDebug)) return 1; } if (combinedTop[atB].Nbonds() > 2) { - //AtomB.SetNbonds(combinedTop[atB].Nbonds()); - SetPriority(AtomB.ModifyPriority(), atB, combinedTop, CombinedFrame, chiralityDebug); + if (AtomB.SetPriority(atB, combinedTop, CombinedFrame, chiralityDebug)) return 1; } // Generate Zmatrix only for ICs involving bonded atoms @@ -169,13 +168,13 @@ int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bo // Determine priorities BuildAtom AtomA; if (topIn[atA].Nbonds() > 2) { - AtomA = DetermineChirality(atA, topIn, frameIn, chiralityDebug); + if (AtomA.DetermineChirality(atA, topIn, frameIn, chiralityDebug)) return 1; } if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); BuildAtom AtomB; if (topIn[atB].Nbonds() > 2) { - AtomB = DetermineChirality(atB, topIn, frameIn, chiralityDebug); + if (AtomB.DetermineChirality(atB, topIn, frameIn, chiralityDebug)) return 1; } if (debug_ > 0) mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index cd95014981..bf8442e82f 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,5 +1,5 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h -Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h Chirality.h InternalCoords.h StructureEnum.h Zmatrix.h +Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h InternalCoords.h StructureEnum.h Zmatrix.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h From b3798aaf5e0d83d346a9fa71bd168ac4b12c65ef Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:12:33 -0500 Subject: [PATCH 0374/1492] Remove dependence on old Chirality routines --- src/Structure/SugarBuilder.cpp | 14 +++++++++----- src/Structure/structuredepend | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Structure/SugarBuilder.cpp b/src/Structure/SugarBuilder.cpp index 1d805996cb..60378df809 100644 --- a/src/Structure/SugarBuilder.cpp +++ b/src/Structure/SugarBuilder.cpp @@ -1,5 +1,5 @@ #include "SugarBuilder.h" -#include "Chirality.h" +#include "BuildAtom.h" #include "FxnGroupBuilder.h" #include "ResStatArray.h" #include "StructureRoutines.h" @@ -1113,8 +1113,10 @@ const cdebug = 1; else cdebug = 0; - ChiralType ctypeR = DetermineChirality(sugar.HighestStereocenter(), topIn, frameIn, cdebug); - if (ctypeR == CHIRALITY_ERR || ctypeR == IS_UNKNOWN_CHIRALITY) { + BuildAtom atomR; + int cerr = atomR.DetermineChirality(sugar.HighestStereocenter(), topIn, frameIn, cdebug); + ChiralType ctypeR = atomR.Chirality(); + if (cerr != 0 || ctypeR == IS_UNKNOWN_CHIRALITY) { mprinterr("Error: Could not determine configuration for furanose.\n"); // TODO warn? return 1; } @@ -1123,8 +1125,10 @@ const else stoken.SetChirality(SugarToken::IS_L); - ChiralType ctypeA = DetermineChirality(sugar.AnomericAtom(), topIn, frameIn, cdebug); - if (ctypeA == CHIRALITY_ERR || ctypeA == IS_UNKNOWN_CHIRALITY) { + BuildAtom atomA; + cerr = atomA.DetermineChirality(sugar.AnomericAtom(), topIn, frameIn, cdebug); + ChiralType ctypeA = atomA.Chirality(); + if (cerr != 0 || ctypeA == IS_UNKNOWN_CHIRALITY) { mprinterr("Error: Could not determine chirality around anomeric atom for furanose.\n"); // TODO warn? return 1; } diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index bf8442e82f..a5b95b1fe3 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -10,7 +10,7 @@ Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h -SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Chirality.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h +SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h From ece6b12979b8e0aea7bb0e0ae153c62bf3ff3090 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:16:28 -0500 Subject: [PATCH 0375/1492] Remove dependence on old Chirality routines. Update dependencies --- src/Structure/Zmatrix.cpp | 4 +--- src/Structure/structuredepend | 2 +- src/cpptrajdepend | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index ddddcf2566..93e3638281 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -7,7 +7,6 @@ #include "BuildAtom.h" #include "Model.h" #include "GenerateConnectivityArrays.h" -#include "Chirality.h" #include "../Frame.h" #include "../CpptrajStdio.h" #include "../Constants.h" @@ -1113,8 +1112,7 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology // Set phi for X iat atA atB BuildAtom AtomC; if (topIn[*iat].Nbonds() > 2) { - AtomC.SetChirality( DetermineChirality(*iat, topIn, frameIn, modelDebug) ); - SetPriority(AtomC.ModifyPriority(), *iat, topIn, frameIn, modelDebug); + if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; } newPhi = 0; //model.SetDebug( 1 ); // FIXME diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index a5b95b1fe3..55eb7e12ff 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -13,4 +13,4 @@ Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index dc4ddeb557..644477756d 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -445,8 +445,8 @@ SpaceGroup.o : SpaceGroup.cpp Matrix_3x3.h Parallel.h SpaceGroup.h Vec3.h Spline.o : Spline.cpp CpptrajStdio.h Spline.h SplineFxnTable.o : SplineFxnTable.cpp Constants.h CpptrajStdio.h Spline.h SplineFxnTable.h StringRoutines.h StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h -Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/Chirality.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/Chirality.o : Structure/Chirality.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Chirality.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -457,10 +457,10 @@ Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Const Structure/StructureEnum.o : Structure/StructureEnum.cpp Structure/StructureEnum.h Structure/StructureRoutines.o : Structure/StructureRoutines.cpp Atom.h CpptrajStdio.h NameType.h Residue.h Structure/StructureRoutines.h SymbolExporting.h Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Chirality.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Chirality.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From c3d00f03f94dea9285735ab578e3651da07ff11c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:31:48 -0500 Subject: [PATCH 0376/1492] If chirality not available, use orientation --- src/Structure/Model.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 32162bb204..ba543c620b 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -195,6 +195,11 @@ const // TODO check that atom i actually ends up on the list? std::vector const& priority = AtomJ.Priority(); ChiralType chirality = AtomJ.Chirality(); + if (chirality == IS_UNKNOWN_CHIRALITY) { + chirality = AtomJ.Orientation(); + mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", + topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + } if (debug_ > 0) { mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); mprintf("DEBUG:\t\tPriority around J %s(%i) is", From a8633b5e6d81701360fa25ba280298edaaa06547 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:47:43 -0500 Subject: [PATCH 0377/1492] Ensure builder debug is set --- src/Exec_Sequence.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 4bc95592d0..47e2b737a2 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -92,6 +92,7 @@ const using namespace Cpptraj::Structure; Builder builder; + builder.SetDebug( debug_ ); for (unsigned int idx = 1; idx < Units.size(); idx++) { mprintf("\tConnect %s atom %i to %s atom %i\n", Units[idx-1]->legend(), connectAt1[idx-1]+1, From 24b564a3dc877df06bfb1797a112eb3b9ec8b465 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 22 Jan 2024 11:47:58 -0500 Subject: [PATCH 0378/1492] Change warning to debug message. Not being able to determine absolute priority isnt always a problem. --- src/Structure/BuildAtom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/BuildAtom.cpp b/src/Structure/BuildAtom.cpp index 7f0295d570..a2fdc26ec4 100644 --- a/src/Structure/BuildAtom.cpp +++ b/src/Structure/BuildAtom.cpp @@ -125,8 +125,8 @@ int Cpptraj::Structure::BuildAtom::determineChirality(int atnum, Topology const& break; } if (depth == 10) { - mprintf("Warning: Could not determine priority around '%s'\n", - topIn.AtomMaskName(atnum).c_str()); + if (debugIn > 0) mprintf("DEBUG: Could not determine priority around '%s'\n", + topIn.AtomMaskName(atnum).c_str()); depth_limit_hit = true; break; } From 037f5ca5906f171d3f4895aa1e40933035ad31fa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 24 Jan 2024 12:38:00 -0500 Subject: [PATCH 0379/1492] Improve error message --- src/Structure/Builder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index cb52e25591..d7066cc435 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -73,13 +73,13 @@ const if (AtomA.DetermineChirality(atA, combinedTop, CombinedFrame, chiralityDebug)) return 1; } if (debug_ > 0) - mprintf("DEBUG:\tAtom %4s chirality %6s\n", combinedTop.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); + mprintf("DEBUG:\tAtom %4s chirality before bonding is %6s\n", combinedTop.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); BuildAtom AtomB; if (combinedTop[atB].Nbonds() > 2) { if (AtomB.DetermineChirality(atB, combinedTop, CombinedFrame, chiralityDebug)) return 1; } if (debug_ > 0) - mprintf("DEBUG:\tAtom %4s chirality %6s\n", combinedTop.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); + mprintf("DEBUG:\tAtom %4s chirality before bonding is %6s\n", combinedTop.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); // Create the bond if (debug_ > 0) From b1964b5360e29a1371aa3159df2c65f05c9061c4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 24 Jan 2024 18:42:27 -0500 Subject: [PATCH 0380/1492] FIXME - Temporarily increase the default model debug level --- src/Structure/Zmatrix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 93e3638281..9fbd4ebda3 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1019,7 +1019,8 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology modelDebug = debug_ - 1; } Cpptraj::Structure::Model model; - model.SetDebug( modelDebug ); + //model.SetDebug( modelDebug ); //FIXME + model.SetDebug( 1 ); // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- if (debug_ > 0) mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); From a5853f86342cc990da8266802f682d7214f54ef3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 25 Jan 2024 09:42:13 -0500 Subject: [PATCH 0381/1492] Fix printf issue --- src/DataIO_AmberLib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataIO_AmberLib.cpp b/src/DataIO_AmberLib.cpp index 32ff816b45..e4f0cf46d4 100644 --- a/src/DataIO_AmberLib.cpp +++ b/src/DataIO_AmberLib.cpp @@ -252,7 +252,7 @@ const ArgList tmpArg( Line ); if (tmpArg.Nargs() < 1) { mprinterr("Error: Could not read residue from residues section.\n"); - mprinterr("Error: Line: %s\n", Line); + mprinterr("Error: Line: %s\n", Line.c_str()); return 1; } if (ridx >= top.Nres()) { From 6f4f2226bbb26c4efd6a19aeffc0acf5ac177441 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 25 Jan 2024 10:29:34 -0500 Subject: [PATCH 0382/1492] Add 'byatom' keyword to checkchirality to allow printing of chirality at any atom --- src/Action_CheckChirality.cpp | 279 ++++++++++++++++++++++------------ src/Action_CheckChirality.h | 7 +- src/cpptrajdepend | 2 +- 3 files changed, 187 insertions(+), 101 deletions(-) diff --git a/src/Action_CheckChirality.cpp b/src/Action_CheckChirality.cpp index 10ce49e645..a8d1003074 100644 --- a/src/Action_CheckChirality.cpp +++ b/src/Action_CheckChirality.cpp @@ -2,43 +2,65 @@ #include "CpptrajStdio.h" #include "TorsionRoutines.h" #include "DataSet_Mesh.h" -//#inc lude "Structure/Chirality.h" // DEBUG +//#incl ude "Constants.h" +#include "Structure/BuildAtom.h" void Action_CheckChirality::Help() const { - mprintf("\t[] [] [out ]\n" - " Check the chirality of AA residues in .\n"); + mprintf("\t[] [] [out ] [byatom]\n" + " Check the chirality of amino acid residues in .\n" + " If 'byatom' is specified, check the chirality of any atoms in\n" + " that are chiral centers.\n"); } +/** CONSTRUCTOR */ +Action_CheckChirality::Action_CheckChirality() : + data_L_(0), + data_D_(0), + outfile_(0), + byatom_(false), + currentTop_(0), + debug_(0) +{} + // Action_CheckChirality::Init() Action::RetType Action_CheckChirality::Init(ArgList& actionArgs, ActionInit& init, int debugIn) { + debug_ = debugIn; // Get keywords - DataFile* outfile = init.DFL().AddDataFile( actionArgs.GetStringKey("out"), actionArgs ); + outfile_ = init.DFL().AddDataFile( actionArgs.GetStringKey("out"), actionArgs ); + byatom_ = actionArgs.hasKey("byatom"); // Get Masks if (Mask1_.SetMaskString( actionArgs.GetMaskNext() )) return Action::ERR; // Set up DataSets setname_ = actionArgs.GetStringNext(); if (setname_.empty()) setname_ = init.DSL().GenerateDefaultName("CHIRAL"); - MetaData md(setname_, "L", MetaData::NOT_TS); - data_L_ = init.DSL().AddSet( DataSet::XYMESH, md); - md.SetAspect("D"); - data_D_ = init.DSL().AddSet( DataSet::XYMESH, md); - if (data_L_ == 0 || data_D_ == 0) return Action::ERR; - data_L_->SetupFormat().SetFormatWidthPrecision( 8, 0 ); - data_D_->SetupFormat().SetFormatWidthPrecision( 8, 0 ); - if (outfile != 0) { - outfile->AddDataSet( data_L_ ); - outfile->AddDataSet( data_D_ ); + if (!byatom_) { + MetaData md(setname_, "L", MetaData::NOT_TS); + data_L_ = init.DSL().AddSet( DataSet::XYMESH, md); + md.SetAspect("D"); + data_D_ = init.DSL().AddSet( DataSet::XYMESH, md); + if (data_L_ == 0 || data_D_ == 0) return Action::ERR; + data_L_->SetupFormat().SetFormatWidthPrecision( 8, 0 ); + data_D_->SetupFormat().SetFormatWidthPrecision( 8, 0 ); + if (outfile_ != 0) { + outfile_->AddDataSet( data_L_ ); + outfile_->AddDataSet( data_D_ ); + } +# ifdef MPI + data_L_->SetNeedsSync( false ); + data_D_->SetNeedsSync( false ); +# endif + } + if (!byatom_) { + mprintf(" CHECKCHIRALITY: Check chirality for AA residues in mask '%s'\n", + Mask1_.MaskString()); + } else { + mprintf(" CHECKCHIRALITY: Check chirality for atoms in mask '%s'\n", + Mask1_.MaskString()); } -# ifdef MPI - data_L_->SetNeedsSync( false ); - data_D_->SetNeedsSync( false ); -# endif - mprintf(" CHECKCHIRALITY: Check chirality for AA residues in mask '%s'\n", - Mask1_.MaskString()); - if (outfile != 0) - mprintf("\tOutput to file %s\n", outfile->DataFilename().full()); + if (outfile_ != 0) + mprintf("\tOutput to file %s\n", outfile_->DataFilename().full()); if (!setname_.empty()) mprintf("\tData set name: %s\n", setname_.c_str()); Init_ = init; @@ -55,92 +77,148 @@ Action::RetType Action_CheckChirality::Setup(ActionSetup& setup) { mprinterr("Warning: Mask '%s' selects no atoms.\n", Mask1_.MaskString()); return Action::SKIP; } - // Reset any existing ResidueInfos to inactive - for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) - ri->isActive_ = 0; - int Nactive = 0; - // Loop over all non-solvent residues - int resnum = 0; - std::vector NotFound; - for (Topology::res_iterator res = setup.Top().ResStart(); - res != setup.Top().ResEnd(); ++res, ++resnum) - { - int firstAtom = res->FirstAtom(); - int molnum = setup.Top()[firstAtom].MolNum(); - // Skip solvent - if (!setup.Top().Mol(molnum).IsSolvent()) - { - if (Mask1_.AtomsInCharMask( firstAtom, res->LastAtom() )) - { - int n_atom = setup.Top().FindAtomInResidue(resnum, "N"); - int ca_atom = setup.Top().FindAtomInResidue(resnum, "CA"); - int c_atom = setup.Top().FindAtomInResidue(resnum, "C"); - int cb_atom = setup.Top().FindAtomInResidue(resnum, "CB"); - if (n_atom == -1 || ca_atom == -1 || c_atom == -1 || cb_atom == -1) - { - NotFound.push_back( setup.Top().TruncResNameNum(resnum) ); - continue; - } - Nactive++; - // See if a data set is already present - Rarray::iterator rinfo = resInfo_.end(); - for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) - if (resnum == ri->num_) { - rinfo = ri; - break; + if (byatom_) { + currentTop_ = setup.TopAddress(); + if (atomChiralitySets_.empty()) { + // First time + atomChiralitySets_.assign( setup.Top().Natom(), 0 ); + } else if ((unsigned int)setup.Top().Natom() > atomChiralitySets_.size()) { + atomChiralitySets_.resize( setup.Top().Natom(), 0 ); + } + // For each selected atom, create a set + for (int at = 0; at != setup.Top().Natom(); ++at) { + if (Mask1_.AtomInCharMask(at)) { + std::string legend = setup.Top().AtomMaskName(at); + if ( atomChiralitySets_[at] == 0 ) { + if (setup.Top()[at].Nbonds() < 3) { + mprintf("Warning: Atom %s has < 3 bonds, not checking for chirality.\n", legend.c_str()); + } else { + // Initial set up + //atomChiralitySets_[at] = Init_.DSL().AddSet( DataSet::FLOAT, MetaData(setname_, at+1) ); + atomChiralitySets_[at] = Init_.DSL().AddSet( DataSet::STRING, MetaData(setname_, at+1) ); + if (atomChiralitySets_[at] == 0) { + mprinterr("Error: Could not allocate set for atom '%s'\n", legend.c_str()); + return Action::ERR; + } + atomChiralitySets_[at]->SetLegend( legend ); + if (outfile_ != 0) outfile_->AddDataSet( atomChiralitySets_[at] ); } - if (rinfo != resInfo_.end()) { - // Update coord indices in ResidueInfo - rinfo->isActive_ = 1; - rinfo->n_ = n_atom * 3; - rinfo->ca_ = ca_atom * 3; - rinfo->c_ = c_atom * 3; - rinfo->cb_ = cb_atom * 3; } else { - // New ResidueInfo - ResidueInfo RI; - RI.num_ = resnum; - RI.isActive_ = 1; - RI.n_ = n_atom * 3; - RI.ca_ = ca_atom * 3; - RI.c_ = c_atom * 3; - RI.cb_ = cb_atom * 3; - RI.N_L_ = 0; - RI.N_D_ = 0; - resInfo_.push_back( RI ); + // Check an already set up dataset + if (legend != atomChiralitySets_[at]->Meta().Legend()) { + mprintf("Warning: After topology change, atom %i has changed from %s to %s\n", + at+1, atomChiralitySets_[at]->legend(), legend.c_str()); + } } - } // END atoms in mask - } // END not solvent - } // END loop over residues + } // END atom is selected + } // END loop over atoms + mprintf("\tChecking chirality for %i atoms.\n", Mask1_.Nselected()); + } else { + // Reset any existing ResidueInfos to inactive + for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) + ri->isActive_ = 0; + int Nactive = 0; + // Loop over all non-solvent residues + int resnum = 0; + std::vector NotFound; + for (Topology::res_iterator res = setup.Top().ResStart(); + res != setup.Top().ResEnd(); ++res, ++resnum) + { + int firstAtom = res->FirstAtom(); + int molnum = setup.Top()[firstAtom].MolNum(); + // Skip solvent + if (!setup.Top().Mol(molnum).IsSolvent()) + { + if (Mask1_.AtomsInCharMask( firstAtom, res->LastAtom() )) + { + int n_atom = setup.Top().FindAtomInResidue(resnum, "N"); + int ca_atom = setup.Top().FindAtomInResidue(resnum, "CA"); + int c_atom = setup.Top().FindAtomInResidue(resnum, "C"); + int cb_atom = setup.Top().FindAtomInResidue(resnum, "CB"); + if (n_atom == -1 || ca_atom == -1 || c_atom == -1 || cb_atom == -1) + { + NotFound.push_back( setup.Top().TruncResNameNum(resnum) ); + continue; + } + Nactive++; + // See if a data set is already present + Rarray::iterator rinfo = resInfo_.end(); + for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) + if (resnum == ri->num_) { + rinfo = ri; + break; + } + if (rinfo != resInfo_.end()) { + // Update coord indices in ResidueInfo + rinfo->isActive_ = 1; + rinfo->n_ = n_atom * 3; + rinfo->ca_ = ca_atom * 3; + rinfo->c_ = c_atom * 3; + rinfo->cb_ = cb_atom * 3; + } else { + // New ResidueInfo + ResidueInfo RI; + RI.num_ = resnum; + RI.isActive_ = 1; + RI.n_ = n_atom * 3; + RI.ca_ = ca_atom * 3; + RI.c_ = c_atom * 3; + RI.cb_ = cb_atom * 3; + RI.N_L_ = 0; + RI.N_D_ = 0; + resInfo_.push_back( RI ); + } + } // END atoms in mask + } // END not solvent + } // END loop over residues - if (Nactive == 0) { - mprintf("Warning: No valid residues selected from '%s'\n", setup.Top().c_str()); - return Action::SKIP; - } - mprintf("\tChecking chirality for %i residues\n", Nactive); - if (!NotFound.empty()) { - mprintf("\tSome atoms not found for %zu residues (this is expected for e.g. GLY)\n\t", - NotFound.size()); - for (std::vector::const_iterator rn = NotFound.begin(); - rn != NotFound.end(); ++rn) - mprintf(" %s", rn->c_str()); - mprintf("\n"); - } + if (Nactive == 0) { + mprintf("Warning: No valid residues selected from '%s'\n", setup.Top().c_str()); + return Action::SKIP; + } + mprintf("\tChecking chirality for %i residues\n", Nactive); + if (!NotFound.empty()) { + mprintf("\tSome atoms not found for %zu residues (this is expected for e.g. GLY)\n\t", + NotFound.size()); + for (std::vector::const_iterator rn = NotFound.begin(); + rn != NotFound.end(); ++rn) + mprintf(" %s", rn->c_str()); + mprintf("\n"); + } + } // END residue setup return Action::OK; } // Action_CheckChirality::DoAction() Action::RetType Action_CheckChirality::DoAction(int frameNum, ActionFrame& frm) { - for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) - { - double torsion = Torsion( frm.Frm().CRD(ri->n_), - frm.Frm().CRD(ri->ca_), - frm.Frm().CRD(ri->c_), - frm.Frm().CRD(ri->cb_) ); - if (torsion < 0.0) - ri->N_L_++; - else - ri->N_D_++; + if (byatom_) { + for (std::vector::const_iterator it = atomChiralitySets_.begin(); + it != atomChiralitySets_.end(); ++it) + { + if (*it != 0) { + DataSet* ds = *it; + int iat = ds->Meta().Idx() - 1; + Cpptraj::Structure::BuildAtom AtomC; + if (AtomC.DetermineChirality(iat, *currentTop_, frm.Frm(), debug_)) + return Action::ERR; + //double tval_degrees = AtomC.TorsionVal() * Constants::RADDEG; + //float ftval = (float)tval_degrees; + //ds->Add( frameNum, &ftval ); + const char* chiralstr = Cpptraj::Structure::chiralStr( AtomC.Chirality() ); + ds->Add( frameNum, chiralstr ); + } + } + } else { + for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) + { + double torsion = Torsion( frm.Frm().CRD(ri->n_), + frm.Frm().CRD(ri->ca_), + frm.Frm().CRD(ri->c_), + frm.Frm().CRD(ri->cb_) ); + if (torsion < 0.0) + ri->N_L_++; + else + ri->N_D_++; // DEBUG // int at = ri->ca_ / 3; // Cpptraj::Structure::ChiralType chirality = Cpptraj::Structure::IS_UNKNOWN_CHIRALITY; @@ -148,6 +226,7 @@ Action::RetType Action_CheckChirality::DoAction(int frameNum, ActionFrame& frm) // chirality = Cpptraj::Structure::DetermineChirality(at, *top_, frm.Frm(), 0); // mprintf("Chirality around %s is %s\n", top_->AtomMaskName(at).c_str(), Cpptraj::Structure::chiralStr(chirality)); // DEBUG + } } return Action::OK; @@ -155,6 +234,7 @@ Action::RetType Action_CheckChirality::DoAction(int frameNum, ActionFrame& frm) #ifdef MPI int Action_CheckChirality::SyncAction() { + if (byatom_) return 0; int total_L, total_D; for (Rarray::iterator ri = resInfo_.begin(); ri != resInfo_.end(); ++ri) { Init_.TrajComm().ReduceMaster( &total_L, &(ri->N_L_), 1, MPI_INT, MPI_SUM ); @@ -169,6 +249,7 @@ int Action_CheckChirality::SyncAction() { #endif void Action_CheckChirality::Print() { + if (byatom_) return; data_L_->ModifyDim(Dimension::X).SetLabel("Res"); data_D_->ModifyDim(Dimension::X).SetLabel("Res"); DataSet_Mesh& dsetL = static_cast( *data_L_ ); diff --git a/src/Action_CheckChirality.h b/src/Action_CheckChirality.h index 861f3801d3..3e3a1b0599 100644 --- a/src/Action_CheckChirality.h +++ b/src/Action_CheckChirality.h @@ -5,7 +5,7 @@ /// Determine if amino acids are D or L class Action_CheckChirality: public Action { public: - Action_CheckChirality() {} + Action_CheckChirality(); DispatchObject* Alloc() const { return (DispatchObject*)new Action_CheckChirality(); } void Help() const; private: @@ -35,7 +35,12 @@ class Action_CheckChirality: public Action { DataSet* data_L_; ///< Hold number of times each residue was L DataSet* data_D_; ///< Hold number of times each residue was D std::string setname_; ///< Data set name + DataFile* outfile_; ///< Output file + std::vector atomChiralitySets_; ///< For each atom, hold chirality each frame ActionInit Init_; ///< Master DSL/DFL + bool byatom_; + Topology* currentTop_; + int debug_; // Topology* top_; // DEBUG }; #endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 57187e3768..18fa7492c2 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -14,7 +14,7 @@ Action_Bounds.o : Action_Bounds.cpp Action.h ActionState.h Action_Bounds.h ArgLi Action_Box.o : Action_Box.cpp Action.h ActionState.h Action_Box.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BoxArgs.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Action_Center.o : Action_Center.cpp Action.h ActionState.h Action_Center.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Action_Channel.o : Action_Channel.cpp Action.h ActionState.h Action_Channel.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Action_CheckChirality.o : Action_CheckChirality.cpp Action.h ActionState.h Action_CheckChirality.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Action_CheckChirality.o : Action_CheckChirality.cpp Action.h ActionState.h Action_CheckChirality.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Spline.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Action_CheckStructure.o : Action_CheckStructure.cpp Action.h ActionState.h Action_CheckStructure.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DataSet_integer.h DataSet_string.h Dimension.h DispatchObject.h ExclusionArray.h FileIO.h FileName.h FileTypes.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Action_Closest.o : Action_Closest.cpp Action.h ActionState.h ActionTopWriter.h Action_Closest.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h DistRoutines.h FileIO.h FileName.h FileTypes.h Frame.h ImageOption.h ImageRoutines.h ImageTypes.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h cuda_kernels/kernel_wrappers.cuh Action_ClusterDihedral.o : Action_ClusterDihedral.cpp Action.h ActionState.h Action_ClusterDihedral.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_integer.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h From c753bb8786f348c58799042da2e5c5f9770a61fc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 25 Jan 2024 14:11:04 -0500 Subject: [PATCH 0383/1492] Start new phi assignment --- src/Structure/Model.cpp | 65 +++++++++++++++++++++++++++++++++++++++-- src/Structure/Model.h | 7 +++-- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index ba543c620b..8a7b6fa45f 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,7 +1,6 @@ #include "Model.h" #include "BuildAtom.h" -//#incl ude "InternalCoords.h" -//#incl ude "Chirality.h" +#include "InternalCoords.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../Topology.h" @@ -31,6 +30,11 @@ const // Figure out hybridization and chirality of atom j. if (debug_ > 0) mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); + if (atomPositionKnown[ai] && atomPositionKnown[aj] && atomPositionKnown[ak]) + { + theta = CalcAngle(frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak)); + return 0; + } //enum HybridizationType { SP = 0, SP2, SP3, UNKNOWN_HYBRIDIZATION }; @@ -376,6 +380,63 @@ const */ return 0; } + +/** Assign internal coordinates for atoms I for torsions around J-K-L. */ +int Cpptraj::Structure::Model::AssignICsAroundBond(std::vector& IC, + int aj, int ak, int al, + Topology const& topIn, Frame const& frameIn, + std::vector const& atomPositionKnown, + BuildAtom const& AtomJ) +const +{ + // Atoms J K and L should be known + if (!atomPositionKnown[aj] || + !atomPositionKnown[ak] || + !atomPositionKnown[al]) + { + mprinterr("Internal Error: AssignIcAroundBond(): Not all atom positions known.\n" + "Internal Error: %i (%i), %i (%i), %i (%i)\n", + aj+1, (int)atomPositionKnown[aj], + ak+1, (int)atomPositionKnown[ak], + al+1, (int)atomPositionKnown[al]); + return 1; + } + Atom const& AJ = topIn[aj]; + // If atom J has only 1 bond this is not needed. + if (AJ.Nbonds() < 2) return 0; + + + if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); + // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. + if (AJ.Nbonds() < 3) { + if (debug_ > 0) + mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); + double newPhi = -180 * Constants::DEGRAD; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + if (AJ.Bond(idx) != ak) { + int ai = AJ.Bond(idx); + double newDist = 0; + if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: AssignLength failed for %s - %s \n", + topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); + return 1; + } + double newTheta = 0; + if (AssignTheta(newTheta, ai, aj, ak, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: AssignTheta failed for %s - %s - %s\n", + topIn.AtomMaskName(ai).c_str(), + topIn.AtomMaskName(aj).c_str(), + topIn.AtomMaskName(ak).c_str()); + } + IC.push_back( InternalCoords(ai, aj, ak, al, newDist, newTheta, newPhi) ); + break; + } + } + return 0; + } // END only 2 bonds + + return 0; +} /* static inline AtomType::HybridizationType getAtomHybridization(ParmHolder const& AT, Topology const& topIn, int ix) { diff --git a/src/Structure/Model.h b/src/Structure/Model.h index d820c5e1e3..b43613b027 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -22,9 +22,12 @@ class Model { int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I //int AssignPhi(std::vector&, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; + /// Given atoms I J K and L, attempt to assign a reasonable value for phi for atom I int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; - /// Assign phi around bond - //int AssignPhiAroundBond(int, int, Topology const&, Frame const&, std::vector const&, ParmHolder const&) const; + /// Assign internal coordinates for atoms I for torsions around J-K-L. + int AssignICsAroundBond(std::vector&, int, int, int, + Topology const&, Frame const&, std::vector const&, + BuildAtom const&) const; private: int debug_; }; From 992a45ee7d8992fb240b92b4ec6cdea98cdfe3f2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 25 Jan 2024 14:35:06 -0500 Subject: [PATCH 0384/1492] Add known phi calc --- src/Structure/Model.cpp | 64 ++++++++++++++++++++++++++++++++++++--- src/Structure/Zmatrix.cpp | 7 +++++ 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 8a7b6fa45f..4f148f570d 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -389,17 +389,22 @@ int Cpptraj::Structure::Model::AssignICsAroundBond(std::vector& BuildAtom const& AtomJ) const { - // Atoms J K and L should be known + mprintf("DEBUG: AssignICsAroundBond: X - %s - %s - %s %i - %i - %i\n", + topIn.AtomMaskName(aj).c_str(), + topIn.AtomMaskName(ak).c_str(), + topIn.AtomMaskName(al).c_str(), + aj+1, ak+1, al+1); + // Ideally, atoms J K and L should be known if (!atomPositionKnown[aj] || !atomPositionKnown[ak] || !atomPositionKnown[al]) { - mprinterr("Internal Error: AssignIcAroundBond(): Not all atom positions known.\n" - "Internal Error: %i (%i), %i (%i), %i (%i)\n", + mprintf("Warning: AssignICsAroundBond(): Not all atom positions known.\n" + "Warning: %i (%i), %i (%i), %i (%i)\n", aj+1, (int)atomPositionKnown[aj], ak+1, (int)atomPositionKnown[ak], al+1, (int)atomPositionKnown[al]); - return 1; + //return 1; } Atom const& AJ = topIn[aj]; // If atom J has only 1 bond this is not needed. @@ -435,6 +440,57 @@ const return 0; } // END only 2 bonds + // 3 or more bonds. + std::vector const& priority = AtomJ.Priority(); + ChiralType chirality = AtomJ.Chirality(); + //if (chirality == IS_UNKNOWN_CHIRALITY) { + // chirality = AtomJ.Orientation(); + // mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", + // topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + //} + if (debug_ > 0) { + mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + mprintf("DEBUG:\t\tPriority around J %s(%i) is", + topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); + for (int idx = 0; idx < AJ.Nbonds(); idx++) + mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); + mprintf("\n"); + } + + // Fill in what values we can for known atoms + std::vector knownPhi( AJ.Nbonds() ); + std::vector isKnown( AJ.Nbonds(), false ); + int knownIdx = -1; + double knownInterval = 0; + bool hasKnownInterval = false; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak && atomPositionKnown[atnum] && + atomPositionKnown[aj] && + atomPositionKnown[ak] && + atomPositionKnown[al]) + { + knownPhi[idx] = Torsion(frameIn.XYZ(atnum), + frameIn.XYZ(aj), + frameIn.XYZ(ak), + frameIn.XYZ(al)); + isKnown[idx] = true; + if (debug_ > 0) + mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); + if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known + if (idx > 0 && isKnown[idx-1] && isKnown[idx]) { + knownInterval = wrap360(knownPhi[idx] - knownPhi[idx-1]); + hasKnownInterval = true; + } + } + } + if (hasKnownInterval) + mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); + +// for (int idx = 0; idx < AJ.Nbonds(); idx++) { +// if (AJ.Bond(idx) != ak) { +// int ai = AJ.Bond(idx); + return 0; } /* diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 9fbd4ebda3..36d9e7e5ac 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1021,6 +1021,13 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology Cpptraj::Structure::Model model; //model.SetDebug( modelDebug ); //FIXME model.SetDebug( 1 ); + // FIXME + std::vector tmpic; + if (model.AssignICsAroundBond(tmpic, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { + mprinterr("Error: AssignICsAroundBond failed.\n"); + return 1; + } + // FIXME // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- if (debug_ > 0) mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); From 1277b434521c394211b8171eded5cd0bb92dcc4e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 25 Jan 2024 17:42:04 -0500 Subject: [PATCH 0385/1492] Print final ICs --- src/Structure/Zmatrix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 36d9e7e5ac..026ecb2795 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1027,6 +1027,9 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology mprinterr("Error: AssignICsAroundBond failed.\n"); return 1; } + for (std::vector::const_iterator it = tmpic.begin(); it != tmpic.end(); ++it) + it->printIC( topIn ); + mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); // FIXME // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- if (debug_ > 0) From 24617b0cd5cac075e4d8a8daf48d39b1ad633ff1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 26 Jan 2024 12:05:02 -0500 Subject: [PATCH 0386/1492] Add ParameterSet to model for hybridization. Finish initial incarnation of the new Assign phi routine --- src/Structure/Model.cpp | 204 +++++++++++++++++++++++++++++++--- src/Structure/Model.h | 7 +- src/Structure/structuredepend | 2 +- src/cpptrajdepend | 2 +- 4 files changed, 197 insertions(+), 18 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 4f148f570d..13bece2f81 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -7,8 +7,24 @@ #include "../TorsionRoutines.h" #include "../DistRoutines.h" #include "../Constants.h" +#include "../ParameterSet.h" #include +/** CONSTRUCTOR */ +Cpptraj::Structure::Model::Model() : + debug_(0), + params_(0) +{} + +/** Set optional parameter set. */ +void Cpptraj::Structure::Model::SetParameters(ParameterSet const* paramsIn) { + if (paramsIn == 0) { + mprinterr("Internal Error: Model::SetParmaters called with null set.\n"); + return; + } + params_ = paramsIn; +} + /** Assign reasonable value for bond distance. */ int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) const @@ -36,8 +52,6 @@ const return 0; } - //enum HybridizationType { SP = 0, SP2, SP3, UNKNOWN_HYBRIDIZATION }; - Atom const& AJ = topIn[aj]; if (debug_ > 0) { mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); @@ -49,8 +63,14 @@ const mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); return 1; } - // TODO pass in atom type info? - AtomType::HybridizationType hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) + hybrid = it->second.Hybridization(); + } + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) + hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); /* HybridizationType hybrid = UNKNOWN_HYBRIDIZATION; // Handle specific elements @@ -283,8 +303,27 @@ const return 1; } - // The interval will be 360 / (number of bonds - 1) - double interval = Constants::TWOPI / (AJ.Nbonds() - 1); + bool intervalIsSet = false; + double interval = 0; + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) { + if (it->second.Hybridization() == AtomType::SP2) { + interval = 180 * Constants::DEGRAD; + intervalIsSet = true; + } else if (it->second.Hybridization() == AtomType::SP3) { + interval = 120 * Constants::DEGRAD; + intervalIsSet = true; + } + } + if (intervalIsSet) mprintf("DEBUG: Interval was set from atom J hybridization.\n"); + } + if (!intervalIsSet) { + // The interval will be 360 / (number of bonds - 1) + interval = Constants::TWOPI / (AJ.Nbonds() - 1); + mprintf("DEBUG: Interval was set from number of bonds.\n"); + } + if (hasKnownInterval) { if (chirality == IS_UNKNOWN_CHIRALITY) { mprintf("DEBUG: Setting chirality from known interval.\n"); @@ -389,6 +428,7 @@ int Cpptraj::Structure::Model::AssignICsAroundBond(std::vector& BuildAtom const& AtomJ) const { + mprintf("DEBUG: ------------------------------------------------\n"); mprintf("DEBUG: AssignICsAroundBond: X - %s - %s - %s %i - %i - %i\n", topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(ak).c_str(), @@ -443,13 +483,13 @@ const // 3 or more bonds. std::vector const& priority = AtomJ.Priority(); ChiralType chirality = AtomJ.Chirality(); - //if (chirality == IS_UNKNOWN_CHIRALITY) { - // chirality = AtomJ.Orientation(); - // mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", - // topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - //} + if (chirality == IS_UNKNOWN_CHIRALITY) { + chirality = AtomJ.Orientation(); + mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", + topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + } if (debug_ > 0) { - mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + mprintf("DEBUG:\t\tOriginal chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); mprintf("DEBUG:\t\tPriority around J %s(%i) is", topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); for (int idx = 0; idx < AJ.Nbonds(); idx++) @@ -457,6 +497,21 @@ const mprintf("\n"); } + // Get index of atom K in the priority list, starting from least priority. + int kPriorityIdx = -1; + for (int idx = AJ.Nbonds()-1; idx > -1; idx--) { + if (priority[idx] == ak) { + kPriorityIdx = AJ.Nbonds() - 1 - idx; + break; + } + } + mprintf("DEBUG:\t\tK priority index is %i\n", kPriorityIdx); + if (kPriorityIdx < 0) { + mprinterr("Error: Could not find atom K %s in atom J %s bond list.\n", + topIn.AtomMaskName(ak).c_str(), topIn.AtomMaskName(aj).c_str()); + return 1; + } + // Fill in what values we can for known atoms std::vector knownPhi( AJ.Nbonds() ); std::vector isKnown( AJ.Nbonds(), false ); @@ -487,9 +542,128 @@ const if (hasKnownInterval) mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); -// for (int idx = 0; idx < AJ.Nbonds(); idx++) { -// if (AJ.Bond(idx) != ak) { -// int ai = AJ.Bond(idx); + // If we have to assign an initial phi, make trans the longer branch + if (knownIdx == -1) { + std::vector visited = atomPositionKnown; + // TODO: Ensure bonded atoms are not yet visited? + visited[aj] = true; + visited[ak] = true; + //std::vector depth( AJ.Nbonds() ); + int max_depth = 0; + int max_idx = -1; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + int currentDepth = 0; + //depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); + int depth = atom_depth(currentDepth, atnum, topIn, visited, 10); + if (debug_ > 0) + mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", + topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth); + //if (knownIdx == -1 && depth[idx] < 3) { + // knownIdx = idx; + // knownPhi[idx] = 0; + //} + if (max_idx == -1 || depth > max_depth) { + max_depth = depth; + max_idx = idx; + } + } + } + mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); + knownIdx = max_idx; + knownPhi[max_idx] = -180 * Constants::DEGRAD; + isKnown[max_idx] = true; + } + + // Sanity check + if (knownIdx < 0) { + mprinterr("Internal Error: AssignPhi(): knownIdx is < 0\n"); + return 1; + } + + // Determine the interval + bool intervalIsSet = false; + double interval = 0; + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) { + if (it->second.Hybridization() == AtomType::SP2) { + interval = 180 * Constants::DEGRAD; + intervalIsSet = true; + } else if (it->second.Hybridization() == AtomType::SP3) { + interval = 120 * Constants::DEGRAD; + intervalIsSet = true; + } + } + if (intervalIsSet) mprintf("DEBUG:\t\tInterval was set from atom J hybridization.\n"); + } + if (!intervalIsSet) { + // The interval will be 360 / (number of bonds - 1) + interval = Constants::TWOPI / (AJ.Nbonds() - 1); + mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); + } + + // Check known interval if set + if (hasKnownInterval) { + if (chirality == IS_UNKNOWN_CHIRALITY) { + mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); + if (knownInterval < 0) + chirality = IS_S; + else + chirality = IS_R; + } else if (chirality == IS_S) { + if (knownInterval > 0) + mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); + } else if (chirality == IS_R) { + if (knownInterval < 0) + mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); + } + } + + // Adjust interval based on chirality and priority of the k atom + if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) + interval = -interval; + if ( kPriorityIdx%2 ) { + mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); + interval = -interval; + } + + if (debug_ > 0) { + mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); + mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); + } + + // Forwards from the known index + double currentPhi = knownPhi[knownIdx]; + for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + if (isKnown[idx]) + currentPhi = knownPhi[idx]; + else + currentPhi = wrap360(currentPhi + interval); + //if (atnum == ai) phi = currentPhi; + //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); + if (debug_ > 0) + mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); + } + } + // Backwards from the known index + currentPhi = knownPhi[knownIdx]; + for (int idx = knownIdx - 1; idx > -1; idx--) { + int atnum = priority[idx]; + if (atnum != ak) { + if (isKnown[idx]) + currentPhi = knownPhi[idx]; + else + currentPhi = wrap360(currentPhi - interval); + //if (atnum == ai) phi = currentPhi; + //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); + if (debug_ > 0) + mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); + } + } return 0; } diff --git a/src/Structure/Model.h b/src/Structure/Model.h index b43613b027..f57d9c1875 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -4,6 +4,7 @@ //#incl ude "StructureEnum.h" class Topology; class Frame; +class ParameterSet; //template class ParmHolder; //class AtomType; namespace Cpptraj { @@ -13,9 +14,12 @@ class InternalCoords; /// Routines to create a model for missing bond/angle/torsion parameters class Model { public: - Model() : debug_(0) {} + /// CONSTRUCTOR + Model(); /// Set debug level void SetDebug(int d) { debug_ = d; } + /// Set optional parameter set + void SetParameters(ParameterSet const*); /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I @@ -30,6 +34,7 @@ class Model { BuildAtom const&) const; private: int debug_; + ParameterSet const* params_; }; } // END namespace Structure } // END namespace Cpptraj diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 55eb7e12ff..b944b35e4c 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -6,7 +6,7 @@ FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h .. GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h -Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Model.h StructureEnum.h +Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h InternalCoords.h Model.h StructureEnum.h StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 18fa7492c2..c3666e4073 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -453,7 +453,7 @@ Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h At Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/StructureEnum.o : Structure/StructureEnum.cpp Structure/StructureEnum.h Structure/StructureRoutines.o : Structure/StructureRoutines.cpp Atom.h CpptrajStdio.h NameType.h Residue.h Structure/StructureRoutines.h SymbolExporting.h Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 9f8cf56a8727a4c8efed56cb5a6fe2f775b1e899 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 26 Jan 2024 12:25:10 -0500 Subject: [PATCH 0387/1492] Do J K ICs. Set unknown starting phi to interval. Improve debug messages --- src/Structure/Model.cpp | 91 +++++++++++++++++++-------------------- src/Structure/Zmatrix.cpp | 10 ++++- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 13bece2f81..55c0339fe9 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -428,7 +428,6 @@ int Cpptraj::Structure::Model::AssignICsAroundBond(std::vector& BuildAtom const& AtomJ) const { - mprintf("DEBUG: ------------------------------------------------\n"); mprintf("DEBUG: AssignICsAroundBond: X - %s - %s - %s %i - %i - %i\n", topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(ak).c_str(), @@ -440,10 +439,10 @@ const !atomPositionKnown[al]) { mprintf("Warning: AssignICsAroundBond(): Not all atom positions known.\n" - "Warning: %i (%i), %i (%i), %i (%i)\n", - aj+1, (int)atomPositionKnown[aj], - ak+1, (int)atomPositionKnown[ak], - al+1, (int)atomPositionKnown[al]); + "Warning: %i %s (%i) - %i %s (%i) - %i %s (%i)\n", + aj+1, topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj], + ak+1, topIn.AtomMaskName(ak).c_str(), (int)atomPositionKnown[ak], + al+1, topIn.AtomMaskName(al).c_str(), (int)atomPositionKnown[al]); //return 1; } Atom const& AJ = topIn[aj]; @@ -542,6 +541,45 @@ const if (hasKnownInterval) mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); + // Check known interval if set + if (hasKnownInterval) { + if (chirality == IS_UNKNOWN_CHIRALITY) { + mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); + if (knownInterval < 0) + chirality = IS_S; + else + chirality = IS_R; + } else if (chirality == IS_S) { + if (knownInterval > 0) + mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); + } else if (chirality == IS_R) { + if (knownInterval < 0) + mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); + } + } + + // Determine the interval + bool intervalIsSet = false; + double interval = 0; + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) { + if (it->second.Hybridization() == AtomType::SP2) { + interval = 180 * Constants::DEGRAD; + intervalIsSet = true; + } else if (it->second.Hybridization() == AtomType::SP3) { + interval = 120 * Constants::DEGRAD; + intervalIsSet = true; + } + } + if (intervalIsSet) mprintf("DEBUG:\t\tInterval was set from atom J hybridization.\n"); + } + if (!intervalIsSet) { + // The interval will be 360 / (number of bonds - 1) + interval = Constants::TWOPI / (AJ.Nbonds() - 1); + mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); + } + // If we have to assign an initial phi, make trans the longer branch if (knownIdx == -1) { std::vector visited = atomPositionKnown; @@ -572,7 +610,7 @@ const } mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); knownIdx = max_idx; - knownPhi[max_idx] = -180 * Constants::DEGRAD; + knownPhi[max_idx] = interval;// -180 * Constants::DEGRAD; isKnown[max_idx] = true; } @@ -582,49 +620,10 @@ const return 1; } - // Determine the interval - bool intervalIsSet = false; - double interval = 0; - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) { - if (it->second.Hybridization() == AtomType::SP2) { - interval = 180 * Constants::DEGRAD; - intervalIsSet = true; - } else if (it->second.Hybridization() == AtomType::SP3) { - interval = 120 * Constants::DEGRAD; - intervalIsSet = true; - } - } - if (intervalIsSet) mprintf("DEBUG:\t\tInterval was set from atom J hybridization.\n"); - } - if (!intervalIsSet) { - // The interval will be 360 / (number of bonds - 1) - interval = Constants::TWOPI / (AJ.Nbonds() - 1); - mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); - } - - // Check known interval if set - if (hasKnownInterval) { - if (chirality == IS_UNKNOWN_CHIRALITY) { - mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); - if (knownInterval < 0) - chirality = IS_S; - else - chirality = IS_R; - } else if (chirality == IS_S) { - if (knownInterval > 0) - mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); - } else if (chirality == IS_R) { - if (knownInterval < 0) - mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); - } - } - // Adjust interval based on chirality and priority of the k atom if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) interval = -interval; - if ( kPriorityIdx%2 ) { + if ( (kPriorityIdx%2) == 0 ) { mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); interval = -interval; } diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 026ecb2795..4d9fbbfbe3 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1022,11 +1022,19 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology //model.SetDebug( modelDebug ); //FIXME model.SetDebug( 1 ); // FIXME + mprintf("DEBUG: ------------------------------------------------\n"); std::vector tmpic; + // I J: Set up ICs for X atB K L if (model.AssignICsAroundBond(tmpic, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { - mprinterr("Error: AssignICsAroundBond failed.\n"); + mprinterr("Error: AssignICsAroundBond (I J) failed.\n"); return 1; } + // J K: Set up ICs for X atA atB K + if (model.AssignICsAroundBond(tmpic, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { + mprinterr("Error: AssignICsAroundBond (J K) failed.\n"); + return 1; + } + // Print ICs for (std::vector::const_iterator it = tmpic.begin(); it != tmpic.end(); ++it) it->printIC( topIn ); mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); From b6a90519b73f0288e66c6079a71aeabd3017a0b5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 26 Jan 2024 12:41:05 -0500 Subject: [PATCH 0388/1492] Actually add ICs --- src/Structure/Model.cpp | 35 +++++++++++++++++++++++++++++++++-- src/Structure/Model.h | 4 ++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 55c0339fe9..f9af0becde 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -420,6 +420,34 @@ const return 0; } +int Cpptraj::Structure::Model::insertIc(std::vector& IC, + int ai, int aj, int ak, int al, double newPhi, + Topology const& topIn, Frame const& frameIn, + std::vector const& atomPositionKnown) +const +{ + if (atomPositionKnown[ai]) { + mprintf("DEBUG: Atom position already known for %s, skipping IC.\n", topIn.AtomMaskName(ai).c_str()); + return 0; + } + double newDist = 0; + if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: AssignLength failed for %s - %s \n", + topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); + return 1; + } + double newTheta = 0; + if (AssignTheta(newTheta, ai, aj, ak, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: AssignTheta failed for %s - %s - %s\n", + topIn.AtomMaskName(ai).c_str(), + topIn.AtomMaskName(aj).c_str(), + topIn.AtomMaskName(ak).c_str()); + return 1; + } + IC.push_back( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); + return 0; +} + /** Assign internal coordinates for atoms I for torsions around J-K-L. */ int Cpptraj::Structure::Model::AssignICsAroundBond(std::vector& IC, int aj, int ak, int al, @@ -459,7 +487,8 @@ const for (int idx = 0; idx < AJ.Nbonds(); idx++) { if (AJ.Bond(idx) != ak) { int ai = AJ.Bond(idx); - double newDist = 0; + if (insertIc(IC, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; +/* double newDist = 0; if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: AssignLength failed for %s - %s \n", topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); @@ -472,7 +501,7 @@ const topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(ak).c_str()); } - IC.push_back( InternalCoords(ai, aj, ak, al, newDist, newTheta, newPhi) ); + IC.push_back( InternalCoords(ai, aj, ak, al, newDist, newTheta, newPhi) );*/ break; } } @@ -644,6 +673,7 @@ const currentPhi = wrap360(currentPhi + interval); //if (atnum == ai) phi = currentPhi; //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); + if (insertIc(IC, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; if (debug_ > 0) mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); } @@ -659,6 +689,7 @@ const currentPhi = wrap360(currentPhi - interval); //if (atnum == ai) phi = currentPhi; //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); + if (insertIc(IC, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; if (debug_ > 0) mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); } diff --git a/src/Structure/Model.h b/src/Structure/Model.h index f57d9c1875..77044818eb 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -33,6 +33,10 @@ class Model { Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; private: + int insertIc(std::vector&, int, int, int, int, double, + Topology const&, Frame const&, std::vector const&) const; + + int debug_; ParameterSet const* params_; }; From 517eb5d488a863970b888f84d20dd1879f57a81c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 26 Jan 2024 12:53:06 -0500 Subject: [PATCH 0389/1492] Actually assign ICs, do K L ICs --- src/Structure/Zmatrix.cpp | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 4d9fbbfbe3..a0a5a8ab93 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1023,24 +1023,41 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology model.SetDebug( 1 ); // FIXME mprintf("DEBUG: ------------------------------------------------\n"); - std::vector tmpic; + //std::vector tmpic; // I J: Set up ICs for X atB K L - if (model.AssignICsAroundBond(tmpic, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { + if (model.AssignICsAroundBond(IC_, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { mprinterr("Error: AssignICsAroundBond (I J) failed.\n"); return 1; } // J K: Set up ICs for X atA atB K - if (model.AssignICsAroundBond(tmpic, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { + if (model.AssignICsAroundBond(IC_, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { mprinterr("Error: AssignICsAroundBond (J K) failed.\n"); return 1; } - // Print ICs - for (std::vector::const_iterator it = tmpic.begin(); it != tmpic.end(); ++it) - it->printIC( topIn ); + // K L: Set up ICs for X iat atA atB + Atom const& AJ1 = topIn[atA]; + for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) + { + if (*iat != atB) { + BuildAtom AtomC; + if (topIn[*iat].Nbonds() > 2) { + if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; + } + if (model.AssignICsAroundBond(IC_, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { + mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); + return 1; + } + } + } + // Mark/Print ICs + for (std::vector::const_iterator it = IC_.begin(); it != IC_.end(); ++it) { + it->printIC( topIn ); // DEBUG + MARK( it->AtI(), hasIC, nHasIC ); + } mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); // FIXME // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- - if (debug_ > 0) +/* if (debug_ > 0) mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); double newDist = 0; if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { @@ -1067,7 +1084,8 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology mprintf("DEBUG: MODEL I J IC: "); IC_.back().printIC(topIn); } - MARK( atA, hasIC, nHasIC ); + MARK( atA, hasIC, nHasIC );*/ +/* // ----- J K: Set up ICs for X atA atB K --------------------------- Atom const& AJ1 = topIn[atA]; int ati = -1; @@ -1077,7 +1095,7 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology { if (*iat != atB) { if (ati == -1) ati = *iat; - // Set bond dist +/ // Set bond dist if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { mprinterr("Error: length (j k) assignment failed.\n"); return 1; @@ -1156,6 +1174,8 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology } } } +*/ + /* // Handle remaining atoms. if (AJ1.Nbonds() > 1) { From d50caaa3b61cf573e0a3fef42976402fe836721f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 27 Jan 2024 15:52:27 -0500 Subject: [PATCH 0390/1492] Try using known interval --- src/Structure/Model.cpp | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index f9af0becde..c57338d3df 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -420,6 +420,7 @@ const return 0; } +/** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ int Cpptraj::Structure::Model::insertIc(std::vector& IC, int ai, int aj, int ak, int al, double newPhi, Topology const& topIn, Frame const& frameIn, @@ -488,20 +489,6 @@ const if (AJ.Bond(idx) != ak) { int ai = AJ.Bond(idx); if (insertIc(IC, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; -/* double newDist = 0; - if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: AssignLength failed for %s - %s \n", - topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); - return 1; - } - double newTheta = 0; - if (AssignTheta(newTheta, ai, aj, ak, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: AssignTheta failed for %s - %s - %s\n", - topIn.AtomMaskName(ai).c_str(), - topIn.AtomMaskName(aj).c_str(), - topIn.AtomMaskName(ak).c_str()); - } - IC.push_back( InternalCoords(ai, aj, ak, al, newDist, newTheta, newPhi) );*/ break; } } @@ -511,17 +498,15 @@ const // 3 or more bonds. std::vector const& priority = AtomJ.Priority(); ChiralType chirality = AtomJ.Chirality(); - if (chirality == IS_UNKNOWN_CHIRALITY) { - chirality = AtomJ.Orientation(); - mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", - topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - } + if (debug_ > 0) { mprintf("DEBUG:\t\tOriginal chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); mprintf("DEBUG:\t\tPriority around J %s(%i) is", topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); for (int idx = 0; idx < AJ.Nbonds(); idx++) mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); + for (int idx = 0; idx < AJ.Nbonds(); idx++) + mprintf(" %i", priority[idx]); mprintf("\n"); } @@ -567,11 +552,10 @@ const } } } - if (hasKnownInterval) - mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); // Check known interval if set if (hasKnownInterval) { + mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); if (chirality == IS_UNKNOWN_CHIRALITY) { mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); if (knownInterval < 0) @@ -587,6 +571,13 @@ const } } + // If still no chirality use the detected orientation + if (chirality == IS_UNKNOWN_CHIRALITY) { + chirality = AtomJ.Orientation(); + mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", + topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + } + // Determine the interval bool intervalIsSet = false; double interval = 0; @@ -609,6 +600,14 @@ const mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); } + // If there is a known interval, compare it to the determined one. + if (hasKnownInterval) { + double deltaInterval = fabs(interval - knownInterval); + mprintf("DEBUG:\t\tDetermined interval %g, known interval %g, delta %g\n", + interval*Constants::RADDEG, knownInterval*Constants::RADDEG, deltaInterval*Constants::RADDEG); + interval = fabs(knownInterval); + } + // If we have to assign an initial phi, make trans the longer branch if (knownIdx == -1) { std::vector visited = atomPositionKnown; From 45999894877270369aa84067dc009754f695aa70 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 27 Jan 2024 16:03:09 -0500 Subject: [PATCH 0391/1492] Adjust interval before know interval is used --- src/Structure/Model.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index c57338d3df..5f1cbbd336 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -600,6 +600,14 @@ const mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); } + // Adjust interval based on chirality and priority of the k atom + if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) + interval = -interval; + if ( (kPriorityIdx%2) == 0 ) { + mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); + interval = -interval; + } + // If there is a known interval, compare it to the determined one. if (hasKnownInterval) { double deltaInterval = fabs(interval - knownInterval); @@ -648,14 +656,6 @@ const return 1; } - // Adjust interval based on chirality and priority of the k atom - if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) - interval = -interval; - if ( (kPriorityIdx%2) == 0 ) { - mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); - interval = -interval; - } - if (debug_ > 0) { mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); From e70ebecbee907135dd5e9f3844277fd8c9f6dd96 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 28 Jan 2024 15:47:37 -0500 Subject: [PATCH 0392/1492] Only set K L IC if another IC does not cover it --- src/Structure/Builder.cpp | 14 +++++++++++--- src/Structure/Zmatrix.cpp | 27 +++++++++++++++++++++++---- src/Structure/Zmatrix.h | 3 ++- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index d7066cc435..2a2d0cdc4f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -51,7 +51,6 @@ const // Combine fragment1 into fragment 0 topology Topology& combinedTop = frag0Top; combinedTop.AppendTop( frag1Top ); - zmatrixA.print( &combinedTop ); // Combined fragment1 into fragment 0 coords. // Need to save the original coords in frame0 since SetupFrameV does not preserve. double* tmpcrd0 = new double[natom0*3]; @@ -99,20 +98,28 @@ const // Generate Zmatrix only for ICs involving bonded atoms Zmatrix bondZmatrix; + // Note which atoms already have an IC in zmatrixA + std::vector hasIC(combinedTop.Natom(), false); + for (Zmatrix::const_iterator it = zmatrixA.begin(); it != zmatrixA.end(); ++it) + hasIC[it->AtI()] = true; + //bondZmatrix.SetDebug( debug_ ); bondZmatrix.SetDebug( 1 ); // FIXME - if (bondZmatrix.SetupICsAroundBond(atA, atB, CombinedFrame, combinedTop, posKnown, AtomA, AtomB)) { + if (bondZmatrix.SetupICsAroundBond(atA, atB, CombinedFrame, combinedTop, posKnown, hasIC, AtomA, AtomB)) { mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", combinedTop.AtomMaskName(atA).c_str(), combinedTop.AtomMaskName(atB).c_str()); return 1; } + mprintf("DEBUG: CONVERT WITH bondZmatrix.\n"); //if (debug_ > 0) bondZmatrix.print(&combinedTop); if (bondZmatrix.SetToFrame( CombinedFrame, posKnown )) { mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); return 1; } + mprintf("DEBUG: CONVERT WITH zmatrixA.\n"); + zmatrixA.print( &combinedTop ); if (zmatrixA.SetToFrame( CombinedFrame, posKnown )) { mprinterr("Error: Conversion from zmatrixA to Cartesian coords failed.\n"); return 1; @@ -183,7 +190,8 @@ int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bo Zmatrix bondZmatrix; bondZmatrix.SetDebug( debug_ ); - if (bondZmatrix.SetupICsAroundBond(atA, atB, frameIn, topIn, hasPosition, AtomA, AtomB)) { + std::vector hasIC(topIn.Natom(), false); // FIXME + if (bondZmatrix.SetupICsAroundBond(atA, atB, frameIn, topIn, hasPosition, hasIC, AtomA, AtomB)) { mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", topIn.AtomMaskName(atA).c_str(), topIn.AtomMaskName(atB).c_str()); diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index a0a5a8ab93..0be0bd2c45 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -951,6 +951,7 @@ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn, int molnu */ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology const& topIn, std::vector const& atomPositionKnown, + std::vector const& hasICin, BuildAtom const& AtomA, BuildAtom const& AtomB) { if (debug_ > 0) @@ -960,8 +961,15 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology topIn.Natom()); IC_.clear(); - Barray hasIC( topIn.Natom(), false ); + //Barray hasIC( topIn.Natom(), false ); + Barray hasIC = hasICin; unsigned int nHasIC = 0; + for (std::vector::const_iterator it = hasIC.begin(); it != hasIC.end(); ++it) { + if (*it) { + nHasIC++; + mprintf("DEBUG:\tAtom %s already has an IC.\n", topIn.AtomMaskName(it-hasIC.begin()).c_str()); + } + } // Mark known atoms as already having IC for (std::vector::const_iterator it = atomPositionKnown.begin(); it != atomPositionKnown.end(); ++it) @@ -1043,9 +1051,20 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology if (topIn[*iat].Nbonds() > 2) { if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; } - if (model.AssignICsAroundBond(IC_, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { - mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); - return 1; + // Only do this if one or more of the atoms bonded to iat does not + // already have an IC. + unsigned int needsKLic = 0; + for (Atom::bond_iterator bat = topIn[*iat].bondbegin(); bat != topIn[*iat].bondend(); ++bat) + if ( *bat != atA && !hasIC[*bat] ) + needsKLic++; + if (needsKLic > 0) { + mprintf("DEBUG: K L IC needed.\n"); + if (model.AssignICsAroundBond(IC_, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { + mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); + return 1; + } + } else { + mprintf("DEBUG: K L IC not needed.\n"); } } } diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index d60ff50ddd..80ba9d61af 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -51,7 +51,8 @@ class Zmatrix { int SetFromFrame(Frame const&, Topology const&); /// Get internal coordinates around bond in one direction. int SetupICsAroundBond(int, int, Frame const&, Topology const&, - std::vector const&, BuildAtom const&, BuildAtom const&); + std::vector const&, std::vector const&, + BuildAtom const&, BuildAtom const&); /// Set Frame from internal coords int SetToFrame(Frame&) const; From 36da8acd8ac4db77d9e2443e3e356601c650e35e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 10:05:17 -0500 Subject: [PATCH 0393/1492] Add debug info. Note which atoms have an IC associated and do not need an IC when modeling ICs around a bond. --- src/Exec_Build.cpp | 15 +++++++++------ src/Structure/Builder.cpp | 22 ++++++++++++++++++---- src/Structure/Builder.h | 3 ++- src/Structure/Model.cpp | 2 +- src/Structure/Zmatrix.cpp | 11 +++++++---- 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 39afa8a282..5dee723fad 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -380,17 +380,23 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (zmatrix != 0) { mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); + mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, + topOut.TruncResNameOnumId(ires).c_str()); + zmatrix->print(&topOut); // Is this residue connected to an earlier residue? if ( *termType != Cpptraj::Structure::BEG_TERMINAL ) { for (int at = topOut.Res(ires).FirstAtom(); at != topOut.Res(ires).LastAtom(); ++at) { for (Atom::bond_iterator bat = topOut[at].bondbegin(); bat != topOut[at].bondend(); ++bat) { - if ((long int)topOut[*bat].ResNum() < ires) { - mprintf("DEBUG: Connected to residue %i\n", topOut[*bat].ResNum()); + long int jres = (long int)topOut[*bat].ResNum(); + if (jres < ires) { + mprintf("DEBUG: Connected to residue %s\n", topOut.TruncResNameNum(jres).c_str()); Cpptraj::Structure::Builder linkBuilder; linkBuilder.SetDebug( 1 ); // FIXME - if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, hasPosition)) { + if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, + zmatrix, ResZmatrices[jres], hasPosition)) + { mprinterr("Error: Model coords around bond failed between %s and %s\n", topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); return 1; @@ -405,9 +411,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // mprinterr("Error: Failed to create zmatrix from topology.\n"); // return 1; // } - mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, - topOut.TruncResNameOnumId(ires).c_str()); - zmatrix->print(&topOut); // Update internal coords from known positions if (zmatrix->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 2a2d0cdc4f..27713b5c1b 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -128,6 +128,7 @@ const return 0; } +/// \return The total number of atoms whose position is known for the specified residue static inline int known_count(int ires, Topology const& topIn, std::vector const& hasPosition) { int count = 0; @@ -138,7 +139,10 @@ static inline int known_count(int ires, Topology const& topIn, std::vector } /** Model the coordinates around a bond */ -int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bondAt0, int bondAt1, Barray& hasPosition) const { +int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bondAt0, int bondAt1, + Zmatrix const* zmatrix0, Zmatrix const* zmatrix1, Barray& hasPosition) +const +{ mprintf("DEBUG: Model coords around bond %s - %s\n", topIn.AtomMaskName(bondAt0).c_str(), topIn.AtomMaskName(bondAt1).c_str()); int res0 = topIn[bondAt0].ResNum(); int res1 = topIn[bondAt1].ResNum(); @@ -151,19 +155,23 @@ int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bo int known0 = known_count(res0, topIn, hasPosition); int known1 = known_count(res1, topIn, hasPosition); int atA, atB; - + Zmatrix const* zA; if (known0 < known1) { // Fragment 1 is better-known atA = bondAt0; atB = bondAt1; + zA = zmatrix0; + //zB = zmatrix1; } else { // Fragment 0 is better or equally known atA = bondAt1; atB = bondAt0; + zA = zmatrix1; + //zB = zmatrix0; } mprintf("DEBUG: More well-known atom: %s\n", topIn.AtomMaskName(atB).c_str()); - mprintf("DEBUG: Less well-known atom: %s\n", topIn.AtomMaskName(atA).c_str()); + mprintf("DEBUG: Less well-known atom: %s has zmatrix= %i\n", topIn.AtomMaskName(atA).c_str(), (int)(zA != 0)); int chiralityDebug; if (debug_ < 1) @@ -189,8 +197,14 @@ int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bo // Generate Zmatrix only for ICs involving bonded atoms Zmatrix bondZmatrix; + // Note which atoms already have an IC in zmatrix A + std::vector hasIC(topIn.Natom(), false); + if (zA != 0) { + for (Zmatrix::const_iterator it = zA->begin(); it != zA->end(); ++it) + hasIC[it->AtI()] = true; + } + bondZmatrix.SetDebug( debug_ ); - std::vector hasIC(topIn.Natom(), false); // FIXME if (bondZmatrix.SetupICsAroundBond(atA, atB, frameIn, topIn, hasPosition, hasIC, AtomA, AtomB)) { mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", topIn.AtomMaskName(atA).c_str(), diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 705902f005..bb82d47af7 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -5,6 +5,7 @@ class Topology; class Frame; namespace Cpptraj { namespace Structure { +class Zmatrix; /// Used to attach different topology/frame combos using internal coordinates class Builder { typedef std::vector Barray; @@ -14,7 +15,7 @@ class Builder { /// Combine second fragment into first fragment and bond int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; /// Model the coordinates around a bond given only some coordinates are known - int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Barray&) const; + int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; /// Set debug void SetDebug(int d) { debug_ = d; } private: diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 5f1cbbd336..50f700a506 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -428,7 +428,7 @@ int Cpptraj::Structure::Model::insertIc(std::vector& IC, const { if (atomPositionKnown[ai]) { - mprintf("DEBUG: Atom position already known for %s, skipping IC.\n", topIn.AtomMaskName(ai).c_str()); + mprintf("DEBUG:\tAtom position already known for %s, skipping IC.\n", topIn.AtomMaskName(ai).c_str()); return 0; } double newDist = 0; diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 0be0bd2c45..a5ac85a720 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1054,17 +1054,20 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology // Only do this if one or more of the atoms bonded to iat does not // already have an IC. unsigned int needsKLic = 0; - for (Atom::bond_iterator bat = topIn[*iat].bondbegin(); bat != topIn[*iat].bondend(); ++bat) - if ( *bat != atA && !hasIC[*bat] ) + for (Atom::bond_iterator bat = topIn[*iat].bondbegin(); bat != topIn[*iat].bondend(); ++bat) { + if ( *bat != atA && !hasIC[*bat] ) { + mprintf("DEBUG:\tAtom %s around %s has no IC.\n", topIn.AtomMaskName(*bat).c_str(), topIn.AtomMaskName(*iat).c_str()); needsKLic++; + } + } if (needsKLic > 0) { - mprintf("DEBUG: K L IC needed.\n"); + mprintf("DEBUG: K L IC needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); if (model.AssignICsAroundBond(IC_, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); return 1; } } else { - mprintf("DEBUG: K L IC not needed.\n"); + mprintf("DEBUG: K L IC not needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); } } } From de37f18f16c483b3fe8be701e3323b8d2de906e4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 10:21:14 -0500 Subject: [PATCH 0394/1492] Update again, fixed KL IC behavior --- test/Test_Sequence/Mol.mol2.save | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Test_Sequence/Mol.mol2.save b/test/Test_Sequence/Mol.mol2.save index 482c8198c5..c1b6440f8a 100644 --- a/test/Test_Sequence/Mol.mol2.save +++ b/test/Test_Sequence/Mol.mol2.save @@ -7,9 +7,9 @@ USER_CHARGES @ATOM 1 C1 -1.9010 -1.2979 -0.5927 CT 1 MOC 1.387300 - 2 H2 -2.3121 -2.1475 -1.1378 H1 1 MOC -0.288000 - 3 H3 -2.2811 -0.3718 -1.0240 H1 1 MOC -0.288000 - 4 H4 -2.1989 -1.3598 0.4539 H1 1 MOC -0.288000 + 2 H2 -2.2470 -2.2143 -0.1146 H1 1 MOC -0.288000 + 3 H3 -2.3292 -1.2263 -1.5925 H1 1 MOC -0.288000 + 4 H4 -2.2160 -0.4385 -0.0008 H1 1 MOC -0.288000 5 O5 -0.4741 -1.3169 -0.6848 OS 1 MOC -0.523200 6 N 0.0540 -0.2256 0.0153 N 2 CNALA -0.570310 7 H -0.4149 0.5139 0.5357 H 2 CNALA 0.364710 From 1f7209f68649c3c3a1428db9549b296ae4edcdfe Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 11:04:25 -0500 Subject: [PATCH 0395/1492] Make sequence search more expansive --- src/Exec_Sequence.cpp | 7 ++++++- src/Structure/Zmatrix.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 47e2b737a2..89127f23cb 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -25,7 +25,12 @@ const DataSet_Coords* unit = 0; if (LibSetNames.empty()) { // Look for name - unit = (DataSet_Coords*)DSL.FindSetOfGroup( *it, DataSet::COORDINATES ); + unit = (DataSet_Coords*)DSL.FindSetOfGroup( *it, DataSet::COORDINATES ); // FIXME need new set type + if (unit == 0) { + // Look for *[name] + std::string searchStr("*[" + *it + "]"); + unit = (DataSet_Coords*)DSL.FindSetOfGroup( searchStr, DataSet::COORDINATES ); // FIXME need new set type + } } else { // Look for name[aspect] DataSet* ds = 0; diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index a5ac85a720..2029906dda 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1429,7 +1429,7 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { continue; // FIXME } InternalCoords const& ic = IC_[icIdx]; - if (debug_ > 0) + //if (debug_ > 0) mprintf("DEBUG: Next IC to use is %i : %i %i %i %i r=%g theta=%g phi=%g\n", icIdx+1, ic.AtI()+1, ic.AtJ()+1, ic.AtK()+1, ic.AtL()+1, ic.Dist(), ic.Theta(), ic.Phi()); From 8d4d77a45022bd98f3fbc63a97a612f4841cc629 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 13:13:55 -0500 Subject: [PATCH 0396/1492] Add HasType function --- src/Atom.h | 1 + src/Parm_Amber.cpp | 2 +- src/Topology.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Atom.h b/src/Atom.h index ddc79dad78..8d6432508e 100644 --- a/src/Atom.h +++ b/src/Atom.h @@ -81,6 +81,7 @@ class Atom { inline double ElementRadius() const { return AtomicElementRadius_[element_]; } inline const NameType& Name() const { return aname_; } inline const NameType& Type() const { return atype_; } + inline bool HasType() const { return (atype_.len() > 0); } inline int TypeIndex() const { return atype_index_; } inline int MolNum() const { return mol_; } inline int Nbonds() const { return (int)bonds_.size(); } diff --git a/src/Parm_Amber.cpp b/src/Parm_Amber.cpp index c012e2278a..9f2b903bfb 100644 --- a/src/Parm_Amber.cpp +++ b/src/Parm_Amber.cpp @@ -2174,7 +2174,7 @@ int Parm_Amber::WriteParm(FileName const& fname, Topology const& TopOut) { // Check that atoms actually have a type. int NemptyTypes = 0; for (Topology::atom_iterator atm = TopOut.begin(); atm != TopOut.end(); ++atm) { - if (atm->Type().len() < 1) ++NemptyTypes; + if (!atm->HasType()) ++NemptyTypes; file_.CharToBuffer( *(atm->Type()) ); } file_.FlushBuffer(); diff --git a/src/Topology.cpp b/src/Topology.cpp index 051e6b3d42..121e038b80 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -53,7 +53,7 @@ unsigned int Topology::NuniqueAtomTypes() const { ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { - if (atm->Type().len() > 0) { + if (atm->HasType()) { TypeNameHolder atype( atm->Type() ); // Find in currentAtomTypes. bool found; @@ -2310,7 +2310,7 @@ static inline void GetLJAtomTypes( ParmHolder& atomTypes, ParmHolder::const_iterator atm = atoms.begin(); atm != atoms.end(); ++atm) - if (atm->Type().len() > 0) + if (atm->HasType() > 0) atomTypes.AddParm( TypeNameHolder(atm->Type()), AtomType(atm->Mass(), atm->Polar()), true ); } } @@ -3022,7 +3022,7 @@ void Topology::AssignNonbondParams(ParmHolder const& newTypes, ParmHolder currentAtomTypes; for (std::vector::const_iterator atm = atoms_.begin(); atm != atoms_.end(); ++atm) { - if (atm->Type().len() > 0) { + if (atm->HasType()) { TypeNameHolder types(1); types.AddName(atm->Type()); // Find in newTypes. From 083ffd54314385c2bb78cc08948e953f63e849df Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 14:04:07 -0500 Subject: [PATCH 0397/1492] Add code to get bond lengths from parameters if they are present. Only calc AtomC chirality if actually doing K L IC --- src/Structure/Model.cpp | 23 ++++++++++++++++++++--- src/Structure/Zmatrix.cpp | 8 ++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 50f700a506..9629b791dd 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -31,9 +31,26 @@ const { if (atomPositionKnown[ai] && atomPositionKnown[aj]) dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); - else - // One or both positions unknown. Use bond length. TODO use parameters - dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); + else { + // One or both positions unknown. Use estimated bond length or parameters. + bool foundParam = false; + if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { + TypeNameHolder btypes(2); + btypes.AddName( topIn[ai].Type() ); + btypes.AddName( topIn[aj].Type() ); + ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); + if (it != params_->BP().end()) { + dist = it->second.Req(); + foundParam = true; + mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", + topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), + topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), + it->second.Req(), it->second.Rk()); + } + } + if (!foundParam) + dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); + } return 0; } diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 2029906dda..f623d82374 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1047,10 +1047,6 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) { if (*iat != atB) { - BuildAtom AtomC; - if (topIn[*iat].Nbonds() > 2) { - if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; - } // Only do this if one or more of the atoms bonded to iat does not // already have an IC. unsigned int needsKLic = 0; @@ -1061,6 +1057,10 @@ int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology } } if (needsKLic > 0) { + BuildAtom AtomC; + if (topIn[*iat].Nbonds() > 2) { + if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; + } mprintf("DEBUG: K L IC needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); if (model.AssignICsAroundBond(IC_, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); From daa8bd64e7812edeec67462ef3f046d7901711e2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 15:10:27 -0500 Subject: [PATCH 0398/1492] Add parameter set var --- src/Structure/Builder.cpp | 3 ++- src/Structure/Builder.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 27713b5c1b..10fe1b6341 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -10,7 +10,8 @@ using namespace Cpptraj::Structure; /** CONSTRUCTOR */ Builder::Builder() : - debug_(0) + debug_(0), + params_(0) {} /** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index bb82d47af7..4f596662af 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -3,6 +3,7 @@ #include class Topology; class Frame; +class ParameterSet; namespace Cpptraj { namespace Structure { class Zmatrix; @@ -18,9 +19,12 @@ class Builder { int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; /// Set debug void SetDebug(int d) { debug_ = d; } + /// Set optional parameter set + void SetParameters(ParameterSet const*); private: int debug_; + ParameterSet const* params_; }; } } From 285bdf5a06ecb044244d73075fb959bbee2faefe Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 15:30:24 -0500 Subject: [PATCH 0399/1492] Move SetupICsAroundBond into Builder --- src/Structure/Builder.cpp | 307 +++++++++++++++++++++++++++++++++- src/Structure/Builder.h | 4 + src/Structure/Model.cpp | 14 +- src/Structure/Model.h | 6 +- src/Structure/Zmatrix.cpp | 302 +-------------------------------- src/Structure/Zmatrix.h | 6 - src/Structure/structuredepend | 6 +- src/cpptrajdepend | 6 +- 8 files changed, 326 insertions(+), 325 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 10fe1b6341..1465ec7fff 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1,5 +1,6 @@ #include "Builder.h" #include "BuildAtom.h" +#include "Model.h" #include "Zmatrix.h" #include "../CpptrajStdio.h" #include "../Frame.h" @@ -106,7 +107,7 @@ const //bondZmatrix.SetDebug( debug_ ); bondZmatrix.SetDebug( 1 ); // FIXME - if (bondZmatrix.SetupICsAroundBond(atA, atB, CombinedFrame, combinedTop, posKnown, hasIC, AtomA, AtomB)) { + if (SetupICsAroundBond(bondZmatrix, atA, atB, CombinedFrame, combinedTop, posKnown, hasIC, AtomA, AtomB)) { mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", combinedTop.AtomMaskName(atA).c_str(), combinedTop.AtomMaskName(atB).c_str()); @@ -206,7 +207,7 @@ const } bondZmatrix.SetDebug( debug_ ); - if (bondZmatrix.SetupICsAroundBond(atA, atB, frameIn, topIn, hasPosition, hasIC, AtomA, AtomB)) { + if (SetupICsAroundBond(bondZmatrix, atA, atB, frameIn, topIn, hasPosition, hasIC, AtomA, AtomB)) { mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", topIn.AtomMaskName(atA).c_str(), topIn.AtomMaskName(atB).c_str()); @@ -222,3 +223,305 @@ const return 0; } +/** Given two bonded atoms A and B, where B has a depth of at least 2 + * (i.e., it is possible to have B be atom J where we can form J-K-L), + * set up a complete set of internal coordinates involving A and B in the + * direction of atom A. This means all internal coordinates with A and B + * as I and J (should be only 1), as J and K, and as K and L. + */ +int Builder::SetupICsAroundBond(Zmatrix& zmatrix, + int atA, int atB, Frame const& frameIn, Topology const& topIn, + std::vector const& atomPositionKnown, + std::vector const& hasICin, + BuildAtom const& AtomA, BuildAtom const& AtomB) +const +{ + if (debug_ > 0) + mprintf("DEBUG: SetupICsAroundBond: atA= %s (%i) atB= %s (%i) total # atoms %i\n", + topIn.AtomMaskName(atA).c_str(), atA+1, + topIn.AtomMaskName(atB).c_str(), atB+1, + topIn.Natom()); + zmatrix.clear(); + + //Barray hasIC( topIn.Natom(), false ); + Barray hasIC = hasICin; + unsigned int nHasIC = 0; + for (std::vector::const_iterator it = hasIC.begin(); it != hasIC.end(); ++it) { + if (*it) { + nHasIC++; + mprintf("DEBUG:\tAtom %s already has an IC.\n", topIn.AtomMaskName(it-hasIC.begin()).c_str()); + } + } + // Mark known atoms as already having IC + for (std::vector::const_iterator it = atomPositionKnown.begin(); + it != atomPositionKnown.end(); ++it) + { + //mprintf("DEBUG: MARKING KNOWN ATOMS. %li\n", it - atomPositionKnown.begin()); + if (*it) { //MARK( it - atomPositionKnown.begin(), hasIC, nHasIC ); + hasIC[it - atomPositionKnown.begin()] = true; + nHasIC++; + } + } + + // First, make sure atom B as a bond depth of at least 2. + // Choose K and L atoms given atA is I and atB is J. + Atom const& AJ = topIn[atB]; + typedef std::pair Apair; + std::vector KLpairs; + for (Atom::bond_iterator kat = AJ.bondbegin(); kat != AJ.bondend(); ++kat) + { + if (*kat != atA) { + //mprintf("DEBUG: kat= %s\n", topIn.AtomMaskName(*kat).c_str()); + Atom const& AK = topIn[*kat]; + for (Atom::bond_iterator lat = AK.bondbegin(); lat != AK.bondend(); ++lat) + { + if (*lat != atB && *lat != atA) { + //mprintf("DEBUG: lat= %s\n", topIn.AtomMaskName(*lat).c_str()); + KLpairs.push_back( Apair(*kat, *lat) ); + } + } + } + } + if (debug_ > 0) { + for (std::vector::const_iterator it = KLpairs.begin(); + it != KLpairs.end(); ++it) + mprintf("DEBUG:\t\tKL pair %s - %s\n", topIn.AtomMaskName(it->first).c_str(), + topIn.AtomMaskName(it->second).c_str()); + } + if (KLpairs.empty()) { + mprinterr("Error: SetFromFrameAroundBond(): Could not find an atom pair bonded to atom %s\n", + topIn.AtomMaskName(atB).c_str()); + return 1; + } + // TODO be smarter about how K and L are selected? + double maxMass = topIn[KLpairs[0].first].Mass() + topIn[KLpairs[0].second].Mass(); + unsigned int maxIdx = 0; + for (unsigned int idx = 1; idx < KLpairs.size(); idx++) { + double sumMass = topIn[KLpairs[idx].first].Mass() + topIn[KLpairs[idx].second].Mass(); + if (sumMass > maxMass) { + maxMass = sumMass; + maxIdx = idx; + } + } + int atk0 = KLpairs[maxIdx].first; + int atl0 = KLpairs[maxIdx].second; + int modelDebug = 0; + if (debug_ > 0) { + mprintf("DEBUG: Chosen KL pair: %s - %s\n",topIn.AtomMaskName(atk0).c_str(), + topIn.AtomMaskName(atl0).c_str()); + modelDebug = debug_ - 1; + } + Cpptraj::Structure::Model model; + //model.SetDebug( modelDebug ); //FIXME + model.SetDebug( 1 ); + // FIXME + mprintf("DEBUG: ------------------------------------------------\n"); + //std::vector tmpic; + // I J: Set up ICs for X atB K L + if (model.AssignICsAroundBond(zmatrix, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { + mprinterr("Error: AssignICsAroundBond (I J) failed.\n"); + return 1; + } + // J K: Set up ICs for X atA atB K + if (model.AssignICsAroundBond(zmatrix, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { + mprinterr("Error: AssignICsAroundBond (J K) failed.\n"); + return 1; + } + // K L: Set up ICs for X iat atA atB + Atom const& AJ1 = topIn[atA]; + for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) + { + if (*iat != atB) { + // Only do this if one or more of the atoms bonded to iat does not + // already have an IC. + unsigned int needsKLic = 0; + for (Atom::bond_iterator bat = topIn[*iat].bondbegin(); bat != topIn[*iat].bondend(); ++bat) { + if ( *bat != atA && !hasIC[*bat] ) { + mprintf("DEBUG:\tAtom %s around %s has no IC.\n", topIn.AtomMaskName(*bat).c_str(), topIn.AtomMaskName(*iat).c_str()); + needsKLic++; + } + } + if (needsKLic > 0) { + BuildAtom AtomC; + if (topIn[*iat].Nbonds() > 2) { + if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; + } + mprintf("DEBUG: K L IC needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); + if (model.AssignICsAroundBond(zmatrix, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { + mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); + return 1; + } + } else { + mprintf("DEBUG: K L IC not needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); + } + } + } + // Mark/Print ICs + for (Zmatrix::const_iterator it = zmatrix.begin(); it != zmatrix.end(); ++it) { + it->printIC( topIn ); // DEBUG + //MARK( it->AtI(), hasIC, nHasIC ); + } + mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); + // FIXME + // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- +/* if (debug_ > 0) + mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); + double newDist = 0; + if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: length (i j) assignment failed.\n"); + return 1; + } + if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); + double newTheta = 0; + if (model.AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: theta (i j) assignment failed.\n"); + return 1; + } + if (debug_ > 0) mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); + double newPhi = 0; + if (model.AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, + atomPositionKnown, AtomB)) + { + mprinterr("Error: phi (i j) assignment failed.\n"); + return 1; + } + if (debug_ > 0) mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); + IC_.push_back(InternalCoords( atA, atB, atk0, atl0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); + if (debug_ > 0) { + mprintf("DEBUG: MODEL I J IC: "); + IC_.back().printIC(topIn); + } + MARK( atA, hasIC, nHasIC );*/ +/* + // ----- J K: Set up ICs for X atA atB K --------------------------- + Atom const& AJ1 = topIn[atA]; + int ati = -1; + //Atom const& AK1 = topIn[atB]; + //Atom const& AL1 = topIn[atk0]; + for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) + { + if (*iat != atB) { + if (ati == -1) ati = *iat; +/ // Set bond dist + if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: length (j k) assignment failed.\n"); + return 1; + } + // Set theta for I atA atB + newTheta = 0; + if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: theta (j k) assignment failed.\n"); + return 1; + } + if (debug_ > 0) + mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); + // Set phi for I atA atB K + newPhi = 0; + if (model.AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, + atomPositionKnown, AtomA)) + { + mprinterr("Error: phi (j k) assignment failed.\n"); + return 1; + } + if (debug_ > 0) + mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); + IC_.push_back(InternalCoords( *iat, atA, atB, atk0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); + if (debug_ > 0) { + mprintf("DEBUG: MODEL J K IC: "); + IC_.back().printIC(topIn); + } + MARK( *iat, hasIC, nHasIC ); + // ----- K L: Set up ICs for X iat atA atB --------------------- + Atom const& AJ2 = topIn[*iat]; + for (Atom::bond_iterator i2at = AJ2.bondbegin(); i2at != AJ2.bondend(); ++i2at) + { + if (*i2at != atA && *i2at != atB && !hasIC[*i2at]) { + mprintf("DEBUG: MODEL K L IC: %s %s %s %s %i %i %i %i\n", + topIn.AtomMaskName(*i2at).c_str(), + topIn.AtomMaskName(*iat).c_str(), + topIn.AtomMaskName(atA).c_str(), + topIn.AtomMaskName(atB).c_str(), + *i2at+1, *iat+1, atA+1, atB+1); + if (model.AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: length (k l) assignment failed.\n"); + return 1; + } + mprintf("DEBUG: K L distance= %g\n", newDist); + //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); + if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: theta (k l) assignment failed.\n"); + return 1; + } + mprintf("DEBUG: K L angle= %g\n", newTheta*Constants::RADDEG); + // Set phi for X iat atA atB + BuildAtom AtomC; + if (topIn[*iat].Nbonds() > 2) { + if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; + } + newPhi = 0; + //model.SetDebug( 1 ); // FIXME + if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, + atomPositionKnown, AtomC)) + { + mprinterr("Error: phi (k l) assignment failed.\n"); + return 1; + } + mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); + IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); + mprintf("DEBUG: MODEL K L IC: "); + IC_.back().printIC(topIn); + MARK( *i2at, hasIC, nHasIC ); + // Trace from atA *iat *i2at outwards + //ToTrace.push_back(atA); + //ToTrace.push_back(*iat); + //ToTrace.push_back(*i2at); + //if (traceMol(atA, *iat, *i2at, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) return 1; + + } + } + } + } +*/ + +/* + // Handle remaining atoms. + if (AJ1.Nbonds() > 1) { + if (AJ1.Nbonds() == 2) { + if (debug_ > 0) mprintf("DEBUG: 2 bonds to %s.\n", topIn.AtomMaskName(atA).c_str()); + if (traceMol(atB, atA, ati, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) + return 1; + } else { + // 3 or more bonds + std::vector const& priority = AtomA.Priority(); + int at0 = -1; + int at1 = -1; + std::vector remainingAtoms; + if (debug_ > 0) mprintf("DEBUG: %i bonds to %s\n", AJ1.Nbonds(), topIn.AtomMaskName(atA).c_str()); + for (std::vector::const_iterator it = priority.begin(); it != priority.end(); ++it) { + if (*it != atB) { + if (debug_ > 0) mprintf("DEBUG:\t\t%s\n", topIn.AtomMaskName(*it).c_str()); + if (at0 == -1) + at0 = *it; + else if (at1 == -1) + at1 = *it; + else + remainingAtoms.push_back( *it ); + } + } + // at0 atA at1 + if (traceMol(at1, atA, at0, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) + return 1; + // at1 atA, at0 + if (traceMol(at0, atA, at1, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) + return 1; + // Remaining atoms. + for (std::vector::const_iterator it = remainingAtoms.begin(); it != remainingAtoms.end(); ++it) { + if (traceMol(at0, atA, *it, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) + return 1; + } + } + } +*/ + return 0; +} + diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 4f596662af..d8336dedb6 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -6,6 +6,7 @@ class Frame; class ParameterSet; namespace Cpptraj { namespace Structure { +class BuildAtom; class Zmatrix; /// Used to attach different topology/frame combos using internal coordinates class Builder { @@ -22,6 +23,9 @@ class Builder { /// Set optional parameter set void SetParameters(ParameterSet const*); private: + int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, + std::vector const&, std::vector const&, + BuildAtom const&, BuildAtom const&) const; int debug_; ParameterSet const* params_; diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp index 9629b791dd..a0d560964f 100644 --- a/src/Structure/Model.cpp +++ b/src/Structure/Model.cpp @@ -1,6 +1,6 @@ #include "Model.h" #include "BuildAtom.h" -#include "InternalCoords.h" +#include "Zmatrix.h" #include "../CpptrajStdio.h" #include "../GuessAtomHybridization.h" #include "../Topology.h" @@ -438,7 +438,7 @@ const } /** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ -int Cpptraj::Structure::Model::insertIc(std::vector& IC, +int Cpptraj::Structure::Model::insertIc(Zmatrix& zmatrix, int ai, int aj, int ak, int al, double newPhi, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) @@ -462,12 +462,12 @@ const topIn.AtomMaskName(ak).c_str()); return 1; } - IC.push_back( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); + zmatrix.AddIC( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); return 0; } /** Assign internal coordinates for atoms I for torsions around J-K-L. */ -int Cpptraj::Structure::Model::AssignICsAroundBond(std::vector& IC, +int Cpptraj::Structure::Model::AssignICsAroundBond(Zmatrix& zmatrix, int aj, int ak, int al, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown, @@ -505,7 +505,7 @@ const for (int idx = 0; idx < AJ.Nbonds(); idx++) { if (AJ.Bond(idx) != ak) { int ai = AJ.Bond(idx); - if (insertIc(IC, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; + if (insertIc(zmatrix, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; break; } } @@ -689,7 +689,7 @@ const currentPhi = wrap360(currentPhi + interval); //if (atnum == ai) phi = currentPhi; //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (insertIc(IC, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; + if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; if (debug_ > 0) mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); } @@ -705,7 +705,7 @@ const currentPhi = wrap360(currentPhi - interval); //if (atnum == ai) phi = currentPhi; //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (insertIc(IC, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; + if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; if (debug_ > 0) mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); } diff --git a/src/Structure/Model.h b/src/Structure/Model.h index 77044818eb..f73f711579 100644 --- a/src/Structure/Model.h +++ b/src/Structure/Model.h @@ -10,7 +10,7 @@ class ParameterSet; namespace Cpptraj { namespace Structure { class BuildAtom; -class InternalCoords; +class Zmatrix; /// Routines to create a model for missing bond/angle/torsion parameters class Model { public: @@ -29,11 +29,11 @@ class Model { /// Given atoms I J K and L, attempt to assign a reasonable value for phi for atom I int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; /// Assign internal coordinates for atoms I for torsions around J-K-L. - int AssignICsAroundBond(std::vector&, int, int, int, + int AssignICsAroundBond(Zmatrix&, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; private: - int insertIc(std::vector&, int, int, int, int, double, + int insertIc(Zmatrix&, int, int, int, int, double, Topology const&, Frame const&, std::vector const&) const; diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index f623d82374..0eae2717b9 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1,11 +1,8 @@ #include -#include // std::sort, std::min, std::max +#include // std::sort, std::min, std::max, std::find #include #include // cos -#include // std::pair #include "Zmatrix.h" -#include "BuildAtom.h" -#include "Model.h" #include "GenerateConnectivityArrays.h" #include "../Frame.h" #include "../CpptrajStdio.h" @@ -943,303 +940,6 @@ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn, int molnu return SetFromFrame_Trace(frameIn, topIn, molnum); } -/** Given two bonded atoms A and B, where B has a depth of at least 2 - * (i.e., it is possible to have B be atom J where we can form J-K-L), - * set up a complete set of internal coordinates involving A and B in the - * direction of atom A. This means all internal coordinates with A and B - * as I and J (should be only 1), as J and K, and as K and L. - */ -int Zmatrix::SetupICsAroundBond(int atA, int atB, Frame const& frameIn, Topology const& topIn, - std::vector const& atomPositionKnown, - std::vector const& hasICin, - BuildAtom const& AtomA, BuildAtom const& AtomB) -{ - if (debug_ > 0) - mprintf("DEBUG: SetupICsAroundBond: atA= %s (%i) atB= %s (%i) total # atoms %i\n", - topIn.AtomMaskName(atA).c_str(), atA+1, - topIn.AtomMaskName(atB).c_str(), atB+1, - topIn.Natom()); - IC_.clear(); - - //Barray hasIC( topIn.Natom(), false ); - Barray hasIC = hasICin; - unsigned int nHasIC = 0; - for (std::vector::const_iterator it = hasIC.begin(); it != hasIC.end(); ++it) { - if (*it) { - nHasIC++; - mprintf("DEBUG:\tAtom %s already has an IC.\n", topIn.AtomMaskName(it-hasIC.begin()).c_str()); - } - } - // Mark known atoms as already having IC - for (std::vector::const_iterator it = atomPositionKnown.begin(); - it != atomPositionKnown.end(); ++it) - { - //mprintf("DEBUG: MARKING KNOWN ATOMS. %li\n", it - atomPositionKnown.begin()); - if (*it) MARK( it - atomPositionKnown.begin(), hasIC, nHasIC ); - } - - // First, make sure atom B as a bond depth of at least 2. - // Choose K and L atoms given atA is I and atB is J. - Atom const& AJ = topIn[atB]; - typedef std::pair Apair; - std::vector KLpairs; - for (Atom::bond_iterator kat = AJ.bondbegin(); kat != AJ.bondend(); ++kat) - { - if (*kat != atA) { - //mprintf("DEBUG: kat= %s\n", topIn.AtomMaskName(*kat).c_str()); - Atom const& AK = topIn[*kat]; - for (Atom::bond_iterator lat = AK.bondbegin(); lat != AK.bondend(); ++lat) - { - if (*lat != atB && *lat != atA) { - //mprintf("DEBUG: lat= %s\n", topIn.AtomMaskName(*lat).c_str()); - KLpairs.push_back( Apair(*kat, *lat) ); - } - } - } - } - if (debug_ > 0) { - for (std::vector::const_iterator it = KLpairs.begin(); - it != KLpairs.end(); ++it) - mprintf("DEBUG:\t\tKL pair %s - %s\n", topIn.AtomMaskName(it->first).c_str(), - topIn.AtomMaskName(it->second).c_str()); - } - if (KLpairs.empty()) { - mprinterr("Error: SetFromFrameAroundBond(): Could not find an atom pair bonded to atom %s\n", - topIn.AtomMaskName(atB).c_str()); - return 1; - } - // TODO be smarter about how K and L are selected? - double maxMass = topIn[KLpairs[0].first].Mass() + topIn[KLpairs[0].second].Mass(); - unsigned int maxIdx = 0; - for (unsigned int idx = 1; idx < KLpairs.size(); idx++) { - double sumMass = topIn[KLpairs[idx].first].Mass() + topIn[KLpairs[idx].second].Mass(); - if (sumMass > maxMass) { - maxMass = sumMass; - maxIdx = idx; - } - } - int atk0 = KLpairs[maxIdx].first; - int atl0 = KLpairs[maxIdx].second; - int modelDebug = 0; - if (debug_ > 0) { - mprintf("DEBUG: Chosen KL pair: %s - %s\n",topIn.AtomMaskName(atk0).c_str(), - topIn.AtomMaskName(atl0).c_str()); - modelDebug = debug_ - 1; - } - Cpptraj::Structure::Model model; - //model.SetDebug( modelDebug ); //FIXME - model.SetDebug( 1 ); - // FIXME - mprintf("DEBUG: ------------------------------------------------\n"); - //std::vector tmpic; - // I J: Set up ICs for X atB K L - if (model.AssignICsAroundBond(IC_, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { - mprinterr("Error: AssignICsAroundBond (I J) failed.\n"); - return 1; - } - // J K: Set up ICs for X atA atB K - if (model.AssignICsAroundBond(IC_, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { - mprinterr("Error: AssignICsAroundBond (J K) failed.\n"); - return 1; - } - // K L: Set up ICs for X iat atA atB - Atom const& AJ1 = topIn[atA]; - for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) - { - if (*iat != atB) { - // Only do this if one or more of the atoms bonded to iat does not - // already have an IC. - unsigned int needsKLic = 0; - for (Atom::bond_iterator bat = topIn[*iat].bondbegin(); bat != topIn[*iat].bondend(); ++bat) { - if ( *bat != atA && !hasIC[*bat] ) { - mprintf("DEBUG:\tAtom %s around %s has no IC.\n", topIn.AtomMaskName(*bat).c_str(), topIn.AtomMaskName(*iat).c_str()); - needsKLic++; - } - } - if (needsKLic > 0) { - BuildAtom AtomC; - if (topIn[*iat].Nbonds() > 2) { - if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; - } - mprintf("DEBUG: K L IC needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); - if (model.AssignICsAroundBond(IC_, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { - mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); - return 1; - } - } else { - mprintf("DEBUG: K L IC not needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); - } - } - } - // Mark/Print ICs - for (std::vector::const_iterator it = IC_.begin(); it != IC_.end(); ++it) { - it->printIC( topIn ); // DEBUG - MARK( it->AtI(), hasIC, nHasIC ); - } - mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); - // FIXME - // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- -/* if (debug_ > 0) - mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); - double newDist = 0; - if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: length (i j) assignment failed.\n"); - return 1; - } - if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); - double newTheta = 0; - if (model.AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: theta (i j) assignment failed.\n"); - return 1; - } - if (debug_ > 0) mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); - double newPhi = 0; - if (model.AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, - atomPositionKnown, AtomB)) - { - mprinterr("Error: phi (i j) assignment failed.\n"); - return 1; - } - if (debug_ > 0) mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( atA, atB, atk0, atl0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - if (debug_ > 0) { - mprintf("DEBUG: MODEL I J IC: "); - IC_.back().printIC(topIn); - } - MARK( atA, hasIC, nHasIC );*/ -/* - // ----- J K: Set up ICs for X atA atB K --------------------------- - Atom const& AJ1 = topIn[atA]; - int ati = -1; - //Atom const& AK1 = topIn[atB]; - //Atom const& AL1 = topIn[atk0]; - for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) - { - if (*iat != atB) { - if (ati == -1) ati = *iat; -/ // Set bond dist - if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: length (j k) assignment failed.\n"); - return 1; - } - // Set theta for I atA atB - newTheta = 0; - if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: theta (j k) assignment failed.\n"); - return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); - // Set phi for I atA atB K - newPhi = 0; - if (model.AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, - atomPositionKnown, AtomA)) - { - mprinterr("Error: phi (j k) assignment failed.\n"); - return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( *iat, atA, atB, atk0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - if (debug_ > 0) { - mprintf("DEBUG: MODEL J K IC: "); - IC_.back().printIC(topIn); - } - MARK( *iat, hasIC, nHasIC ); - // ----- K L: Set up ICs for X iat atA atB --------------------- - Atom const& AJ2 = topIn[*iat]; - for (Atom::bond_iterator i2at = AJ2.bondbegin(); i2at != AJ2.bondend(); ++i2at) - { - if (*i2at != atA && *i2at != atB && !hasIC[*i2at]) { - mprintf("DEBUG: MODEL K L IC: %s %s %s %s %i %i %i %i\n", - topIn.AtomMaskName(*i2at).c_str(), - topIn.AtomMaskName(*iat).c_str(), - topIn.AtomMaskName(atA).c_str(), - topIn.AtomMaskName(atB).c_str(), - *i2at+1, *iat+1, atA+1, atB+1); - if (model.AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: length (k l) assignment failed.\n"); - return 1; - } - mprintf("DEBUG: K L distance= %g\n", newDist); - //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); - if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: theta (k l) assignment failed.\n"); - return 1; - } - mprintf("DEBUG: K L angle= %g\n", newTheta*Constants::RADDEG); - // Set phi for X iat atA atB - BuildAtom AtomC; - if (topIn[*iat].Nbonds() > 2) { - if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; - } - newPhi = 0; - //model.SetDebug( 1 ); // FIXME - if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, - atomPositionKnown, AtomC)) - { - mprinterr("Error: phi (k l) assignment failed.\n"); - return 1; - } - mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - mprintf("DEBUG: MODEL K L IC: "); - IC_.back().printIC(topIn); - MARK( *i2at, hasIC, nHasIC ); - // Trace from atA *iat *i2at outwards - //ToTrace.push_back(atA); - //ToTrace.push_back(*iat); - //ToTrace.push_back(*i2at); - //if (traceMol(atA, *iat, *i2at, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) return 1; - - } - } - } - } -*/ - -/* - // Handle remaining atoms. - if (AJ1.Nbonds() > 1) { - if (AJ1.Nbonds() == 2) { - if (debug_ > 0) mprintf("DEBUG: 2 bonds to %s.\n", topIn.AtomMaskName(atA).c_str()); - if (traceMol(atB, atA, ati, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - } else { - // 3 or more bonds - std::vector const& priority = AtomA.Priority(); - int at0 = -1; - int at1 = -1; - std::vector remainingAtoms; - if (debug_ > 0) mprintf("DEBUG: %i bonds to %s\n", AJ1.Nbonds(), topIn.AtomMaskName(atA).c_str()); - for (std::vector::const_iterator it = priority.begin(); it != priority.end(); ++it) { - if (*it != atB) { - if (debug_ > 0) mprintf("DEBUG:\t\t%s\n", topIn.AtomMaskName(*it).c_str()); - if (at0 == -1) - at0 = *it; - else if (at1 == -1) - at1 = *it; - else - remainingAtoms.push_back( *it ); - } - } - // at0 atA at1 - if (traceMol(at1, atA, at0, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - // at1 atA, at0 - if (traceMol(at0, atA, at1, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - // Remaining atoms. - for (std::vector::const_iterator it = remainingAtoms.begin(); it != remainingAtoms.end(); ++it) { - if (traceMol(at0, atA, *it, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - } - } - } -*/ - return 0; -} - // ----------------------------------------------------------------------------- /** \return Position of atom I from given internal coordinate. */ Vec3 Zmatrix::AtomIposition(InternalCoords const& ic, Frame const& frameOut) diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 80ba9d61af..165d5c661e 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -1,14 +1,12 @@ #ifndef INC_STRUCTURE_ZMATRIX_H #define INC_STRUCTURE_ZMATRIX_H #include "InternalCoords.h" -#include "StructureEnum.h" #include "../Vec3.h" class Frame; class Topology; class Molecule; namespace Cpptraj { namespace Structure { -class BuildAtom; /// Hold internal coordinates for a system. class Zmatrix { typedef std::vector ICarray; @@ -49,10 +47,6 @@ class Zmatrix { int SetFromFrame(Frame const&, Topology const&, int); /// Convert molecule 0 of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&); - /// Get internal coordinates around bond in one direction. - int SetupICsAroundBond(int, int, Frame const&, Topology const&, - std::vector const&, std::vector const&, - BuildAtom const&, BuildAtom const&); /// Set Frame from internal coords int SetToFrame(Frame&) const; diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index b944b35e4c..0c7b220ea1 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,16 +1,16 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h -Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h InternalCoords.h StructureEnum.h Zmatrix.h +Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h -Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h InternalCoords.h Model.h StructureEnum.h +Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h GenerateConnectivityArrays.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivityArrays.h InternalCoords.h StructureEnum.h Zmatrix.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index c3666e4073..f58b379a6f 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -446,21 +446,21 @@ Spline.o : Spline.cpp CpptrajStdio.h Spline.h SplineFxnTable.o : SplineFxnTable.cpp Constants.h CpptrajStdio.h Spline.h SplineFxnTable.h StringRoutines.h StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/StructureEnum.o : Structure/StructureEnum.cpp Structure/StructureEnum.h Structure/StructureRoutines.o : Structure/StructureRoutines.cpp Atom.h CpptrajStdio.h NameType.h Residue.h Structure/StructureRoutines.h SymbolExporting.h Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 3aed3f0ef8bc60360d508e445af3b90fe19d44a1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 15:33:51 -0500 Subject: [PATCH 0400/1492] Add SetParameters --- src/Structure/Builder.cpp | 9 +++++++++ src/Structure/Builder.h | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 1465ec7fff..3dcbf1cff6 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -15,6 +15,15 @@ Builder::Builder() : params_(0) {} +/** Set optional parameter set. */ +void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { + if (paramsIn == 0) { + mprinterr("Internal Error: Builder::SetParmaters called with null set.\n"); + return; + } + params_ = paramsIn; +} + /** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ int Builder::Combine(Topology& frag0Top, Frame& frag0frm, Topology const& frag1Top, Frame const& frag1frm, diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index d8336dedb6..020f677c69 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -14,14 +14,15 @@ class Builder { public: /// CONSTRUCTOR Builder(); - /// Combine second fragment into first fragment and bond - int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; - /// Model the coordinates around a bond given only some coordinates are known - int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; /// Set debug void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); + + /// Combine second fragment into first fragment and bond + int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; + /// Model the coordinates around a bond given only some coordinates are known + int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; private: int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, std::vector const&, std::vector const&, From cd20b708bb673c3b945fd4d452dbae41ccf25765 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 15:35:52 -0500 Subject: [PATCH 0401/1492] Copy AssignLengths to Builder --- src/Structure/Builder.cpp | 32 ++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 3 +++ 2 files changed, 35 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 3dcbf1cff6..78b33cc8f5 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -3,6 +3,7 @@ #include "Model.h" #include "Zmatrix.h" #include "../CpptrajStdio.h" +#include "../DistRoutines.h" #include "../Frame.h" #include "../Topology.h" #include // std::copy @@ -24,6 +25,37 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { params_ = paramsIn; } +// ----------------------------------------------------------------------------- +/** Assign reasonable value for bond distance. */ +int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) +const +{ + if (atomPositionKnown[ai] && atomPositionKnown[aj]) + dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); + else { + // One or both positions unknown. Use estimated bond length or parameters. + bool foundParam = false; + if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { + TypeNameHolder btypes(2); + btypes.AddName( topIn[ai].Type() ); + btypes.AddName( topIn[aj].Type() ); + ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); + if (it != params_->BP().end()) { + dist = it->second.Req(); + foundParam = true; + mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", + topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), + topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), + it->second.Req(), it->second.Rk()); + } + } + if (!foundParam) + dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); + } + return 0; +} + +// ----------------------------------------------------------------------------- /** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ int Builder::Combine(Topology& frag0Top, Frame& frag0frm, Topology const& frag1Top, Frame const& frag1frm, diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 020f677c69..fd4baf304a 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -24,6 +24,9 @@ class Builder { /// Model the coordinates around a bond given only some coordinates are known int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; private: + /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known + int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; + int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, std::vector const&, std::vector const&, BuildAtom const&, BuildAtom const&) const; From 475387f34fd7fe44e27f09245235cdb55778d2be Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 15:38:00 -0500 Subject: [PATCH 0402/1492] Copy AssignTheta to Builder --- src/Structure/Builder.cpp | 115 ++++++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 3 + 2 files changed, 118 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 78b33cc8f5..3ca3be6258 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2,10 +2,13 @@ #include "BuildAtom.h" #include "Model.h" #include "Zmatrix.h" +#include "../Constants.h" #include "../CpptrajStdio.h" #include "../DistRoutines.h" #include "../Frame.h" +#include "../GuessAtomHybridization.h" #include "../Topology.h" +#include "../TorsionRoutines.h" #include // std::copy using namespace Cpptraj::Structure; @@ -55,6 +58,118 @@ const return 0; } +/** Attempt to assign a reasonable value for theta internal coordinate for + * atom i given that atoms j and k have known positions. + */ +int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) +const +{ + // Figure out hybridization and chirality of atom j. + if (debug_ > 0) + mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); + if (atomPositionKnown[ai] && atomPositionKnown[aj] && atomPositionKnown[ak]) + { + theta = CalcAngle(frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak)); + return 0; + } + + Atom const& AJ = topIn[aj]; + if (debug_ > 0) { + mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); + mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); + mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); + } + // Sanity check + if (AJ.Nbonds() < 2) { + mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); + return 1; + } + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) + hybrid = it->second.Hybridization(); + } + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) + hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); +/* + HybridizationType hybrid = UNKNOWN_HYBRIDIZATION; + // Handle specific elements + switch (AJ.Element()) { + case Atom::CARBON : + switch (AJ.Nbonds()) { + case 2 : hybrid = SP; break; + case 3 : hybrid = SP2; break; + case 4 : hybrid = SP3; break; + } + break; + case Atom::NITROGEN : + switch (AJ.Nbonds()) { + case 2 : hybrid = SP2; break; + case 3 : + // Check for potential SP2. If only 1 of the bonded atoms is + // hydrogen, assume SP2. TODO actually check for aromaticity. + int n_hydrogens = 0; + for (Atom::bond_iterator bat = AJ.bondbegin(); bat != AJ.bondend(); ++bat) + if (topIn[*bat].Element() == Atom::HYDROGEN) + n_hydrogens++; + if (n_hydrogens == 1) + hybrid = SP2; + else + hybrid = SP3; + break; + } + break; + case Atom::OXYGEN : + switch (AJ.Nbonds()) { + case 2 : hybrid = SP3; break; + } + break; + case Atom::SULFUR : + switch (AJ.Nbonds()) { + case 2 : hybrid = SP3; break; + } + break; + default: hybrid = UNKNOWN_HYBRIDIZATION; break; + }*/ + // Fill in what values we can for known atoms +/* std::vector knownTheta( AJ.Nbonds() ); + int knownIdx = -1; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = AJ.Bond(idx); + if (atnum != ak && atomPositionKnown[atnum]) { + knownTheta[idx] = CalcAngle(frameIn.XYZ(atnum), + frameIn.XYZ(aj), + frameIn.XYZ(ak)); + mprintf("DEBUG:\t\tKnown theta for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownTheta[idx]*Constants::RADDEG); + if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known + } + } + if (knownIdx == -1) {*/ + //mprintf("DEBUG:\t\tNo known theta.\n"); + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { + // Assign a theta based on number of bonds + switch (AJ.Nbonds()) { + case 4 : hybrid = AtomType::SP3; break; + case 3 : hybrid = AtomType::SP2; break; + case 2 : hybrid = AtomType::SP; break; + default : mprinterr("Internal Error: AssignTheta(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; + } + } + // Assign a theta based on hybridization + switch (hybrid) { + case AtomType::SP3 : theta = 109.5 * Constants::DEGRAD; break; + case AtomType::SP2 : theta = 120.0 * Constants::DEGRAD; break; + case AtomType::SP : theta = 180.0 * Constants::DEGRAD; break; + default : mprinterr("Internal Error: AssignTheta(): Unhandled hybridization for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; + }/* + } else { + theta = knownTheta[knownIdx]; // TODO just use above guess via hybrid? + }*/ + + return 0; +} + // ----------------------------------------------------------------------------- /** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ int Builder::Combine(Topology& frag0Top, Frame& frag0frm, diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index fd4baf304a..297cda10bd 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -26,7 +26,10 @@ class Builder { private: /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; + /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I + int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; + /// Model coordinates around a bond int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, std::vector const&, std::vector const&, BuildAtom const&, BuildAtom const&) const; From d2ad854cf50416d6752184ba938ae755e94c1afe Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 29 Jan 2024 15:42:03 -0500 Subject: [PATCH 0403/1492] Copy AssignICsAroundBond to Builder --- src/Structure/Builder.cpp | 302 ++++++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 7 + 2 files changed, 309 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 3ca3be6258..a170ff40b4 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -169,6 +169,308 @@ const return 0; } +/** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ +int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, + int ai, int aj, int ak, int al, double newPhi, + Topology const& topIn, Frame const& frameIn, + std::vector const& atomPositionKnown) +const +{ + if (atomPositionKnown[ai]) { + mprintf("DEBUG:\tAtom position already known for %s, skipping IC.\n", topIn.AtomMaskName(ai).c_str()); + return 0; + } + double newDist = 0; + if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: AssignLength failed for %s - %s \n", + topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); + return 1; + } + double newTheta = 0; + if (AssignTheta(newTheta, ai, aj, ak, topIn, frameIn, atomPositionKnown)) { + mprinterr("Error: AssignTheta failed for %s - %s - %s\n", + topIn.AtomMaskName(ai).c_str(), + topIn.AtomMaskName(aj).c_str(), + topIn.AtomMaskName(ak).c_str()); + return 1; + } + zmatrix.AddIC( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); + return 0; +} + +/// Recursive function to return depth from an atom along bonds +static int atom_depth(int& depth, + int at, Topology const& topIn, std::vector& visited, int maxdepth) +{ + if (depth == maxdepth) return 0; + depth++; + visited[at] = true; + int depthFromHere = 1; + for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) + { + if (!visited[*bat]) + depthFromHere += atom_depth( depth, *bat, topIn, visited, maxdepth ); + } + return depthFromHere; +} + +/// Wrap given value between -PI and PI +static inline double wrap360(double phi) { + if (phi > Constants::PI) + return phi - Constants::TWOPI; + else if (phi < -Constants::PI) + return phi + Constants::TWOPI; + else + return phi; +} + +/** Assign internal coordinates for atoms I for torsions around J-K-L. */ +int Cpptraj::Structure::Builder::AssignICsAroundBond(Zmatrix& zmatrix, + int aj, int ak, int al, + Topology const& topIn, Frame const& frameIn, + std::vector const& atomPositionKnown, + BuildAtom const& AtomJ) +const +{ + mprintf("DEBUG: AssignICsAroundBond: X - %s - %s - %s %i - %i - %i\n", + topIn.AtomMaskName(aj).c_str(), + topIn.AtomMaskName(ak).c_str(), + topIn.AtomMaskName(al).c_str(), + aj+1, ak+1, al+1); + // Ideally, atoms J K and L should be known + if (!atomPositionKnown[aj] || + !atomPositionKnown[ak] || + !atomPositionKnown[al]) + { + mprintf("Warning: AssignICsAroundBond(): Not all atom positions known.\n" + "Warning: %i %s (%i) - %i %s (%i) - %i %s (%i)\n", + aj+1, topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj], + ak+1, topIn.AtomMaskName(ak).c_str(), (int)atomPositionKnown[ak], + al+1, topIn.AtomMaskName(al).c_str(), (int)atomPositionKnown[al]); + //return 1; + } + Atom const& AJ = topIn[aj]; + // If atom J has only 1 bond this is not needed. + if (AJ.Nbonds() < 2) return 0; + + + if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); + // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. + if (AJ.Nbonds() < 3) { + if (debug_ > 0) + mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); + double newPhi = -180 * Constants::DEGRAD; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + if (AJ.Bond(idx) != ak) { + int ai = AJ.Bond(idx); + if (insertIc(zmatrix, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; + break; + } + } + return 0; + } // END only 2 bonds + + // 3 or more bonds. + std::vector const& priority = AtomJ.Priority(); + ChiralType chirality = AtomJ.Chirality(); + + if (debug_ > 0) { + mprintf("DEBUG:\t\tOriginal chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + mprintf("DEBUG:\t\tPriority around J %s(%i) is", + topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); + for (int idx = 0; idx < AJ.Nbonds(); idx++) + mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); + for (int idx = 0; idx < AJ.Nbonds(); idx++) + mprintf(" %i", priority[idx]); + mprintf("\n"); + } + + // Get index of atom K in the priority list, starting from least priority. + int kPriorityIdx = -1; + for (int idx = AJ.Nbonds()-1; idx > -1; idx--) { + if (priority[idx] == ak) { + kPriorityIdx = AJ.Nbonds() - 1 - idx; + break; + } + } + mprintf("DEBUG:\t\tK priority index is %i\n", kPriorityIdx); + if (kPriorityIdx < 0) { + mprinterr("Error: Could not find atom K %s in atom J %s bond list.\n", + topIn.AtomMaskName(ak).c_str(), topIn.AtomMaskName(aj).c_str()); + return 1; + } + + // Fill in what values we can for known atoms + std::vector knownPhi( AJ.Nbonds() ); + std::vector isKnown( AJ.Nbonds(), false ); + int knownIdx = -1; + double knownInterval = 0; + bool hasKnownInterval = false; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak && atomPositionKnown[atnum] && + atomPositionKnown[aj] && + atomPositionKnown[ak] && + atomPositionKnown[al]) + { + knownPhi[idx] = Torsion(frameIn.XYZ(atnum), + frameIn.XYZ(aj), + frameIn.XYZ(ak), + frameIn.XYZ(al)); + isKnown[idx] = true; + if (debug_ > 0) + mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); + if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known + if (idx > 0 && isKnown[idx-1] && isKnown[idx]) { + knownInterval = wrap360(knownPhi[idx] - knownPhi[idx-1]); + hasKnownInterval = true; + } + } + } + + // Check known interval if set + if (hasKnownInterval) { + mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); + if (chirality == IS_UNKNOWN_CHIRALITY) { + mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); + if (knownInterval < 0) + chirality = IS_S; + else + chirality = IS_R; + } else if (chirality == IS_S) { + if (knownInterval > 0) + mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); + } else if (chirality == IS_R) { + if (knownInterval < 0) + mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); + } + } + + // If still no chirality use the detected orientation + if (chirality == IS_UNKNOWN_CHIRALITY) { + chirality = AtomJ.Orientation(); + mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", + topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); + } + + // Determine the interval + bool intervalIsSet = false; + double interval = 0; + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) { + if (it->second.Hybridization() == AtomType::SP2) { + interval = 180 * Constants::DEGRAD; + intervalIsSet = true; + } else if (it->second.Hybridization() == AtomType::SP3) { + interval = 120 * Constants::DEGRAD; + intervalIsSet = true; + } + } + if (intervalIsSet) mprintf("DEBUG:\t\tInterval was set from atom J hybridization.\n"); + } + if (!intervalIsSet) { + // The interval will be 360 / (number of bonds - 1) + interval = Constants::TWOPI / (AJ.Nbonds() - 1); + mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); + } + + // Adjust interval based on chirality and priority of the k atom + if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) + interval = -interval; + if ( (kPriorityIdx%2) == 0 ) { + mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); + interval = -interval; + } + + // If there is a known interval, compare it to the determined one. + if (hasKnownInterval) { + double deltaInterval = fabs(interval - knownInterval); + mprintf("DEBUG:\t\tDetermined interval %g, known interval %g, delta %g\n", + interval*Constants::RADDEG, knownInterval*Constants::RADDEG, deltaInterval*Constants::RADDEG); + interval = fabs(knownInterval); + } + + // If we have to assign an initial phi, make trans the longer branch + if (knownIdx == -1) { + std::vector visited = atomPositionKnown; + // TODO: Ensure bonded atoms are not yet visited? + visited[aj] = true; + visited[ak] = true; + //std::vector depth( AJ.Nbonds() ); + int max_depth = 0; + int max_idx = -1; + for (int idx = 0; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + int currentDepth = 0; + //depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); + int depth = atom_depth(currentDepth, atnum, topIn, visited, 10); + if (debug_ > 0) + mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", + topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth); + //if (knownIdx == -1 && depth[idx] < 3) { + // knownIdx = idx; + // knownPhi[idx] = 0; + //} + if (max_idx == -1 || depth > max_depth) { + max_depth = depth; + max_idx = idx; + } + } + } + mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); + knownIdx = max_idx; + knownPhi[max_idx] = interval;// -180 * Constants::DEGRAD; + isKnown[max_idx] = true; + } + + // Sanity check + if (knownIdx < 0) { + mprinterr("Internal Error: AssignPhi(): knownIdx is < 0\n"); + return 1; + } + + if (debug_ > 0) { + mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); + mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); + } + + // Forwards from the known index + double currentPhi = knownPhi[knownIdx]; + for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { + int atnum = priority[idx]; + if (atnum != ak) { + if (isKnown[idx]) + currentPhi = knownPhi[idx]; + else + currentPhi = wrap360(currentPhi + interval); + //if (atnum == ai) phi = currentPhi; + //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); + if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; + if (debug_ > 0) + mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); + } + } + // Backwards from the known index + currentPhi = knownPhi[knownIdx]; + for (int idx = knownIdx - 1; idx > -1; idx--) { + int atnum = priority[idx]; + if (atnum != ak) { + if (isKnown[idx]) + currentPhi = knownPhi[idx]; + else + currentPhi = wrap360(currentPhi - interval); + //if (atnum == ai) phi = currentPhi; + //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); + if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; + if (debug_ > 0) + mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); + } + } + + return 0; +} // ----------------------------------------------------------------------------- /** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 297cda10bd..3b2055b837 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -28,6 +28,13 @@ class Builder { int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; + /// Insert an internal coord into a zmatrix + int insertIc(Zmatrix&, int, int, int, int, double, + Topology const&, Frame const&, std::vector const&) const; + /// Assign internal coordinates for atoms I for torsions around J-K-L. + int AssignICsAroundBond(Zmatrix&, int, int, int, + Topology const&, Frame const&, std::vector const&, + BuildAtom const&) const; /// Model coordinates around a bond int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, From f0e2f3612ea73ebe2f107afa40b3d526b57e69e7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 08:04:55 -0500 Subject: [PATCH 0404/1492] Remove Model class; functionality moved to Builder class. --- src/Structure/Builder.cpp | 11 +- src/Structure/CMakeLists.txt | 1 - src/Structure/Model.cpp | 753 ---------------------------------- src/Structure/Model.h | 45 -- src/Structure/structuredepend | 5 +- src/Structure/structurefiles | 1 - src/cpptrajdepend | 11 +- 7 files changed, 12 insertions(+), 815 deletions(-) delete mode 100644 src/Structure/Model.cpp delete mode 100644 src/Structure/Model.h diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index a170ff40b4..02cbb2664b 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1,6 +1,5 @@ #include "Builder.h" #include "BuildAtom.h" -#include "Model.h" #include "Zmatrix.h" #include "../Constants.h" #include "../CpptrajStdio.h" @@ -769,19 +768,19 @@ const topIn.AtomMaskName(atl0).c_str()); modelDebug = debug_ - 1; } - Cpptraj::Structure::Model model; + //Cpptraj::Structure::Model model; //model.SetDebug( modelDebug ); //FIXME - model.SetDebug( 1 ); + //model.SetDebug( 1 ); // FIXME mprintf("DEBUG: ------------------------------------------------\n"); //std::vector tmpic; // I J: Set up ICs for X atB K L - if (model.AssignICsAroundBond(zmatrix, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { + if (AssignICsAroundBond(zmatrix, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { mprinterr("Error: AssignICsAroundBond (I J) failed.\n"); return 1; } // J K: Set up ICs for X atA atB K - if (model.AssignICsAroundBond(zmatrix, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { + if (AssignICsAroundBond(zmatrix, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { mprinterr("Error: AssignICsAroundBond (J K) failed.\n"); return 1; } @@ -805,7 +804,7 @@ const if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; } mprintf("DEBUG: K L IC needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); - if (model.AssignICsAroundBond(zmatrix, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { + if (AssignICsAroundBond(zmatrix, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); return 1; } diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index ffdd80270f..a7cebdea51 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -8,7 +8,6 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/GenerateConnectivityArrays.cpp ${CMAKE_CURRENT_LIST_DIR}/HisProt.cpp ${CMAKE_CURRENT_LIST_DIR}/InternalCoords.cpp - ${CMAKE_CURRENT_LIST_DIR}/Model.cpp ${CMAKE_CURRENT_LIST_DIR}/StructureEnum.cpp ${CMAKE_CURRENT_LIST_DIR}/StructureRoutines.cpp ${CMAKE_CURRENT_LIST_DIR}/SugarBuilder.cpp diff --git a/src/Structure/Model.cpp b/src/Structure/Model.cpp deleted file mode 100644 index a0d560964f..0000000000 --- a/src/Structure/Model.cpp +++ /dev/null @@ -1,753 +0,0 @@ -#include "Model.h" -#include "BuildAtom.h" -#include "Zmatrix.h" -#include "../CpptrajStdio.h" -#include "../GuessAtomHybridization.h" -#include "../Topology.h" -#include "../TorsionRoutines.h" -#include "../DistRoutines.h" -#include "../Constants.h" -#include "../ParameterSet.h" -#include - -/** CONSTRUCTOR */ -Cpptraj::Structure::Model::Model() : - debug_(0), - params_(0) -{} - -/** Set optional parameter set. */ -void Cpptraj::Structure::Model::SetParameters(ParameterSet const* paramsIn) { - if (paramsIn == 0) { - mprinterr("Internal Error: Model::SetParmaters called with null set.\n"); - return; - } - params_ = paramsIn; -} - -/** Assign reasonable value for bond distance. */ -int Cpptraj::Structure::Model::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) -const -{ - if (atomPositionKnown[ai] && atomPositionKnown[aj]) - dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); - else { - // One or both positions unknown. Use estimated bond length or parameters. - bool foundParam = false; - if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { - TypeNameHolder btypes(2); - btypes.AddName( topIn[ai].Type() ); - btypes.AddName( topIn[aj].Type() ); - ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); - if (it != params_->BP().end()) { - dist = it->second.Req(); - foundParam = true; - mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", - topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), - topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), - it->second.Req(), it->second.Rk()); - } - } - if (!foundParam) - dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); - } - return 0; -} - -/** Attempt to assign a reasonable value for theta internal coordinate for - * atom i given that atoms j and k have known positions. - */ -int Cpptraj::Structure::Model::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) -const -{ - // Figure out hybridization and chirality of atom j. - if (debug_ > 0) - mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); - if (atomPositionKnown[ai] && atomPositionKnown[aj] && atomPositionKnown[ak]) - { - theta = CalcAngle(frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak)); - return 0; - } - - Atom const& AJ = topIn[aj]; - if (debug_ > 0) { - mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); - mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); - mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); - } - // Sanity check - if (AJ.Nbonds() < 2) { - mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); - return 1; - } - AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) - hybrid = it->second.Hybridization(); - } - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) - hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); -/* - HybridizationType hybrid = UNKNOWN_HYBRIDIZATION; - // Handle specific elements - switch (AJ.Element()) { - case Atom::CARBON : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP; break; - case 3 : hybrid = SP2; break; - case 4 : hybrid = SP3; break; - } - break; - case Atom::NITROGEN : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP2; break; - case 3 : - // Check for potential SP2. If only 1 of the bonded atoms is - // hydrogen, assume SP2. TODO actually check for aromaticity. - int n_hydrogens = 0; - for (Atom::bond_iterator bat = AJ.bondbegin(); bat != AJ.bondend(); ++bat) - if (topIn[*bat].Element() == Atom::HYDROGEN) - n_hydrogens++; - if (n_hydrogens == 1) - hybrid = SP2; - else - hybrid = SP3; - break; - } - break; - case Atom::OXYGEN : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP3; break; - } - break; - case Atom::SULFUR : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP3; break; - } - break; - default: hybrid = UNKNOWN_HYBRIDIZATION; break; - }*/ - // Fill in what values we can for known atoms -/* std::vector knownTheta( AJ.Nbonds() ); - int knownIdx = -1; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = AJ.Bond(idx); - if (atnum != ak && atomPositionKnown[atnum]) { - knownTheta[idx] = CalcAngle(frameIn.XYZ(atnum), - frameIn.XYZ(aj), - frameIn.XYZ(ak)); - mprintf("DEBUG:\t\tKnown theta for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownTheta[idx]*Constants::RADDEG); - if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known - } - } - if (knownIdx == -1) {*/ - //mprintf("DEBUG:\t\tNo known theta.\n"); - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { - // Assign a theta based on number of bonds - switch (AJ.Nbonds()) { - case 4 : hybrid = AtomType::SP3; break; - case 3 : hybrid = AtomType::SP2; break; - case 2 : hybrid = AtomType::SP; break; - default : mprinterr("Internal Error: AssignTheta(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; - } - } - // Assign a theta based on hybridization - switch (hybrid) { - case AtomType::SP3 : theta = 109.5 * Constants::DEGRAD; break; - case AtomType::SP2 : theta = 120.0 * Constants::DEGRAD; break; - case AtomType::SP : theta = 180.0 * Constants::DEGRAD; break; - default : mprinterr("Internal Error: AssignTheta(): Unhandled hybridization for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; - }/* - } else { - theta = knownTheta[knownIdx]; // TODO just use above guess via hybrid? - }*/ - - return 0; -} - -/// Recursive function to return depth from an atom along bonds -static int atom_depth(int& depth, - int at, Topology const& topIn, std::vector& visited, int maxdepth) -{ - if (depth == maxdepth) return 0; - depth++; - visited[at] = true; - int depthFromHere = 1; - for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) - { - if (!visited[*bat]) - depthFromHere += atom_depth( depth, *bat, topIn, visited, maxdepth ); - } - return depthFromHere; -} - -static inline double wrap360(double phi) { - if (phi > Constants::PI) - return phi - Constants::TWOPI; - else if (phi < -Constants::PI) - return phi + Constants::TWOPI; - else - return phi; -} - -/** Attempt to assign reasonable values for phi internal coordinates for atoms - * bonded to atom j given that atoms j k and l have known positions. - * j - k - * / \ - * i l - */ -//int Cpptraj::Structure::Model::AssignPhi(std::vector& IC, int aj, int ak, int al, -int Cpptraj::Structure::Model::AssignPhi(double& phi, int ai, int aj, int ak, int al, - Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown, - BuildAtom const& AtomJ) -const -{ - Atom const& AJ = topIn[aj]; - // If atom J has only 1 bond this is not needed. - if (AJ.Nbonds() < 2) return 0; - - if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); - // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. - if (AJ.Nbonds() < 3) { - if (debug_ > 0) - mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); - double currentPhi = -180 * Constants::DEGRAD; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - if (AJ.Bond(idx) != ak) { - //IC.push_back( InternalCoords(AJ.Bond(idx), aj, ak, al, 0, 0, currentPhi) ); - phi = currentPhi; - break; - } - } - return 0; - } - // Figure out hybridization and chirality of atom j. - if (debug_ > 0) - mprintf("DEBUG: AssignPhi for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); -// std::vector priority; -// int chiralDebug = debug_; -// if (chiralDebug > 0) -// chiralDebug--; -// ChiralType chirality = SetPriority(priority, aj, topIn, frameIn, chiralDebug); - - - // TODO check that atom i actually ends up on the list? - std::vector const& priority = AtomJ.Priority(); - ChiralType chirality = AtomJ.Chirality(); - if (chirality == IS_UNKNOWN_CHIRALITY) { - chirality = AtomJ.Orientation(); - mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", - topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - } - if (debug_ > 0) { - mprintf("DEBUG: Original chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - mprintf("DEBUG:\t\tPriority around J %s(%i) is", - topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); - for (int idx = 0; idx < AJ.Nbonds(); idx++) - mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); - mprintf("\n"); - } - - // Fill in what values we can for known atoms - std::vector knownPhi( AJ.Nbonds() ); - std::vector isKnown( AJ.Nbonds(), false ); - int knownIdx = -1; - double knownInterval = 0; - bool hasKnownInterval = false; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak && atomPositionKnown[atnum] && - atomPositionKnown[aj] && - atomPositionKnown[ak] && - atomPositionKnown[al]) - { - knownPhi[idx] = Torsion(frameIn.XYZ(atnum), - frameIn.XYZ(aj), - frameIn.XYZ(ak), - frameIn.XYZ(al)); - isKnown[idx] = true; - if (debug_ > 0) - mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); - if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known - if (idx > 0 && isKnown[idx-1] && isKnown[idx]) { - knownInterval = wrap360(knownPhi[idx] - knownPhi[idx-1]); - hasKnownInterval = true; - } - } - } - if (hasKnownInterval) - mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); - - // If we have to assign an initial phi, make trans the longer branch - if (knownIdx == -1) { - std::vector visited = atomPositionKnown; - // TODO: Ensure bonded atoms are not yet visited? - visited[aj] = true; - visited[ak] = true; - //std::vector depth( AJ.Nbonds() ); - int max_depth = 0; - int max_idx = -1; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - int currentDepth = 0; - //depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); - int depth = atom_depth(currentDepth, atnum, topIn, visited, 10); - if (debug_ > 0) - mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", - topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth); - //if (knownIdx == -1 && depth[idx] < 3) { - // knownIdx = idx; - // knownPhi[idx] = 0; - //} - if (max_idx == -1 || depth > max_depth) { - max_depth = depth; - max_idx = idx; - } - } - } - mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); - knownIdx = max_idx; - knownPhi[max_idx] = -180 * Constants::DEGRAD; - isKnown[max_idx] = true; - } - - // Sanity check - if (knownIdx < 0) { - mprinterr("Internal Error: AssignPhi(): knownIdx is < 0\n"); - return 1; - } - - bool intervalIsSet = false; - double interval = 0; - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) { - if (it->second.Hybridization() == AtomType::SP2) { - interval = 180 * Constants::DEGRAD; - intervalIsSet = true; - } else if (it->second.Hybridization() == AtomType::SP3) { - interval = 120 * Constants::DEGRAD; - intervalIsSet = true; - } - } - if (intervalIsSet) mprintf("DEBUG: Interval was set from atom J hybridization.\n"); - } - if (!intervalIsSet) { - // The interval will be 360 / (number of bonds - 1) - interval = Constants::TWOPI / (AJ.Nbonds() - 1); - mprintf("DEBUG: Interval was set from number of bonds.\n"); - } - - if (hasKnownInterval) { - if (chirality == IS_UNKNOWN_CHIRALITY) { - mprintf("DEBUG: Setting chirality from known interval.\n"); - if (knownInterval < 0) - chirality = IS_S; - else - chirality = IS_R; - } else if (chirality == IS_S) { - if (knownInterval > 0) - mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); - } else if (chirality == IS_R) { - if (knownInterval < 0) - mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); - } - } - if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) - interval = -interval; - - - if (debug_ > 0) { - mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); - mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); - } - - // Forwards from the known index - double currentPhi = knownPhi[knownIdx]; - for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - if (isKnown[idx]) - currentPhi = knownPhi[idx]; - else - currentPhi = wrap360(currentPhi + interval); - if (atnum == ai) phi = currentPhi; - //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); - } - } - // Backwards from the known index - currentPhi = knownPhi[knownIdx]; - for (int idx = knownIdx - 1; idx > -1; idx--) { - int atnum = priority[idx]; - if (atnum != ak) { - if (isKnown[idx]) - currentPhi = knownPhi[idx]; - else - currentPhi = wrap360(currentPhi - interval); - if (atnum == ai) phi = currentPhi; - //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); - } - } -/* - double startPhi; - if (knownIdx == -1) { - startPhi = -180*Constants::DEGRAD; - if (debug_ > 0) mprintf("DEBUG:\t\tNo known phi. Setting to %g.\n", startPhi*Constants::RADDEG); - knownIdx = 0; - } else - startPhi = knownPhi[knownIdx]; - - if (AtomJ.Chirality() == IS_R) { - startPhi = -startPhi; - interval = -interval; - } - - // Forward direction - double currentPhi = startPhi; - for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - if (atnum == ai) phi = currentPhi; - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); - currentPhi += interval; - currentPhi = wrap360(currentPhi); - } - } - // Reverse direction - currentPhi = startPhi - interval; - for (int idx = knownIdx - 1; idx > -1; idx--) { - int atnum = priority[idx]; - if (atnum != ak) { - if (atnum == ai) phi = currentPhi; - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s phi= %g\n", topIn.AtomMaskName(atnum).c_str(), currentPhi*Constants::RADDEG); - currentPhi -= interval; - currentPhi = wrap360(currentPhi); - } - } -*/ - return 0; -} - -/** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ -int Cpptraj::Structure::Model::insertIc(Zmatrix& zmatrix, - int ai, int aj, int ak, int al, double newPhi, - Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown) -const -{ - if (atomPositionKnown[ai]) { - mprintf("DEBUG:\tAtom position already known for %s, skipping IC.\n", topIn.AtomMaskName(ai).c_str()); - return 0; - } - double newDist = 0; - if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: AssignLength failed for %s - %s \n", - topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); - return 1; - } - double newTheta = 0; - if (AssignTheta(newTheta, ai, aj, ak, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: AssignTheta failed for %s - %s - %s\n", - topIn.AtomMaskName(ai).c_str(), - topIn.AtomMaskName(aj).c_str(), - topIn.AtomMaskName(ak).c_str()); - return 1; - } - zmatrix.AddIC( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); - return 0; -} - -/** Assign internal coordinates for atoms I for torsions around J-K-L. */ -int Cpptraj::Structure::Model::AssignICsAroundBond(Zmatrix& zmatrix, - int aj, int ak, int al, - Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown, - BuildAtom const& AtomJ) -const -{ - mprintf("DEBUG: AssignICsAroundBond: X - %s - %s - %s %i - %i - %i\n", - topIn.AtomMaskName(aj).c_str(), - topIn.AtomMaskName(ak).c_str(), - topIn.AtomMaskName(al).c_str(), - aj+1, ak+1, al+1); - // Ideally, atoms J K and L should be known - if (!atomPositionKnown[aj] || - !atomPositionKnown[ak] || - !atomPositionKnown[al]) - { - mprintf("Warning: AssignICsAroundBond(): Not all atom positions known.\n" - "Warning: %i %s (%i) - %i %s (%i) - %i %s (%i)\n", - aj+1, topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj], - ak+1, topIn.AtomMaskName(ak).c_str(), (int)atomPositionKnown[ak], - al+1, topIn.AtomMaskName(al).c_str(), (int)atomPositionKnown[al]); - //return 1; - } - Atom const& AJ = topIn[aj]; - // If atom J has only 1 bond this is not needed. - if (AJ.Nbonds() < 2) return 0; - - - if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); - // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. - if (AJ.Nbonds() < 3) { - if (debug_ > 0) - mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); - double newPhi = -180 * Constants::DEGRAD; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - if (AJ.Bond(idx) != ak) { - int ai = AJ.Bond(idx); - if (insertIc(zmatrix, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; - break; - } - } - return 0; - } // END only 2 bonds - - // 3 or more bonds. - std::vector const& priority = AtomJ.Priority(); - ChiralType chirality = AtomJ.Chirality(); - - if (debug_ > 0) { - mprintf("DEBUG:\t\tOriginal chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - mprintf("DEBUG:\t\tPriority around J %s(%i) is", - topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); - for (int idx = 0; idx < AJ.Nbonds(); idx++) - mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); - for (int idx = 0; idx < AJ.Nbonds(); idx++) - mprintf(" %i", priority[idx]); - mprintf("\n"); - } - - // Get index of atom K in the priority list, starting from least priority. - int kPriorityIdx = -1; - for (int idx = AJ.Nbonds()-1; idx > -1; idx--) { - if (priority[idx] == ak) { - kPriorityIdx = AJ.Nbonds() - 1 - idx; - break; - } - } - mprintf("DEBUG:\t\tK priority index is %i\n", kPriorityIdx); - if (kPriorityIdx < 0) { - mprinterr("Error: Could not find atom K %s in atom J %s bond list.\n", - topIn.AtomMaskName(ak).c_str(), topIn.AtomMaskName(aj).c_str()); - return 1; - } - - // Fill in what values we can for known atoms - std::vector knownPhi( AJ.Nbonds() ); - std::vector isKnown( AJ.Nbonds(), false ); - int knownIdx = -1; - double knownInterval = 0; - bool hasKnownInterval = false; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak && atomPositionKnown[atnum] && - atomPositionKnown[aj] && - atomPositionKnown[ak] && - atomPositionKnown[al]) - { - knownPhi[idx] = Torsion(frameIn.XYZ(atnum), - frameIn.XYZ(aj), - frameIn.XYZ(ak), - frameIn.XYZ(al)); - isKnown[idx] = true; - if (debug_ > 0) - mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); - if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known - if (idx > 0 && isKnown[idx-1] && isKnown[idx]) { - knownInterval = wrap360(knownPhi[idx] - knownPhi[idx-1]); - hasKnownInterval = true; - } - } - } - - // Check known interval if set - if (hasKnownInterval) { - mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); - if (chirality == IS_UNKNOWN_CHIRALITY) { - mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); - if (knownInterval < 0) - chirality = IS_S; - else - chirality = IS_R; - } else if (chirality == IS_S) { - if (knownInterval > 0) - mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); - } else if (chirality == IS_R) { - if (knownInterval < 0) - mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); - } - } - - // If still no chirality use the detected orientation - if (chirality == IS_UNKNOWN_CHIRALITY) { - chirality = AtomJ.Orientation(); - mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", - topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - } - - // Determine the interval - bool intervalIsSet = false; - double interval = 0; - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) { - if (it->second.Hybridization() == AtomType::SP2) { - interval = 180 * Constants::DEGRAD; - intervalIsSet = true; - } else if (it->second.Hybridization() == AtomType::SP3) { - interval = 120 * Constants::DEGRAD; - intervalIsSet = true; - } - } - if (intervalIsSet) mprintf("DEBUG:\t\tInterval was set from atom J hybridization.\n"); - } - if (!intervalIsSet) { - // The interval will be 360 / (number of bonds - 1) - interval = Constants::TWOPI / (AJ.Nbonds() - 1); - mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); - } - - // Adjust interval based on chirality and priority of the k atom - if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) - interval = -interval; - if ( (kPriorityIdx%2) == 0 ) { - mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); - interval = -interval; - } - - // If there is a known interval, compare it to the determined one. - if (hasKnownInterval) { - double deltaInterval = fabs(interval - knownInterval); - mprintf("DEBUG:\t\tDetermined interval %g, known interval %g, delta %g\n", - interval*Constants::RADDEG, knownInterval*Constants::RADDEG, deltaInterval*Constants::RADDEG); - interval = fabs(knownInterval); - } - - // If we have to assign an initial phi, make trans the longer branch - if (knownIdx == -1) { - std::vector visited = atomPositionKnown; - // TODO: Ensure bonded atoms are not yet visited? - visited[aj] = true; - visited[ak] = true; - //std::vector depth( AJ.Nbonds() ); - int max_depth = 0; - int max_idx = -1; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - int currentDepth = 0; - //depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); - int depth = atom_depth(currentDepth, atnum, topIn, visited, 10); - if (debug_ > 0) - mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", - topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth); - //if (knownIdx == -1 && depth[idx] < 3) { - // knownIdx = idx; - // knownPhi[idx] = 0; - //} - if (max_idx == -1 || depth > max_depth) { - max_depth = depth; - max_idx = idx; - } - } - } - mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); - knownIdx = max_idx; - knownPhi[max_idx] = interval;// -180 * Constants::DEGRAD; - isKnown[max_idx] = true; - } - - // Sanity check - if (knownIdx < 0) { - mprinterr("Internal Error: AssignPhi(): knownIdx is < 0\n"); - return 1; - } - - if (debug_ > 0) { - mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); - mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); - } - - // Forwards from the known index - double currentPhi = knownPhi[knownIdx]; - for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - if (isKnown[idx]) - currentPhi = knownPhi[idx]; - else - currentPhi = wrap360(currentPhi + interval); - //if (atnum == ai) phi = currentPhi; - //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); - } - } - // Backwards from the known index - currentPhi = knownPhi[knownIdx]; - for (int idx = knownIdx - 1; idx > -1; idx--) { - int atnum = priority[idx]; - if (atnum != ak) { - if (isKnown[idx]) - currentPhi = knownPhi[idx]; - else - currentPhi = wrap360(currentPhi - interval); - //if (atnum == ai) phi = currentPhi; - //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); - } - } - - return 0; -} -/* -static inline AtomType::HybridizationType getAtomHybridization(ParmHolder const& AT, Topology const& topIn, int ix) -{ - AtomType::HybridizationType hx; - ParmHolder::const_iterator itx = AT.GetParam( TypeNameHolder( topIn[ix].Type() ) ); - if (itx == AT.end()) - hx = Cpptraj::GuessAtomHybridization(topIn[ix], topIn.Atoms()); - else - hx = itx->second.Hybridization(); - return hx; -} -*/ -/** Assign phi values around a bond. */ -/*int Cpptraj::Structure::Model::AssignPhiAroundBond(int ix, int iy, Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown, - ParmHolder const& AT) -const -{ - // Order atoms by hybridization; AX > AY - int ax, ay; - AtomType::HybridizationType hx = getAtomHybridization(AT, topIn, ix); - AtomType::HybridizationType hy = getAtomHybridization(AT, topIn, iy); - if (hx < hy) { - ax = iy; - ay = ix; - } else { - ax = ix; - ay = iy; - } - mprintf("DEBUG: Assign torsions around %s (%i) - %s (%i)\n", - topIn.AtomMaskName(ix).c_str(), (int)hx, - topIn.AtomMaskName(iy).c_str(), (int)hy); - mprintf("DEBUG: Ordered by hybridization: %s %s\n", - topIn.AtomMaskName(ax).c_str(), - topIn.AtomMaskName(ay).c_str()); - - return 0; -}*/ diff --git a/src/Structure/Model.h b/src/Structure/Model.h deleted file mode 100644 index f73f711579..0000000000 --- a/src/Structure/Model.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef INC_STRUCTURE_MODEL_H -#define INC_STRUCTURE_MODEL_H -#include -//#incl ude "StructureEnum.h" -class Topology; -class Frame; -class ParameterSet; -//template class ParmHolder; -//class AtomType; -namespace Cpptraj { -namespace Structure { -class BuildAtom; -class Zmatrix; -/// Routines to create a model for missing bond/angle/torsion parameters -class Model { - public: - /// CONSTRUCTOR - Model(); - /// Set debug level - void SetDebug(int d) { debug_ = d; } - /// Set optional parameter set - void SetParameters(ParameterSet const*); - /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known - int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; - /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I - int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; - /// Given atoms J K and L, attempt to assign a reasonable value for phi for atom I - //int AssignPhi(std::vector&, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; - /// Given atoms I J K and L, attempt to assign a reasonable value for phi for atom I - int AssignPhi(double&, int, int, int, int, Topology const&, Frame const&, std::vector const&, BuildAtom const&) const; - /// Assign internal coordinates for atoms I for torsions around J-K-L. - int AssignICsAroundBond(Zmatrix&, int, int, int, - Topology const&, Frame const&, std::vector const&, - BuildAtom const&) const; - private: - int insertIc(Zmatrix&, int, int, int, int, double, - Topology const&, Frame const&, std::vector const&) const; - - - int debug_; - ParameterSet const* params_; -}; -} // END namespace Structure -} // END namespace Cpptraj -#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 0c7b220ea1..772844a3da 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,16 +1,15 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h -Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h +Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h InternalCoords.h StructureEnum.h Zmatrix.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h GenerateConnectivityArrays.o : GenerateConnectivityArrays.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../ParameterTypes.h ../Residue.h ../SymbolExporting.h GenerateConnectivityArrays.h HisProt.o : HisProt.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h HisProt.h StructureRoutines.h InternalCoords.o : InternalCoords.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h -Model.o : Model.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h InternalCoords.h Model.h StructureEnum.h Zmatrix.h StructureEnum.o : StructureEnum.cpp StructureEnum.h StructureRoutines.o : StructureRoutines.cpp ../Atom.h ../CpptrajStdio.h ../NameType.h ../Residue.h ../SymbolExporting.h StructureRoutines.h Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Sugar.h SugarToken.h SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivityArrays.h InternalCoords.h StructureEnum.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index d609540255..1e7c8a3f12 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -8,7 +8,6 @@ STRUCTURE_SOURCES= \ GenerateConnectivityArrays.cpp \ HisProt.cpp \ InternalCoords.cpp \ - Model.cpp \ StructureEnum.cpp \ StructureRoutines.cpp \ SugarBuilder.cpp \ diff --git a/src/cpptrajdepend b/src/cpptrajdepend index f58b379a6f..93baffd806 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -209,7 +209,7 @@ DataIO_AmberEne.o : DataIO_AmberEne.cpp ArgList.h AssociatedData.h Atom.h AtomMa DataIO_AmberFF.o : DataIO_AmberFF.cpp AmberParamFile.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFF.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberFrcmod.o : DataIO_AmberFrcmod.cpp AmberParamFile.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberFrcmod.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_AmberLib.o : DataIO_AmberLib.cpp ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberLib.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h -DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h +DataIO_AmberPrep.o : DataIO_AmberPrep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_AmberPrep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CCP4.o : DataIO_CCP4.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h ByteRoutines.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CCP4.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CharmmFastRep.o : DataIO_CharmmFastRep.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CharmmFastRep.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_RemLog.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataIO_CharmmOutput.o : DataIO_CharmmOutput.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataIO.h DataIO_CharmmOutput.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -260,7 +260,7 @@ DataSet_Tensor.o : DataSet_Tensor.cpp AssociatedData.h CpptrajFile.h DataSet.h D DataSet_Topology.o : DataSet_Topology.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Topology.h Dimension.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h DataSet_Vector.o : DataSet_Vector.cpp ArrayIterator.h AssociatedData.h ComplexArray.h Constants.h Corr.h CpptrajFile.h DataSet.h DataSet_1D.h DataSet_Vector.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h PubFFT.h Range.h SymbolExporting.h TextFormat.h Vec3.h DataSet_Vector_Scalar.o : DataSet_Vector_Scalar.cpp AssociatedData.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Vector_Scalar.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h Range.h TextFormat.h Vec3.h -DataSet_Zmatrix.o : DataSet_Zmatrix.cpp AssociatedData.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Zmatrix.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h Range.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h TextFormat.h Vec3.h +DataSet_Zmatrix.o : DataSet_Zmatrix.cpp AssociatedData.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Zmatrix.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h Range.h Structure/InternalCoords.h Structure/Zmatrix.h TextFormat.h Vec3.h DataSet_double.o : DataSet_double.cpp AssociatedData.h CpptrajFile.h DataSet.h DataSet_1D.h DataSet_double.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h Range.h TextFormat.h DataSet_float.o : DataSet_float.cpp AssociatedData.h CpptrajFile.h DataSet.h DataSet_1D.h DataSet_float.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h Range.h TextFormat.h DataSet_integer_disk.o : DataSet_integer_disk.cpp AssociatedData.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_1D.h DataSet_integer.h DataSet_integer_disk.h Dimension.h FileIO.h FileName.h File_TempName.h MetaData.h NC_Routines.h Parallel.h Range.h TextFormat.h @@ -345,7 +345,7 @@ Exec_Top.o : Exec_Top.cpp Action.h ActionList.h ActionState.h Analysis.h Analysi Exec_Traj.o : Exec_Traj.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Traj.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_UpdateParameters.o : Exec_UpdateParameters.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h DataSet_Topology.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_UpdateParameters.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ViewRst.o : Exec_ViewRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ViewRst.h -Exec_Zmatrix.o : Exec_Zmatrix.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Zmatrix.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Zmatrix.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Zmatrix.o : Exec_Zmatrix.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Zmatrix.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Zmatrix.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h ExtendedSimilarity.o : ExtendedSimilarity.cpp AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h Dimension.h ExtendedSimilarity.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h TextFormat.h Topology.h TypeNameHolder.h Unit.h Vec3.h ExternalFxn.o : ExternalFxn.cpp Random.h FileIO_Bzip2.o : FileIO_Bzip2.cpp CpptrajStdio.h FileIO.h FileIO_Bzip2.h @@ -446,21 +446,20 @@ Spline.o : Spline.cpp CpptrajStdio.h Spline.h SplineFxnTable.o : SplineFxnTable.cpp Constants.h CpptrajStdio.h Spline.h SplineFxnTable.h StringRoutines.h StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h +Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/GenerateConnectivityArrays.o : Structure/GenerateConnectivityArrays.cpp Atom.h Constants.h CpptrajStdio.h NameType.h ParameterTypes.h Residue.h Structure/GenerateConnectivityArrays.h SymbolExporting.h Structure/HisProt.o : Structure/HisProt.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/HisProt.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/InternalCoords.o : Structure/InternalCoords.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h -Structure/Model.o : Structure/Model.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/InternalCoords.h Structure/Model.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/StructureEnum.o : Structure/StructureEnum.cpp Structure/StructureEnum.h Structure/StructureRoutines.o : Structure/StructureRoutines.cpp Atom.h CpptrajStdio.h NameType.h Residue.h Structure/StructureRoutines.h SymbolExporting.h Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From c54d6d2f67338cc87b61fbd7bcd11fd3162ddc8f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 08:13:41 -0500 Subject: [PATCH 0405/1492] Look for angle parameters --- src/Structure/Builder.cpp | 65 +++++++++++++++------------------------ 1 file changed, 24 insertions(+), 41 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 02cbb2664b..ee439d63f1 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -63,7 +63,6 @@ const int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) const { - // Figure out hybridization and chirality of atom j. if (debug_ > 0) mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); if (atomPositionKnown[ai] && atomPositionKnown[aj] && atomPositionKnown[ak]) @@ -72,6 +71,28 @@ const return 0; } + if (params_ != 0 && + topIn[ai].HasType() && + topIn[aj].HasType() && + topIn[ak].HasType()) + { + TypeNameHolder atypes(3); + atypes.AddName( topIn[ai].Type() ); + atypes.AddName( topIn[aj].Type() ); + atypes.AddName( topIn[ak].Type() ); + ParmHolder::const_iterator it = params_->AP().GetParam( atypes ); + if (it != params_->AP().end()) { + theta = it->second.Teq(); + mprintf("DEBUG: Found angle parameter for %s (%s) - %s (%s) - %s (%s): teq=%g tk=%g\n", + topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), + topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), + topIn.AtomMaskName(ak).c_str(), *(topIn[ak].Type()), + it->second.Teq()*Constants::RADDEG, it->second.Tk()); + return 0; + } + } + + // Figure out hybridization and chirality of atom j. Atom const& AJ = topIn[aj]; if (debug_ > 0) { mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); @@ -91,46 +112,7 @@ const } if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); -/* - HybridizationType hybrid = UNKNOWN_HYBRIDIZATION; - // Handle specific elements - switch (AJ.Element()) { - case Atom::CARBON : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP; break; - case 3 : hybrid = SP2; break; - case 4 : hybrid = SP3; break; - } - break; - case Atom::NITROGEN : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP2; break; - case 3 : - // Check for potential SP2. If only 1 of the bonded atoms is - // hydrogen, assume SP2. TODO actually check for aromaticity. - int n_hydrogens = 0; - for (Atom::bond_iterator bat = AJ.bondbegin(); bat != AJ.bondend(); ++bat) - if (topIn[*bat].Element() == Atom::HYDROGEN) - n_hydrogens++; - if (n_hydrogens == 1) - hybrid = SP2; - else - hybrid = SP3; - break; - } - break; - case Atom::OXYGEN : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP3; break; - } - break; - case Atom::SULFUR : - switch (AJ.Nbonds()) { - case 2 : hybrid = SP3; break; - } - break; - default: hybrid = UNKNOWN_HYBRIDIZATION; break; - }*/ + // Fill in what values we can for known atoms /* std::vector knownTheta( AJ.Nbonds() ); int knownIdx = -1; @@ -168,6 +150,7 @@ const return 0; } + /** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, int ai, int aj, int ak, int al, double newPhi, From 5772f89cfb4d5a73cc864a6069f10efd758a8d86 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 08:25:25 -0500 Subject: [PATCH 0406/1492] Set up the main parameter set --- src/Exec_Build.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 5dee723fad..77e094dcbf 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -394,6 +394,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: Connected to residue %s\n", topOut.TruncResNameNum(jres).c_str()); Cpptraj::Structure::Builder linkBuilder; linkBuilder.SetDebug( 1 ); // FIXME + linkBuilder.SetParameters( &mainParmSet ); if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, zmatrix, ResZmatrices[jres], hasPosition)) { From 1c4ea3014d7e3db60a4081a9692c85ccf9decc9d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 09:03:31 -0500 Subject: [PATCH 0407/1492] Move UpdateICsFromFrame to Builder --- src/Exec_Build.cpp | 10 +-- src/Structure/Builder.cpp | 157 ++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 6 ++ src/Structure/Zmatrix.cpp | 144 ------------------------------- src/Structure/Zmatrix.h | 4 +- src/Structure/structuredepend | 4 +- src/cpptrajdepend | 4 +- 7 files changed, 174 insertions(+), 155 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 77e094dcbf..2b02cdd930 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -370,7 +370,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, else resIsBuilt.push_back( false ); } - + + Cpptraj::Structure::Builder linkBuilder; + linkBuilder.SetDebug( 1 ); // FIXME + linkBuilder.SetParameters( &mainParmSet ); bool buildFailed = false; TermTypeArray::const_iterator termType = ResTypes.begin(); for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) @@ -392,9 +395,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, long int jres = (long int)topOut[*bat].ResNum(); if (jres < ires) { mprintf("DEBUG: Connected to residue %s\n", topOut.TruncResNameNum(jres).c_str()); - Cpptraj::Structure::Builder linkBuilder; - linkBuilder.SetDebug( 1 ); // FIXME - linkBuilder.SetParameters( &mainParmSet ); if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, zmatrix, ResZmatrices[jres], hasPosition)) { @@ -413,7 +413,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // return 1; // } // Update internal coords from known positions - if (zmatrix->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { + if (linkBuilder.UpdateICsFromFrame( *zmatrix, frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index ee439d63f1..2630191210 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1,5 +1,6 @@ #include "Builder.h" #include "BuildAtom.h" +#include "GenerateConnectivityArrays.h" #include "Zmatrix.h" #include "../Constants.h" #include "../CpptrajStdio.h" @@ -151,6 +152,20 @@ const return 0; } +/** Calculate internal coordinate for atoms i j k l with known positions. */ +Cpptraj::Structure::InternalCoords Builder::calcKnownAtomIc(int ai, int aj, int ak, int al, Frame const& frameIn) +{ + double newDist = DIST2_NoImage(frameIn.XYZ(ai), frameIn.XYZ(aj)); + + double newTheta = CalcAngle( frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak) ); + + double newPhi = Torsion( frameIn.XYZ(ai), + frameIn.XYZ(aj), + frameIn.XYZ(ak), + frameIn.XYZ(al) ); + return InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG); +} + /** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, int ai, int aj, int ak, int al, double newPhi, @@ -965,3 +980,145 @@ const return 0; } +/** For existing torsions, see if all coordinates in that torsion + * exist. If so, update the IC from the existing coordinates. + */ +int Builder::UpdateICsFromFrame(Zmatrix& zmatrix, Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) +const +{ + Barray isUsed( zmatrix.N_IC(), false ); + //unsigned int Nused = 0; + // Get list of bonds + BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); + for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) { + if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { + mprintf("DEBUG: Looking at torsions around: %s - %s\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); // Find all ICs that share atoms 1 and 2 (J and K) + Iarray bondICs; + bool needsUpdate = false; + double tDiff = 0; + for (unsigned int idx = 0; idx != zmatrix.N_IC(); idx++) + { + if (!isUsed[idx]) { + InternalCoords& thisIc = zmatrix.ModifyIC(idx); + if ( (bnd->A1() == thisIc.AtJ() && bnd->A2() == thisIc.AtK()) || + (bnd->A2() == thisIc.AtJ() && bnd->A1() == thisIc.AtK()) ) + { + // This IC has this bond at the center + bondICs.push_back( idx ); + isUsed[idx] = true; + //MARK(idx, isUsed, Nused); + if (hasPosition[thisIc.AtI()] && + hasPosition[thisIc.AtJ()] && + hasPosition[thisIc.AtK()] && + hasPosition[thisIc.AtL()]) + { + mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + InternalCoords frameIc = calcKnownAtomIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), frameIn); + double dTorsion = frameIc.Phi() * Constants::DEGRAD; + double dInternalValue = thisIc.Phi() * Constants::DEGRAD; + tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); + thisIc = frameIc; + needsUpdate = true; + } // END all IC coords present + } // END this IC matches current bond + } // END IC is not used + } // END loop searching for ICs matching current bond + // If any difference was found, shift all of the torsions + if (needsUpdate) { + mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", + topIn.AtomMaskName(bnd->A1()).c_str(), + topIn.AtomMaskName(bnd->A2()).c_str(), + tDiff); + for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) + { + InternalCoords& thisIc = zmatrix.ModifyIC(*it); + double dNew = thisIc.Phi() + tDiff; + mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); + thisIc.SetPhi( dNew ); + } + } // END ICs need update + } // END both bond atoms belong to this residue + } // END loop over bonds +/* + Barray isUsed( IC_.size(), false ); + unsigned int Nused = 0; + while (Nused < IC_.size()) { + unsigned int idx = 0; + while (idx < IC_.size() && isUsed[idx]) idx++; + if (idx >= IC_.size()) break; + // Unused IC. Find all other ICs that share atoms J-K + MARK(idx, isUsed, Nused); + Iarray bondICs(1, idx); + for (unsigned int jdx = idx + 1; jdx < IC_.size(); jdx++) { + if ( IC_[idx].AtJ() == IC_[jdx].AtJ() && + IC_[idx].AtK() == IC_[jdx].AtK() ) + { + bondICs.push_back( jdx ); + MARK(jdx, isUsed, Nused); + } + } + mprintf("DEBUG: Looking at %zu ICs involving %s - %s\n", bondICs.size(), + topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), + topIn.AtomMaskName(IC_[idx].AtK()).c_str()); + bool needsUpdate = false; + Iarray toUpdate; + toUpdate.reserve( bondICs.size() ); + double tDiff = 0; + for (Iarray::iterator it = bondICs.begin(); it != bondICs.end(); ++it) + { + InternalCoords& thisIc = IC_[*it]; + if (hasPosition[thisIc.AtI()] && + hasPosition[thisIc.AtJ()] && + hasPosition[thisIc.AtK()] && + hasPosition[thisIc.AtL()]) + { + mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), + frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), + frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); + double dTorsion = frameIc.Phi() * Constants::DEGRAD; + double dInternalValue = thisIc.Phi() * Constants::DEGRAD; + tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); + thisIc = frameIc; + needsUpdate = true; + } else { + toUpdate.push_back( *it ); + } + } // END calc loop over ICs sharing J-K bond + // If any difference was found, shift all of the torsions + if (needsUpdate) { + mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", + topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), + topIn.AtomMaskName(IC_[idx].AtK()).c_str(), + tDiff); + for (Iarray::const_iterator it = toUpdate.begin(); it != toUpdate.end(); ++it) + { + InternalCoords& thisIc = IC_[*it]; + double dNew = thisIc.Phi() + tDiff; + mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); + thisIc.SetPhi( dNew ); + } + } + } // END loop over ICs*/ + return 0; +} diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 3b2055b837..f2fc696a7d 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -8,6 +8,7 @@ namespace Cpptraj { namespace Structure { class BuildAtom; class Zmatrix; +class InternalCoords; /// Used to attach different topology/frame combos using internal coordinates class Builder { typedef std::vector Barray; @@ -23,11 +24,16 @@ class Builder { int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; /// Model the coordinates around a bond given only some coordinates are known int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; + /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters + int UpdateICsFromFrame(Zmatrix&, Frame const&, int, Topology const&, Barray const&) const; private: + typedef std::vector Iarray; /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; + /// Calculate an internal coordinate for known atoms + static inline InternalCoords calcKnownAtomIc(int, int, int, int, Frame const&); /// Insert an internal coord into a zmatrix int insertIc(Zmatrix&, int, int, int, int, double, Topology const&, Frame const&, std::vector const&) const; diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 0eae2717b9..5e91740f47 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -3,7 +3,6 @@ #include #include // cos #include "Zmatrix.h" -#include "GenerateConnectivityArrays.h" #include "../Frame.h" #include "../CpptrajStdio.h" #include "../Constants.h" @@ -586,149 +585,6 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con return 0; } -/** For existing torsions, see if all coordinates in that torsion - * exist. If so, update the IC from the existing coordinates. - */ -int Zmatrix::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) -{ - Barray isUsed( IC_.size(), false ); - unsigned int Nused = 0; - // Get list of bonds - BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); - for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) { - if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { - mprintf("DEBUG: Looking at torsions around: %s - %s\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); // Find all ICs that share atoms 1 and 2 (J and K) - Iarray bondICs; - bool needsUpdate = false; - double tDiff = 0; - for (unsigned int idx = 0; idx != IC_.size(); idx++) - { - if (!isUsed[idx]) { - InternalCoords& thisIc = IC_[idx]; - if ( (bnd->A1() == thisIc.AtJ() && bnd->A2() == thisIc.AtK()) || - (bnd->A2() == thisIc.AtJ() && bnd->A1() == thisIc.AtK()) ) - { - // This IC has this bond at the center - bondICs.push_back( idx ); - MARK(idx, isUsed, Nused); - if (hasPosition[thisIc.AtI()] && - hasPosition[thisIc.AtJ()] && - hasPosition[thisIc.AtK()] && - hasPosition[thisIc.AtL()]) - { - mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), - frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), - frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); - double dTorsion = frameIc.Phi() * Constants::DEGRAD; - double dInternalValue = thisIc.Phi() * Constants::DEGRAD; - tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); - thisIc = frameIc; - needsUpdate = true; - } // END all IC coords present - } // END this IC matches current bond - } // END IC is not used - } // END loop searching for ICs matching current bond - // If any difference was found, shift all of the torsions - if (needsUpdate) { - mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", - topIn.AtomMaskName(bnd->A1()).c_str(), - topIn.AtomMaskName(bnd->A2()).c_str(), - tDiff); - for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) - { - InternalCoords& thisIc = IC_[*it]; - double dNew = thisIc.Phi() + tDiff; - mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); - thisIc.SetPhi( dNew ); - } - } // END ICs need update - } // END both bond atoms belong to this residue - } // END loop over bonds -/* - Barray isUsed( IC_.size(), false ); - unsigned int Nused = 0; - while (Nused < IC_.size()) { - unsigned int idx = 0; - while (idx < IC_.size() && isUsed[idx]) idx++; - if (idx >= IC_.size()) break; - // Unused IC. Find all other ICs that share atoms J-K - MARK(idx, isUsed, Nused); - Iarray bondICs(1, idx); - for (unsigned int jdx = idx + 1; jdx < IC_.size(); jdx++) { - if ( IC_[idx].AtJ() == IC_[jdx].AtJ() && - IC_[idx].AtK() == IC_[jdx].AtK() ) - { - bondICs.push_back( jdx ); - MARK(jdx, isUsed, Nused); - } - } - mprintf("DEBUG: Looking at %zu ICs involving %s - %s\n", bondICs.size(), - topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), - topIn.AtomMaskName(IC_[idx].AtK()).c_str()); - bool needsUpdate = false; - Iarray toUpdate; - toUpdate.reserve( bondICs.size() ); - double tDiff = 0; - for (Iarray::iterator it = bondICs.begin(); it != bondICs.end(); ++it) - { - InternalCoords& thisIc = IC_[*it]; - if (hasPosition[thisIc.AtI()] && - hasPosition[thisIc.AtJ()] && - hasPosition[thisIc.AtK()] && - hasPosition[thisIc.AtL()]) - { - mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), - frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), - frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); - double dTorsion = frameIc.Phi() * Constants::DEGRAD; - double dInternalValue = thisIc.Phi() * Constants::DEGRAD; - tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); - thisIc = frameIc; - needsUpdate = true; - } else { - toUpdate.push_back( *it ); - } - } // END calc loop over ICs sharing J-K bond - // If any difference was found, shift all of the torsions - if (needsUpdate) { - mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", - topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), - topIn.AtomMaskName(IC_[idx].AtK()).c_str(), - tDiff); - for (Iarray::const_iterator it = toUpdate.begin(); it != toUpdate.end(); ++it) - { - InternalCoords& thisIc = IC_[*it]; - double dNew = thisIc.Phi() + tDiff; - mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); - thisIc.SetPhi( dNew ); - } - } - } // END loop over ICs*/ - return 0; -} - /** Set up Zmatrix from Cartesian coordinates and topology. * Use torsions based on connectivity to create a complete set of ICs. */ diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 165d5c661e..7d27d471cc 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -41,12 +41,12 @@ class Zmatrix { /// Try to generate complete ICs from atom connectivity int SetFromFrameAndConnect(Frame const&, Topology const&);//, int); - /// Update ICs from existing coords - int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Convert specifed molecule of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&, int); /// Convert molecule 0 of Frame/Topology to internal coordinates array int SetFromFrame(Frame const&, Topology const&); + /// \return Modifable reference to specified IC + InternalCoords& ModifyIC(unsigned int idx) { return IC_[idx]; } /// Set Frame from internal coords int SetToFrame(Frame&) const; diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 772844a3da..c2874b3e7e 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,5 +1,5 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h -Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h InternalCoords.h StructureEnum.h Zmatrix.h +Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h GenerateConnectivityArrays.h InternalCoords.h StructureEnum.h Zmatrix.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h @@ -12,4 +12,4 @@ Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Zmatrix.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 93baffd806..8ee99a7068 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -446,7 +446,7 @@ Spline.o : Spline.cpp CpptrajStdio.h Spline.h SplineFxnTable.o : SplineFxnTable.cpp Constants.h CpptrajStdio.h Spline.h SplineFxnTable.h StringRoutines.h StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h @@ -459,7 +459,7 @@ Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Const Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 27319edf32bf9976bd6d3536926d7d6c0c368776 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 09:05:12 -0500 Subject: [PATCH 0408/1492] Remove unused code --- src/Structure/Builder.cpp | 71 --------------------------------------- 1 file changed, 71 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 2630191210..ee91d3d1ef 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1049,76 +1049,5 @@ const } // END ICs need update } // END both bond atoms belong to this residue } // END loop over bonds -/* - Barray isUsed( IC_.size(), false ); - unsigned int Nused = 0; - while (Nused < IC_.size()) { - unsigned int idx = 0; - while (idx < IC_.size() && isUsed[idx]) idx++; - if (idx >= IC_.size()) break; - // Unused IC. Find all other ICs that share atoms J-K - MARK(idx, isUsed, Nused); - Iarray bondICs(1, idx); - for (unsigned int jdx = idx + 1; jdx < IC_.size(); jdx++) { - if ( IC_[idx].AtJ() == IC_[jdx].AtJ() && - IC_[idx].AtK() == IC_[jdx].AtK() ) - { - bondICs.push_back( jdx ); - MARK(jdx, isUsed, Nused); - } - } - mprintf("DEBUG: Looking at %zu ICs involving %s - %s\n", bondICs.size(), - topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), - topIn.AtomMaskName(IC_[idx].AtK()).c_str()); - bool needsUpdate = false; - Iarray toUpdate; - toUpdate.reserve( bondICs.size() ); - double tDiff = 0; - for (Iarray::iterator it = bondICs.begin(); it != bondICs.end(); ++it) - { - InternalCoords& thisIc = IC_[*it]; - if (hasPosition[thisIc.AtI()] && - hasPosition[thisIc.AtJ()] && - hasPosition[thisIc.AtK()] && - hasPosition[thisIc.AtL()]) - { - mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - InternalCoords frameIc = calcIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), - frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()), - frameIn.XYZ(thisIc.AtK()), frameIn.XYZ(thisIc.AtL())); - double dTorsion = frameIc.Phi() * Constants::DEGRAD; - double dInternalValue = thisIc.Phi() * Constants::DEGRAD; - tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); - thisIc = frameIc; - needsUpdate = true; - } else { - toUpdate.push_back( *it ); - } - } // END calc loop over ICs sharing J-K bond - // If any difference was found, shift all of the torsions - if (needsUpdate) { - mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", - topIn.AtomMaskName(IC_[idx].AtJ()).c_str(), - topIn.AtomMaskName(IC_[idx].AtK()).c_str(), - tDiff); - for (Iarray::const_iterator it = toUpdate.begin(); it != toUpdate.end(); ++it) - { - InternalCoords& thisIc = IC_[*it]; - double dNew = thisIc.Phi() + tDiff; - mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); - thisIc.SetPhi( dNew ); - } - } - } // END loop over ICs*/ return 0; } From 7b033a8b63ec262a28481ecfa3398627864a2513 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 09:14:34 -0500 Subject: [PATCH 0409/1492] Separate out finding length parameters --- src/Structure/Builder.cpp | 68 +++++++++++++++++++++++++++------------ src/Structure/Builder.h | 2 ++ 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index ee91d3d1ef..02e42bcd68 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -29,32 +29,57 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { } // ----------------------------------------------------------------------------- +/** Get length from parameter set if present. + * \return 1 if a length parameter was found. + */ +int Cpptraj::Structure::Builder::getLengthParam(double& dist, int ai, int aj, Topology const& topIn) +const +{ + if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { + TypeNameHolder btypes(2); + btypes.AddName( topIn[ai].Type() ); + btypes.AddName( topIn[aj].Type() ); + ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); + if (it != params_->BP().end()) { + dist = it->second.Req(); + mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", + topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), + topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), + it->second.Req(), it->second.Rk()); + return 1; + } + } + return 0; +} + /** Assign reasonable value for bond distance. */ int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) const { - if (atomPositionKnown[ai] && atomPositionKnown[aj]) + if (atomPositionKnown[ai] && atomPositionKnown[aj]) { dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); - else { - // One or both positions unknown. Use estimated bond length or parameters. - bool foundParam = false; - if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { - TypeNameHolder btypes(2); - btypes.AddName( topIn[ai].Type() ); - btypes.AddName( topIn[aj].Type() ); - ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); - if (it != params_->BP().end()) { - dist = it->second.Req(); - foundParam = true; - mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", - topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), - topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), - it->second.Req(), it->second.Rk()); - } - } - if (!foundParam) - dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); + return 0; } + + // One or both positions unknown. Use estimated bond length or parameters. + if (getLengthParam(dist, ai, aj, topIn)) return 0; +/* if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { + TypeNameHolder btypes(2); + btypes.AddName( topIn[ai].Type() ); + btypes.AddName( topIn[aj].Type() ); + ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); + if (it != params_->BP().end()) { + dist = it->second.Req(); + mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", + topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), + topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), + it->second.Req(), it->second.Rk()); + return 0; + } + }*/ + + // Default to bond length based on elements + dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); return 0; } @@ -986,6 +1011,9 @@ const int Builder::UpdateICsFromFrame(Zmatrix& zmatrix, Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) const { + // Update bond/angle values for atoms with no position. + + // Update torsions Barray isUsed( zmatrix.N_IC(), false ); //unsigned int Nused = 0; // Get list of bonds diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index f2fc696a7d..dbc3795639 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -28,6 +28,8 @@ class Builder { int UpdateICsFromFrame(Zmatrix&, Frame const&, int, Topology const&, Barray const&) const; private: typedef std::vector Iarray; + /// Get length parameter for atoms + int getLengthParam(double&, int, int, Topology const&) const; /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I From df9e57e15d1748e190dbcb1a4739536ea918ab76 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 14:27:58 -0500 Subject: [PATCH 0410/1492] Separate out getting angle parameter --- src/Structure/Builder.cpp | 33 ++++++++++++++++++++++++++++++++- src/Structure/Builder.h | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 02e42bcd68..3d921bea4f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -83,6 +83,35 @@ const return 0; } +/** Get angle parameter if present. + * \return 1 if parameter found. + */ +int Cpptraj::Structure::Builder::getAngleParam(double& theta, int ai, int aj, int ak, Topology const& topIn) +const +{ + if (params_ != 0 && + topIn[ai].HasType() && + topIn[aj].HasType() && + topIn[ak].HasType()) + { + TypeNameHolder atypes(3); + atypes.AddName( topIn[ai].Type() ); + atypes.AddName( topIn[aj].Type() ); + atypes.AddName( topIn[ak].Type() ); + ParmHolder::const_iterator it = params_->AP().GetParam( atypes ); + if (it != params_->AP().end()) { + theta = it->second.Teq(); + mprintf("DEBUG: Found angle parameter for %s (%s) - %s (%s) - %s (%s): teq=%g tk=%g\n", + topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), + topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), + topIn.AtomMaskName(ak).c_str(), *(topIn[ak].Type()), + it->second.Teq()*Constants::RADDEG, it->second.Tk()); + return 1; + } + } + return 0; +} + /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. */ @@ -97,6 +126,8 @@ const return 0; } + if (getAngleParam(theta, ai, aj, ak, topIn)) return 0; +/* if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType() && @@ -117,7 +148,7 @@ const return 0; } } - +*/ // Figure out hybridization and chirality of atom j. Atom const& AJ = topIn[aj]; if (debug_ > 0) { diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index dbc3795639..c912d0651b 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -32,6 +32,8 @@ class Builder { int getLengthParam(double&, int, int, Topology const&) const; /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; + /// Get angle parameter for atoms. + int getAngleParam(double&, int, int, int, Topology const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; /// Calculate an internal coordinate for known atoms From 018810211362e30838815fd4793e9426e182d0de Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 14:41:10 -0500 Subject: [PATCH 0411/1492] Add but do not yet enable ability to update ICs with values from parameter set --- src/Structure/Builder.cpp | 23 ++++++++++++++++++++++- src/Structure/InternalCoords.h | 4 ++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 3d921bea4f..7b2c9ac8b1 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1043,7 +1043,28 @@ int Builder::UpdateICsFromFrame(Zmatrix& zmatrix, Frame const& frameIn, int ires const { // Update bond/angle values for atoms with no position. - +/* for (unsigned int idx = 0; idx != zmatrix.N_IC(); idx++) + { + InternalCoords& thisIc = zmatrix.ModifyIC(idx); + if (!hasPosition[thisIc.AtI()]) { + double dist = 0; + if (getLengthParam( dist, thisIc.AtI(), thisIc.AtJ(), topIn )) { + mprintf("DEBUG: Replacing existing bond length %g for %s - %s with parameter %g\n", + thisIc.Dist(), topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), dist); + thisIc.SetDist( dist ); + } + double theta = 0; + if (getAngleParam( theta, thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), topIn)) { + theta *= Constants::RADDEG; + mprintf("DEBUG: Replacing existing angle %g for %s - %s - %s with parameter %g\n", + thisIc.Theta(), topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), topIn.AtomMaskName(thisIc.AtK()).c_str(), + theta); + thisIc.SetTheta( theta ); + } + } + }*/ // Update torsions Barray isUsed( zmatrix.N_IC(), false ); //unsigned int Nused = 0; diff --git a/src/Structure/InternalCoords.h b/src/Structure/InternalCoords.h index e655ce94a5..acf02face1 100644 --- a/src/Structure/InternalCoords.h +++ b/src/Structure/InternalCoords.h @@ -45,6 +45,10 @@ class InternalCoords { void OffsetIndices(int); /// Set the value of Phi void SetPhi(double p) { val_[2] = p; } + /// Set the value of theta + void SetTheta(double t) { val_[1] = t; } + /// Set the value of distance + void SetDist(double d) { val_[0] = d; } private: int ati_; ///< Atom I index int idx_[3]; ///< Atom indices for distance, angle, torsion From 468cf7d9380279cd0775621623fc0495141154b9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 30 Jan 2024 15:50:38 -0500 Subject: [PATCH 0412/1492] No need to update ICs for atoms that have coordinates set. --- src/Structure/Builder.cpp | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 7b2c9ac8b1..a423674729 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1043,9 +1043,30 @@ int Builder::UpdateICsFromFrame(Zmatrix& zmatrix, Frame const& frameIn, int ires const { // Update bond/angle values for atoms with no position. -/* for (unsigned int idx = 0; idx != zmatrix.N_IC(); idx++) - { - InternalCoords& thisIc = zmatrix.ModifyIC(idx); +// for (unsigned int idx = 0; idx != zmatrix.N_IC(); idx++) +// { +/* InternalCoords& thisIc = zmatrix.ModifyIC(idx); + if (hasPosition[thisIc.AtI()] && hasPosition[thisIc.AtJ()]) { + // Bond exists. + double dist = DIST2_NoImage( frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()) ); + mprintf("DEBUG: Replacing existing bond length %g for %s - %s with existing length %g\n", + thisIc.Dist(), topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), dist); + thisIc.SetDist( dist ); + if (hasPosition[thisIc.AtK()]) { + // Angle also exists + double theta = CalcAngle(frameIn.XYZ(thisIc.AtI()), + frameIn.XYZ(thisIc.AtJ()), + frameIn.XYZ(thisIc.AtK())); + theta *= Constants::RADDEG; + mprintf("DEBUG: Replacing existing angle %g for %s - %s - %s with existing angle %g\n", + thisIc.Theta(), topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), topIn.AtomMaskName(thisIc.AtK()).c_str(), + theta); + thisIc.SetTheta( theta ); + } + }*/ +/* if (!hasPosition[thisIc.AtI()]) { double dist = 0; if (getLengthParam( dist, thisIc.AtI(), thisIc.AtJ(), topIn )) { @@ -1064,7 +1085,8 @@ const thisIc.SetTheta( theta ); } } - }*/ +*/ +// } // END loop over zmatrix ICs // Update torsions Barray isUsed( zmatrix.N_IC(), false ); //unsigned int Nused = 0; From 227aa974c0c9efefc03e99d73e0362290923af72 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 31 Jan 2024 09:02:14 -0500 Subject: [PATCH 0413/1492] Remove old code --- src/Structure/Zmatrix.cpp | 53 +++++++++++++-------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 5e91740f47..c76eb9ed2f 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -590,47 +590,30 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con */ int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn) //, int molnum) { -// if (molnum < 0) { -// mprinterr("Internal Error: Zmatrix::SetFromFrame(): Negative molecule index.\n"); -// return 1; -// } -// if (topIn.Nmol() < 1) { -// mprinterr("Internal Error: Zmatrix::SetFromFrame(): No molecules.\n"); -// return 1; -// } clear(); - - IC_.clear(); -// Molecule const& currentMol = topIn.Mol(molnum); - -// for (Unit::const_iterator seg = currentMol.MolUnit().segBegin(); -// seg != currentMol.MolUnit().segEnd(); ++seg) -// { -// for (int iat1 = seg->Begin(); iat1 != seg->End(); ++iat1) - for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) - { - Atom const& At1 = topIn[iat1]; - for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { - int iat2 = At1.Bond(bidx1); - Atom const& At2 = topIn[iat2]; - for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { - int iat3 = At2.Bond(bidx2); - if (iat3 != iat1) { - Atom const& At3 = topIn[iat3]; - for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { - int iat4 = At3.Bond(bidx3); - if (iat4 != iat2 && iat1 < iat4) { - //mprintf("DEBUG: DIHEDRAL %i - %i - %i - %i (%i %i %i %i)\n", iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); - //out.push_back( DihedralType( iat1, iat2, iat3, iat4, -1 ) ); - addIc(iat1, iat2, iat3, iat4, frameIn); - addIc(iat4, iat3, iat2, iat1, frameIn); // FIXME should the reverse one be put in? - } + for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) + { + Atom const& At1 = topIn[iat1]; + for (int bidx1 = 0; bidx1 < At1.Nbonds(); bidx1++) { + int iat2 = At1.Bond(bidx1); + Atom const& At2 = topIn[iat2]; + for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { + int iat3 = At2.Bond(bidx2); + if (iat3 != iat1) { + Atom const& At3 = topIn[iat3]; + for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { + int iat4 = At3.Bond(bidx3); + if (iat4 != iat2 && iat1 < iat4) { + //mprintf("DEBUG: DIHEDRAL %i - %i - %i - %i (%i %i %i %i)\n", iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + //out.push_back( DihedralType( iat1, iat2, iat3, iat4, -1 ) ); + addIc(iat1, iat2, iat3, iat4, frameIn); + addIc(iat4, iat3, iat2, iat1, frameIn); // FIXME should the reverse one be put in? } } } } } - //} + } if (IC_.empty()) { // Either 4-5 atoms in a tetrahedral configuration or else // some other strange configuration. From 590822e109c38ee6d0deafd1a4b1dc2277986688 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 31 Jan 2024 09:44:28 -0500 Subject: [PATCH 0414/1492] Start trying to build internals in the same order as leap --- src/Structure/GenerateConnectivityArrays.cpp | 26 ++++++++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 2 ++ src/Structure/Zmatrix.cpp | 4 +++ src/Topology.h | 1 + 4 files changed, 33 insertions(+) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 0b7dd8e6c8..edf57535bc 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -252,3 +252,29 @@ void Cpptraj::Structure::GenerateAngleAndTorsionArraysFromBonds(AngleArray& angl enumerateDihedrals( dihedrals, it->A1(), it->A2(), atoms ); } } + +/** Generate dihedral array in the same order as LEaP's + * BuildInternalsForContainer/ModelAssignTorsionsAround. + */ +DihedralArray Cpptraj::Structure::GenerateInternals(std::vector const& residues, + std::vector const& atoms) +{ + // First generate the bond array + BondArray bonds = GenerateBondArray( residues, atoms ); + // Loop over bonds + for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) + { + Atom const& A2 = atoms[bnd->A1()]; + Atom const& A3 = atoms[bnd->A2()]; + if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { + Residue const& R2 = residues[A2.ResNum()]; + Residue const& R3 = residues[A3.ResNum()]; + mprintf("Building torsion INTERNALs around: .R<%s %i>.A<%s %i> - .R<%s %i>.A<%s %i>\n", + *(R2.Name()), A2.ResNum()+1, *(A2.Name()), bnd->A1()+1, + *(R3.Name()), A3.ResNum()+1, *(A3.Name()), bnd->A2()+1 ); + } + } + + DihedralArray out; + return out; +} diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index b0bc6f8bc2..43eed2f57f 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -22,6 +22,8 @@ DihedralArray GenerateDihedralArray(std::vector const&, std::vector const&, std::vector const&); /// Generate angle and torsion arrays from bonds void GenerateAngleAndTorsionArraysFromBonds(AngleArray&, DihedralArray&, std::vector const&, BondArray const&); +/// Generate array of dihedrals to be used as internal coordinates +DihedralArray GenerateInternals(std::vector const&, std::vector const&); } } #endif diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index c76eb9ed2f..275c87e9df 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -3,6 +3,7 @@ #include #include // cos #include "Zmatrix.h" +#include "GenerateConnectivityArrays.h" #include "../Frame.h" #include "../CpptrajStdio.h" #include "../Constants.h" @@ -591,6 +592,9 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn) //, int molnum) { clear(); + // DEBUG + DihedralArray internals = GenerateInternals(topIn.Residues(), topIn.Atoms()); + // DEBUG for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) { Atom const& At1 = topIn[iat1]; diff --git a/src/Topology.h b/src/Topology.h index 825ed4cc50..b193af71e2 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -89,6 +89,7 @@ class Topology { inline res_iterator ResEnd() const { return residues_.end(); } const Residue& Res(int idx) const { return residues_[idx]; } Residue& SetRes(int idx) { return residues_[idx]; } + std::vector const& Residues() const { return residues_; } Range SoluteResidues() const; /// Merge residues in given range int MergeResidues(int, int); From 50be3d1af483a1d1be9cd47206f359c838c3bc75 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 31 Jan 2024 10:56:42 -0500 Subject: [PATCH 0415/1492] Move the leap-like internal coord generation scheme to inside zmatrix --- src/Structure/GenerateConnectivityArrays.cpp | 26 ------ src/Structure/GenerateConnectivityArrays.h | 2 - src/Structure/Zmatrix.cpp | 88 +++++++++++++++++++- src/Structure/Zmatrix.h | 2 + 4 files changed, 88 insertions(+), 30 deletions(-) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index edf57535bc..0b7dd8e6c8 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -252,29 +252,3 @@ void Cpptraj::Structure::GenerateAngleAndTorsionArraysFromBonds(AngleArray& angl enumerateDihedrals( dihedrals, it->A1(), it->A2(), atoms ); } } - -/** Generate dihedral array in the same order as LEaP's - * BuildInternalsForContainer/ModelAssignTorsionsAround. - */ -DihedralArray Cpptraj::Structure::GenerateInternals(std::vector const& residues, - std::vector const& atoms) -{ - // First generate the bond array - BondArray bonds = GenerateBondArray( residues, atoms ); - // Loop over bonds - for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) - { - Atom const& A2 = atoms[bnd->A1()]; - Atom const& A3 = atoms[bnd->A2()]; - if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { - Residue const& R2 = residues[A2.ResNum()]; - Residue const& R3 = residues[A3.ResNum()]; - mprintf("Building torsion INTERNALs around: .R<%s %i>.A<%s %i> - .R<%s %i>.A<%s %i>\n", - *(R2.Name()), A2.ResNum()+1, *(A2.Name()), bnd->A1()+1, - *(R3.Name()), A3.ResNum()+1, *(A3.Name()), bnd->A2()+1 ); - } - } - - DihedralArray out; - return out; -} diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index 43eed2f57f..b0bc6f8bc2 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -22,8 +22,6 @@ DihedralArray GenerateDihedralArray(std::vector const&, std::vector const&, std::vector const&); /// Generate angle and torsion arrays from bonds void GenerateAngleAndTorsionArraysFromBonds(AngleArray&, DihedralArray&, std::vector const&, BondArray const&); -/// Generate array of dihedrals to be used as internal coordinates -DihedralArray GenerateInternals(std::vector const&, std::vector const&); } } #endif diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 275c87e9df..401be123b5 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1,5 +1,5 @@ #include -#include // std::sort, std::min, std::max, std::find +#include // std::sort, std::min, std::max, std::find, std::swap #include #include // cos #include "Zmatrix.h" @@ -586,6 +586,90 @@ int Zmatrix::addInternalCoordForAtom(int iat, Frame const& frameIn, Topology con return 0; } +// ----------------------------------------------- +/** \return the LEaP 'weight' of an atom. + * Originally used to force the 'heaviest' atoms around a torsion trans to + * each other. The 'weight' of an atom is defined as its element number, + * unless the atom is CARBON, then it is 1000, making it the 'heaviest' atom. + */ +static int LeapAtomWeight(Atom const& At) +{ + if ( At.Element() == Atom::CARBON ) + return 1000; + return At.AtomicNumber(); +} + +/** Order atoms bonded to the given atom in a manner similar to LEaP's + * zModelOrderAtoms. In that routine, first atoms were sorted into + * known position > unknown position. Then the heaviest atom in each + * subgroup was swapped with the first element of that list. Since at this + * point we assume all positions are known, we are just shifting the + * heaviest atom to the front of the list. + * The ignore atom is the index of the atom this atom is bonded to that + * forms the torsion we are interested in. + */ +static inline std::vector SortBondedAtomsLikeLeap(Atom const& At, Topology const& topIn, int ignoreAtom) +{ + std::vector out; + out.reserve( At.Nbonds() ); + // Find the index of the heaviest atom + int iHighest = 0; + int iPos = 0; + for (int idx = 0; idx < At.Nbonds(); idx++) { + int bat = At.Bond(idx); + if (bat != ignoreAtom) { + out.push_back( bat ); + int iWeight = LeapAtomWeight( topIn[bat] ); + if ( iHighest < iWeight ) { + iHighest = iWeight; + iPos = (int)out.size()-1; + } + } + } + // If highest weight atom not already in front, swap it there. + if (iPos != 0) std::swap( out[0], out[iPos] ); + + return out; +} + +/** Set up Zmatrix from Cartesian coordinates and topology in the same + * manner as LEaP's BuildInternalsForContainer/ModelAssignTorsionsAround. + * Currently assumes all positions are known. + */ +int Zmatrix::GenerateInternals(Frame const& frameIn, Topology const& topIn) +{ + // First generate the bond array + BondArray bonds = GenerateBondArray( topIn.Residues(), topIn.Atoms() ); + // Loop over bonds + for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) + { + Atom const& A2 = topIn[bnd->A1()]; + Atom const& A3 = topIn[bnd->A2()]; + if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { + Residue const& R2 = topIn.Res(A2.ResNum()); + Residue const& R3 = topIn.Res(A3.ResNum()); + mprintf("Building torsion INTERNALs around: .R<%s %i>.A<%s %i> - .R<%s %i>.A<%s %i>\n", + *(R2.Name()), A2.ResNum()+1, *(A2.Name()), bnd->A1()+1, + *(R3.Name()), A3.ResNum()+1, *(A3.Name()), bnd->A2()+1 ); + Iarray sorted_a2 = SortBondedAtomsLikeLeap(A2, topIn, bnd->A2()); + Iarray sorted_a3 = SortBondedAtomsLikeLeap(A3, topIn, bnd->A1()); + mprintf("Orientation around: %s {", *(A2.Name())); + for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + mprintf("}\n"); + for (Iarray::const_iterator it = sorted_a2.begin(); it != sorted_a2.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_a2.begin(), *(topIn[*it].Name())); + mprintf("Orientation around: %s {", *(A3.Name())); + for (Atom::bond_iterator bat = A3.bondbegin(); bat != A3.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + mprintf("}\n"); + for (Iarray::const_iterator it = sorted_a3.begin(); it != sorted_a3.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_a3.begin(), *(topIn[*it].Name())); + + } + } + return 0; +} + +// ----------------------------------------------- /** Set up Zmatrix from Cartesian coordinates and topology. * Use torsions based on connectivity to create a complete set of ICs. */ @@ -593,7 +677,7 @@ int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn) { clear(); // DEBUG - DihedralArray internals = GenerateInternals(topIn.Residues(), topIn.Atoms()); + GenerateInternals(frameIn, topIn); // DEBUG for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) { diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index 7d27d471cc..d6cb710759 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -39,6 +39,8 @@ class Zmatrix { /// Set seed atoms as 3 consecutive atoms with known positions for specified residue # TODO deprecate? int AutoSetSeedsWithPositions(Frame const&, Topology const&, int, Barray const&); + /// Try to generate complete ICs in same manner as LEaP + int GenerateInternals(Frame const&, Topology const&); /// Try to generate complete ICs from atom connectivity int SetFromFrameAndConnect(Frame const&, Topology const&);//, int); /// Convert specifed molecule of Frame/Topology to internal coordinates array From 6dd31d48b26415e1e4b3f6b343e2a1d92b552cce Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 31 Jan 2024 11:34:50 -0500 Subject: [PATCH 0416/1492] Create a dedicated leap format name function for easier debugging --- src/Structure/Zmatrix.cpp | 9 ++++----- src/Topology.cpp | 8 ++++++++ src/Topology.h | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 401be123b5..8647f0469e 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -646,11 +646,10 @@ int Zmatrix::GenerateInternals(Frame const& frameIn, Topology const& topIn) Atom const& A2 = topIn[bnd->A1()]; Atom const& A3 = topIn[bnd->A2()]; if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { - Residue const& R2 = topIn.Res(A2.ResNum()); - Residue const& R3 = topIn.Res(A3.ResNum()); - mprintf("Building torsion INTERNALs around: .R<%s %i>.A<%s %i> - .R<%s %i>.A<%s %i>\n", - *(R2.Name()), A2.ResNum()+1, *(A2.Name()), bnd->A1()+1, - *(R3.Name()), A3.ResNum()+1, *(A3.Name()), bnd->A2()+1 ); + //Residue const& R2 = topIn.Res(A2.ResNum()); + //Residue const& R3 = topIn.Res(A3.ResNum()); + mprintf("Building torsion INTERNALs around: %s - %s\n", + topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str()); Iarray sorted_a2 = SortBondedAtomsLikeLeap(A2, topIn, bnd->A2()); Iarray sorted_a3 = SortBondedAtomsLikeLeap(A3, topIn, bnd->A1()); mprintf("Orientation around: %s {", *(A2.Name())); diff --git a/src/Topology.cpp b/src/Topology.cpp index 121e038b80..48046ba4ac 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -334,6 +334,14 @@ std::string Topology::TruncAtomNameNum(int atom) const { return atom_name; } +/** Given an atom number, return a string in LEaP-style format. */ +std::string Topology::LeapName(int at) const { + int rnum = atoms_[at].ResNum(); + std::string out( ".R<" + residues_[rnum].Name().Truncated() + " " + integerToString(rnum+1) + + ">.A<" + atoms_[at].Name().Truncated() + " " + integerToString(at+1) + ">"); + return out; +} + // Topology::TruncResNameNum() /** Given a residue index (starting from 0), return a string containing * residue name and number (starting from 1) with format: diff --git a/src/Topology.h b/src/Topology.h index b193af71e2..804c734f1c 100644 --- a/src/Topology.h +++ b/src/Topology.h @@ -196,6 +196,8 @@ class Topology { std::string AtomMaskName(int) const; /// Format: _ std::string TruncAtomNameNum(int) const; + /// LEaP Format: R.A + std::string LeapName(int) const; /// Format: : std::string TruncResNameNum(int) const; /// Format: _[_] From 410e182195ce37f4ada23f3f285d16c3d84a9692 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 31 Jan 2024 12:06:08 -0500 Subject: [PATCH 0417/1492] Use leap ordering for internal coordinates. Getting closer! --- src/Exec_Build.cpp | 3 ++- src/Structure/Zmatrix.cpp | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 2b02cdd930..3dd6016afc 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -299,7 +299,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); - if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { + //if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { + if (zmatrix->GenerateInternals( templateFrame, resTemplate->Top() )) { mprinterr("Error: Could not set up residue template zmatrix.\n"); return 1; } diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 8647f0469e..31ead01817 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -638,6 +638,7 @@ static inline std::vector SortBondedAtomsLikeLeap(Atom const& At, Topology */ int Zmatrix::GenerateInternals(Frame const& frameIn, Topology const& topIn) { + clear(); // First generate the bond array BondArray bonds = GenerateBondArray( topIn.Residues(), topIn.Atoms() ); // Loop over bonds @@ -662,7 +663,22 @@ int Zmatrix::GenerateInternals(Frame const& frameIn, Topology const& topIn) mprintf("}\n"); for (Iarray::const_iterator it = sorted_a3.begin(); it != sorted_a3.end(); ++it) mprintf("Atom %li: %s\n", it - sorted_a3.begin(), *(topIn[*it].Name())); - + // Build the torsions + int aj = bnd->A1(); + int ak = bnd->A2(); + for (Iarray::const_iterator ai = sorted_a2.begin(); ai != sorted_a2.end(); ++ai) { + for (Iarray::const_iterator al = sorted_a3.begin(); al != sorted_a3.end(); ++al) { + //double dval = Torsion(frameIn.XYZ(*ai), frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(*al)); + addIc(*ai, aj, ak, *al, frameIn); + mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", + IC_.back().Phi() * Constants::RADDEG, + topIn.LeapName(*ai).c_str(), + topIn.LeapName(aj).c_str(), + topIn.LeapName(ak).c_str(), + topIn.LeapName(*al).c_str()); + addIc(*al, ak, aj, *ai, frameIn); + } + } } } return 0; @@ -675,9 +691,7 @@ int Zmatrix::GenerateInternals(Frame const& frameIn, Topology const& topIn) int Zmatrix::SetFromFrameAndConnect(Frame const& frameIn, Topology const& topIn) //, int molnum) { clear(); - // DEBUG - GenerateInternals(frameIn, topIn); - // DEBUG + for (int iat1 = 0; iat1 < topIn.Natom(); iat1++) { Atom const& At1 = topIn[iat1]; From 41fc28c2dceced6430519eef4eb199ffe7d9e79d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 31 Jan 2024 12:26:09 -0500 Subject: [PATCH 0418/1492] Use LeapName in more places --- src/Structure/Builder.cpp | 12 ++++++------ src/Structure/Zmatrix.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index a423674729..99a9eba09a 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1115,10 +1115,10 @@ const hasPosition[thisIc.AtL()]) { mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); + topIn.LeapName(thisIc.AtI()).c_str(), + topIn.LeapName(thisIc.AtJ()).c_str(), + topIn.LeapName(thisIc.AtK()).c_str(), + topIn.LeapName(thisIc.AtL()).c_str()); InternalCoords frameIc = calcKnownAtomIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), frameIn); double dTorsion = frameIc.Phi() * Constants::DEGRAD; double dInternalValue = thisIc.Phi() * Constants::DEGRAD; @@ -1133,8 +1133,8 @@ const // If any difference was found, shift all of the torsions if (needsUpdate) { mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", - topIn.AtomMaskName(bnd->A1()).c_str(), - topIn.AtomMaskName(bnd->A2()).c_str(), + topIn.LeapName(bnd->A1()).c_str(), + topIn.LeapName(bnd->A2()).c_str(), tDiff); for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) { diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 31ead01817..8acb53f49e 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -671,7 +671,7 @@ int Zmatrix::GenerateInternals(Frame const& frameIn, Topology const& topIn) //double dval = Torsion(frameIn.XYZ(*ai), frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(*al)); addIc(*ai, aj, ak, *al, frameIn); mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", - IC_.back().Phi() * Constants::RADDEG, + IC_.back().Phi(), topIn.LeapName(*ai).c_str(), topIn.LeapName(aj).c_str(), topIn.LeapName(ak).c_str(), From 2db89609a6a4d5479632c09649366fc6a0d589f7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 1 Feb 2024 10:08:40 -0500 Subject: [PATCH 0419/1492] Add <, ==, and != operators --- src/Structure/InternalCoords.h | 36 +++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/Structure/InternalCoords.h b/src/Structure/InternalCoords.h index acf02face1..7dc8f1c3a0 100644 --- a/src/Structure/InternalCoords.h +++ b/src/Structure/InternalCoords.h @@ -24,7 +24,41 @@ class InternalCoords { InternalCoords(InternalCoords const&); /// ASSIGNMENT InternalCoords& operator=(InternalCoords const&); - + /// Less than another IC using AI < AL < AK < AJ + bool operator<(InternalCoords const& rhs) const { + if (ati_ == rhs.ati_) { + if (idx_[2] == rhs.idx_[2]) { // Atom L + if (idx_[1] == rhs.idx_[1]) { // Atom K + if (idx_[0] == rhs.idx_[0]) { // Atom J + return false; // Equal + } else { + return (idx_[0] < rhs.idx_[0]); + } + } else { + return (idx_[1] < rhs.idx_[1]); + } + } else { + return (idx_[2] < rhs.idx_[2]); + } + } else { + return (ati_ < rhs.ati_); + } + } + /// \return True if all indices are equal + bool operator==(InternalCoords const& rhs) const { + return ( ati_ == rhs.ati_ && + idx_[0] == rhs.idx_[0] && + idx_[1] == rhs.idx_[1] && + idx_[2] == rhs.idx_[2] ); + } + /// \return True if any index is not equal + bool operator!=(InternalCoords const& rhs) const { + return ( ati_ != rhs.ati_ || + idx_[0] != rhs.idx_[0] || + idx_[1] != rhs.idx_[1] || + idx_[2] != rhs.idx_[2] ); + } + /// Indictaes no atom set static const int NO_ATOM; double Dist() const { return val_[0]; } From f765f178f798b0de01a63b6062518e36ea7fa377 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 1 Feb 2024 10:20:58 -0500 Subject: [PATCH 0420/1492] Have ModelCoordsAroundBond add IC to existing Zmatrix instead of actually setting the coordinates. --- src/Exec_Build.cpp | 2 +- src/Structure/Builder.cpp | 72 ++++++++++++++++++++++++--------------- src/Structure/Builder.h | 2 +- src/Structure/Zmatrix.cpp | 5 +++ src/Structure/Zmatrix.h | 2 ++ 5 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 3dd6016afc..a8499759cd 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -397,7 +397,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (jres < ires) { mprintf("DEBUG: Connected to residue %s\n", topOut.TruncResNameNum(jres).c_str()); if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, - zmatrix, ResZmatrices[jres], hasPosition)) + *zmatrix, hasPosition)) { mprinterr("Error: Model coords around bond failed between %s and %s\n", topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 99a9eba09a..8926c601bd 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -642,18 +642,21 @@ const } /// \return The total number of atoms whose position is known for the specified residue -static inline int known_count(int ires, Topology const& topIn, std::vector const& hasPosition) +/*static inline int known_count(int ires, Topology const& topIn, std::vector const& hasPosition) { int count = 0; for (int at = topIn.Res(ires).FirstAtom(); at != topIn.Res(ires).LastAtom(); at++) if (hasPosition[at]) count++; return count; -} +}*/ -/** Model the coordinates around a bond */ -int Builder::ModelCoordsAroundBond(Frame& frameIn, Topology const& topIn, int bondAt0, int bondAt1, - Zmatrix const* zmatrix0, Zmatrix const* zmatrix1, Barray& hasPosition) +/** Model the internal coordinates around a bond between two residues defined + * by bondAt0 (in residue0) and bondAt1 in (residue1). + * + */ +int Builder::ModelCoordsAroundBond(Frame const& frameIn, Topology const& topIn, int bondAt0, int bondAt1, + Zmatrix& zmatrix0, Barray const& hasPosition) const { mprintf("DEBUG: Model coords around bond %s - %s\n", topIn.AtomMaskName(bondAt0).c_str(), topIn.AtomMaskName(bondAt1).c_str()); @@ -664,24 +667,33 @@ const return 1; } // Determine which "direction" we will be combining the fragments. - // Make atA belong to the less-known fragment. atB fragment will be "known". - int known0 = known_count(res0, topIn, hasPosition); - int known1 = known_count(res1, topIn, hasPosition); - int atA, atB; - Zmatrix const* zA; - if (known0 < known1) { - // Fragment 1 is better-known - atA = bondAt0; - atB = bondAt1; - zA = zmatrix0; - //zB = zmatrix1; - } else { - // Fragment 0 is better or equally known - atA = bondAt1; - atB = bondAt0; - zA = zmatrix1; - //zB = zmatrix0; - } + // Ensure atA belongs to the less-known fragment. atB fragment will be "known". +// int known0 = known_count(res0, topIn, hasPosition); +// int known1 = known_count(res1, topIn, hasPosition); +//// int atA, atB; +// if (known0 > known1) { +// mprinterr("Internal Error: ModelCoordsAroundBond(): Residue0 '%s' is more well-known than Residue1 '%s'\n", +// topIn.TruncResNameNum( topIn[bondAt0].ResNum() ).c_str(), +// topIn.TruncResNameNum( topIn[bondAt1].ResNum() ).c_str()); +// return 1; +// } + int atA = bondAt0; + int atB = bondAt1; + Zmatrix* zA = &zmatrix0; // FIXME +// Zmatrix const* zA; +// if (known0 < known1) { +// // Fragment 1 is better-known +// atA = bondAt0; +// atB = bondAt1; +// zA = zmatrix0; +// //zB = zmatrix1; +// } else { +// // Fragment 0 is better or equally known +// atA = bondAt1; +// atB = bondAt0; +// zA = zmatrix1; +// //zB = zmatrix0; +// } mprintf("DEBUG: More well-known atom: %s\n", topIn.AtomMaskName(atB).c_str()); mprintf("DEBUG: Less well-known atom: %s has zmatrix= %i\n", topIn.AtomMaskName(atA).c_str(), (int)(zA != 0)); @@ -724,12 +736,16 @@ const topIn.AtomMaskName(atB).c_str()); return 1; } + // Add the remaining ICs FIXME check for duplicates + for (Zmatrix::const_iterator it = zmatrix0.begin(); it != zmatrix0.end(); ++it) + bondZmatrix.AddIC( *it ); if (debug_ > 0) bondZmatrix.print(&topIn); - if (bondZmatrix.SetToFrame( frameIn, hasPosition )) { - mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); - return 1; - } + zmatrix0 = bondZmatrix; +// if (bondZmatrix.SetToFrame( frameIn, hasPosition )) { +// mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); +// return 1; +// } return 0; } @@ -752,7 +768,7 @@ const topIn.AtomMaskName(atA).c_str(), atA+1, topIn.AtomMaskName(atB).c_str(), atB+1, topIn.Natom()); - zmatrix.clear(); +// zmatrix.clear(); //Barray hasIC( topIn.Natom(), false ); Barray hasIC = hasICin; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index c912d0651b..13e285ab48 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -23,7 +23,7 @@ class Builder { /// Combine second fragment into first fragment and bond int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; /// Model the coordinates around a bond given only some coordinates are known - int ModelCoordsAroundBond(Frame&, Topology const&, int, int, Zmatrix const*, Zmatrix const*, Barray&) const; + int ModelCoordsAroundBond(Frame const&, Topology const&, int, int, Zmatrix&, Barray const&) const; /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters int UpdateICsFromFrame(Zmatrix&, Frame const&, int, Topology const&, Barray const&) const; private: diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 8acb53f49e..e76a05a68e 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -41,6 +41,11 @@ void Zmatrix::clear() { seedAt2_ = InternalCoords::NO_ATOM; } +/** Sort ICs. */ +void Zmatrix::sort() { + std::sort( IC_.begin(), IC_.end() ); +} + /// Error message for seed already set static inline int seed_err(int iseed) { mprinterr("Internal Error: Internal coord seed %i is already set.\n", iseed); diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index d6cb710759..fbd921d84c 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -25,6 +25,8 @@ class Zmatrix { void reserve(unsigned int n) { IC_.reserve( n ); } /// Clear the Zmatrix void clear(); + /// Sort ICs by atom index (I < L < K < J) + void sort(); /// Add internal coordinate int AddIC(InternalCoords const&); /// Set specified IC From 1ec5ae84cf6eccfa666f934f0a2d915bb0377bf9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 1 Feb 2024 11:10:22 -0500 Subject: [PATCH 0421/1492] For atoms with 3 bonds, determine the angle if the 2 other angles are known via known atoms/ICs --- src/Exec_Build.cpp | 1 + src/Structure/Builder.cpp | 152 ++++++++++++++++++++++---------------- src/Structure/Builder.h | 3 + 3 files changed, 94 insertions(+), 62 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index a8499759cd..5462530b60 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -387,6 +387,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); zmatrix->print(&topOut); + linkBuilder.SetZmatrix( zmatrix ); // Is this residue connected to an earlier residue? if ( *termType != Cpptraj::Structure::BEG_TERMINAL ) { for (int at = topOut.Res(ires).FirstAtom(); at != topOut.Res(ires).LastAtom(); ++at) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 8926c601bd..9c5ad8224e 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -16,7 +16,8 @@ using namespace Cpptraj::Structure; /** CONSTRUCTOR */ Builder::Builder() : debug_(0), - params_(0) + params_(0), + currentZmatrix_(0) {} /** Set optional parameter set. */ @@ -28,6 +29,15 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { params_ = paramsIn; } +/** Set optional Zmatrix. */ +void Cpptraj::Structure::Builder::SetZmatrix(Zmatrix const* zmatrixIn) { + if (zmatrixIn == 0) { + mprinterr("Internal Error: Builder::SetZmatrix called with null set.\n"); + return; + } + currentZmatrix_ = zmatrixIn; +} + // ----------------------------------------------------------------------------- /** Get length from parameter set if present. * \return 1 if a length parameter was found. @@ -63,20 +73,6 @@ const // One or both positions unknown. Use estimated bond length or parameters. if (getLengthParam(dist, ai, aj, topIn)) return 0; -/* if (params_ != 0 && topIn[ai].HasType() && topIn[aj].HasType()) { - TypeNameHolder btypes(2); - btypes.AddName( topIn[ai].Type() ); - btypes.AddName( topIn[aj].Type() ); - ParmHolder::const_iterator it = params_->BP().GetParam( btypes ); - if (it != params_->BP().end()) { - dist = it->second.Req(); - mprintf("DEBUG: Found bond parameter for %s (%s) - %s (%s): req=%g rk=%g\n", - topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), - topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), - it->second.Req(), it->second.Rk()); - return 0; - } - }*/ // Default to bond length based on elements dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); @@ -120,73 +116,107 @@ const { if (debug_ > 0) mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); + Atom const& AJ = topIn[aj]; + + // Sanity check + if (AJ.Nbonds() < 2) { + mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); + return 1; + } + + // Check if all positions are already known if (atomPositionKnown[ai] && atomPositionKnown[aj] && atomPositionKnown[ak]) { theta = CalcAngle(frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak)); return 0; } - if (getAngleParam(theta, ai, aj, ak, topIn)) return 0; -/* - if (params_ != 0 && - topIn[ai].HasType() && - topIn[aj].HasType() && - topIn[ak].HasType()) - { - TypeNameHolder atypes(3); - atypes.AddName( topIn[ai].Type() ); - atypes.AddName( topIn[aj].Type() ); - atypes.AddName( topIn[ak].Type() ); - ParmHolder::const_iterator it = params_->AP().GetParam( atypes ); - if (it != params_->AP().end()) { - theta = it->second.Teq(); - mprintf("DEBUG: Found angle parameter for %s (%s) - %s (%s) - %s (%s): teq=%g tk=%g\n", - topIn.AtomMaskName(ai).c_str(), *(topIn[ai].Type()), - topIn.AtomMaskName(aj).c_str(), *(topIn[aj].Type()), - topIn.AtomMaskName(ak).c_str(), *(topIn[ak].Type()), - it->second.Teq()*Constants::RADDEG, it->second.Tk()); + // Figure out angles from known atoms + ICs + int nAngles = (AJ.Nbonds() * (AJ.Nbonds()-1)) / 2; + if (nAngles == 3) { + mprintf("DEBUG: Expect %i angles around AJ.\n", nAngles); + std::vector thetaVals; + int tgtIdx = -1; + int numKnown = 0; + for (int idx0 = 0; idx0 < AJ.Nbonds(); idx0++) { + int atomi = AJ.Bond(idx0); + for (int idx1 = idx0 + 1; idx1 < AJ.Nbonds(); idx1++) { + int atomk = AJ.Bond(idx1); + mprintf("DEBUG: AssignTheta(): Angle %zu atoms %i - %i - %i\n", thetaVals.size(), atomi+1, aj+1, atomk+1); + if (ai == atomi && ak == atomk) + tgtIdx = (int)thetaVals.size(); + double ajTheta = 0; + if (atomPositionKnown[atomi] && atomPositionKnown[aj] && atomPositionKnown[atomk]) { + ajTheta = CalcAngle(frameIn.XYZ(atomi), frameIn.XYZ(aj), frameIn.XYZ(atomk)); + numKnown++; + mprintf("DEBUG: AssignTheta(): Known angle centered on atom J: %s - %s - %s = %g\n", + topIn.LeapName(atomi).c_str(), + topIn.LeapName(aj).c_str(), + topIn.LeapName(atomk).c_str(), + ajTheta * Constants::RADDEG); + } else if (currentZmatrix_ != 0) { // FIXME faster search? + for (Zmatrix::const_iterator ic = currentZmatrix_->begin(); ic != currentZmatrix_->end(); ++ic) { + if (ic->AtI() == atomi && ic->AtJ() == aj && ic->AtK() == atomk) { + // TODO: Check that repeats are equal? + ajTheta = ic->Theta() * Constants::DEGRAD; + numKnown++; + mprintf("DEBUG: AssignTheta(): IC angle centered on atomJ: %s - %s - %s = %g\n", + topIn.LeapName(atomi).c_str(), + topIn.LeapName(aj).c_str(), + topIn.LeapName(atomk).c_str(), + ic->Theta()); + break; + } + } + } + thetaVals.push_back( ajTheta ); + } // END inner loop over bonds to AJ + } // END outer loop over bonds to AJ + mprintf("DEBUG: AssignTheta(): thetaVals="); + for (std::vector::const_iterator it = thetaVals.begin(); it != thetaVals.end(); ++it) { + mprintf(" %g", *it * Constants::RADDEG); + if (tgtIdx == it - thetaVals.begin()) mprintf("*"); + } + mprintf("\n"); + if (tgtIdx != -1 && numKnown >= 2) { + double sumTheta = 0; + for (std::vector::const_iterator it = thetaVals.begin(); it != thetaVals.end(); ++it) { + if (it - thetaVals.begin() != tgtIdx) { + double tval = *it; + if (tval < 0) + tval += Constants::TWOPI; + else if (tval > Constants::TWOPI) + tval -= Constants::TWOPI; + sumTheta += tval; + } + } + theta = Constants::TWOPI - sumTheta; + mprintf("DEBUG: AssignTheta(): Setting from existing atoms/ICs: %g\n", theta * Constants::RADDEG); return 0; } } -*/ + + // See if a parameter is defined for these atom types + if (getAngleParam(theta, ai, aj, ak, topIn)) return 0; + // Figure out hybridization and chirality of atom j. - Atom const& AJ = topIn[aj]; if (debug_ > 0) { mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); } - // Sanity check - if (AJ.Nbonds() < 2) { - mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); - return 1; - } AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + // Check params for hybrid if (params_ != 0) { ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); if (it != params_->AT().end()) hybrid = it->second.Hybridization(); } + // Guess hybrid if needed if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); - - // Fill in what values we can for known atoms -/* std::vector knownTheta( AJ.Nbonds() ); - int knownIdx = -1; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = AJ.Bond(idx); - if (atnum != ak && atomPositionKnown[atnum]) { - knownTheta[idx] = CalcAngle(frameIn.XYZ(atnum), - frameIn.XYZ(aj), - frameIn.XYZ(ak)); - mprintf("DEBUG:\t\tKnown theta for %s = %g\n", topIn.AtomMaskName(atnum).c_str(), knownTheta[idx]*Constants::RADDEG); - if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known - } - } - if (knownIdx == -1) {*/ - //mprintf("DEBUG:\t\tNo known theta.\n"); + // Set from number of bonds if still unknown. This is a pretty crude guess. if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { - // Assign a theta based on number of bonds switch (AJ.Nbonds()) { case 4 : hybrid = AtomType::SP3; break; case 3 : hybrid = AtomType::SP2; break; @@ -194,16 +224,14 @@ const default : mprinterr("Internal Error: AssignTheta(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; } } + // Assign a theta based on hybridization switch (hybrid) { case AtomType::SP3 : theta = 109.5 * Constants::DEGRAD; break; case AtomType::SP2 : theta = 120.0 * Constants::DEGRAD; break; case AtomType::SP : theta = 180.0 * Constants::DEGRAD; break; default : mprinterr("Internal Error: AssignTheta(): Unhandled hybridization for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; - }/* - } else { - theta = knownTheta[knownIdx]; // TODO just use above guess via hybrid? - }*/ + } return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 13e285ab48..c8f346d9f8 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -19,6 +19,8 @@ class Builder { void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); + /// Set optional Zmatrix with current ICs + void SetZmatrix(Zmatrix const*); /// Combine second fragment into first fragment and bond int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; @@ -53,6 +55,7 @@ class Builder { int debug_; ParameterSet const* params_; + Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates }; } } From 9939cdd5d1c99c575bfdd937baa6377bc7220b07 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 08:42:51 -0500 Subject: [PATCH 0422/1492] Start moving GenerateInternals routine to Builder. Change std::vector to Barray --- src/Structure/Builder.cpp | 123 ++++++++++++++++++++++++++++++++++---- src/Structure/Builder.h | 13 ++-- 2 files changed, 117 insertions(+), 19 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9c5ad8224e..07c254726c 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -63,7 +63,7 @@ const } /** Assign reasonable value for bond distance. */ -int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) +int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) const { if (atomPositionKnown[ai] && atomPositionKnown[aj]) { @@ -111,7 +111,7 @@ const /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. */ -int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, std::vector const& atomPositionKnown) +int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) const { if (debug_ > 0) @@ -254,7 +254,7 @@ Cpptraj::Structure::InternalCoords Builder::calcKnownAtomIc(int ai, int aj, int int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, int ai, int aj, int ak, int al, double newPhi, Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown) + Barray const& atomPositionKnown) const { if (atomPositionKnown[ai]) { @@ -309,7 +309,7 @@ static inline double wrap360(double phi) { int Cpptraj::Structure::Builder::AssignICsAroundBond(Zmatrix& zmatrix, int aj, int ak, int al, Topology const& topIn, Frame const& frameIn, - std::vector const& atomPositionKnown, + Barray const& atomPositionKnown, BuildAtom const& AtomJ) const { @@ -383,7 +383,7 @@ const // Fill in what values we can for known atoms std::vector knownPhi( AJ.Nbonds() ); - std::vector isKnown( AJ.Nbonds(), false ); + Barray isKnown( AJ.Nbonds(), false ); int knownIdx = -1; double knownInterval = 0; bool hasKnownInterval = false; @@ -474,7 +474,7 @@ const // If we have to assign an initial phi, make trans the longer branch if (knownIdx == -1) { - std::vector visited = atomPositionKnown; + Barray visited = atomPositionKnown; // TODO: Ensure bonded atoms are not yet visited? visited[aj] = true; visited[ak] = true; @@ -640,7 +640,7 @@ const Zmatrix bondZmatrix; // Note which atoms already have an IC in zmatrixA - std::vector hasIC(combinedTop.Natom(), false); + Barray hasIC(combinedTop.Natom(), false); for (Zmatrix::const_iterator it = zmatrixA.begin(); it != zmatrixA.end(); ++it) hasIC[it->AtI()] = true; @@ -751,7 +751,7 @@ const Zmatrix bondZmatrix; // Note which atoms already have an IC in zmatrix A - std::vector hasIC(topIn.Natom(), false); + Barray hasIC(topIn.Natom(), false); if (zA != 0) { for (Zmatrix::const_iterator it = zA->begin(); it != zA->end(); ++it) hasIC[it->AtI()] = true; @@ -786,8 +786,8 @@ const */ int Builder::SetupICsAroundBond(Zmatrix& zmatrix, int atA, int atB, Frame const& frameIn, Topology const& topIn, - std::vector const& atomPositionKnown, - std::vector const& hasICin, + Barray const& atomPositionKnown, + Barray const& hasICin, BuildAtom const& AtomA, BuildAtom const& AtomB) const { @@ -801,14 +801,14 @@ const //Barray hasIC( topIn.Natom(), false ); Barray hasIC = hasICin; unsigned int nHasIC = 0; - for (std::vector::const_iterator it = hasIC.begin(); it != hasIC.end(); ++it) { + for (Barray::const_iterator it = hasIC.begin(); it != hasIC.end(); ++it) { if (*it) { nHasIC++; mprintf("DEBUG:\tAtom %s already has an IC.\n", topIn.AtomMaskName(it-hasIC.begin()).c_str()); } } // Mark known atoms as already having IC - for (std::vector::const_iterator it = atomPositionKnown.begin(); + for (Barray::const_iterator it = atomPositionKnown.begin(); it != atomPositionKnown.end(); ++it) { //mprintf("DEBUG: MARKING KNOWN ATOMS. %li\n", it - atomPositionKnown.begin()); @@ -1196,4 +1196,101 @@ const } // END both bond atoms belong to this residue } // END loop over bonds return 0; -} +} +// ----------------------------------------------- +/** \return the LEaP 'weight' of an atom. + * Originally used to force the 'heaviest' atoms around a torsion trans to + * each other. The 'weight' of an atom is defined as its element number, + * unless the atom is CARBON, then it is 1000, making it the 'heaviest' atom. + */ +static int LeapAtomWeight(Atom const& At) +{ + if ( At.Element() == Atom::CARBON ) + return 1000; + return At.AtomicNumber(); +} + +/** Order atoms bonded to the given atom in a manner similar to LEaP's + * zModelOrderAtoms. In that routine, first atoms were sorted into + * known position > unknown position. Then the heaviest atom in each + * subgroup was swapped with the first element of that list. Since at this + * point we assume all positions are known, we are just shifting the + * heaviest atom to the front of the list. + * The ignore atom is the index of the atom this atom is bonded to that + * forms the torsion we are interested in. + */ +static inline std::vector SortBondedAtomsLikeLeap(Atom const& At, Topology const& topIn, int ignoreAtom) +{ + std::vector out; + out.reserve( At.Nbonds() ); + // Find the index of the heaviest atom + int iHighest = 0; + int iPos = 0; + for (int idx = 0; idx < At.Nbonds(); idx++) { + int bat = At.Bond(idx); + if (bat != ignoreAtom) { + out.push_back( bat ); + int iWeight = LeapAtomWeight( topIn[bat] ); + if ( iHighest < iWeight ) { + iHighest = iWeight; + iPos = (int)out.size()-1; + } + } + } + // If highest weight atom not already in front, swap it there. + if (iPos != 0) std::swap( out[0], out[iPos] ); + + return out; +} + +/** Generate internal coordinates in the same + * manner as LEaP's BuildInternalsForContainer/ModelAssignTorsionsAround. + */ +int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +{ + zmatrix.clear(); + // First generate the bond array + BondArray bonds = GenerateBondArray( topIn.Residues(), topIn.Atoms() ); + // Loop over bonds + for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) + { + Atom const& A2 = topIn[bnd->A1()]; + Atom const& A3 = topIn[bnd->A2()]; + if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { + //Residue const& R2 = topIn.Res(A2.ResNum()); + //Residue const& R3 = topIn.Res(A3.ResNum()); + mprintf("Building torsion INTERNALs around: %s - %s\n", + topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str()); + Iarray sorted_a2 = SortBondedAtomsLikeLeap(A2, topIn, bnd->A2()); + Iarray sorted_a3 = SortBondedAtomsLikeLeap(A3, topIn, bnd->A1()); + mprintf("Orientation around: %s {", *(A2.Name())); + for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + mprintf("}\n"); + for (Iarray::const_iterator it = sorted_a2.begin(); it != sorted_a2.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_a2.begin(), *(topIn[*it].Name())); + mprintf("Orientation around: %s {", *(A3.Name())); + for (Atom::bond_iterator bat = A3.bondbegin(); bat != A3.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + mprintf("}\n"); + for (Iarray::const_iterator it = sorted_a3.begin(); it != sorted_a3.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_a3.begin(), *(topIn[*it].Name())); + // Build the torsions + int aj = bnd->A1(); + int ak = bnd->A2(); + for (Iarray::const_iterator ai = sorted_a2.begin(); ai != sorted_a2.end(); ++ai) { + for (Iarray::const_iterator al = sorted_a3.begin(); al != sorted_a3.end(); ++al) { + //double dval = Torsion(frameIn.XYZ(*ai), frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(*al)); + addIc(*ai, aj, ak, *al, frameIn); + mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", + IC_.back().Phi(), + topIn.LeapName(*ai).c_str(), + topIn.LeapName(aj).c_str(), + topIn.LeapName(ak).c_str(), + topIn.LeapName(*al).c_str()); + addIc(*al, ak, aj, *ai, frameIn); + } + } + } + } + return 0; +} + diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index c8f346d9f8..b2873d4b19 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -33,26 +33,27 @@ class Builder { /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known - int AssignLength(double&, int, int, Topology const&, Frame const&, std::vector const&) const; + int AssignLength(double&, int, int, Topology const&, Frame const&, Barray const&) const; /// Get angle parameter for atoms. int getAngleParam(double&, int, int, int, Topology const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I - int AssignTheta(double&, int, int, int, Topology const&, Frame const&, std::vector const&) const; + int AssignTheta(double&, int, int, int, Topology const&, Frame const&, Barray const&) const; /// Calculate an internal coordinate for known atoms static inline InternalCoords calcKnownAtomIc(int, int, int, int, Frame const&); /// Insert an internal coord into a zmatrix int insertIc(Zmatrix&, int, int, int, int, double, - Topology const&, Frame const&, std::vector const&) const; + Topology const&, Frame const&, Barray const&) const; /// Assign internal coordinates for atoms I for torsions around J-K-L. int AssignICsAroundBond(Zmatrix&, int, int, int, - Topology const&, Frame const&, std::vector const&, + Topology const&, Frame const&, Barray const&, BuildAtom const&) const; /// Model coordinates around a bond int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, - std::vector const&, std::vector const&, + Barray const&, Barray const&, BuildAtom const&, BuildAtom const&) const; - + /// Generate internal coordinates in the same manner as LEaP + int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); int debug_; ParameterSet const* params_; Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates From f8ab3ffc4f1b588d9cbe2c85a2fcf5d8cb754a21 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 08:49:37 -0500 Subject: [PATCH 0423/1492] Finish adding GenerateInternals to Builder --- src/Structure/Builder.cpp | 6 +++--- src/Structure/Builder.h | 1 + src/Structure/Zmatrix.cpp | 12 ++++++------ src/Structure/Zmatrix.h | 6 ++++-- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 07c254726c..f045208677 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1279,14 +1279,14 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology for (Iarray::const_iterator ai = sorted_a2.begin(); ai != sorted_a2.end(); ++ai) { for (Iarray::const_iterator al = sorted_a3.begin(); al != sorted_a3.end(); ++al) { //double dval = Torsion(frameIn.XYZ(*ai), frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(*al)); - addIc(*ai, aj, ak, *al, frameIn); + zmatrix.AddIC(*ai, aj, ak, *al, frameIn); mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", - IC_.back().Phi(), + zmatrix.back().Phi(), topIn.LeapName(*ai).c_str(), topIn.LeapName(aj).c_str(), topIn.LeapName(ak).c_str(), topIn.LeapName(*al).c_str()); - addIc(*al, ak, aj, *ai, frameIn); + zmatrix.AddIC(*al, ak, aj, *ai, frameIn); } } } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index b2873d4b19..9cf7b05af3 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -54,6 +54,7 @@ class Builder { BuildAtom const&, BuildAtom const&) const; /// Generate internal coordinates in the same manner as LEaP int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); + int debug_; ParameterSet const* params_; Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index e76a05a68e..89dbbda772 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -80,6 +80,12 @@ int Zmatrix::AddIC(InternalCoords const& ic) { return 0; } +/** Calculate and add internal coordinate from frame. */ +int Zmatrix::AddIC(int ai, int aj, int ak, int al, Frame const& frameIn) { + addIc(ai, aj, ak, al, frameIn); + return 0; +} + /** Set IC at specified position. */ // TODO check if seed? void Zmatrix::SetIC(unsigned int idx, InternalCoords const& ic) { IC_[idx] = ic; @@ -123,12 +129,6 @@ void Zmatrix::print(Topology const* topIn) const { } } -/** Remap internal coordinate indices according to the given atom map. */ -/*void Zmatrix::RemapIcIndices(std::vector const& map) { - for (ICarray::iterator it = IC_.begin(); it != IC_.end(); ++it) - it->RemapIndices(map); -}*/ - /** Increment IC indices by given offset */ void Zmatrix::OffsetIcIndices(int offset) { for (ICarray::iterator it = IC_.begin(); it != IC_.end(); ++it) diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index fbd921d84c..a727b771f0 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -27,12 +27,14 @@ class Zmatrix { void clear(); /// Sort ICs by atom index (I < L < K < J) void sort(); + /// \return the last added IC + InternalCoords const& back() const { return IC_.back(); } /// Add internal coordinate int AddIC(InternalCoords const&); + /// Calculate and add internal coordinate for specified atoms + int AddIC(int,int,int,int,Frame const&); /// Set specified IC void SetIC(unsigned int, InternalCoords const&); - /// Remap IC indices according to given map - //void RemapIcIndices(std::vector const&); /// Offset IC indices by given value void OffsetIcIndices(int); From 5118d800bf04eba0e1b89bdd98c10e6d6bf5b2a2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 09:59:42 -0500 Subject: [PATCH 0424/1492] Start testing new code. Order by hybdridization --- src/Exec_Build.cpp | 10 ++++++ src/Structure/Builder.cpp | 69 ++++++++++++++++++++++++++++++++++++++- src/Structure/Builder.h | 9 +++-- 3 files changed, 85 insertions(+), 3 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 5462530b60..49be97a84b 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -194,6 +194,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, typedef std::vector ResAtArray; ResAtArray interResBonds; + Cpptraj::Structure::Builder structureBuilder; + structureBuilder.SetDebug( 1 ); + structureBuilder.SetParameters( &mainParmSet ); + // Loop for setting up atoms in the topology from residues or residue templates. int nRefAtomsMissing = 0; for (int ires = 0; ires != topIn.Nres(); ires++) @@ -307,6 +311,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // zmatrix->print( resTemplate->TopPtr() ); zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); + // FIXME DEBUG + Cpptraj::Structure::Zmatrix tmpz; + if (structureBuilder.GenerateInternals( tmpz, templateFrame, resTemplate->Top(), std::vector(resTemplate->Top().Natom(), true) )) { + mprinterr("Error: Generate internals for template failed.\n"); + return 1; + } // zmatrix->print( &topOut ); //for (Iarray::const_iterator jres = resConnections[ires].begin(); // jres != resConnections[ires].end(); ++jres) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index f045208677..80ae60d3b4 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1243,17 +1243,83 @@ static inline std::vector SortBondedAtomsLikeLeap(Atom const& At, Topology return out; } +/** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ +int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +{ + // No need to do this if either atom only has 1 bond. + if (topIn[a1].Nbonds() < 2 || topIn[a2].Nbonds() < 2) + return 0; + // Get atom hybridizations + AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; + AtomType::HybridizationType H2 = AtomType::UNKNOWN_HYBRIDIZATION; + if (params_ != 0) { + ParmHolder::const_iterator it; + if (topIn[a1].HasType()) { + it = params_->AT().GetParam( TypeNameHolder(topIn[a1].Type()) ); + if (it != params_->AT().end()) + H1 = it->second.Hybridization(); + } + if (topIn[a2].HasType()) { + it = params_->AT().GetParam( TypeNameHolder(topIn[a2].Type()) ); + if (it != params_->AT().end()) + H2 = it->second.Hybridization(); + } + } + if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) + H1 = GuessAtomHybridization(topIn[a1], topIn.Atoms()); + if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) + H2 = GuessAtomHybridization(topIn[a2], topIn.Atoms()); + if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) + mprintf("Warning: No hybridization set for atom %s\n", topIn.AtomMaskName(a1).c_str()); + if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) + mprintf("Warning: No hybridization set for atom %s\n", topIn.AtomMaskName(a2).c_str()); + // Ensure the hybridization of ax is > ay + int ax, ay; + AtomType::HybridizationType Hx, Hy; // DEBUG + if (H1 == AtomType::UNKNOWN_HYBRIDIZATION || H2 == AtomType::UNKNOWN_HYBRIDIZATION) { + // Do not try to sort. + ax = a1; + ay = a2; + Hx = H1; + Hy = H2; + } else if (H1 < H2) { + ax = a2; + ay = a1; + Hx = H2; + Hy = H1; + } else { + ax = a1; + ay = a2; + Hx = H1; + Hy = H2; + } + static const char* hstr[] = { "SP", "SP2", "SP3", "Unknown" }; + mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", + topIn.AtomMaskName(ax).c_str(), hstr[Hx], + topIn.AtomMaskName(ay).c_str(), hstr[Hy]); + + return 0; +} + /** Generate internal coordinates in the same * manner as LEaP's BuildInternalsForContainer/ModelAssignTorsionsAround. */ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { + mprintf("DEBUG: ----- Entering Builder::GenerateInternals. -----\n"); zmatrix.clear(); // First generate the bond array BondArray bonds = GenerateBondArray( topIn.Residues(), topIn.Atoms() ); // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { + if (assignTorsionsAroundBond( bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { + mprinterr("Error Assign torsions around bond %s - %s failed.\n", + topIn.AtomMaskName(bnd->A1()).c_str(), + topIn.AtomMaskName(bnd->A2()).c_str()); + return 1; + } +/* Atom const& A2 = topIn[bnd->A1()]; Atom const& A3 = topIn[bnd->A2()]; if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { @@ -1289,8 +1355,9 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology zmatrix.AddIC(*al, ak, aj, *ai, frameIn); } } - } + }*/ } + mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 9cf7b05af3..f8efefc2b7 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -28,6 +28,10 @@ class Builder { int ModelCoordsAroundBond(Frame const&, Topology const&, int, int, Zmatrix&, Barray const&) const; /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters int UpdateICsFromFrame(Zmatrix&, Frame const&, int, Topology const&, Barray const&) const; + + /// Generate internal coordinates in the same manner as LEaP + int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); + private: typedef std::vector Iarray; /// Get length parameter for atoms @@ -52,8 +56,9 @@ class Builder { int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&, Barray const&, BuildAtom const&, BuildAtom const&) const; - /// Generate internal coordinates in the same manner as LEaP - int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); + + /// Model torsions around a bond in the same manner as LEaP + int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&); int debug_; ParameterSet const* params_; From 6cef130c689544eaa38014eef4096bbaebc8252a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 10:27:55 -0500 Subject: [PATCH 0425/1492] Do the sifting by known/unknown --- src/Structure/Builder.cpp | 77 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 6 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 80ae60d3b4..221fdcc9f5 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1210,24 +1210,45 @@ static int LeapAtomWeight(Atom const& At) return At.AtomicNumber(); } +/** Place atoms with known position ahead of atoms with no known position. + * \param firstUnknownIdx Position in output array of the first unknown atom. + * \param At The atom to sift. + * \param hasPosition Array indicating whether atoms have position. + */ +static inline std::vector SiftBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, Atom const& At, std::vector const& hasPosition) +{ + std::vector out; + out.reserve( At.Nbonds() ); + for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) + if (hasPosition[*bat]) + out.push_back( *bat ); + firstUnknownIdx = out.size(); + for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) + if (!hasPosition[*bat]) + out.push_back( *bat ); + return out; +} + /** Order atoms bonded to the given atom in a manner similar to LEaP's * zModelOrderAtoms. In that routine, first atoms were sorted into * known position > unknown position. Then the heaviest atom in each - * subgroup was swapped with the first element of that list. Since at this - * point we assume all positions are known, we are just shifting the - * heaviest atom to the front of the list. + * subgroup was swapped with the first element of that list. * The ignore atom is the index of the atom this atom is bonded to that * forms the torsion we are interested in. */ -static inline std::vector SortBondedAtomsLikeLeap(Atom const& At, Topology const& topIn, int ignoreAtom) +static inline std::vector SortBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, + Atom const& At, Topology const& topIn, + int ignoreAtom, std::vector const& hasPosition) { std::vector out; out.reserve( At.Nbonds() ); + // Sift so that atoms with known position are at the front + std::vector bondedAtoms = SiftBondedAtomsLikeLeap(firstUnknownIdx, At, hasPosition); // Find the index of the heaviest atom int iHighest = 0; int iPos = 0; - for (int idx = 0; idx < At.Nbonds(); idx++) { - int bat = At.Bond(idx); + for (unsigned int idx = 0; idx < bondedAtoms.size(); idx++) { + int bat = bondedAtoms[idx]; if (bat != ignoreAtom) { out.push_back( bat ); int iWeight = LeapAtomWeight( topIn[bat] ); @@ -1297,6 +1318,50 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", topIn.AtomMaskName(ax).c_str(), hstr[Hx], topIn.AtomMaskName(ay).c_str(), hstr[Hy]); + // Check if there is at least one atom on either side of the ax-ay pair + // whose position is known. + Atom const& AX = topIn[ax]; + Atom const& AY = topIn[ay]; + bool axHasKnownAtoms = false; + for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) { + if (*bat != ay && hasPosition[*bat]) { + axHasKnownAtoms = true; + break; + } + } + bool ayHasKnownAtoms = false; + for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) { + if (*bat != ax && hasPosition[*bat]) { + ayHasKnownAtoms = true; + break; + } + } + + if (!axHasKnownAtoms && !ayHasKnownAtoms) { + mprinterr("Internal Error: assignTorsionsAroundBond both not known not yet implemented.\n"); + return 1; + } else { + mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", + topIn.LeapName(ax).c_str(), + topIn.LeapName(ay).c_str()); + // Sort AX bonds + unsigned int firstUnknownIdxX = 0; + Iarray sorted_ax = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); + mprintf("Orientation around: %s {", *(AX.Name())); + for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + mprintf("}\n"); + for (Iarray::const_iterator it = sorted_ax.begin(); it != sorted_ax.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ax.begin(), *(topIn[*it].Name())); + // Sort AY bonds + unsigned int firstUnknownIdxY = 0; + Iarray sorted_ay = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); + mprintf("Orientation around: %s {", *(AY.Name())); + for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + mprintf("}\n"); + for (Iarray::const_iterator it = sorted_ay.begin(); it != sorted_ay.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ay.begin(), *(topIn[*it].Name())); + + } return 0; } From 0d44caf3020cad95320c8941fe5dfac434e472a3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 10:50:25 -0500 Subject: [PATCH 0426/1492] Get orientation --- src/Structure/Builder.cpp | 68 ++++++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 221fdcc9f5..50ab68e9b3 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1264,6 +1264,47 @@ static inline std::vector SortBondedAtomsLikeLeap(unsigned int& firstUnknow return out; } +/** LEaP routine for determining atom chirality. + * This is done by crossing A to B and then dotting the + * result with C. TODO use Chirality in BuildAtom? + * The chirality of the vectors is determined by the sign of + * the result, which is determined by whether or not C has + * a component in the direction AxB or in the opposite direction. + */ +static inline double VectorAtomChirality(Vec3 const& Center, Vec3 const& A, Vec3 const& B, Vec3 const& C) +{ + Vec3 vA = A - Center; + Vec3 vB = B - Center; + Vec3 vC = C - Center; + Vec3 vCross = vA.Cross( vB ); + double dot = vCross * vC; + if (dot > 0) + return 1.0; + else if (dot < 0) + return -1.0; + return 0.0; +} + +/** Assuming atoms have been ordered with SortBondedAtomsLikeLeap, + * calculate the orientation of the iB atom with respect to the + * triangle (iA, iX, iY). This orientation will be used by the + * CreateSpXSpX routines to determine which torsion values to use. + */ +static inline double calculateOrientation(int iX, int iA, int iY, int iB, Frame const& frameIn, std::vector const& hasPosition) +{ + double dOrientation = 1.0; + if (hasPosition[iX] && + hasPosition[iA] && + hasPosition[iY] && + hasPosition[iB]) + { + dOrientation = VectorAtomChirality( frameIn.XYZ(iX), frameIn.XYZ(iA), frameIn.XYZ(iY), frameIn.XYZ(iB) ); + } else { + mprinterr("Internal Error: Builder::calculateOrientation not yet set up for unknown positions.\n"); + } + return dOrientation; +} + /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { @@ -1347,17 +1388,28 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo // Sort AX bonds unsigned int firstUnknownIdxX = 0; Iarray sorted_ax = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); - mprintf("Orientation around: %s {", *(AX.Name())); - for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); - mprintf("}\n"); - for (Iarray::const_iterator it = sorted_ax.begin(); it != sorted_ax.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ax.begin(), *(topIn[*it].Name())); // Sort AY bonds unsigned int firstUnknownIdxY = 0; Iarray sorted_ay = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); - mprintf("Orientation around: %s {", *(AY.Name())); - for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); - mprintf("}\n"); + // Calculate the chirality around atom X + double Xorientation = 0; + if (Hx == AtomType::SP3) { + Xorientation = calculateOrientation( ax, sorted_ax[0], ay, sorted_ax[1], frameIn, hasPosition ); + } + // Calculate the chirality around atom Y + double Yorientation = 0; + if (Hy == AtomType::SP3) { + Yorientation = calculateOrientation( ay, sorted_ay[0], ax, sorted_ay[1], frameIn, hasPosition ); + } + // DEBUG + mprintf("Orientation around: %s = %f\n", *(AX.Name()), Xorientation); + //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + //mprintf("}\n"); + for (Iarray::const_iterator it = sorted_ax.begin(); it != sorted_ax.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ax.begin(), *(topIn[*it].Name())); + mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation); + //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + //mprintf("}\n"); for (Iarray::const_iterator it = sorted_ay.begin(); it != sorted_ay.end(); ++it) mprintf("Atom %li: %s\n", it - sorted_ay.begin(), *(topIn[*it].Name())); From eadfb43829e6deecc4fb4463c3886a629709ff6f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 11:00:39 -0500 Subject: [PATCH 0427/1492] Calculate absolute torsion --- src/Structure/Builder.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 50ab68e9b3..30bedf598a 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1412,7 +1412,21 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo //mprintf("}\n"); for (Iarray::const_iterator it = sorted_ay.begin(); it != sorted_ay.end(); ++it) mprintf("Atom %li: %s\n", it - sorted_ay.begin(), *(topIn[*it].Name())); - + // Calculate the actual torsion angle between A-X-Y-D + double dAbsolute; + if (hasPosition[sorted_ax[0]] && + hasPosition[ax] && + hasPosition[ay] && + hasPosition[sorted_ay[0]]) + { + dAbsolute = Torsion( frameIn.XYZ(sorted_ax[0]), + frameIn.XYZ(ax), + frameIn.XYZ(ay), + frameIn.XYZ(sorted_ay[0]) ); + } else { + dAbsolute = 180.0 * Constants::DEGRAD; + } + mprintf("DABSOLUTE= %g\n", dAbsolute); } return 0; From ff463a4a9bbf72f7439befc19a0f0c4af8011b26 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 11:09:33 -0500 Subject: [PATCH 0428/1492] Start routines for modelling in torsions --- src/Structure/Builder.cpp | 32 ++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 4 ++++ 2 files changed, 36 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 30bedf598a..f48d449aa0 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1305,6 +1305,18 @@ static inline double calculateOrientation(int iX, int iA, int iY, int iB, Frame return dOrientation; } +void Builder::createSp3Sp3Torsions() { + return; +} + +void Builder::createSp3Sp2Torsions() { + return; +} + +void Builder::createSp2Sp2Torsions() { + return; +} + /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { @@ -1427,6 +1439,26 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo dAbsolute = 180.0 * Constants::DEGRAD; } mprintf("DABSOLUTE= %g\n", dAbsolute); + // Build the new internals + if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { + mprintf("SP3 SP3\n"); + createSp3Sp3Torsions(); + } else if (Hx == AtomType::SP3 && Hy == AtomType::SP2) { + mprintf("SP3 SP2\n"); + createSp3Sp2Torsions(); + } else if (Hx == AtomType::SP2 && Hy == AtomType::SP2) { + mprintf("SP2 SP2\n"); + createSp2Sp2Torsions(); + } else { + mprinterr("Error: Currently only Sp3-Sp3/Sp3-Sp2/Sp2-Sp2 are supported\n" + "Error: ---Tried to superimpose torsions for: *-%s-%s-*\n" + "Error: --- With %s - %s\n" + "Error: --- Sp0 probably means a new atom type is involved\n" + "Error: --- which needs to be defined prior to this routine.\n", + topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str(), + hstr[Hx], hstr[Hy]); + return 1; + } } return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index f8efefc2b7..26ed0bc39c 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -60,6 +60,10 @@ class Builder { /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&); + void createSp3Sp3Torsions(); + void createSp3Sp2Torsions(); + void createSp2Sp2Torsions(); + int debug_; ParameterSet const* params_; Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates From 480ebac8de91ad3b12eb4a30c087a647f87bb862 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 11:21:10 -0500 Subject: [PATCH 0429/1492] Start ModelTorsion class --- src/Structure/Builder.cpp | 49 +++++++++++++++++++++++++-------------- src/Structure/Builder.h | 4 ++++ 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index f48d449aa0..9cd81a23ef 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1197,6 +1197,18 @@ const } // END loop over bonds return 0; } + +// ------------------------------------------------------------------------------ +/** Store info for modelling torsions around X-Y */ +class Cpptraj::Structure::Builder::ModelTorsion { + public: + int ax_; ///< Atom X + int ay_; ///< Atom Y + Iarray sorted_ax_; ///< Hold the leap-sorted bonds for atom X + Iarray sorted_ay_; ///< Hold the leap-sorted bonds for atom Y + double dAbsolute_; ///< Hold the value of the A-X-Y-D torsion in radians +}; + // ----------------------------------------------- /** \return the LEaP 'weight' of an atom. * Originally used to force the 'heaviest' atoms around a torsion trans to @@ -1305,6 +1317,7 @@ static inline double calculateOrientation(int iX, int iA, int iY, int iB, Frame return dOrientation; } +/** Create torsions around SP3-SP3. */ void Builder::createSp3Sp3Torsions() { return; } @@ -1397,48 +1410,50 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + ModelTorsion mT; + mT.ax_ = ax; + mT.ay_ = ay; // Sort AX bonds unsigned int firstUnknownIdxX = 0; - Iarray sorted_ax = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); + mT.sorted_ax_ = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); // Sort AY bonds unsigned int firstUnknownIdxY = 0; - Iarray sorted_ay = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); + mT.sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); // Calculate the chirality around atom X double Xorientation = 0; if (Hx == AtomType::SP3) { - Xorientation = calculateOrientation( ax, sorted_ax[0], ay, sorted_ax[1], frameIn, hasPosition ); + Xorientation = calculateOrientation( ax, mT.sorted_ax_[0], ay, mT.sorted_ax_[1], frameIn, hasPosition ); } // Calculate the chirality around atom Y double Yorientation = 0; if (Hy == AtomType::SP3) { - Yorientation = calculateOrientation( ay, sorted_ay[0], ax, sorted_ay[1], frameIn, hasPosition ); + Yorientation = calculateOrientation( ay, mT.sorted_ay_[0], ax, mT.sorted_ay_[1], frameIn, hasPosition ); } // DEBUG mprintf("Orientation around: %s = %f\n", *(AX.Name()), Xorientation); //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); - for (Iarray::const_iterator it = sorted_ax.begin(); it != sorted_ax.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ax.begin(), *(topIn[*it].Name())); + for (Iarray::const_iterator it = mT.sorted_ax_.begin(); it != mT.sorted_ax_.end(); ++it) + mprintf("Atom %li: %s\n", it - mT.sorted_ax_.begin(), *(topIn[*it].Name())); mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation); //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); - for (Iarray::const_iterator it = sorted_ay.begin(); it != sorted_ay.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ay.begin(), *(topIn[*it].Name())); + for (Iarray::const_iterator it = mT.sorted_ay_.begin(); it != mT.sorted_ay_.end(); ++it) + mprintf("Atom %li: %s\n", it - mT.sorted_ay_.begin(), *(topIn[*it].Name())); // Calculate the actual torsion angle between A-X-Y-D - double dAbsolute; - if (hasPosition[sorted_ax[0]] && + if (hasPosition[mT.sorted_ax_[0]] && hasPosition[ax] && hasPosition[ay] && - hasPosition[sorted_ay[0]]) + hasPosition[mT.sorted_ay_[0]]) { - dAbsolute = Torsion( frameIn.XYZ(sorted_ax[0]), - frameIn.XYZ(ax), - frameIn.XYZ(ay), - frameIn.XYZ(sorted_ay[0]) ); + mT.dAbsolute_ = Torsion( frameIn.XYZ(mT.sorted_ax_[0]), + frameIn.XYZ(ax), + frameIn.XYZ(ay), + frameIn.XYZ(mT.sorted_ay_[0]) ); } else { - dAbsolute = 180.0 * Constants::DEGRAD; + mT.dAbsolute_ = 180.0 * Constants::DEGRAD; } - mprintf("DABSOLUTE= %g\n", dAbsolute); + mprintf("DABSOLUTE= %g\n", mT.dAbsolute_); // Build the new internals if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { mprintf("SP3 SP3\n"); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 26ed0bc39c..6cd9e62eba 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -34,6 +34,10 @@ class Builder { private: typedef std::vector Iarray; + + /// Used to hold parameters for modeling a torsion + class ModelTorsion; + /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known From 3cecb6b5c98567a5d3aed1c25c2021f45765914a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 14:12:46 -0500 Subject: [PATCH 0430/1492] Place functions inside ModelTorsion --- src/Structure/Builder.cpp | 155 +++++++++++++++++++++++++------------- 1 file changed, 101 insertions(+), 54 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9cd81a23ef..4bb0c1c42f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1202,20 +1202,34 @@ const /** Store info for modelling torsions around X-Y */ class Cpptraj::Structure::Builder::ModelTorsion { public: - int ax_; ///< Atom X - int ay_; ///< Atom Y - Iarray sorted_ax_; ///< Hold the leap-sorted bonds for atom X - Iarray sorted_ay_; ///< Hold the leap-sorted bonds for atom Y - double dAbsolute_; ///< Hold the value of the A-X-Y-D torsion in radians + /// CONSTRUCTOR + ModelTorsion() : ax_(-1), ay_(-1), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} + /// Set up torsions around bonded atoms + int SetupTorsion(int, int, AtomType::HybridizationType, AtomType::HybridizationType, + Frame const&, Topology const&, std::vector const&); + + private: + static int LeapAtomWeight(Atom const&); + static inline std::vector SiftBondedAtomsLikeLeap(unsigned int&, Atom const&, std::vector const&); + static inline std::vector SortBondedAtomsLikeLeap(unsigned int&, Atom const&, + Topology const& topIn, int ignoreAtom, + std::vector const& hasPosition); + + int ax_; ///< Atom X + int ay_; ///< Atom Y + Iarray sorted_ax_; ///< Hold the leap-sorted bonds for atom X + Iarray sorted_ay_; ///< Hold the leap-sorted bonds for atom Y + double dAbsolute_; ///< Hold the value of the A-X-Y-D torsion in radians + double Xorientation_; ///< Orientation around the X atom TODO make an enum? + double Yorientation_; ///< Orientation around the Y atoms }; -// ----------------------------------------------- /** \return the LEaP 'weight' of an atom. * Originally used to force the 'heaviest' atoms around a torsion trans to * each other. The 'weight' of an atom is defined as its element number, * unless the atom is CARBON, then it is 1000, making it the 'heaviest' atom. */ -static int LeapAtomWeight(Atom const& At) +int Cpptraj::Structure::Builder::ModelTorsion::LeapAtomWeight(Atom const& At) { if ( At.Element() == Atom::CARBON ) return 1000; @@ -1227,7 +1241,10 @@ static int LeapAtomWeight(Atom const& At) * \param At The atom to sift. * \param hasPosition Array indicating whether atoms have position. */ -static inline std::vector SiftBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, Atom const& At, std::vector const& hasPosition) +std::vector + Cpptraj::Structure::Builder::ModelTorsion::SiftBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, + Atom const& At, + std::vector const& hasPosition) { std::vector out; out.reserve( At.Nbonds() ); @@ -1248,9 +1265,11 @@ static inline std::vector SiftBondedAtomsLikeLeap(unsigned int& firstUnknow * The ignore atom is the index of the atom this atom is bonded to that * forms the torsion we are interested in. */ -static inline std::vector SortBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, - Atom const& At, Topology const& topIn, - int ignoreAtom, std::vector const& hasPosition) +std::vector + Cpptraj::Structure::Builder::ModelTorsion::SortBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, + Atom const& At, Topology const& topIn, + int ignoreAtom, + std::vector const& hasPosition) { std::vector out; out.reserve( At.Nbonds() ); @@ -1317,6 +1336,69 @@ static inline double calculateOrientation(int iX, int iA, int iY, int iB, Frame return dOrientation; } +/** Set up model torsion for bonded atoms. */ +int Cpptraj::Structure::Builder::ModelTorsion::SetupTorsion(int ax, int ay, + AtomType::HybridizationType Hx, + AtomType::HybridizationType Hy, + Frame const& frameIn, + Topology const& topIn, + std::vector const& hasPosition) +{ + if (Hx != AtomType::UNKNOWN_HYBRIDIZATION && Hy != AtomType::UNKNOWN_HYBRIDIZATION) { + if (Hy > Hx) { + mprinterr("Internal Error: :ModelTorsion::SetupTorsion() called with AX hybrid > AY hybrid.\n"); + return 1; + } + } + ax_ = ax; + ay_ = ay; + Atom const& AX = topIn[ax]; + Atom const& AY = topIn[ay]; + // Sort AX bonds + unsigned int firstUnknownIdxX = 0; + sorted_ax_ = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); + // Sort AY bonds + unsigned int firstUnknownIdxY = 0; + sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); + // Calculate the chirality around atom X + Xorientation_ = 0; + if (Hx == AtomType::SP3) { + Xorientation_ = calculateOrientation( ax, sorted_ax_[0], ay, sorted_ax_[1], frameIn, hasPosition ); + } + // Calculate the chirality around atom Y + Yorientation_ = 0; + if (Hy == AtomType::SP3) { + Yorientation_ = calculateOrientation( ay, sorted_ay_[0], ax, sorted_ay_[1], frameIn, hasPosition ); + } + // DEBUG + mprintf("Orientation around: %s = %f\n", *(AX.Name()), Xorientation_); + //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + //mprintf("}\n"); + for (Iarray::const_iterator it = sorted_ax_.begin(); it != sorted_ax_.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ax_.begin(), *(topIn[*it].Name())); + mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation_); + //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); + //mprintf("}\n"); + for (Iarray::const_iterator it = sorted_ay_.begin(); it != sorted_ay_.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ay_.begin(), *(topIn[*it].Name())); + // Calculate the actual torsion angle between A-X-Y-D + if (hasPosition[sorted_ax_[0]] && + hasPosition[ax] && + hasPosition[ay] && + hasPosition[sorted_ay_[0]]) + { + dAbsolute_ = Torsion( frameIn.XYZ(sorted_ax_[0]), + frameIn.XYZ(ax), + frameIn.XYZ(ay), + frameIn.XYZ(sorted_ay_[0]) ); + } else { + dAbsolute_ = 180.0 * Constants::DEGRAD; + } + mprintf("DABSOLUTE= %g\n", dAbsolute_); + return 0; +} + +// ----------------------------------------------- /** Create torsions around SP3-SP3. */ void Builder::createSp3Sp3Torsions() { return; @@ -1410,50 +1492,15 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + ModelTorsion mT; - mT.ax_ = ax; - mT.ay_ = ay; - // Sort AX bonds - unsigned int firstUnknownIdxX = 0; - mT.sorted_ax_ = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); - // Sort AY bonds - unsigned int firstUnknownIdxY = 0; - mT.sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); - // Calculate the chirality around atom X - double Xorientation = 0; - if (Hx == AtomType::SP3) { - Xorientation = calculateOrientation( ax, mT.sorted_ax_[0], ay, mT.sorted_ax_[1], frameIn, hasPosition ); - } - // Calculate the chirality around atom Y - double Yorientation = 0; - if (Hy == AtomType::SP3) { - Yorientation = calculateOrientation( ay, mT.sorted_ay_[0], ax, mT.sorted_ay_[1], frameIn, hasPosition ); - } - // DEBUG - mprintf("Orientation around: %s = %f\n", *(AX.Name()), Xorientation); - //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); - //mprintf("}\n"); - for (Iarray::const_iterator it = mT.sorted_ax_.begin(); it != mT.sorted_ax_.end(); ++it) - mprintf("Atom %li: %s\n", it - mT.sorted_ax_.begin(), *(topIn[*it].Name())); - mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation); - //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); - //mprintf("}\n"); - for (Iarray::const_iterator it = mT.sorted_ay_.begin(); it != mT.sorted_ay_.end(); ++it) - mprintf("Atom %li: %s\n", it - mT.sorted_ay_.begin(), *(topIn[*it].Name())); - // Calculate the actual torsion angle between A-X-Y-D - if (hasPosition[mT.sorted_ax_[0]] && - hasPosition[ax] && - hasPosition[ay] && - hasPosition[mT.sorted_ay_[0]]) - { - mT.dAbsolute_ = Torsion( frameIn.XYZ(mT.sorted_ax_[0]), - frameIn.XYZ(ax), - frameIn.XYZ(ay), - frameIn.XYZ(mT.sorted_ay_[0]) ); - } else { - mT.dAbsolute_ = 180.0 * Constants::DEGRAD; - } - mprintf("DABSOLUTE= %g\n", mT.dAbsolute_); + if (mT.SetupTorsion(ax, ay, Hx, Hy, frameIn, topIn, hasPosition)) { + mprinterr("Error: Could not set up torsions around %s - %s\n", + topIn.LeapName(ax).c_str(), + topIn.LeapName(ay).c_str()); + return 1; + } + // Build the new internals if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { mprintf("SP3 SP3\n"); From 924b79fe71d003123be7c65e2201ac5c457c0a69 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 14:31:23 -0500 Subject: [PATCH 0431/1492] Change class to TorsionModel. Start adding ModelTorsion routines --- src/Structure/Builder.cpp | 99 +++++++++++++++++++++++++++++++++++---- src/Structure/Builder.h | 6 ++- 2 files changed, 93 insertions(+), 12 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 4bb0c1c42f..c9ba6d4a1b 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1200,14 +1200,24 @@ const // ------------------------------------------------------------------------------ /** Store info for modelling torsions around X-Y */ -class Cpptraj::Structure::Builder::ModelTorsion { +class Cpptraj::Structure::Builder::TorsionModel { public: /// CONSTRUCTOR - ModelTorsion() : ax_(-1), ay_(-1), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} + TorsionModel() : ax_(-1), ay_(-1), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} /// Set up torsions around bonded atoms int SetupTorsion(int, int, AtomType::HybridizationType, AtomType::HybridizationType, Frame const&, Topology const&, std::vector const&); + /// \return Value of A-X-Y-D torsion in radians + double Absolute() const { return dAbsolute_; } + /// \return Value of orientation around X + double XOrientation() const { return Xorientation_; } + /// \return Value of orientation around Y + double YOrientation() const { return Yorientation_; } + /// \return Sorted atoms bonded to X excluding Y + std::vector const& SortedAx() const { return sorted_ax_; } + /// \return Sorted atoms bonded to Y excluding X + std::vector const& SortedAy() const { return sorted_ay_; } private: static int LeapAtomWeight(Atom const&); static inline std::vector SiftBondedAtomsLikeLeap(unsigned int&, Atom const&, std::vector const&); @@ -1229,7 +1239,7 @@ class Cpptraj::Structure::Builder::ModelTorsion { * each other. The 'weight' of an atom is defined as its element number, * unless the atom is CARBON, then it is 1000, making it the 'heaviest' atom. */ -int Cpptraj::Structure::Builder::ModelTorsion::LeapAtomWeight(Atom const& At) +int Cpptraj::Structure::Builder::TorsionModel::LeapAtomWeight(Atom const& At) { if ( At.Element() == Atom::CARBON ) return 1000; @@ -1242,7 +1252,7 @@ int Cpptraj::Structure::Builder::ModelTorsion::LeapAtomWeight(Atom const& At) * \param hasPosition Array indicating whether atoms have position. */ std::vector - Cpptraj::Structure::Builder::ModelTorsion::SiftBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, + Cpptraj::Structure::Builder::TorsionModel::SiftBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, Atom const& At, std::vector const& hasPosition) { @@ -1266,7 +1276,7 @@ std::vector * forms the torsion we are interested in. */ std::vector - Cpptraj::Structure::Builder::ModelTorsion::SortBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, + Cpptraj::Structure::Builder::TorsionModel::SortBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, Atom const& At, Topology const& topIn, int ignoreAtom, std::vector const& hasPosition) @@ -1337,7 +1347,7 @@ static inline double calculateOrientation(int iX, int iA, int iY, int iB, Frame } /** Set up model torsion for bonded atoms. */ -int Cpptraj::Structure::Builder::ModelTorsion::SetupTorsion(int ax, int ay, +int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(int ax, int ay, AtomType::HybridizationType Hx, AtomType::HybridizationType Hy, Frame const& frameIn, @@ -1346,7 +1356,7 @@ int Cpptraj::Structure::Builder::ModelTorsion::SetupTorsion(int ax, int ay, { if (Hx != AtomType::UNKNOWN_HYBRIDIZATION && Hy != AtomType::UNKNOWN_HYBRIDIZATION) { if (Hy > Hx) { - mprinterr("Internal Error: :ModelTorsion::SetupTorsion() called with AX hybrid > AY hybrid.\n"); + mprinterr("Internal Error: TorsionModel::SetupTorsion() called with AX hybrid > AY hybrid.\n"); return 1; } } @@ -1399,8 +1409,77 @@ int Cpptraj::Structure::Builder::ModelTorsion::SetupTorsion(int ax, int ay, } // ----------------------------------------------- +/** Model torsion */ +void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dval) +{ + if (iBondX >= MT.SortedAx().size()) { + mprinterr("Internal Error: Builder::ModelTorsion: iBondX %u is >= # sorted bonds %zu\n", iBondX, MT.SortedAx().size()); + return; + } + if (iBondY >= MT.SortedAy().size()) { + mprinterr("Internal Error: Builder::ModelTorsion: iBondY %u is >= # sorted bonds %zu\n", iBondY, MT.SortedAy().size()); + return; + } + +} + /** Create torsions around SP3-SP3. */ -void Builder::createSp3Sp3Torsions() { +void Builder::createSp3Sp3Torsions(TorsionModel const& MT) { + // First twist the torsion so that the AD torsion has + // the same absolute angle that is measured + // and twist all the others with it. + static const double PIOVER3 = Constants::PI / 3.0; + double dADOffset = MT.Absolute() - Constants::PI; + double d180 = Constants::PI + dADOffset; + double dm60 = -PIOVER3 + dADOffset; + double d60 = PIOVER3 + dADOffset; + + if ( MT.XOrientation() > 0.0 ) { + if ( MT.YOrientation() > 0.0 ) { + ModelTorsion( MT, 0, 0, d180 ); + ModelTorsion( MT, 0, 1, dm60 ); + ModelTorsion( MT, 0, 2, d60 ); + ModelTorsion( MT, 1, 0, dm60 ); + ModelTorsion( MT, 1, 1, d60 ); + ModelTorsion( MT, 1, 2, d180 ); + ModelTorsion( MT, 2, 0, d60 ); + ModelTorsion( MT, 2, 1, d180 ); + ModelTorsion( MT, 2, 2, dm60 ); + } else { + ModelTorsion( MT, 0, 0, d180 ); + ModelTorsion( MT, 0, 1, d60 ); + ModelTorsion( MT, 0, 2, dm60 ); + ModelTorsion( MT, 1, 0, dm60 ); + ModelTorsion( MT, 1, 1, d180 ); + ModelTorsion( MT, 1, 2, d60 ); + ModelTorsion( MT, 2, 0, d60 ); + ModelTorsion( MT, 2, 1, dm60 ); + ModelTorsion( MT, 2, 2, d180 ); + } + } else { + if ( MT.YOrientation() > 0.0 ) { + ModelTorsion( MT, 0, 0, d180 ); + ModelTorsion( MT, 0, 1, dm60 ); + ModelTorsion( MT, 0, 2, d60 ); + ModelTorsion( MT, 1, 0, d60 ); + ModelTorsion( MT, 1, 1, d180 ); + ModelTorsion( MT, 1, 2, dm60 ); + ModelTorsion( MT, 2, 0, dm60 ); + ModelTorsion( MT, 2, 1, d60 ); + ModelTorsion( MT, 2, 2, d180 ); + } else { + ModelTorsion( MT, 0, 0, d180 ); + ModelTorsion( MT, 0, 1, d60 ); + ModelTorsion( MT, 0, 2, dm60 ); + ModelTorsion( MT, 1, 0, d60 ); + ModelTorsion( MT, 1, 1, dm60 ); + ModelTorsion( MT, 1, 2, d180 ); + ModelTorsion( MT, 2, 0, dm60 ); + ModelTorsion( MT, 2, 1, d180 ); + ModelTorsion( MT, 2, 2, d60 ); + } + } + return; } @@ -1493,7 +1572,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); - ModelTorsion mT; + TorsionModel mT; if (mT.SetupTorsion(ax, ay, Hx, Hy, frameIn, topIn, hasPosition)) { mprinterr("Error: Could not set up torsions around %s - %s\n", topIn.LeapName(ax).c_str(), @@ -1504,7 +1583,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo // Build the new internals if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { mprintf("SP3 SP3\n"); - createSp3Sp3Torsions(); + createSp3Sp3Torsions(mT); } else if (Hx == AtomType::SP3 && Hy == AtomType::SP2) { mprintf("SP3 SP2\n"); createSp3Sp2Torsions(); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 6cd9e62eba..5f64e30175 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -36,7 +36,7 @@ class Builder { typedef std::vector Iarray; /// Used to hold parameters for modeling a torsion - class ModelTorsion; + class TorsionModel; /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; @@ -64,7 +64,9 @@ class Builder { /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&); - void createSp3Sp3Torsions(); + void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); + + void createSp3Sp3Torsions(TorsionModel const&); void createSp3Sp2Torsions(); void createSp2Sp2Torsions(); From f6870f3e03badaf194c1411c1a1525bc2617b52b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 14:55:13 -0500 Subject: [PATCH 0432/1492] Do SP3 SP3 and SP3 SP2 --- src/Structure/Builder.cpp | 145 ++++++++++++++++++++++++++------------ src/Structure/Builder.h | 6 +- 2 files changed, 101 insertions(+), 50 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index c9ba6d4a1b..d1c9d8e61e 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1218,6 +1218,10 @@ class Cpptraj::Structure::Builder::TorsionModel { std::vector const& SortedAx() const { return sorted_ax_; } /// \return Sorted atoms bonded to Y excluding X std::vector const& SortedAy() const { return sorted_ay_; } + /// \return Index of atom X + int AtX() const { return ax_; } + /// \return Index of atom Y + int AtY() const { return ay_; } private: static int LeapAtomWeight(Atom const&); static inline std::vector SiftBondedAtomsLikeLeap(unsigned int&, Atom const&, std::vector const&); @@ -1410,21 +1414,38 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(int ax, int ay, // ----------------------------------------------- /** Model torsion */ -void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dval) +void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dvalIn, Frame const& frameIn, Barray const& hasPosition) { - if (iBondX >= MT.SortedAx().size()) { - mprinterr("Internal Error: Builder::ModelTorsion: iBondX %u is >= # sorted bonds %zu\n", iBondX, MT.SortedAx().size()); - return; - } - if (iBondY >= MT.SortedAy().size()) { - mprinterr("Internal Error: Builder::ModelTorsion: iBondY %u is >= # sorted bonds %zu\n", iBondY, MT.SortedAy().size()); + if (iBondX >= MT.SortedAx().size() || + iBondY >= MT.SortedAy().size()) return; + + int aa = MT.SortedAx()[iBondX]; + int ax = MT.AtX(); + int ay = MT.AtY(); + int ad = MT.SortedAy()[iBondY]; + // If the coordinates for the atoms are defined then + // measure the torsion angle between them and use that for + // the internal. + double dval = dvalIn; + if (hasPosition[aa] && + hasPosition[ax] && + hasPosition[ay] && + hasPosition[ad]) + { + dval = Torsion( frameIn.XYZ(aa), + frameIn.XYZ(ax), + frameIn.XYZ(ay), + frameIn.XYZ(ad) ); + } else { + mprinterr("Internal Error: Need to implement torsion lookup.\n"); } + mprintf( "++++Torsion INTERNAL: %f to %i - %i - %i - %i\n", dval*Constants::RADDEG, aa+1, ax+1, ay+1, ad+1); } /** Create torsions around SP3-SP3. */ -void Builder::createSp3Sp3Torsions(TorsionModel const& MT) { +void Builder::createSp3Sp3Torsions(TorsionModel const& MT, Frame const& frameIn, Barray const& hasPosition) { // First twist the torsion so that the AD torsion has // the same absolute angle that is measured // and twist all the others with it. @@ -1436,54 +1457,84 @@ void Builder::createSp3Sp3Torsions(TorsionModel const& MT) { if ( MT.XOrientation() > 0.0 ) { if ( MT.YOrientation() > 0.0 ) { - ModelTorsion( MT, 0, 0, d180 ); - ModelTorsion( MT, 0, 1, dm60 ); - ModelTorsion( MT, 0, 2, d60 ); - ModelTorsion( MT, 1, 0, dm60 ); - ModelTorsion( MT, 1, 1, d60 ); - ModelTorsion( MT, 1, 2, d180 ); - ModelTorsion( MT, 2, 0, d60 ); - ModelTorsion( MT, 2, 1, d180 ); - ModelTorsion( MT, 2, 2, dm60 ); + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 1, dm60, frameIn, hasPosition); + ModelTorsion( MT, 0, 2, d60, frameIn, hasPosition); + ModelTorsion( MT, 1, 0, dm60, frameIn, hasPosition); + ModelTorsion( MT, 1, 1, d60, frameIn, hasPosition); + ModelTorsion( MT, 1, 2, d180, frameIn, hasPosition); + ModelTorsion( MT, 2, 0, d60, frameIn, hasPosition); + ModelTorsion( MT, 2, 1, d180, frameIn, hasPosition); + ModelTorsion( MT, 2, 2, dm60, frameIn, hasPosition); } else { - ModelTorsion( MT, 0, 0, d180 ); - ModelTorsion( MT, 0, 1, d60 ); - ModelTorsion( MT, 0, 2, dm60 ); - ModelTorsion( MT, 1, 0, dm60 ); - ModelTorsion( MT, 1, 1, d180 ); - ModelTorsion( MT, 1, 2, d60 ); - ModelTorsion( MT, 2, 0, d60 ); - ModelTorsion( MT, 2, 1, dm60 ); - ModelTorsion( MT, 2, 2, d180 ); + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 1, d60, frameIn, hasPosition); + ModelTorsion( MT, 0, 2, dm60, frameIn, hasPosition); + ModelTorsion( MT, 1, 0, dm60, frameIn, hasPosition); + ModelTorsion( MT, 1, 1, d180, frameIn, hasPosition); + ModelTorsion( MT, 1, 2, d60, frameIn, hasPosition); + ModelTorsion( MT, 2, 0, d60, frameIn, hasPosition); + ModelTorsion( MT, 2, 1, dm60, frameIn, hasPosition); + ModelTorsion( MT, 2, 2, d180, frameIn, hasPosition); } } else { if ( MT.YOrientation() > 0.0 ) { - ModelTorsion( MT, 0, 0, d180 ); - ModelTorsion( MT, 0, 1, dm60 ); - ModelTorsion( MT, 0, 2, d60 ); - ModelTorsion( MT, 1, 0, d60 ); - ModelTorsion( MT, 1, 1, d180 ); - ModelTorsion( MT, 1, 2, dm60 ); - ModelTorsion( MT, 2, 0, dm60 ); - ModelTorsion( MT, 2, 1, d60 ); - ModelTorsion( MT, 2, 2, d180 ); + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 1, dm60, frameIn, hasPosition); + ModelTorsion( MT, 0, 2, d60, frameIn, hasPosition); + ModelTorsion( MT, 1, 0, d60, frameIn, hasPosition); + ModelTorsion( MT, 1, 1, d180, frameIn, hasPosition); + ModelTorsion( MT, 1, 2, dm60, frameIn, hasPosition); + ModelTorsion( MT, 2, 0, dm60, frameIn, hasPosition); + ModelTorsion( MT, 2, 1, d60, frameIn, hasPosition); + ModelTorsion( MT, 2, 2, d180, frameIn, hasPosition); } else { - ModelTorsion( MT, 0, 0, d180 ); - ModelTorsion( MT, 0, 1, d60 ); - ModelTorsion( MT, 0, 2, dm60 ); - ModelTorsion( MT, 1, 0, d60 ); - ModelTorsion( MT, 1, 1, dm60 ); - ModelTorsion( MT, 1, 2, d180 ); - ModelTorsion( MT, 2, 0, dm60 ); - ModelTorsion( MT, 2, 1, d180 ); - ModelTorsion( MT, 2, 2, d60 ); + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 1, d60, frameIn, hasPosition); + ModelTorsion( MT, 0, 2, dm60, frameIn, hasPosition); + ModelTorsion( MT, 1, 0, d60, frameIn, hasPosition); + ModelTorsion( MT, 1, 1, dm60, frameIn, hasPosition); + ModelTorsion( MT, 1, 2, d180, frameIn, hasPosition); + ModelTorsion( MT, 2, 0, dm60, frameIn, hasPosition); + ModelTorsion( MT, 2, 1, d180, frameIn, hasPosition); + ModelTorsion( MT, 2, 2, d60, frameIn, hasPosition); } } return; } -void Builder::createSp3Sp2Torsions() { +/** Create torsions around SP3-SP2. */ +void Builder::createSp3Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, Barray const& hasPosition) { + // First twist the torsion so that the AD torsion has + // the same absolute angle that is measured + // and twist all the others with it. + static const double PIOVER3 = Constants::PI / 3.0; + static const double PIOVER3x2 = PIOVER3 * 2.0; + double dADOffset = MT.Absolute() - Constants::PI; + double d180 = Constants::PI + dADOffset; + double dm60 = -PIOVER3 + dADOffset; + double d60 = PIOVER3 + dADOffset; + double dm120 = -PIOVER3x2 + dADOffset; + double d120 = PIOVER3x2 + dADOffset; + double d0 = dADOffset; + + if ( MT.XOrientation() > 0.0 ) { + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 1, d0, frameIn, hasPosition); + ModelTorsion( MT, 1, 0, dm60, frameIn, hasPosition); + ModelTorsion( MT, 1, 1, d120, frameIn, hasPosition); + ModelTorsion( MT, 2, 0, d60, frameIn, hasPosition); + ModelTorsion( MT, 2, 1, dm120, frameIn, hasPosition); + } else { + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 1, d0, frameIn, hasPosition); + ModelTorsion( MT, 1, 0, d60, frameIn, hasPosition); + ModelTorsion( MT, 1, 1, dm120, frameIn, hasPosition); + ModelTorsion( MT, 2, 0, dm60, frameIn, hasPosition); + ModelTorsion( MT, 2, 1, d120, frameIn, hasPosition); + } + return; } @@ -1583,10 +1634,10 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo // Build the new internals if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { mprintf("SP3 SP3\n"); - createSp3Sp3Torsions(mT); + createSp3Sp3Torsions(mT, frameIn, hasPosition); } else if (Hx == AtomType::SP3 && Hy == AtomType::SP2) { mprintf("SP3 SP2\n"); - createSp3Sp2Torsions(); + createSp3Sp2Torsions(mT, frameIn, hasPosition); } else if (Hx == AtomType::SP2 && Hy == AtomType::SP2) { mprintf("SP2 SP2\n"); createSp2Sp2Torsions(); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 5f64e30175..c0c0ccef0f 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -64,10 +64,10 @@ class Builder { /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&); - void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); + void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double, Frame const&, Barray const&); - void createSp3Sp3Torsions(TorsionModel const&); - void createSp3Sp2Torsions(); + void createSp3Sp3Torsions(TorsionModel const&, Frame const&, Barray const&); + void createSp3Sp2Torsions(TorsionModel const&, Frame const&, Barray const&); void createSp2Sp2Torsions(); int debug_; From 4f3e5add6efa170813a723b07764578ac67ab81a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 2 Feb 2024 15:04:16 -0500 Subject: [PATCH 0433/1492] Do SP2 SP2 --- src/Structure/Builder.cpp | 15 +++++++++++++-- src/Structure/Builder.h | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index d1c9d8e61e..84aaa0ab1d 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1538,7 +1538,18 @@ void Builder::createSp3Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, return; } -void Builder::createSp2Sp2Torsions() { +void Builder::createSp2Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, Barray const& hasPosition) { + // First twist the torsion so that the AD torsion has + // the same absolute angle that is measured + // and twist all the others with it. + double dADOffset = MT.Absolute() - Constants::PI; + double d180 = Constants::PI + dADOffset; + double d0 = dADOffset; + + ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition ); + ModelTorsion( MT, 0, 1, d0, frameIn, hasPosition ); + ModelTorsion( MT, 1, 0, d0, frameIn, hasPosition ); + ModelTorsion( MT, 1, 1, d180, frameIn, hasPosition ); return; } @@ -1640,7 +1651,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo createSp3Sp2Torsions(mT, frameIn, hasPosition); } else if (Hx == AtomType::SP2 && Hy == AtomType::SP2) { mprintf("SP2 SP2\n"); - createSp2Sp2Torsions(); + createSp2Sp2Torsions(mT, frameIn, hasPosition); } else { mprinterr("Error: Currently only Sp3-Sp3/Sp3-Sp2/Sp2-Sp2 are supported\n" "Error: ---Tried to superimpose torsions for: *-%s-%s-*\n" diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index c0c0ccef0f..c44cf723e7 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -68,7 +68,7 @@ class Builder { void createSp3Sp3Torsions(TorsionModel const&, Frame const&, Barray const&); void createSp3Sp2Torsions(TorsionModel const&, Frame const&, Barray const&); - void createSp2Sp2Torsions(); + void createSp2Sp2Torsions(TorsionModel const&, Frame const&, Barray const&); int debug_; ParameterSet const* params_; From 9563a15936beefba4098d1815b436b5bee14477d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 3 Feb 2024 08:55:39 -0500 Subject: [PATCH 0434/1492] Put common vars in the class --- src/Structure/Builder.cpp | 133 ++++++++++++++++++++------------------ src/Structure/Builder.h | 6 +- 2 files changed, 75 insertions(+), 64 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 84aaa0ab1d..ca4232ee06 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1414,7 +1414,7 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(int ax, int ay, // ----------------------------------------------- /** Model torsion */ -void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dvalIn, Frame const& frameIn, Barray const& hasPosition) +void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dvalIn) { if (iBondX >= MT.SortedAx().size() || iBondY >= MT.SortedAy().size()) @@ -1428,20 +1428,23 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned // measure the torsion angle between them and use that for // the internal. double dval = dvalIn; - if (hasPosition[aa] && - hasPosition[ax] && - hasPosition[ay] && - hasPosition[ad]) + if ((*hasPosition_)[aa] && + (*hasPosition_)[ax] && + (*hasPosition_)[ay] && + (*hasPosition_)[ad]) { - dval = Torsion( frameIn.XYZ(aa), - frameIn.XYZ(ax), - frameIn.XYZ(ay), - frameIn.XYZ(ad) ); + dval = Torsion( currentFrm_->XYZ(aa), + currentFrm_->XYZ(ax), + currentFrm_->XYZ(ay), + currentFrm_->XYZ(ad) ); } else { mprinterr("Internal Error: Need to implement torsion lookup.\n"); } - mprintf( "++++Torsion INTERNAL: %f to %i - %i - %i - %i\n", dval*Constants::RADDEG, aa+1, ax+1, ay+1, ad+1); - + mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", dval*Constants::RADDEG, + currentTop_->LeapName(aa).c_str(), + currentTop_->LeapName(ax).c_str(), + currentTop_->LeapName(ay).c_str(), + currentTop_->LeapName(ad).c_str()); } /** Create torsions around SP3-SP3. */ @@ -1457,47 +1460,47 @@ void Builder::createSp3Sp3Torsions(TorsionModel const& MT, Frame const& frameIn, if ( MT.XOrientation() > 0.0 ) { if ( MT.YOrientation() > 0.0 ) { - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); - ModelTorsion( MT, 0, 1, dm60, frameIn, hasPosition); - ModelTorsion( MT, 0, 2, d60, frameIn, hasPosition); - ModelTorsion( MT, 1, 0, dm60, frameIn, hasPosition); - ModelTorsion( MT, 1, 1, d60, frameIn, hasPosition); - ModelTorsion( MT, 1, 2, d180, frameIn, hasPosition); - ModelTorsion( MT, 2, 0, d60, frameIn, hasPosition); - ModelTorsion( MT, 2, 1, d180, frameIn, hasPosition); - ModelTorsion( MT, 2, 2, dm60, frameIn, hasPosition); + ModelTorsion( MT, 0, 0, d180); + ModelTorsion( MT, 0, 1, dm60); + ModelTorsion( MT, 0, 2, d60); + ModelTorsion( MT, 1, 0, dm60); + ModelTorsion( MT, 1, 1, d60); + ModelTorsion( MT, 1, 2, d180); + ModelTorsion( MT, 2, 0, d60); + ModelTorsion( MT, 2, 1, d180); + ModelTorsion( MT, 2, 2, dm60); } else { - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); - ModelTorsion( MT, 0, 1, d60, frameIn, hasPosition); - ModelTorsion( MT, 0, 2, dm60, frameIn, hasPosition); - ModelTorsion( MT, 1, 0, dm60, frameIn, hasPosition); - ModelTorsion( MT, 1, 1, d180, frameIn, hasPosition); - ModelTorsion( MT, 1, 2, d60, frameIn, hasPosition); - ModelTorsion( MT, 2, 0, d60, frameIn, hasPosition); - ModelTorsion( MT, 2, 1, dm60, frameIn, hasPosition); - ModelTorsion( MT, 2, 2, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 0, d180); + ModelTorsion( MT, 0, 1, d60); + ModelTorsion( MT, 0, 2, dm60); + ModelTorsion( MT, 1, 0, dm60); + ModelTorsion( MT, 1, 1, d180); + ModelTorsion( MT, 1, 2, d60); + ModelTorsion( MT, 2, 0, d60); + ModelTorsion( MT, 2, 1, dm60); + ModelTorsion( MT, 2, 2, d180); } } else { if ( MT.YOrientation() > 0.0 ) { - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); - ModelTorsion( MT, 0, 1, dm60, frameIn, hasPosition); - ModelTorsion( MT, 0, 2, d60, frameIn, hasPosition); - ModelTorsion( MT, 1, 0, d60, frameIn, hasPosition); - ModelTorsion( MT, 1, 1, d180, frameIn, hasPosition); - ModelTorsion( MT, 1, 2, dm60, frameIn, hasPosition); - ModelTorsion( MT, 2, 0, dm60, frameIn, hasPosition); - ModelTorsion( MT, 2, 1, d60, frameIn, hasPosition); - ModelTorsion( MT, 2, 2, d180, frameIn, hasPosition); + ModelTorsion( MT, 0, 0, d180); + ModelTorsion( MT, 0, 1, dm60); + ModelTorsion( MT, 0, 2, d60); + ModelTorsion( MT, 1, 0, d60); + ModelTorsion( MT, 1, 1, d180); + ModelTorsion( MT, 1, 2, dm60); + ModelTorsion( MT, 2, 0, dm60); + ModelTorsion( MT, 2, 1, d60); + ModelTorsion( MT, 2, 2, d180); } else { - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); - ModelTorsion( MT, 0, 1, d60, frameIn, hasPosition); - ModelTorsion( MT, 0, 2, dm60, frameIn, hasPosition); - ModelTorsion( MT, 1, 0, d60, frameIn, hasPosition); - ModelTorsion( MT, 1, 1, dm60, frameIn, hasPosition); - ModelTorsion( MT, 1, 2, d180, frameIn, hasPosition); - ModelTorsion( MT, 2, 0, dm60, frameIn, hasPosition); - ModelTorsion( MT, 2, 1, d180, frameIn, hasPosition); - ModelTorsion( MT, 2, 2, d60, frameIn, hasPosition); + ModelTorsion( MT, 0, 0, d180); + ModelTorsion( MT, 0, 1, d60); + ModelTorsion( MT, 0, 2, dm60); + ModelTorsion( MT, 1, 0, d60); + ModelTorsion( MT, 1, 1, dm60); + ModelTorsion( MT, 1, 2, d180); + ModelTorsion( MT, 2, 0, dm60); + ModelTorsion( MT, 2, 1, d180); + ModelTorsion( MT, 2, 2, d60); } } @@ -1520,19 +1523,19 @@ void Builder::createSp3Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, double d0 = dADOffset; if ( MT.XOrientation() > 0.0 ) { - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); - ModelTorsion( MT, 0, 1, d0, frameIn, hasPosition); - ModelTorsion( MT, 1, 0, dm60, frameIn, hasPosition); - ModelTorsion( MT, 1, 1, d120, frameIn, hasPosition); - ModelTorsion( MT, 2, 0, d60, frameIn, hasPosition); - ModelTorsion( MT, 2, 1, dm120, frameIn, hasPosition); + ModelTorsion( MT, 0, 0, d180); + ModelTorsion( MT, 0, 1, d0); + ModelTorsion( MT, 1, 0, dm60); + ModelTorsion( MT, 1, 1, d120); + ModelTorsion( MT, 2, 0, d60); + ModelTorsion( MT, 2, 1, dm120); } else { - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition); - ModelTorsion( MT, 0, 1, d0, frameIn, hasPosition); - ModelTorsion( MT, 1, 0, d60, frameIn, hasPosition); - ModelTorsion( MT, 1, 1, dm120, frameIn, hasPosition); - ModelTorsion( MT, 2, 0, dm60, frameIn, hasPosition); - ModelTorsion( MT, 2, 1, d120, frameIn, hasPosition); + ModelTorsion( MT, 0, 0, d180); + ModelTorsion( MT, 0, 1, d0); + ModelTorsion( MT, 1, 0, d60); + ModelTorsion( MT, 1, 1, dm120); + ModelTorsion( MT, 2, 0, dm60); + ModelTorsion( MT, 2, 1, d120); } return; @@ -1546,16 +1549,20 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, double d180 = Constants::PI + dADOffset; double d0 = dADOffset; - ModelTorsion( MT, 0, 0, d180, frameIn, hasPosition ); - ModelTorsion( MT, 0, 1, d0, frameIn, hasPosition ); - ModelTorsion( MT, 1, 0, d0, frameIn, hasPosition ); - ModelTorsion( MT, 1, 1, d180, frameIn, hasPosition ); + ModelTorsion( MT, 0, 0, d180 ); + ModelTorsion( MT, 0, 1, d0 ); + ModelTorsion( MT, 1, 0, d0 ); + ModelTorsion( MT, 1, 1, d180 ); return; } /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { + // Save addresses of frame, topology, and hasPosition + currentFrm_ = &frameIn; + currentTop_ = &topIn; + hasPosition_ = &hasPosition; // No need to do this if either atom only has 1 bond. if (topIn[a1].Nbonds() < 2 || topIn[a2].Nbonds() < 2) return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index c44cf723e7..b393d554c7 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -64,7 +64,7 @@ class Builder { /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&); - void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double, Frame const&, Barray const&); + void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); void createSp3Sp3Torsions(TorsionModel const&, Frame const&, Barray const&); void createSp3Sp2Torsions(TorsionModel const&, Frame const&, Barray const&); @@ -73,6 +73,10 @@ class Builder { int debug_; ParameterSet const* params_; Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates + + Topology const* currentTop_; ///< Topology for the createSpXSpXTorsions/ModelTorsion routines + Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines + Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines }; } } From 87e9a42f1d762acf98ba42762045065644c416f2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 3 Feb 2024 09:03:49 -0500 Subject: [PATCH 0435/1492] No need to pass in frame or hasPosition anymore. Save address of current Zmatrix --- src/Structure/Builder.cpp | 57 ++++++++------------------------------- src/Structure/Builder.h | 8 +++--- 2 files changed, 15 insertions(+), 50 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index ca4232ee06..647ebb1bd0 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1448,7 +1448,7 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned } /** Create torsions around SP3-SP3. */ -void Builder::createSp3Sp3Torsions(TorsionModel const& MT, Frame const& frameIn, Barray const& hasPosition) { +void Builder::createSp3Sp3Torsions(TorsionModel const& MT) { // First twist the torsion so that the AD torsion has // the same absolute angle that is measured // and twist all the others with it. @@ -1508,7 +1508,7 @@ void Builder::createSp3Sp3Torsions(TorsionModel const& MT, Frame const& frameIn, } /** Create torsions around SP3-SP2. */ -void Builder::createSp3Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, Barray const& hasPosition) { +void Builder::createSp3Sp2Torsions(TorsionModel const& MT) { // First twist the torsion so that the AD torsion has // the same absolute angle that is measured // and twist all the others with it. @@ -1541,7 +1541,7 @@ void Builder::createSp3Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, return; } -void Builder::createSp2Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, Barray const& hasPosition) { +void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { // First twist the torsion so that the AD torsion has // the same absolute angle that is measured // and twist all the others with it. @@ -1557,9 +1557,11 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT, Frame const& frameIn, } /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ -int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { - // Save addresses of frame, topology, and hasPosition + // Save addresses of zmatrix, frame, topology, and hasPosition. + // These are required for the createSpXSpX routines. + currentZmatrix_ = &zmatrix; currentFrm_ = &frameIn; currentTop_ = &topIn; hasPosition_ = &hasPosition; @@ -1652,13 +1654,13 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo // Build the new internals if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { mprintf("SP3 SP3\n"); - createSp3Sp3Torsions(mT, frameIn, hasPosition); + createSp3Sp3Torsions(mT); } else if (Hx == AtomType::SP3 && Hy == AtomType::SP2) { mprintf("SP3 SP2\n"); - createSp3Sp2Torsions(mT, frameIn, hasPosition); + createSp3Sp2Torsions(mT); } else if (Hx == AtomType::SP2 && Hy == AtomType::SP2) { mprintf("SP2 SP2\n"); - createSp2Sp2Torsions(mT, frameIn, hasPosition); + createSp2Sp2Torsions(mT); } else { mprinterr("Error: Currently only Sp3-Sp3/Sp3-Sp2/Sp2-Sp2 are supported\n" "Error: ---Tried to superimpose torsions for: *-%s-%s-*\n" @@ -1686,49 +1688,12 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { - if (assignTorsionsAroundBond( bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { + if (assignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { mprinterr("Error Assign torsions around bond %s - %s failed.\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); return 1; } -/* - Atom const& A2 = topIn[bnd->A1()]; - Atom const& A3 = topIn[bnd->A2()]; - if (A2.Nbonds() > 1 && A3.Nbonds() > 1) { - //Residue const& R2 = topIn.Res(A2.ResNum()); - //Residue const& R3 = topIn.Res(A3.ResNum()); - mprintf("Building torsion INTERNALs around: %s - %s\n", - topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str()); - Iarray sorted_a2 = SortBondedAtomsLikeLeap(A2, topIn, bnd->A2()); - Iarray sorted_a3 = SortBondedAtomsLikeLeap(A3, topIn, bnd->A1()); - mprintf("Orientation around: %s {", *(A2.Name())); - for (Atom::bond_iterator bat = A2.bondbegin(); bat != A2.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); - mprintf("}\n"); - for (Iarray::const_iterator it = sorted_a2.begin(); it != sorted_a2.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_a2.begin(), *(topIn[*it].Name())); - mprintf("Orientation around: %s {", *(A3.Name())); - for (Atom::bond_iterator bat = A3.bondbegin(); bat != A3.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); - mprintf("}\n"); - for (Iarray::const_iterator it = sorted_a3.begin(); it != sorted_a3.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_a3.begin(), *(topIn[*it].Name())); - // Build the torsions - int aj = bnd->A1(); - int ak = bnd->A2(); - for (Iarray::const_iterator ai = sorted_a2.begin(); ai != sorted_a2.end(); ++ai) { - for (Iarray::const_iterator al = sorted_a3.begin(); al != sorted_a3.end(); ++al) { - //double dval = Torsion(frameIn.XYZ(*ai), frameIn.XYZ(aj), frameIn.XYZ(ak), frameIn.XYZ(*al)); - zmatrix.AddIC(*ai, aj, ak, *al, frameIn); - mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", - zmatrix.back().Phi(), - topIn.LeapName(*ai).c_str(), - topIn.LeapName(aj).c_str(), - topIn.LeapName(ak).c_str(), - topIn.LeapName(*al).c_str()); - zmatrix.AddIC(*al, ak, aj, *ai, frameIn); - } - } - }*/ } mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index b393d554c7..711d1fb547 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -62,13 +62,13 @@ class Builder { BuildAtom const&, BuildAtom const&) const; /// Model torsions around a bond in the same manner as LEaP - int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&); + int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); - void createSp3Sp3Torsions(TorsionModel const&, Frame const&, Barray const&); - void createSp3Sp2Torsions(TorsionModel const&, Frame const&, Barray const&); - void createSp2Sp2Torsions(TorsionModel const&, Frame const&, Barray const&); + void createSp3Sp3Torsions(TorsionModel const&); + void createSp3Sp2Torsions(TorsionModel const&); + void createSp2Sp2Torsions(TorsionModel const&); int debug_; ParameterSet const* params_; From 88b3239579b6bc0677c0ce60fa4097f5e5b40531 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 3 Feb 2024 14:03:21 -0500 Subject: [PATCH 0436/1492] Add the ICs to Zmatrix --- src/Structure/Builder.cpp | 47 +++++++++++++++++++++++++++++++++------ src/Structure/Builder.h | 4 ++-- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 647ebb1bd0..9c32dc3ebb 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -30,7 +30,7 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { } /** Set optional Zmatrix. */ -void Cpptraj::Structure::Builder::SetZmatrix(Zmatrix const* zmatrixIn) { +void Cpptraj::Structure::Builder::SetZmatrix(Zmatrix* zmatrixIn) { if (zmatrixIn == 0) { mprinterr("Internal Error: Builder::SetZmatrix called with null set.\n"); return; @@ -1424,27 +1424,59 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int ax = MT.AtX(); int ay = MT.AtY(); int ad = MT.SortedAy()[iBondY]; + // Get bond lengths + double l0, l1; + if (AssignLength(l0, aa, ax, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign length between %s and %s\n", + currentTop_->AtomMaskName(aa).c_str(), + currentTop_->AtomMaskName(ax).c_str()); + return; + } + if (AssignLength(l1, ad, ay, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign length between %s and %s\n", + currentTop_->AtomMaskName(ad).c_str(), + currentTop_->AtomMaskName(ay).c_str()); + return; + } + // Get angles + double t0, t1; + if (AssignTheta(t0, aa, ax, ay, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign angle between %s and %s and %s\n", + currentTop_->AtomMaskName(aa).c_str(), + currentTop_->AtomMaskName(ax).c_str(), + currentTop_->AtomMaskName(ay).c_str()); + return; + } + if (AssignTheta(t1, ad, ay, ax, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign angle between %s and %s and %s\n", + currentTop_->AtomMaskName(ad).c_str(), + currentTop_->AtomMaskName(ay).c_str(), + currentTop_->AtomMaskName(ax).c_str()); + return; + } // If the coordinates for the atoms are defined then // measure the torsion angle between them and use that for // the internal. - double dval = dvalIn; + double phiVal = dvalIn; if ((*hasPosition_)[aa] && (*hasPosition_)[ax] && (*hasPosition_)[ay] && (*hasPosition_)[ad]) { - dval = Torsion( currentFrm_->XYZ(aa), - currentFrm_->XYZ(ax), - currentFrm_->XYZ(ay), - currentFrm_->XYZ(ad) ); + phiVal = Torsion( currentFrm_->XYZ(aa), + currentFrm_->XYZ(ax), + currentFrm_->XYZ(ay), + currentFrm_->XYZ(ad) ); } else { mprinterr("Internal Error: Need to implement torsion lookup.\n"); } - mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", dval*Constants::RADDEG, + mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", phiVal*Constants::RADDEG, currentTop_->LeapName(aa).c_str(), currentTop_->LeapName(ax).c_str(), currentTop_->LeapName(ay).c_str(), currentTop_->LeapName(ad).c_str()); + currentZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); + currentZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); } /** Create torsions around SP3-SP3. */ @@ -1695,6 +1727,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology return 1; } } + zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 711d1fb547..eb61bf763b 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -20,7 +20,7 @@ class Builder { /// Set optional parameter set void SetParameters(ParameterSet const*); /// Set optional Zmatrix with current ICs - void SetZmatrix(Zmatrix const*); + void SetZmatrix(Zmatrix*); /// Combine second fragment into first fragment and bond int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; @@ -72,7 +72,7 @@ class Builder { int debug_; ParameterSet const* params_; - Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates + Zmatrix* currentZmatrix_; ///< Any existing internal coordinates Topology const* currentTop_; ///< Topology for the createSpXSpXTorsions/ModelTorsion routines Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines From a446ffd61fe9f9fc6adacdcab56c650ded162950 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 3 Feb 2024 14:08:43 -0500 Subject: [PATCH 0437/1492] Use new generate routine --- src/Exec_Build.cpp | 16 ++++++++-------- src/Structure/Builder.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 49be97a84b..b2b878f5af 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -304,19 +304,19 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, resTemplate->GetFrame( 0, templateFrame ); Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); //if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { - if (zmatrix->GenerateInternals( templateFrame, resTemplate->Top() )) { - mprinterr("Error: Could not set up residue template zmatrix.\n"); +// if (zmatrix->GenerateInternals( templateFrame, resTemplate->Top() )) { +// mprinterr("Error: Could not set up residue template zmatrix.\n"); +// return 1; +// } + if (structureBuilder.GenerateInternals(*zmatrix, templateFrame, resTemplate->Top(), + std::vector(resTemplate->Top().Natom(), true))) + { + mprinterr("Error: Generate internals for residue template failed.\n"); return 1; } // zmatrix->print( resTemplate->TopPtr() ); zmatrix->OffsetIcIndices( atomOffset ); ResZmatrices.push_back( zmatrix ); - // FIXME DEBUG - Cpptraj::Structure::Zmatrix tmpz; - if (structureBuilder.GenerateInternals( tmpz, templateFrame, resTemplate->Top(), std::vector(resTemplate->Top().Natom(), true) )) { - mprinterr("Error: Generate internals for template failed.\n"); - return 1; - } // zmatrix->print( &topOut ); //for (Iarray::const_iterator jres = resConnections[ires].begin(); // jres != resConnections[ires].end(); ++jres) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9c32dc3ebb..c2aa4e2e35 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1727,7 +1727,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology return 1; } } - zmatrix.print( &topIn ); + //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; } From b2af45d6b14a6e6d1ce0999b5dd649a3a92810d4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 3 Feb 2024 14:46:29 -0500 Subject: [PATCH 0438/1492] Test using the new torsion modeller to assign torsions around a residue link. Not yet working. --- src/Exec_Build.cpp | 10 ++++++++++ src/Structure/Builder.cpp | 38 +++++++++++++++++++------------------- src/Structure/Builder.h | 6 +++--- 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index b2b878f5af..853dd111ab 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -414,6 +414,16 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); return 1; } + // FIXME DEBUG + Cpptraj::Structure::Zmatrix tmpz; + if (structureBuilder.AssignTorsionsAroundBond(tmpz, at, *bat, frameOut, topOut, + hasPosition)) + { + mprinterr("Error: Assign torsions around inter-residue bond %s - %s failed.\n", + topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); + return 1; + } + tmpz.print(&topOut); } } } diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index c2aa4e2e35..d4ab7ac1e3 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1485,10 +1485,10 @@ void Builder::createSp3Sp3Torsions(TorsionModel const& MT) { // the same absolute angle that is measured // and twist all the others with it. static const double PIOVER3 = Constants::PI / 3.0; - double dADOffset = MT.Absolute() - Constants::PI; - double d180 = Constants::PI + dADOffset; - double dm60 = -PIOVER3 + dADOffset; - double d60 = PIOVER3 + dADOffset; + double dADOffset = wrap360(MT.Absolute() - Constants::PI); + double d180 = wrap360(Constants::PI + dADOffset ); + double dm60 = wrap360(-PIOVER3 + dADOffset ); + double d60 = wrap360( PIOVER3 + dADOffset ); if ( MT.XOrientation() > 0.0 ) { if ( MT.YOrientation() > 0.0 ) { @@ -1546,13 +1546,13 @@ void Builder::createSp3Sp2Torsions(TorsionModel const& MT) { // and twist all the others with it. static const double PIOVER3 = Constants::PI / 3.0; static const double PIOVER3x2 = PIOVER3 * 2.0; - double dADOffset = MT.Absolute() - Constants::PI; - double d180 = Constants::PI + dADOffset; - double dm60 = -PIOVER3 + dADOffset; - double d60 = PIOVER3 + dADOffset; - double dm120 = -PIOVER3x2 + dADOffset; - double d120 = PIOVER3x2 + dADOffset; - double d0 = dADOffset; + double dADOffset = wrap360(MT.Absolute() - Constants::PI); + double d180 = wrap360(Constants::PI + dADOffset ); + double dm60 = wrap360(-PIOVER3 + dADOffset ); + double d60 = wrap360( PIOVER3 + dADOffset ); + double dm120 = wrap360(-PIOVER3x2 + dADOffset ); + double d120 = wrap360( PIOVER3x2 + dADOffset ); + double d0 = dADOffset ; if ( MT.XOrientation() > 0.0 ) { ModelTorsion( MT, 0, 0, d180); @@ -1577,9 +1577,9 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { // First twist the torsion so that the AD torsion has // the same absolute angle that is measured // and twist all the others with it. - double dADOffset = MT.Absolute() - Constants::PI; - double d180 = Constants::PI + dADOffset; - double d0 = dADOffset; + double dADOffset = wrap360(MT.Absolute() - Constants::PI); + double d180 = wrap360(Constants::PI + dADOffset ); + double d0 = dADOffset ; ModelTorsion( MT, 0, 0, d180 ); ModelTorsion( MT, 0, 1, d0 ); @@ -1589,10 +1589,10 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { } /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ -int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { // Save addresses of zmatrix, frame, topology, and hasPosition. - // These are required for the createSpXSpX routines. + // These are required for the createSpXSpX routines. TODO zero them at the end? currentZmatrix_ = &zmatrix; currentFrm_ = &frameIn; currentTop_ = &topIn; @@ -1645,7 +1645,7 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co Hy = H2; } static const char* hstr[] = { "SP", "SP2", "SP3", "Unknown" }; - mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", + mprintf("DEBUG: AssignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", topIn.AtomMaskName(ax).c_str(), hstr[Hx], topIn.AtomMaskName(ay).c_str(), hstr[Hy]); // Check if there is at least one atom on either side of the ax-ay pair @@ -1668,7 +1668,7 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co } if (!axHasKnownAtoms && !ayHasKnownAtoms) { - mprinterr("Internal Error: assignTorsionsAroundBond both not known not yet implemented.\n"); + mprinterr("Internal Error: AssignTorsionsAroundBond both not known not yet implemented.\n"); return 1; } else { mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", @@ -1720,7 +1720,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { - if (assignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { + if (AssignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { mprinterr("Error Assign torsions around bond %s - %s failed.\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index eb61bf763b..7a5b72218b 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -31,6 +31,8 @@ class Builder { /// Generate internal coordinates in the same manner as LEaP int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); + /// Model torsions around a bond in the same manner as LEaP + int AssignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); private: typedef std::vector Iarray; @@ -61,9 +63,7 @@ class Builder { Barray const&, Barray const&, BuildAtom const&, BuildAtom const&) const; - /// Model torsions around a bond in the same manner as LEaP - int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); - + /// Create IC for a torsion void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); void createSp3Sp3Torsions(TorsionModel const&); From ad36ceac2ae333a28cb24f478e34288cb3ca3e2b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 3 Feb 2024 19:32:39 -0500 Subject: [PATCH 0439/1492] Fix boolean --- src/Structure/Builder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index d4ab7ac1e3..bafb66fe52 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1667,7 +1667,7 @@ int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co } } - if (!axHasKnownAtoms && !ayHasKnownAtoms) { + if (!(axHasKnownAtoms && ayHasKnownAtoms)) { mprinterr("Internal Error: AssignTorsionsAroundBond both not known not yet implemented.\n"); return 1; } else { From 6e2570c55a09d1380cff3949f2eda90c5cd95791 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 4 Feb 2024 09:50:43 -0500 Subject: [PATCH 0440/1492] Have currentZmatrix be any existing ICs, and newZmatrix be ICs that we set --- src/Exec_Build.cpp | 1 + src/Structure/Builder.cpp | 14 +++++++++----- src/Structure/Builder.h | 5 +++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 853dd111ab..035e7a2fec 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -416,6 +416,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } // FIXME DEBUG Cpptraj::Structure::Zmatrix tmpz; + structureBuilder.SetZmatrix( zmatrix ); if (structureBuilder.AssignTorsionsAroundBond(tmpz, at, *bat, frameOut, topOut, hasPosition)) { diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index bafb66fe52..9ebe277f72 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -17,7 +17,11 @@ using namespace Cpptraj::Structure; Builder::Builder() : debug_(0), params_(0), - currentZmatrix_(0) + currentZmatrix_(0), + currentTop_(0), + currentFrm_(0), + hasPosition_(0), + newZmatrix_(0) {} /** Set optional parameter set. */ @@ -30,7 +34,7 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { } /** Set optional Zmatrix. */ -void Cpptraj::Structure::Builder::SetZmatrix(Zmatrix* zmatrixIn) { +void Cpptraj::Structure::Builder::SetZmatrix(Zmatrix const* zmatrixIn) { if (zmatrixIn == 0) { mprinterr("Internal Error: Builder::SetZmatrix called with null set.\n"); return; @@ -1475,8 +1479,8 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned currentTop_->LeapName(ax).c_str(), currentTop_->LeapName(ay).c_str(), currentTop_->LeapName(ad).c_str()); - currentZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); - currentZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); + newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); + newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); } /** Create torsions around SP3-SP3. */ @@ -1593,7 +1597,7 @@ int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co { // Save addresses of zmatrix, frame, topology, and hasPosition. // These are required for the createSpXSpX routines. TODO zero them at the end? - currentZmatrix_ = &zmatrix; + newZmatrix_ = &zmatrix; currentFrm_ = &frameIn; currentTop_ = &topIn; hasPosition_ = &hasPosition; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 7a5b72218b..3d31ef6059 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -20,7 +20,7 @@ class Builder { /// Set optional parameter set void SetParameters(ParameterSet const*); /// Set optional Zmatrix with current ICs - void SetZmatrix(Zmatrix*); + void SetZmatrix(Zmatrix const*); /// Combine second fragment into first fragment and bond int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; @@ -72,11 +72,12 @@ class Builder { int debug_; ParameterSet const* params_; - Zmatrix* currentZmatrix_; ///< Any existing internal coordinates + Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates Topology const* currentTop_; ///< Topology for the createSpXSpXTorsions/ModelTorsion routines Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines + Zmatrix* newZmatrix_; ///< Hold output ICs from AssignTorsionsAroundBond }; } } From 41b318365e18a83a54581ad8ae03114a945e0ee7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 4 Feb 2024 13:59:16 -0500 Subject: [PATCH 0441/1492] Start code for when not all atoms are known --- src/Structure/Builder.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9ebe277f72..453c37dbf8 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1670,11 +1670,27 @@ int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co break; } } - + mprintf("bKnownX=%i bKnownY=%i\n", (int)axHasKnownAtoms, (int)ayHasKnownAtoms); if (!(axHasKnownAtoms && ayHasKnownAtoms)) { - mprinterr("Internal Error: AssignTorsionsAroundBond both not known not yet implemented.\n"); - return 1; + // Find any existing internal coords around ax-ay + std::vector iTorsions; + if (currentZmatrix_ != 0) { + for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) + { + if (it->AtJ() == ax && it->AtK() == ay) { + iTorsions.push_back( *it ); + } + } + } + if (!iTorsions.empty()) { + mprintf("Using INTERNALs to fit new torsions around: %s - %s\n", + topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + } else { + mprintf("Completely free in assigning new torsions for: %s - %s\n", + topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + } } else { + // Use existing atoms to determine torsions mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); From 68682aeeb6733fb8d2a4250d71f181bd4dbe4100 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 5 Feb 2024 10:38:35 -0500 Subject: [PATCH 0442/1492] Hide debug --- src/Structure/GenerateConnectivityArrays.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 0b7dd8e6c8..60285efc1c 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -37,7 +37,7 @@ BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& resi { BondArray out; // BONDS - int bidx = 0; + //int bidx = 0; // DEBUG for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { int start, end, offset; @@ -49,7 +49,7 @@ BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& resi for (Atom::bond_iterator bat = At.bondbegin(); bat != At.bondend(); ++bat) { if (iat < *bat) { - mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); + //mprintf("DEBUG: BOND i= %i %i - %i (%i %i)\n", bidx++, iat+1, *bat+1, iat*3, *bat*3); out.push_back( BondType(iat, *bat, -1) ); } //else From a3bd8fc24a7224c8d8a4764363942d894354ab24 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 5 Feb 2024 10:39:32 -0500 Subject: [PATCH 0443/1492] Remove wrap360 for now to be consistent with leap internally. Start new code for generating the ICs around a linkage --- src/Exec_Build.cpp | 7 ++-- src/Structure/Builder.cpp | 76 ++++++++++++++++++++++++++++++--------- src/Structure/Builder.h | 12 ++++--- 3 files changed, 72 insertions(+), 23 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 035e7a2fec..63bb3e1c96 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -392,7 +392,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, long int ires = it-ResZmatrices.begin(); Cpptraj::Structure::Zmatrix* zmatrix = *it; if (zmatrix != 0) { - mprintf("DEBUG: BUILD residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); + mprintf("DEBUG: ***** BUILD residue %li %s *****\n", ires + 1, + topOut.TruncResNameOnumId(ires).c_str()); mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); @@ -417,8 +418,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // FIXME DEBUG Cpptraj::Structure::Zmatrix tmpz; structureBuilder.SetZmatrix( zmatrix ); - if (structureBuilder.AssignTorsionsAroundBond(tmpz, at, *bat, frameOut, topOut, - hasPosition)) + if (structureBuilder.GenerateInternalsAroundLink(tmpz, at, *bat, frameOut, topOut, + hasPosition)) { mprinterr("Error: Assign torsions around inter-residue bond %s - %s failed.\n", topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 453c37dbf8..d3f42f84fe 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1423,7 +1423,7 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned if (iBondX >= MT.SortedAx().size() || iBondY >= MT.SortedAy().size()) return; - + mprintf("CALLING ModelTorsion for iBondX=%u iBondY=%u dVal=%g\n",iBondX,iBondY,dvalIn*Constants::RADDEG); int aa = MT.SortedAx()[iBondX]; int ax = MT.AtX(); int ay = MT.AtY(); @@ -1489,10 +1489,10 @@ void Builder::createSp3Sp3Torsions(TorsionModel const& MT) { // the same absolute angle that is measured // and twist all the others with it. static const double PIOVER3 = Constants::PI / 3.0; - double dADOffset = wrap360(MT.Absolute() - Constants::PI); - double d180 = wrap360(Constants::PI + dADOffset ); - double dm60 = wrap360(-PIOVER3 + dADOffset ); - double d60 = wrap360( PIOVER3 + dADOffset ); + double dADOffset = MT.Absolute() - Constants::PI ; + double d180 = Constants::PI + dADOffset ; + double dm60 = -PIOVER3 + dADOffset ; + double d60 = PIOVER3 + dADOffset ; if ( MT.XOrientation() > 0.0 ) { if ( MT.YOrientation() > 0.0 ) { @@ -1550,12 +1550,12 @@ void Builder::createSp3Sp2Torsions(TorsionModel const& MT) { // and twist all the others with it. static const double PIOVER3 = Constants::PI / 3.0; static const double PIOVER3x2 = PIOVER3 * 2.0; - double dADOffset = wrap360(MT.Absolute() - Constants::PI); - double d180 = wrap360(Constants::PI + dADOffset ); - double dm60 = wrap360(-PIOVER3 + dADOffset ); - double d60 = wrap360( PIOVER3 + dADOffset ); - double dm120 = wrap360(-PIOVER3x2 + dADOffset ); - double d120 = wrap360( PIOVER3x2 + dADOffset ); + double dADOffset = MT.Absolute() - Constants::PI ; + double d180 = Constants::PI + dADOffset ; + double dm60 = -PIOVER3 + dADOffset ; + double d60 = PIOVER3 + dADOffset ; + double dm120 = -PIOVER3x2 + dADOffset ; + double d120 = PIOVER3x2 + dADOffset ; double d0 = dADOffset ; if ( MT.XOrientation() > 0.0 ) { @@ -1581,9 +1581,14 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { // First twist the torsion so that the AD torsion has // the same absolute angle that is measured // and twist all the others with it. - double dADOffset = wrap360(MT.Absolute() - Constants::PI); - double d180 = wrap360(Constants::PI + dADOffset ); + double dADOffset = MT.Absolute() - Constants::PI ; + double d180 = Constants::PI + dADOffset ; double d0 = dADOffset ; + mprintf("In ModelCreateSp2Sp2Torsions, dAbsolute is %g, dADOffset= %g, d180= %g, d0= %g\n", + MT.Absolute()*Constants::RADDEG, + dADOffset * Constants::RADDEG, + d180 * Constants::RADDEG, + d0 * Constants::RADDEG); ModelTorsion( MT, 0, 0, d180 ); ModelTorsion( MT, 0, 1, d0 ); @@ -1593,7 +1598,7 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { } /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ -int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { // Save addresses of zmatrix, frame, topology, and hasPosition. // These are required for the createSpXSpX routines. TODO zero them at the end? @@ -1649,7 +1654,7 @@ int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co Hy = H2; } static const char* hstr[] = { "SP", "SP2", "SP3", "Unknown" }; - mprintf("DEBUG: AssignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", + mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", topIn.AtomMaskName(ax).c_str(), hstr[Hx], topIn.AtomMaskName(ay).c_str(), hstr[Hy]); // Check if there is at least one atom on either side of the ax-ay pair @@ -1685,6 +1690,8 @@ int Builder::AssignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co if (!iTorsions.empty()) { mprintf("Using INTERNALs to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + for (std::vector::const_iterator ic = iTorsions.begin(); ic != iTorsions.end(); ++ic) + ic->printIC( topIn ); } else { mprintf("Completely free in assigning new torsions for: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); @@ -1740,7 +1747,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { - if (AssignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { + if (assignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { mprinterr("Error Assign torsions around bond %s - %s failed.\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); @@ -1752,3 +1759,40 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology return 0; } +/** Generate internal coordinates around a bond linking two residues + * in the same manner as LEaP. + * \param zmatrix Hold output ICs + * \param at0 Atom in residue we are linking to. + * \param at1 Atom in resiude we are linking from. + */ +int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, + Frame const& frameIn, Topology const& topIn, + Barray const& hasPosition) +{ + mprintf("DEBUG: ----- Entering Builder::GenerateInternalsAroundLink. -----\n"); + // Sanity check + Atom const& A0 = topIn[at0]; + Atom const& A1 = topIn[at1]; + if (A0.ResNum() == A1.ResNum()) { + mprinterr("Internal Error: Builder::GenerateInternalsAroundLink(): Atoms are in the same residue.\n"); + return 1; + } + // Create a temporary has position array marking atoms in at0 residue + // (except at0) as unknown. + //Residue const& R0 = topIn.Res(A0.ResNum()); + //Barray tmpHasPosition = hasPosition; + //for (int at = R0.FirstAtom(); at != R0.LastAtom(); at++) + //{ + // if (at != at0) + // tmpHasPosition[at] = false; + //} + // Create torsions around the link + if (assignTorsionsAroundBond( zmatrix, at0, at1, frameIn, topIn, hasPosition )) { + mprinterr("Error Assign torsions around link %s - %s failed.\n", + topIn.AtomMaskName(at0).c_str(), + topIn.AtomMaskName(at1).c_str()); + return 1; + } + mprintf("DEBUG: ----- Leaving Builder::GenerateInternalsAroundLink. -----\n"); + return 0; +} diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 3d31ef6059..c8e613d5ef 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -31,8 +31,8 @@ class Builder { /// Generate internal coordinates in the same manner as LEaP int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); - /// Model torsions around a bond in the same manner as LEaP - int AssignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); + /// Generate internal coordinates around a link between residues in same manner as LEaP + int GenerateInternalsAroundLink(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); private: typedef std::vector Iarray; @@ -65,10 +65,14 @@ class Builder { /// Create IC for a torsion void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); - + /// Create ICs around SP3-SP3 linkage void createSp3Sp3Torsions(TorsionModel const&); + /// Create ICs around SP3-SP2 linkage void createSp3Sp2Torsions(TorsionModel const&); + /// Create ICs around SP2-SP2 linkage void createSp2Sp2Torsions(TorsionModel const&); + /// Model torsions around a bond in the same manner as LEaP + int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); int debug_; ParameterSet const* params_; @@ -77,7 +81,7 @@ class Builder { Topology const* currentTop_; ///< Topology for the createSpXSpXTorsions/ModelTorsion routines Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines - Zmatrix* newZmatrix_; ///< Hold output ICs from AssignTorsionsAroundBond + Zmatrix* newZmatrix_; ///< Hold output ICs from assignTorsionsAroundBond }; } } From 8421c7f9e64e79a8fdcf0fa93241d9a48c9d10e0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 5 Feb 2024 13:34:22 -0500 Subject: [PATCH 0444/1492] New function to generate spanning tree atoms --- src/Structure/Builder.cpp | 5 +++ src/Structure/GenerateConnectivityArrays.cpp | 40 ++++++++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 2 + 3 files changed, 47 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index d3f42f84fe..64d65037c3 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1777,6 +1777,11 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, mprinterr("Internal Error: Builder::GenerateInternalsAroundLink(): Atoms are in the same residue.\n"); return 1; } + // Create spanning tree across the link + std::vector span_atoms = GenerateSpanningTree(at0, at1, 4, topIn.Atoms()); + for (std::vector::const_iterator it = span_atoms.begin(); + it != span_atoms.end(); ++it) + mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); // Create a temporary has position array marking atoms in at0 residue // (except at0) as unknown. //Residue const& R0 = topIn.Res(A0.ResNum()); diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 60285efc1c..9dada227b4 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -60,6 +60,46 @@ BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& resi return out; } +static inline void visit_tree_atom(std::vector& out, + int at, int targetDepth, int currentDepth, + std::vector& atomSeen, + std::vector const& atoms) +{ + if (currentDepth == targetDepth) return; + if (!atomSeen[at]) { + out.push_back( at ); + atomSeen[at] = true; + } + for (Atom::bond_iterator bat = atoms[at].bondbegin(); + bat != atoms[at].bondend(); + ++bat) + { + if (!atomSeen[*bat]) { + out.push_back( *bat ); + atomSeen[*bat] = true; + } + } + for (Atom::bond_iterator bat = atoms[at].bondbegin(); + bat != atoms[at].bondend(); + ++bat) + { + if (atoms[*bat].Nbonds() > 1) + visit_tree_atom(out, *bat, targetDepth, currentDepth+1, atomSeen, atoms); + } +} + +std::vector Cpptraj::Structure::GenerateSpanningTree(int at0, int at1, int targetDepth, + std::vector const& atoms) +{ + std::vector out; + + std::vector atomSeen(atoms.size(), false); + + visit_tree_atom(out, at0, targetDepth, 0, atomSeen, atoms); + + return out; +} + /** From atom connectiviy, generate an angle array in the same order as LEaP. */ // TODO use in GenerateBAT AngleArray Cpptraj::Structure::GenerateAngleArray(std::vector const& residues, std::vector const& atoms) diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index b0bc6f8bc2..9fe70514e7 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -14,6 +14,8 @@ enum AtomScanDirectionType { SCAN_ATOMS_BACKWARDS = 0, SCAN_ATOMS_FORWARDS }; void SetAtomScanDirection(AtomScanDirectionType); /// Generate bond array in same order as leap BondArray GenerateBondArray(std::vector const&, std::vector const&); +/// Generate a spanning tree +std::vector GenerateSpanningTree(int, int, int, std::vector const&); /// Generate angle array in same order as leap AngleArray GenerateAngleArray(std::vector const&, std::vector const&); /// Generate proper dihedral array in same order as leap From bc4e6872f7a349caad0f2eaa0ff3378c020e9420 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 5 Feb 2024 14:58:58 -0500 Subject: [PATCH 0445/1492] Start generateAtomInternals --- src/Structure/Builder.cpp | 53 ++++++++++++++++++++++++++++++++++++--- src/Structure/Builder.h | 3 +++ 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 64d65037c3..b482823218 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1597,6 +1597,20 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { return; } +/** Find any existing internal coords around ax-ay. */ +std::vector Builder::getExistingInternals(int ax, int ay) const { + std::vector iTorsions; + if (currentZmatrix_ != 0) { + for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) + { + if (it->AtJ() == ax && it->AtK() == ay) { + iTorsions.push_back( *it ); + } + } + } + return iTorsions; +} + /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { @@ -1678,15 +1692,15 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co mprintf("bKnownX=%i bKnownY=%i\n", (int)axHasKnownAtoms, (int)ayHasKnownAtoms); if (!(axHasKnownAtoms && ayHasKnownAtoms)) { // Find any existing internal coords around ax-ay - std::vector iTorsions; - if (currentZmatrix_ != 0) { + std::vector iTorsions = getExistingInternals(ax, ay); +/* if (currentZmatrix_ != 0) { for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) { if (it->AtJ() == ax && it->AtK() == ay) { iTorsions.push_back( *it ); } } - } + }*/ if (!iTorsions.empty()) { mprintf("Using INTERNALs to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); @@ -1758,6 +1772,34 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; } + +/** Build internal coordinates around an atom. */ +int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +{ + mprintf( "Building internals for: %s\n", topIn.LeapName(at).c_str()); + Atom const& AtA = topIn[at]; + for (Atom::bond_iterator bat = AtA.bondbegin(); bat != AtA.bondend(); ++bat) { + Atom const& AtB = topIn[*bat]; + for (Atom::bond_iterator cat = AtB.bondbegin(); cat != AtB.bondend(); ++cat) { + if (*cat != at) { + Atom const& AtC = topIn[*cat]; + mprintf("Building torsion INTERNALs for: %s around: %s - %s\n", + topIn.LeapName(at).c_str(), + topIn.LeapName(*bat).c_str(), + topIn.LeapName(*cat).c_str()); + std::vector iTorsions = getExistingInternals(*bat, *cat); + int iShouldBe = (AtB.Nbonds() - 1) * (AtC.Nbonds() - 1); + mprintf("ISHOULDBE= %i ITORSIONS= %zu\n", iShouldBe, iTorsions.size()); + if (iShouldBe != (int)iTorsions.size()) { + Zmatrix tmpz; // FIXME + assignTorsionsAroundBond(tmpz, *bat, *cat, frameIn, topIn, hasPosition); + } + } + } + } + + return 0; +} /** Generate internal coordinates around a bond linking two residues * in the same manner as LEaP. @@ -1781,7 +1823,10 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, std::vector span_atoms = GenerateSpanningTree(at0, at1, 4, topIn.Atoms()); for (std::vector::const_iterator it = span_atoms.begin(); it != span_atoms.end(); ++it) - mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); + { + //mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); + generateAtomInternals(*it, frameIn, topIn, hasPosition); + } // Create a temporary has position array marking atoms in at0 residue // (except at0) as unknown. //Residue const& R0 = topIn.Res(A0.ResNum()); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index c8e613d5ef..1a794a4145 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -74,6 +74,9 @@ class Builder { /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); + std::vector getExistingInternals(int, int) const; + int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); + int debug_; ParameterSet const* params_; Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates From a968de5e2b1bcd89c459cf6387b783a3135bdd63 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 5 Feb 2024 15:21:20 -0500 Subject: [PATCH 0446/1492] Save residue bonding atoms --- src/Exec_Build.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 63bb3e1c96..0c6a7c8c6c 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -198,6 +198,10 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, structureBuilder.SetDebug( 1 ); structureBuilder.SetParameters( &mainParmSet ); + // For holding bonded atom pairs + typedef std::pair Ipair; + typedef std::vector IParray; + // Loop for setting up atoms in the topology from residues or residue templates. int nRefAtomsMissing = 0; for (int ires = 0; ires != topIn.Nres(); ires++) @@ -207,9 +211,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: atom offset is %i\n", atomOffset); Residue const& currentRes = topIn.Res(ires); DataSet_Coords* resTemplate = ResTemplates[ires]; - // For holding bonded atom pairs - typedef std::pair Ipair; - typedef std::vector IParray; IParray intraResBonds; if (resTemplate == 0) { // ----- No template. Just add the atoms. ------------ @@ -339,6 +340,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // ----------------------------------- // Add inter-residue bonds + std::vector resBondingAtoms(topOut.Nres()); for (ResAtArray::const_iterator it = interResBonds.begin(); it != interResBonds.end(); ++it) { ResAtPair const& ra0 = *it; @@ -358,6 +360,17 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, return 1; } topOut.AddBond(at0, at1); + // Save bonding atoms + resBondingAtoms[ra0.first].push_back( Ipair(at0, at1) ); + resBondingAtoms[ra1.first].push_back( Ipair(at1, at0) ); + } + // DEBUG print residue bonding atoms + for (std::vector::const_iterator rit = resBondingAtoms.begin(); + rit != resBondingAtoms.end(); ++rit) + { + mprintf("\tResidue %s bonding atoms.\n", topOut.TruncResNameNum(rit-resBondingAtoms.begin()).c_str()); + for (IParray::const_iterator it = rit->begin(); it != rit->end(); ++it) + mprintf("\t\t%s - %s\n", topOut.AtomMaskName(it->first).c_str(), topOut.AtomMaskName(it->second).c_str()); } // ----------------------------------- From b10a5d91307f4f91f70c6b302dfa36caaf5975de Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 5 Feb 2024 15:38:51 -0500 Subject: [PATCH 0447/1492] Start using resBondedAtoms --- src/Exec_Build.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 0c6a7c8c6c..7851bf4689 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -399,7 +399,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, linkBuilder.SetDebug( 1 ); // FIXME linkBuilder.SetParameters( &mainParmSet ); bool buildFailed = false; - TermTypeArray::const_iterator termType = ResTypes.begin(); + TermTypeArray::const_iterator termType = ResTypes.begin(); // FIXME is termType needed? for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) { long int ires = it-ResZmatrices.begin(); @@ -413,6 +413,15 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, zmatrix->print(&topOut); linkBuilder.SetZmatrix( zmatrix ); // Is this residue connected to an earlier residue? + for (IParray::const_iterator resBonds = resBondingAtoms[ires].begin(); + resBonds != resBondingAtoms[ires].end(); ++resBonds) + { + if (resBonds->second < resBonds->first) { + mprintf("\t\tResidue connection: %s - %s\n", + topOut.AtomMaskName(resBonds->first).c_str(), + topOut.AtomMaskName(resBonds->second).c_str()); + } + } if ( *termType != Cpptraj::Structure::BEG_TERMINAL ) { for (int at = topOut.Res(ires).FirstAtom(); at != topOut.Res(ires).LastAtom(); ++at) { From 91d611271e808aa27bb130af363be1761a647c79 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 08:55:33 -0500 Subject: [PATCH 0448/1492] Start creating inter-residue links like leap. --- src/Exec_Build.cpp | 28 +++++++++++++++------------ src/Structure/Builder.cpp | 40 +++++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 7851bf4689..b2ed9419aa 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -359,7 +359,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Atom %s not found in residue %i\n", *(ra1.second), ra1.first); return 1; } - topOut.AddBond(at0, at1); + //topOut.AddBond(at0, at1); // Save bonding atoms resBondingAtoms[ra0.first].push_back( Ipair(at0, at1) ); resBondingAtoms[ra1.first].push_back( Ipair(at1, at0) ); @@ -420,8 +420,21 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("\t\tResidue connection: %s - %s\n", topOut.AtomMaskName(resBonds->first).c_str(), topOut.AtomMaskName(resBonds->second).c_str()); + topOut.AddBond(resBonds->first, resBonds->second); + // FIXME DEBUG + structureBuilder.SetZmatrix( zmatrix ); + if (structureBuilder.GenerateInternalsAroundLink(*zmatrix, resBonds->first, resBonds->second, + frameOut, topOut, hasPosition)) + { + mprinterr("Error: Assign torsions around inter-residue link %s - %s failed.\n", + topOut.AtomMaskName(resBonds->first).c_str(), + topOut.AtomMaskName(resBonds->second).c_str()); + return 1; + } + //tmpz.print(&topOut); } } +/* if ( *termType != Cpptraj::Structure::BEG_TERMINAL ) { for (int at = topOut.Res(ires).FirstAtom(); at != topOut.Res(ires).LastAtom(); ++at) { @@ -437,21 +450,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); return 1; } - // FIXME DEBUG - Cpptraj::Structure::Zmatrix tmpz; - structureBuilder.SetZmatrix( zmatrix ); - if (structureBuilder.GenerateInternalsAroundLink(tmpz, at, *bat, frameOut, topOut, - hasPosition)) - { - mprinterr("Error: Assign torsions around inter-residue bond %s - %s failed.\n", - topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); - return 1; - } - tmpz.print(&topOut); + } } } } +*/ // TEST FIXME // Cpptraj::Structure::Zmatrix testZ; // if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index b482823218..862a741acb 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1804,7 +1804,7 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& /** Generate internal coordinates around a bond linking two residues * in the same manner as LEaP. * \param zmatrix Hold output ICs - * \param at0 Atom in residue we are linking to. + * \param at0 Atom in residue we are linking to (i.e. the current residue). * \param at1 Atom in resiude we are linking from. */ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, @@ -1819,30 +1819,34 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, mprinterr("Internal Error: Builder::GenerateInternalsAroundLink(): Atoms are in the same residue.\n"); return 1; } + // In order to mimic the way LEaP does things, mark all atoms before + // this residue as having position, the first known atom of this residue + // has having position, and all other atoms as not having position. + Residue const& R0 = topIn.Res(A0.ResNum()); + Barray tmpHasPosition( topIn.Natom(), false ); + for (int at = 0; at < R0.FirstAtom(); at++) + tmpHasPosition[at] = true; + for (int at = R0.FirstAtom(); at != R0.LastAtom(); at++) { + if (hasPosition[at]) { + tmpHasPosition[at] = true; + break; + } + } // Create spanning tree across the link std::vector span_atoms = GenerateSpanningTree(at0, at1, 4, topIn.Atoms()); for (std::vector::const_iterator it = span_atoms.begin(); it != span_atoms.end(); ++it) { //mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); - generateAtomInternals(*it, frameIn, topIn, hasPosition); - } - // Create a temporary has position array marking atoms in at0 residue - // (except at0) as unknown. - //Residue const& R0 = topIn.Res(A0.ResNum()); - //Barray tmpHasPosition = hasPosition; - //for (int at = R0.FirstAtom(); at != R0.LastAtom(); at++) - //{ - // if (at != at0) - // tmpHasPosition[at] = false; - //} - // Create torsions around the link - if (assignTorsionsAroundBond( zmatrix, at0, at1, frameIn, topIn, hasPosition )) { - mprinterr("Error Assign torsions around link %s - %s failed.\n", - topIn.AtomMaskName(at0).c_str(), - topIn.AtomMaskName(at1).c_str()); - return 1; + generateAtomInternals(*it, frameIn, topIn, tmpHasPosition); } + // Create torsions around the link + //if (assignTorsionsAroundBond( zmatrix, at0, at1, frameIn, topIn, hasPosition )) { + // mprinterr("Error Assign torsions around link %s - %s failed.\n", + // topIn.AtomMaskName(at0).c_str(), + // topIn.AtomMaskName(at1).c_str()); + // return 1; + //} mprintf("DEBUG: ----- Leaving Builder::GenerateInternalsAroundLink. -----\n"); return 0; } From 3391916f0bac47952d33f5f256bd5c86e1b1e991 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 09:21:30 -0500 Subject: [PATCH 0449/1492] Start building mock coords --- src/Structure/Builder.cpp | 29 ++++++++++++++++++++++++++++- src/Structure/Builder.h | 5 ++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 862a741acb..a237b9f873 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1208,6 +1208,8 @@ class Cpptraj::Structure::Builder::TorsionModel { public: /// CONSTRUCTOR TorsionModel() : ax_(-1), ay_(-1), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} + /// CONSTRUCTOR - AX and AY atom indices + TorsionModel(int ax, int ay) : ax_(ax), ay_(ay), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} /// Set up torsions around bonded atoms int SetupTorsion(int, int, AtomType::HybridizationType, AtomType::HybridizationType, Frame const&, Topology const&, std::vector const&); @@ -1611,6 +1613,22 @@ std::vector Builder::getExistingInternals(int ax, int ay) const return iTorsions; } +/** Build mock external coordinates around the given torsion using + * the given internal coordinates. + */ +int Builder::buildMockExternals(TorsionModel& mT, std::vector const& iaTorsions) +const +{ + if (iaTorsions.empty()) { + mprinterr("Internal Error: Builder::buildMockExternals() called with no internal torsions.\n"); + return 1; + } + InternalCoords const& iInt = iaTorsions.front(); + mprintf("======= Started mock coords from: %s\n", currentTop_->LeapName(iInt.AtI()).c_str()); + + return 0; +} + /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { @@ -1706,6 +1724,12 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); for (std::vector::const_iterator ic = iTorsions.begin(); ic != iTorsions.end(); ++ic) ic->printIC( topIn ); + TorsionModel mT(ax, ay); + if (buildMockExternals(mT, iTorsions)) { + mprinterr("Error: Building mock externals around %s - %s failed.\n", + topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str()); + return 1; + } } else { mprintf("Completely free in assigning new torsions for: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); @@ -1838,7 +1862,10 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, it != span_atoms.end(); ++it) { //mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); - generateAtomInternals(*it, frameIn, topIn, tmpHasPosition); + if (generateAtomInternals(*it, frameIn, topIn, tmpHasPosition)) { + mprinterr("Error: Could not generate internals for atom %s\n", topIn.AtomMaskName(*it).c_str()); + return 1; + } } // Create torsions around the link //if (assignTorsionsAroundBond( zmatrix, at0, at1, frameIn, topIn, hasPosition )) { diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 1a794a4145..8897d5f6f4 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -73,8 +73,11 @@ class Builder { void createSp2Sp2Torsions(TorsionModel const&); /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); - + /// Get any existing internal coords from currentZmatrix around specified atoms std::vector getExistingInternals(int, int) const; + /// Build mock coordinates around given torsion + int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; + /// Generate internal coords for a given atom int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); int debug_; From 6073c9559677dac0a3a50fc4e1951ef57e9ecbc3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 11:28:49 -0500 Subject: [PATCH 0450/1492] Finish up initial code for building mock externals --- src/Structure/Builder.cpp | 142 ++++++++++++++++++++++++++++++++++---- src/Structure/Zmatrix.cpp | 35 +++++++--- src/Structure/Zmatrix.h | 3 +- 3 files changed, 159 insertions(+), 21 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index a237b9f873..59d9d36ec1 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1613,8 +1613,38 @@ std::vector Builder::getExistingInternals(int ax, int ay) const return iTorsions; } +/// Used to track atoms for mock externals +class MockAtom { + public: + /// CONSTRUCTOR - index, position + MockAtom(int idx, Vec3 const& pos) : idx_(idx), pos_(pos), known_(true) {} + /// CONSTRUCTOR - index, unknown position + MockAtom(int idx) : idx_(idx), pos_(0.0), known_(false) {} + /// Set position + void SetPos(Vec3 const& p) { pos_ = p; known_ = true; } + + int Idx() const { return idx_; } + Vec3 const& Pos() const { return pos_; } + bool Known() const { return known_; } + private: + int idx_; ///< Atom index + Vec3 pos_; ///< Atom mock position + bool known_; ///< True if atom position is known +}; + +/// Used to find mock atom +static inline std::vector::iterator find_mock_atom(std::vector& outerAtoms, int idx) +{ + std::vector::iterator it = outerAtoms.begin(); + for (; it != outerAtoms.end(); ++it) + if (it->Idx() == idx) return it; + return outerAtoms.end(); +} + /** Build mock external coordinates around the given torsion using * the given internal coordinates. + * By definition, the two central atoms will be the same for each + * IC in iaTorsions. */ int Builder::buildMockExternals(TorsionModel& mT, std::vector const& iaTorsions) const @@ -1623,8 +1653,104 @@ const mprinterr("Internal Error: Builder::buildMockExternals() called with no internal torsions.\n"); return 1; } - InternalCoords const& iInt = iaTorsions.front(); - mprintf("======= Started mock coords from: %s\n", currentTop_->LeapName(iInt.AtI()).c_str()); + mprintf("======= Started mock coords from: %s\n", currentTop_->LeapName(iaTorsions.front().AtI()).c_str()); + + for (std::vector::const_iterator ic = iaTorsions.begin(); + ic != iaTorsions.end(); ++ic) + mprintf("------- Known torsion: %s - %s - %s - %s %f\n", + currentTop_->LeapName(ic->AtI()).c_str(), + currentTop_->LeapName(ic->AtJ()).c_str(), + currentTop_->LeapName(ic->AtK()).c_str(), + currentTop_->LeapName(ic->AtL()).c_str(), + ic->Phi()); + + // Define coordinates for the central atoms. + Vec3 posX(0, 0, 0); + Vec3 posY(1, 0, 0); + + // Hold info on X-Y outer atoms + typedef std::vector Marray; + Marray outerAtoms; + + // Define outer atoms + for (std::vector::const_iterator ic = iaTorsions.begin(); + ic != iaTorsions.end(); ++ic) + { + if (ic == iaTorsions.begin()) { + // Define first outer atom as being in the XY plane + outerAtoms.push_back( MockAtom(ic->AtI(), Vec3(1, 1, 0)) ); + } else { + Marray::iterator mi = find_mock_atom( outerAtoms, ic->AtI() ); + if (mi == outerAtoms.end()) + outerAtoms.push_back( MockAtom(ic->AtI()) ); + } + Marray::iterator ml = find_mock_atom( outerAtoms, ic->AtL() ); + if (ml == outerAtoms.end()) + outerAtoms.push_back( MockAtom(ic->AtL()) ); + } + mprintf("DEBUG: Outer atoms:\n"); + for (Marray::const_iterator it = outerAtoms.begin(); it != outerAtoms.end(); ++it) + mprintf("DEBUG:\t\t%i %4s (%i) {%f %f %f}\n", it->Idx()+1, currentTop_->AtomMaskName(it->Idx()).c_str(), + (int)it->Known(), it->Pos()[0], it->Pos()[1], it->Pos()[2]); + + // Loop through the known torsions looking for those that + // have one position defined, then build coords for the + // other atom and mark the torsion as used. + std::vector used( iaTorsions.size(), false ); + unsigned int nused = 0; + for (unsigned int idx = 0; idx != iaTorsions.size(); idx++) { + //bool gotOne = false; + for (unsigned int jdx = 0; jdx != iaTorsions.size(); jdx++) { + if (!used[jdx]) { + InternalCoords const& iInt = iaTorsions[jdx]; + Marray::iterator tmpAt1 = find_mock_atom(outerAtoms, iInt.AtI()); + Marray::iterator tmpAt4 = find_mock_atom(outerAtoms, iInt.AtL()); + if (tmpAt1 == outerAtoms.end()) { + mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom I %i not found.\n", iInt.AtI()+1); + return 1; + } + if (tmpAt4 == outerAtoms.end()) { + mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom L %i not found.\n", iInt.AtL()+1); + return 1; + } + Vec3 maPC1, maPC2; + Marray::iterator tgt = outerAtoms.end(); + Marray::iterator knownAt = outerAtoms.end(); + if (tmpAt4->Known()) { + tgt = tmpAt1; + maPC1 = posX; + maPC2 = posY; + knownAt = tmpAt4; + } else if (tmpAt1->Known()) { + //gotOne = true; // FIXME needed? + tgt = tmpAt4; + maPC1 = posY; + maPC2 = posX; + knownAt = tmpAt1; + } + if (tgt != outerAtoms.end()) { + //gotOne = true; + mprintf("======= Building mock coord for: %s\n", currentTop_->LeapName(tgt->Idx()).c_str()); + mprintf("======= Using torsion: %s - %s - %s - %s (p1known= %i, p4known= %i)\n", + currentTop_->LeapName(iInt.AtI()).c_str(), + currentTop_->LeapName(iInt.AtJ()).c_str(), + currentTop_->LeapName(iInt.AtK()).c_str(), + currentTop_->LeapName(iInt.AtL()).c_str(), + (int)tmpAt1->Known(), (int)tmpAt4->Known()); + // Now build the coordinate for the target atom + tgt->SetPos( Zmatrix::AtomIposition(maPC1, maPC2, knownAt->Pos(), 1.0, 90.0, iInt.Phi()) ); + mprintf("ZMatrixAll: %f,%f,%f\n", tgt->Pos()[0], tgt->Pos()[1], tgt->Pos()[2]); + used[jdx] = true; + nused++; + break; + } + } // END IC not yet used + } // END inner loop over ICs + } // END outer loop over ICs + if (nused < used.size()) { + mprinterr("Error: There are %u torsions left over for mock coords.\n", used.size() - nused); + return 1; + } return 0; } @@ -1711,19 +1837,11 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co if (!(axHasKnownAtoms && ayHasKnownAtoms)) { // Find any existing internal coords around ax-ay std::vector iTorsions = getExistingInternals(ax, ay); -/* if (currentZmatrix_ != 0) { - for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) - { - if (it->AtJ() == ax && it->AtK() == ay) { - iTorsions.push_back( *it ); - } - } - }*/ if (!iTorsions.empty()) { mprintf("Using INTERNALs to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); - for (std::vector::const_iterator ic = iTorsions.begin(); ic != iTorsions.end(); ++ic) - ic->printIC( topIn ); + //for (std::vector::const_iterator ic = iTorsions.begin(); ic != iTorsions.end(); ++ic) + // ic->printIC( topIn ); TorsionModel mT(ax, ay); if (buildMockExternals(mT, iTorsions)) { mprinterr("Error: Building mock externals around %s - %s failed.\n", diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 89dbbda772..15aba9eb12 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -886,12 +886,16 @@ int Zmatrix::SetFromFrame(Frame const& frameIn, Topology const& topIn, int molnu } // ----------------------------------------------------------------------------- -/** \return Position of atom I from given internal coordinate. */ -Vec3 Zmatrix::AtomIposition(InternalCoords const& ic, Frame const& frameOut) +/** \return Position of atom I from positions of atoms J, K, and L, + * and corresponding distance (in Ang) and angle/torsion + * values (in degrees). + */ +Vec3 Zmatrix::AtomIposition(Vec3 const& posJ, Vec3 const& posK, Vec3 const& posL, + double rdist, double theta, double phi) { - double rdist = ic.Dist(); - double theta = ic.Theta(); - double phi = ic.Phi(); +// double rdist = ic.Dist(); +// double theta = ic.Theta(); +// double phi = ic.Phi(); double sinTheta = sin(theta * Constants::DEGRAD); double cosTheta = cos(theta * Constants::DEGRAD); @@ -903,9 +907,9 @@ Vec3 Zmatrix::AtomIposition(InternalCoords const& ic, Frame const& frameOut) rdist * cosPhi * sinTheta, rdist * sinPhi * sinTheta ); - Vec3 posL = Vec3( frameOut.XYZ( ic.AtL()) ); - Vec3 posK = Vec3( frameOut.XYZ( ic.AtK()) ); - Vec3 posJ = Vec3( frameOut.XYZ( ic.AtJ()) ); +// Vec3 posL = Vec3( frameOut.XYZ( ic.AtL()) ); +// Vec3 posK = Vec3( frameOut.XYZ( ic.AtK()) ); +// Vec3 posJ = Vec3( frameOut.XYZ( ic.AtJ()) ); Vec3 LK = posK - posL; Vec3 KJ = posJ - posK; @@ -923,6 +927,21 @@ Vec3 Zmatrix::AtomIposition(InternalCoords const& ic, Frame const& frameOut) return posI; } +/** \return Position of atom I from given internal coordinate and Frame. */ +Vec3 Zmatrix::AtomIposition(InternalCoords const& ic, Frame const& frameOut) +{ + double rdist = ic.Dist(); + double theta = ic.Theta(); + double phi = ic.Phi(); + + Vec3 posJ = Vec3( frameOut.XYZ( ic.AtJ()) ); + Vec3 posK = Vec3( frameOut.XYZ( ic.AtK()) ); + Vec3 posL = Vec3( frameOut.XYZ( ic.AtL()) ); + + return AtomIposition(posJ, posK, posL, rdist, theta, phi); +} + + /** Set Cartesian coordinates in Frame from internal coordinates. * Assume none of the positions in frameOut can be used initially. */ diff --git a/src/Structure/Zmatrix.h b/src/Structure/Zmatrix.h index a727b771f0..9c9b627f71 100644 --- a/src/Structure/Zmatrix.h +++ b/src/Structure/Zmatrix.h @@ -73,7 +73,8 @@ class Zmatrix { unsigned int sizeInBytes() const { return (7*sizeof(int)) + (9*sizeof(double)) + // 3 Vec3 (IC_.size() * InternalCoords::sizeInBytes()); } - + /// \return XYZ position of atom I using positions of atoms J/K/L and distance/angle/torsion (deg) + static Vec3 AtomIposition(Vec3 const&, Vec3 const&, Vec3 const&, double, double, double); /// \return XYZ position of atom I for given internal coordinate static Vec3 AtomIposition(InternalCoords const&, Frame const&); private: From 9acf1a0559801283a7b0c194df6a6b1431bad10a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 15:19:01 -0500 Subject: [PATCH 0451/1492] Start reworking the model routines so that all the information needed is in TorsionModel --- src/Structure/Builder.cpp | 628 +++++++++++++++++++++----------------- 1 file changed, 349 insertions(+), 279 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 59d9d36ec1..42110cd58c 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1203,16 +1203,51 @@ const } // ------------------------------------------------------------------------------ +/// Used to track atoms for mock externals +class MockAtom { + public: + /// CONSTRUCTOR + MockAtom() : idx_(-1), pos_(0.0), known_(false) {} + /// CONSTRUCTOR - index, position + MockAtom(int idx, Vec3 const& pos) : idx_(idx), pos_(pos), known_(true) {} + /// CONSTRUCTOR - index, unknown position + MockAtom(int idx) : idx_(idx), pos_(0.0), known_(false) {} + /// Set position + void SetPos(Vec3 const& p) { pos_ = p; known_ = true; } + + int Idx() const { return idx_; } + Vec3 const& Pos() const { return pos_; } + bool Known() const { return known_; } + private: + int idx_; ///< Atom index + Vec3 pos_; ///< Atom position + bool known_; ///< True if atom position is known +}; + +/// Used to find mock atom +static inline std::vector::iterator find_mock_atom(std::vector& outerAtoms, int idx) +{ + std::vector::iterator it = outerAtoms.begin(); + for (; it != outerAtoms.end(); ++it) + if (it->Idx() == idx) return it; + return outerAtoms.end(); +} + +// ----------------------------------------------- /** Store info for modelling torsions around X-Y */ class Cpptraj::Structure::Builder::TorsionModel { public: + typedef std::vector Marray; /// CONSTRUCTOR - TorsionModel() : ax_(-1), ay_(-1), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} + TorsionModel() : dAbsolute_(0), Xorientation_(0), Yorientation_(0), axHasKnownAtoms_(false), ayHasKnownAtoms_(false) {} /// CONSTRUCTOR - AX and AY atom indices - TorsionModel(int ax, int ay) : ax_(ax), ay_(ay), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} + //TorsionModel(int ax, int ay) : ax_(ax), ay_(ay), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} + /// Initialize torsions around bonded atoms + int InitTorsion(int, int, Frame const&, Topology const&, std::vector const&); /// Set up torsions around bonded atoms - int SetupTorsion(int, int, AtomType::HybridizationType, AtomType::HybridizationType, - Frame const&, Topology const&, std::vector const&); + int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn); + /// Build mock externals from given internals + int BuildMockExternals(std::vector const&, Topology const&); /// \return Value of A-X-Y-D torsion in radians double Absolute() const { return dAbsolute_; } @@ -1221,27 +1256,32 @@ class Cpptraj::Structure::Builder::TorsionModel { /// \return Value of orientation around Y double YOrientation() const { return Yorientation_; } /// \return Sorted atoms bonded to X excluding Y - std::vector const& SortedAx() const { return sorted_ax_; } + Marray const& SortedAx() const { return sorted_ax_; } /// \return Sorted atoms bonded to Y excluding X - std::vector const& SortedAy() const { return sorted_ay_; } - /// \return Index of atom X - int AtX() const { return ax_; } - /// \return Index of atom Y - int AtY() const { return ay_; } + Marray const& SortedAy() const { return sorted_ay_; } + /// \return Atom X + MockAtom const& AtX() const { return atX_; } + /// \return Atom Y + MockAtom const& AtY() const { return atY_; } + /// \return True if AX has known bonded atoms + bool AxHasKnownAtoms() const { return axHasKnownAtoms_; } + /// \return True if AY has known bonded atoms + bool AyHasKnownAtoms() const { return ayHasKnownAtoms_; } private: static int LeapAtomWeight(Atom const&); - static inline std::vector SiftBondedAtomsLikeLeap(unsigned int&, Atom const&, std::vector const&); - static inline std::vector SortBondedAtomsLikeLeap(unsigned int&, Atom const&, - Topology const& topIn, int ignoreAtom, - std::vector const& hasPosition); - - int ax_; ///< Atom X - int ay_; ///< Atom Y - Iarray sorted_ax_; ///< Hold the leap-sorted bonds for atom X - Iarray sorted_ay_; ///< Hold the leap-sorted bonds for atom Y + //static inline std::vector SiftBondedAtomsLikeLeap(unsigned int&, Atom const&, std::vector const&); + static inline Marray SortBondedAtomsLikeLeap(unsigned int&, Topology const& topIn, Marray const&); + static inline void swap_heaviest(Marray&, Topology const&); + + MockAtom atX_; ///< Atom X + MockAtom atY_; ///< Atom Y + Marray sorted_ax_; ///< Hold the leap-sorted bonded atoms for atom X + Marray sorted_ay_; ///< Hold the leap-sorted bonded atoms for atom Y double dAbsolute_; ///< Hold the value of the A-X-Y-D torsion in radians double Xorientation_; ///< Orientation around the X atom TODO make an enum? double Yorientation_; ///< Orientation around the Y atoms + bool axHasKnownAtoms_; ///< True if any atom around ax (other than ay) is known + bool ayHasKnownAtoms_; ///< True if any atom around ay (other than ax) is known }; /** \return the LEaP 'weight' of an atom. @@ -1261,7 +1301,7 @@ int Cpptraj::Structure::Builder::TorsionModel::LeapAtomWeight(Atom const& At) * \param At The atom to sift. * \param hasPosition Array indicating whether atoms have position. */ -std::vector +/*std::vector Cpptraj::Structure::Builder::TorsionModel::SiftBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, Atom const& At, std::vector const& hasPosition) @@ -1276,6 +1316,29 @@ std::vector if (!hasPosition[*bat]) out.push_back( *bat ); return out; +}*/ + +static inline void swap_mock_atom(MockAtom& lhs, MockAtom& rhs) { + MockAtom tmp = lhs; + lhs = rhs; + rhs = tmp; +} + +void Cpptraj::Structure::Builder::TorsionModel::swap_heaviest(Marray& bondedAtoms, Topology const& topIn) +{ + // Find the index of the heaviest atom + int iHighest = 0; + int iPos = 0; + for (Marray::const_iterator it = bondedAtoms.begin(); it != bondedAtoms.end(); ++it) + { + int iWeight = LeapAtomWeight( topIn[it->Idx()] ); + if ( iHighest < iWeight ) { + iHighest = iWeight; + iPos = (int)(it - bondedAtoms.begin()); + } + } + // If highest weight atom not already in front, swap it there. + if (iPos != 0) swap_mock_atom( bondedAtoms[0], bondedAtoms[iPos] ); } /** Order atoms bonded to the given atom in a manner similar to LEaP's @@ -1285,34 +1348,32 @@ std::vector * The ignore atom is the index of the atom this atom is bonded to that * forms the torsion we are interested in. */ -std::vector +std::vector Cpptraj::Structure::Builder::TorsionModel::SortBondedAtomsLikeLeap(unsigned int& firstUnknownIdx, - Atom const& At, Topology const& topIn, - int ignoreAtom, - std::vector const& hasPosition) + Topology const& topIn, + std::vector const& bondedAtoms) { - std::vector out; - out.reserve( At.Nbonds() ); + typedef std::vector Marray; + Marray known_out; + known_out.reserve( bondedAtoms.size() ); // Sift so that atoms with known position are at the front - std::vector bondedAtoms = SiftBondedAtomsLikeLeap(firstUnknownIdx, At, hasPosition); - // Find the index of the heaviest atom - int iHighest = 0; - int iPos = 0; - for (unsigned int idx = 0; idx < bondedAtoms.size(); idx++) { - int bat = bondedAtoms[idx]; - if (bat != ignoreAtom) { - out.push_back( bat ); - int iWeight = LeapAtomWeight( topIn[bat] ); - if ( iHighest < iWeight ) { - iHighest = iWeight; - iPos = (int)out.size()-1; - } - } - } - // If highest weight atom not already in front, swap it there. - if (iPos != 0) std::swap( out[0], out[iPos] ); - - return out; + for (Marray::const_iterator it = bondedAtoms.begin(); it != bondedAtoms.end(); ++it) + if (it->Known()) + known_out.push_back( *it ); + firstUnknownIdx = known_out.size(); + swap_heaviest(known_out, topIn); + // Unknown atoms go at the back + Marray unknown_out; + unknown_out.reserve(bondedAtoms.size() - known_out.size() + 1); + for (Marray::const_iterator it = bondedAtoms.begin(); it != bondedAtoms.end(); ++it) + if (!it->Known()) + unknown_out.push_back( *it ); + swap_heaviest(unknown_out, topIn); + + for (Marray::const_iterator it = unknown_out.begin(); it != unknown_out.end(); ++it) + known_out.push_back( *it ); + + return known_out; } /** LEaP routine for determining atom chirality. @@ -1341,28 +1402,70 @@ static inline double VectorAtomChirality(Vec3 const& Center, Vec3 const& A, Vec3 * triangle (iA, iX, iY). This orientation will be used by the * CreateSpXSpX routines to determine which torsion values to use. */ -static inline double calculateOrientation(int iX, int iA, int iY, int iB, Frame const& frameIn, std::vector const& hasPosition) +static inline double calculateOrientation(MockAtom const& iX, MockAtom const& iA, MockAtom const& iY, MockAtom const& iB) { double dOrientation = 1.0; - if (hasPosition[iX] && - hasPosition[iA] && - hasPosition[iY] && - hasPosition[iB]) + if (iX.Known() && + iA.Known() && + iY.Known() && + iB.Known()) { - dOrientation = VectorAtomChirality( frameIn.XYZ(iX), frameIn.XYZ(iA), frameIn.XYZ(iY), frameIn.XYZ(iB) ); + dOrientation = VectorAtomChirality( iX.Pos(), iA.Pos(), iY.Pos(), iB.Pos() ); } else { mprinterr("Internal Error: Builder::calculateOrientation not yet set up for unknown positions.\n"); } return dOrientation; } +/** Initialize model torsion for bonded atoms. */ +int Cpptraj::Structure::Builder::TorsionModel::InitTorsion(int ax, int ay, + Frame const& frameIn, + Topology const& topIn, + std::vector const& hasPosition) +{ + if (hasPosition[ax]) + atX_ = MockAtom(ax, frameIn.XYZ(ax)); + else + atX_ = MockAtom(ax); + if (hasPosition[ay]) + atY_ = MockAtom(ay, frameIn.XYZ(ay)); + else + atY_ = MockAtom(ay); + Atom const& AX = topIn[ax]; + Atom const& AY = topIn[ay]; + // Create array of AX bonded atoms + axHasKnownAtoms_ = false; + sorted_ax_.clear(); + sorted_ax_.reserve( AX.Nbonds() - 1 ); + for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) { + if (*bat != ay) { + if (hasPosition[*bat]) { + axHasKnownAtoms_ = true; + sorted_ax_.push_back( MockAtom(*bat, frameIn.XYZ(*bat)) ); + } else + sorted_ax_.push_back( MockAtom(*bat) ); + } + } + // Create array of AY bonded atoms + ayHasKnownAtoms_ = false; + sorted_ay_.clear(); + sorted_ay_.reserve( AY.Nbonds() - 1 ); + for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) { + if (*bat != ax) { + if (hasPosition[*bat]) { + ayHasKnownAtoms_ = true; + sorted_ay_.push_back( MockAtom(*bat, frameIn.XYZ(*bat)) ); + } else + sorted_ay_.push_back( MockAtom(*bat) ); + } + } + return 0; +} + /** Set up model torsion for bonded atoms. */ -int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(int ax, int ay, - AtomType::HybridizationType Hx, +int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::HybridizationType Hx, AtomType::HybridizationType Hy, - Frame const& frameIn, - Topology const& topIn, - std::vector const& hasPosition) + Topology const& topIn) { if (Hx != AtomType::UNKNOWN_HYBRIDIZATION && Hy != AtomType::UNKNOWN_HYBRIDIZATION) { if (Hy > Hx) { @@ -1370,47 +1473,45 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(int ax, int ay, return 1; } } - ax_ = ax; - ay_ = ay; - Atom const& AX = topIn[ax]; - Atom const& AY = topIn[ay]; // Sort AX bonds unsigned int firstUnknownIdxX = 0; - sorted_ax_ = SortBondedAtomsLikeLeap(firstUnknownIdxX, AX, topIn, ay, hasPosition); + sorted_ax_ = SortBondedAtomsLikeLeap(firstUnknownIdxX, topIn, sorted_ax_); // Sort AY bonds unsigned int firstUnknownIdxY = 0; - sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, AY, topIn, ax, hasPosition); + sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, topIn, sorted_ay_); // Calculate the chirality around atom X Xorientation_ = 0; if (Hx == AtomType::SP3) { - Xorientation_ = calculateOrientation( ax, sorted_ax_[0], ay, sorted_ax_[1], frameIn, hasPosition ); + Xorientation_ = calculateOrientation( atX_, sorted_ax_[0], atY_, sorted_ax_[1] ); } // Calculate the chirality around atom Y Yorientation_ = 0; if (Hy == AtomType::SP3) { - Yorientation_ = calculateOrientation( ay, sorted_ay_[0], ax, sorted_ay_[1], frameIn, hasPosition ); + Yorientation_ = calculateOrientation( atY_, sorted_ay_[0], atX_, sorted_ay_[1] ); } // DEBUG + Atom const& AX = topIn[atX_.Idx()]; + Atom const& AY = topIn[atY_.Idx()]; mprintf("Orientation around: %s = %f\n", *(AX.Name()), Xorientation_); //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); - for (Iarray::const_iterator it = sorted_ax_.begin(); it != sorted_ax_.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ax_.begin(), *(topIn[*it].Name())); + for (Marray::const_iterator it = sorted_ax_.begin(); it != sorted_ax_.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ax_.begin(), *(topIn[it->Idx()].Name())); mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation_); //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); - for (Iarray::const_iterator it = sorted_ay_.begin(); it != sorted_ay_.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ay_.begin(), *(topIn[*it].Name())); + for (Marray::const_iterator it = sorted_ay_.begin(); it != sorted_ay_.end(); ++it) + mprintf("Atom %li: %s\n", it - sorted_ay_.begin(), *(topIn[it->Idx()].Name())); // Calculate the actual torsion angle between A-X-Y-D - if (hasPosition[sorted_ax_[0]] && - hasPosition[ax] && - hasPosition[ay] && - hasPosition[sorted_ay_[0]]) + if (sorted_ax_[0].Known() && + atX_.Known() && + atY_.Known() && + sorted_ay_[0].Known()) { - dAbsolute_ = Torsion( frameIn.XYZ(sorted_ax_[0]), - frameIn.XYZ(ax), - frameIn.XYZ(ay), - frameIn.XYZ(sorted_ay_[0]) ); + dAbsolute_ = Torsion( sorted_ax_[0].Pos().Dptr(), + atX_.Pos().Dptr(), + atY_.Pos().Dptr(), + sorted_ay_[0].Pos().Dptr() ); } else { dAbsolute_ = 180.0 * Constants::DEGRAD; } @@ -1418,7 +1519,121 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(int ax, int ay, return 0; } -// ----------------------------------------------- +/** Build mock external coordinates around the given torsion using + * the given internal coordinates. + * By definition, the two central atoms will be the same for each + * IC in iaTorsions. + */ +int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vector const& iaTorsions, + Topology const& topIn) // DEBUG topIn for debug only +{ + if (iaTorsions.empty()) { + mprinterr("Internal Error: Builder::buildMockExternals() called with no internal torsions.\n"); + return 1; + } + mprintf("======= Started mock coords from: %s\n", topIn.LeapName(iaTorsions.front().AtI()).c_str()); + + for (std::vector::const_iterator ic = iaTorsions.begin(); + ic != iaTorsions.end(); ++ic) + mprintf("------- Known torsion: %s - %s - %s - %s %f\n", + topIn.LeapName(ic->AtI()).c_str(), + topIn.LeapName(ic->AtJ()).c_str(), + topIn.LeapName(ic->AtK()).c_str(), + topIn.LeapName(ic->AtL()).c_str(), + ic->Phi()); + + // Define coordinates for the central atoms. + Vec3 posX(0, 0, 0); + Vec3 posY(1, 0, 0); + + // Hold info on X-Y outer atoms + typedef std::vector Marray; + Marray outerAtoms; + + // Define outer atoms + for (std::vector::const_iterator ic = iaTorsions.begin(); + ic != iaTorsions.end(); ++ic) + { + if (ic == iaTorsions.begin()) { + // Define first outer atom as being in the XY plane + outerAtoms.push_back( MockAtom(ic->AtI(), Vec3(1, 1, 0)) ); + } else { + Marray::iterator mi = find_mock_atom( outerAtoms, ic->AtI() ); + if (mi == outerAtoms.end()) + outerAtoms.push_back( MockAtom(ic->AtI()) ); + } + Marray::iterator ml = find_mock_atom( outerAtoms, ic->AtL() ); + if (ml == outerAtoms.end()) + outerAtoms.push_back( MockAtom(ic->AtL()) ); + } + mprintf("DEBUG: Outer atoms:\n"); + for (Marray::const_iterator it = outerAtoms.begin(); it != outerAtoms.end(); ++it) + mprintf("DEBUG:\t\t%i %4s (%i) {%f %f %f}\n", it->Idx()+1, topIn.AtomMaskName(it->Idx()).c_str(), + (int)it->Known(), it->Pos()[0], it->Pos()[1], it->Pos()[2]); + + // Loop through the known torsions looking for those that + // have one position defined, then build coords for the + // other atom and mark the torsion as used. + std::vector used( iaTorsions.size(), false ); + unsigned int nused = 0; + for (unsigned int idx = 0; idx != iaTorsions.size(); idx++) { + //bool gotOne = false; + for (unsigned int jdx = 0; jdx != iaTorsions.size(); jdx++) { + if (!used[jdx]) { + InternalCoords const& iInt = iaTorsions[jdx]; + Marray::iterator tmpAt1 = find_mock_atom(outerAtoms, iInt.AtI()); + Marray::iterator tmpAt4 = find_mock_atom(outerAtoms, iInt.AtL()); + if (tmpAt1 == outerAtoms.end()) { + mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom I %i not found.\n", iInt.AtI()+1); + return 1; + } + if (tmpAt4 == outerAtoms.end()) { + mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom L %i not found.\n", iInt.AtL()+1); + return 1; + } + Vec3 maPC1, maPC2; + Marray::iterator tgt = outerAtoms.end(); + Marray::iterator knownAt = outerAtoms.end(); + if (tmpAt4->Known()) { + tgt = tmpAt1; + maPC1 = posX; + maPC2 = posY; + knownAt = tmpAt4; + } else if (tmpAt1->Known()) { + //gotOne = true; // FIXME needed? + tgt = tmpAt4; + maPC1 = posY; + maPC2 = posX; + knownAt = tmpAt1; + } + if (tgt != outerAtoms.end()) { + //gotOne = true; + mprintf("======= Building mock coord for: %s\n", topIn.LeapName(tgt->Idx()).c_str()); + mprintf("======= Using torsion: %s - %s - %s - %s (p1known= %i, p4known= %i)\n", + topIn.LeapName(iInt.AtI()).c_str(), + topIn.LeapName(iInt.AtJ()).c_str(), + topIn.LeapName(iInt.AtK()).c_str(), + topIn.LeapName(iInt.AtL()).c_str(), + (int)tmpAt1->Known(), (int)tmpAt4->Known()); + // Now build the coordinate for the target atom + tgt->SetPos( Zmatrix::AtomIposition(maPC1, maPC2, knownAt->Pos(), 1.0, 90.0, iInt.Phi()) ); + mprintf("ZMatrixAll: %f,%f,%f\n", tgt->Pos()[0], tgt->Pos()[1], tgt->Pos()[2]); + used[jdx] = true; + nused++; + break; + } + } // END IC not yet used + } // END inner loop over ICs + } // END outer loop over ICs + if (nused < used.size()) { + mprinterr("Error: There are %u torsions left over for mock coords.\n", used.size() - nused); + return 1; + } + + return 0; +} + +// ----------------------------------------------------------------------------- /** Model torsion */ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dvalIn) { @@ -1426,11 +1641,11 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned iBondY >= MT.SortedAy().size()) return; mprintf("CALLING ModelTorsion for iBondX=%u iBondY=%u dVal=%g\n",iBondX,iBondY,dvalIn*Constants::RADDEG); - int aa = MT.SortedAx()[iBondX]; - int ax = MT.AtX(); - int ay = MT.AtY(); - int ad = MT.SortedAy()[iBondY]; - // Get bond lengths + int aa = MT.SortedAx()[iBondX].Idx(); + int ax = MT.AtX().Idx(); + int ay = MT.AtY().Idx(); + int ad = MT.SortedAy()[iBondY].Idx(); + // Get bond lengths FIXME deal with unknown positions double l0, l1; if (AssignLength(l0, aa, ax, *currentTop_, *currentFrm_, *hasPosition_)) { mprinterr("Error: Could not assign length between %s and %s\n", @@ -1463,16 +1678,21 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned // If the coordinates for the atoms are defined then // measure the torsion angle between them and use that for // the internal. + MockAtom const& AA = MT.SortedAx()[iBondX]; + MockAtom const& AX = MT.AtX(); + MockAtom const& AY = MT.AtY(); + MockAtom const& AD = MT.SortedAy()[iBondY]; + double phiVal = dvalIn; - if ((*hasPosition_)[aa] && - (*hasPosition_)[ax] && - (*hasPosition_)[ay] && - (*hasPosition_)[ad]) + if (AA.Known() && + AX.Known() && + AY.Known() && + AD.Known()) { - phiVal = Torsion( currentFrm_->XYZ(aa), - currentFrm_->XYZ(ax), - currentFrm_->XYZ(ay), - currentFrm_->XYZ(ad) ); + phiVal = Torsion( AA.Pos().Dptr(), + AX.Pos().Dptr(), + AY.Pos().Dptr(), + AD.Pos().Dptr() ); } else { mprinterr("Internal Error: Need to implement torsion lookup.\n"); } @@ -1613,147 +1833,6 @@ std::vector Builder::getExistingInternals(int ax, int ay) const return iTorsions; } -/// Used to track atoms for mock externals -class MockAtom { - public: - /// CONSTRUCTOR - index, position - MockAtom(int idx, Vec3 const& pos) : idx_(idx), pos_(pos), known_(true) {} - /// CONSTRUCTOR - index, unknown position - MockAtom(int idx) : idx_(idx), pos_(0.0), known_(false) {} - /// Set position - void SetPos(Vec3 const& p) { pos_ = p; known_ = true; } - - int Idx() const { return idx_; } - Vec3 const& Pos() const { return pos_; } - bool Known() const { return known_; } - private: - int idx_; ///< Atom index - Vec3 pos_; ///< Atom mock position - bool known_; ///< True if atom position is known -}; - -/// Used to find mock atom -static inline std::vector::iterator find_mock_atom(std::vector& outerAtoms, int idx) -{ - std::vector::iterator it = outerAtoms.begin(); - for (; it != outerAtoms.end(); ++it) - if (it->Idx() == idx) return it; - return outerAtoms.end(); -} - -/** Build mock external coordinates around the given torsion using - * the given internal coordinates. - * By definition, the two central atoms will be the same for each - * IC in iaTorsions. - */ -int Builder::buildMockExternals(TorsionModel& mT, std::vector const& iaTorsions) -const -{ - if (iaTorsions.empty()) { - mprinterr("Internal Error: Builder::buildMockExternals() called with no internal torsions.\n"); - return 1; - } - mprintf("======= Started mock coords from: %s\n", currentTop_->LeapName(iaTorsions.front().AtI()).c_str()); - - for (std::vector::const_iterator ic = iaTorsions.begin(); - ic != iaTorsions.end(); ++ic) - mprintf("------- Known torsion: %s - %s - %s - %s %f\n", - currentTop_->LeapName(ic->AtI()).c_str(), - currentTop_->LeapName(ic->AtJ()).c_str(), - currentTop_->LeapName(ic->AtK()).c_str(), - currentTop_->LeapName(ic->AtL()).c_str(), - ic->Phi()); - - // Define coordinates for the central atoms. - Vec3 posX(0, 0, 0); - Vec3 posY(1, 0, 0); - - // Hold info on X-Y outer atoms - typedef std::vector Marray; - Marray outerAtoms; - - // Define outer atoms - for (std::vector::const_iterator ic = iaTorsions.begin(); - ic != iaTorsions.end(); ++ic) - { - if (ic == iaTorsions.begin()) { - // Define first outer atom as being in the XY plane - outerAtoms.push_back( MockAtom(ic->AtI(), Vec3(1, 1, 0)) ); - } else { - Marray::iterator mi = find_mock_atom( outerAtoms, ic->AtI() ); - if (mi == outerAtoms.end()) - outerAtoms.push_back( MockAtom(ic->AtI()) ); - } - Marray::iterator ml = find_mock_atom( outerAtoms, ic->AtL() ); - if (ml == outerAtoms.end()) - outerAtoms.push_back( MockAtom(ic->AtL()) ); - } - mprintf("DEBUG: Outer atoms:\n"); - for (Marray::const_iterator it = outerAtoms.begin(); it != outerAtoms.end(); ++it) - mprintf("DEBUG:\t\t%i %4s (%i) {%f %f %f}\n", it->Idx()+1, currentTop_->AtomMaskName(it->Idx()).c_str(), - (int)it->Known(), it->Pos()[0], it->Pos()[1], it->Pos()[2]); - - // Loop through the known torsions looking for those that - // have one position defined, then build coords for the - // other atom and mark the torsion as used. - std::vector used( iaTorsions.size(), false ); - unsigned int nused = 0; - for (unsigned int idx = 0; idx != iaTorsions.size(); idx++) { - //bool gotOne = false; - for (unsigned int jdx = 0; jdx != iaTorsions.size(); jdx++) { - if (!used[jdx]) { - InternalCoords const& iInt = iaTorsions[jdx]; - Marray::iterator tmpAt1 = find_mock_atom(outerAtoms, iInt.AtI()); - Marray::iterator tmpAt4 = find_mock_atom(outerAtoms, iInt.AtL()); - if (tmpAt1 == outerAtoms.end()) { - mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom I %i not found.\n", iInt.AtI()+1); - return 1; - } - if (tmpAt4 == outerAtoms.end()) { - mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom L %i not found.\n", iInt.AtL()+1); - return 1; - } - Vec3 maPC1, maPC2; - Marray::iterator tgt = outerAtoms.end(); - Marray::iterator knownAt = outerAtoms.end(); - if (tmpAt4->Known()) { - tgt = tmpAt1; - maPC1 = posX; - maPC2 = posY; - knownAt = tmpAt4; - } else if (tmpAt1->Known()) { - //gotOne = true; // FIXME needed? - tgt = tmpAt4; - maPC1 = posY; - maPC2 = posX; - knownAt = tmpAt1; - } - if (tgt != outerAtoms.end()) { - //gotOne = true; - mprintf("======= Building mock coord for: %s\n", currentTop_->LeapName(tgt->Idx()).c_str()); - mprintf("======= Using torsion: %s - %s - %s - %s (p1known= %i, p4known= %i)\n", - currentTop_->LeapName(iInt.AtI()).c_str(), - currentTop_->LeapName(iInt.AtJ()).c_str(), - currentTop_->LeapName(iInt.AtK()).c_str(), - currentTop_->LeapName(iInt.AtL()).c_str(), - (int)tmpAt1->Known(), (int)tmpAt4->Known()); - // Now build the coordinate for the target atom - tgt->SetPos( Zmatrix::AtomIposition(maPC1, maPC2, knownAt->Pos(), 1.0, 90.0, iInt.Phi()) ); - mprintf("ZMatrixAll: %f,%f,%f\n", tgt->Pos()[0], tgt->Pos()[1], tgt->Pos()[2]); - used[jdx] = true; - nused++; - break; - } - } // END IC not yet used - } // END inner loop over ICs - } // END outer loop over ICs - if (nused < used.size()) { - mprinterr("Error: There are %u torsions left over for mock coords.\n", used.size() - nused); - return 1; - } - - return 0; -} /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) @@ -1815,26 +1894,17 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", topIn.AtomMaskName(ax).c_str(), hstr[Hx], topIn.AtomMaskName(ay).c_str(), hstr[Hy]); + TorsionModel mT; + if (mT.InitTorsion( ax, ay, frameIn, topIn, hasPosition )) { + mprinterr("Error: Could not init model torsion.\n"); + return 1; + } // Check if there is at least one atom on either side of the ax-ay pair // whose position is known. - Atom const& AX = topIn[ax]; - Atom const& AY = topIn[ay]; - bool axHasKnownAtoms = false; - for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) { - if (*bat != ay && hasPosition[*bat]) { - axHasKnownAtoms = true; - break; - } - } - bool ayHasKnownAtoms = false; - for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) { - if (*bat != ax && hasPosition[*bat]) { - ayHasKnownAtoms = true; - break; - } - } - mprintf("bKnownX=%i bKnownY=%i\n", (int)axHasKnownAtoms, (int)ayHasKnownAtoms); - if (!(axHasKnownAtoms && ayHasKnownAtoms)) { + //Atom const& AX = topIn[ax]; + //Atom const& AY = topIn[ay]; + mprintf("bKnownX=%i bKnownY=%i\n", (int)mT.AxHasKnownAtoms(), (int)mT.AyHasKnownAtoms()); + if (!(mT.AxHasKnownAtoms() && mT.AyHasKnownAtoms())) { // Find any existing internal coords around ax-ay std::vector iTorsions = getExistingInternals(ax, ay); if (!iTorsions.empty()) { @@ -1842,50 +1912,50 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); //for (std::vector::const_iterator ic = iTorsions.begin(); ic != iTorsions.end(); ++ic) // ic->printIC( topIn ); - TorsionModel mT(ax, ay); - if (buildMockExternals(mT, iTorsions)) { + if (mT.BuildMockExternals(iTorsions, topIn)) { mprinterr("Error: Building mock externals around %s - %s failed.\n", topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str()); return 1; } + return 0; // FIXME DEBUG } else { mprintf("Completely free in assigning new torsions for: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + return 0; // FIXME DEBUG } } else { // Use existing atoms to determine torsions mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); + } - TorsionModel mT; - if (mT.SetupTorsion(ax, ay, Hx, Hy, frameIn, topIn, hasPosition)) { - mprinterr("Error: Could not set up torsions around %s - %s\n", - topIn.LeapName(ax).c_str(), - topIn.LeapName(ay).c_str()); - return 1; - } - - // Build the new internals - if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { - mprintf("SP3 SP3\n"); - createSp3Sp3Torsions(mT); - } else if (Hx == AtomType::SP3 && Hy == AtomType::SP2) { - mprintf("SP3 SP2\n"); - createSp3Sp2Torsions(mT); - } else if (Hx == AtomType::SP2 && Hy == AtomType::SP2) { - mprintf("SP2 SP2\n"); - createSp2Sp2Torsions(mT); - } else { - mprinterr("Error: Currently only Sp3-Sp3/Sp3-Sp2/Sp2-Sp2 are supported\n" - "Error: ---Tried to superimpose torsions for: *-%s-%s-*\n" - "Error: --- With %s - %s\n" - "Error: --- Sp0 probably means a new atom type is involved\n" - "Error: --- which needs to be defined prior to this routine.\n", - topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str(), - hstr[Hx], hstr[Hy]); - return 1; - } + if (mT.SetupTorsion(Hx, Hy, topIn)) { + mprinterr("Error: Could not set up torsions around %s - %s\n", + topIn.LeapName(ax).c_str(), + topIn.LeapName(ay).c_str()); + return 1; + } + + // Build the new internals + if (Hx == AtomType::SP3 && Hy == AtomType::SP3) { + mprintf("SP3 SP3\n"); + createSp3Sp3Torsions(mT); + } else if (Hx == AtomType::SP3 && Hy == AtomType::SP2) { + mprintf("SP3 SP2\n"); + createSp3Sp2Torsions(mT); + } else if (Hx == AtomType::SP2 && Hy == AtomType::SP2) { + mprintf("SP2 SP2\n"); + createSp2Sp2Torsions(mT); + } else { + mprinterr("Error: Currently only Sp3-Sp3/Sp3-Sp2/Sp2-Sp2 are supported\n" + "Error: ---Tried to superimpose torsions for: *-%s-%s-*\n" + "Error: --- With %s - %s\n" + "Error: --- Sp0 probably means a new atom type is involved\n" + "Error: --- which needs to be defined prior to this routine.\n", + topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str(), + hstr[Hx], hstr[Hy]); + return 1; } return 0; From 94fe32591fe59a4915147f4ea90ae7591330e314 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 16:23:48 -0500 Subject: [PATCH 0452/1492] Set outer atom positions unknown --- src/Structure/Builder.cpp | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 42110cd58c..22886d03ca 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1214,6 +1214,8 @@ class MockAtom { MockAtom(int idx) : idx_(idx), pos_(0.0), known_(false) {} /// Set position void SetPos(Vec3 const& p) { pos_ = p; known_ = true; } + /// Set unknown + void SetUnknown() { pos_ = Vec3(0.0); known_ = false; } int Idx() const { return idx_; } Vec3 const& Pos() const { return pos_; } @@ -1224,15 +1226,6 @@ class MockAtom { bool known_; ///< True if atom position is known }; -/// Used to find mock atom -static inline std::vector::iterator find_mock_atom(std::vector& outerAtoms, int idx) -{ - std::vector::iterator it = outerAtoms.begin(); - for (; it != outerAtoms.end(); ++it) - if (it->Idx() == idx) return it; - return outerAtoms.end(); -} - // ----------------------------------------------- /** Store info for modelling torsions around X-Y */ class Cpptraj::Structure::Builder::TorsionModel { @@ -1519,6 +1512,15 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat return 0; } +/// Used to find mock atom +static inline std::vector::iterator find_mock_atom(std::vector& outerAtoms, int idx) +{ + std::vector::iterator it = outerAtoms.begin(); + for (; it != outerAtoms.end(); ++it) + if (it->Idx() == idx) return it; + return outerAtoms.end(); +} + /** Build mock external coordinates around the given torsion using * the given internal coordinates. * By definition, the two central atoms will be the same for each @@ -1543,10 +1545,20 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vectorPhi()); // Define coordinates for the central atoms. - Vec3 posX(0, 0, 0); - Vec3 posY(1, 0, 0); - - // Hold info on X-Y outer atoms + //Vec3 posX(0, 0, 0); + //Vec3 posY(1, 0, 0); + atX_.SetPos( Vec3(0, 0, 0) ); + atY_.SetPos( Vec3(1, 0, 0) ); + Vec3 const& posX = atX_.Pos(); + Vec3 const& posY = atY_.Pos(); + + // Tell the outer atoms they do not have defined positions. + for (Marray::iterator it = sorted_ax_.begin(); it != sorted_ax_.end(); ++it) + it->SetUnknown(); + for (Marray::iterator it = sorted_ay_.begin(); it != sorted_ay_.end(); ++it) + it->SetUnknown(); + +// // Hold info on X-Y outer atoms typedef std::vector Marray; Marray outerAtoms; From 8c7fd1af617f1666c63a70a9e87326718326c72f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 16:31:49 -0500 Subject: [PATCH 0453/1492] Add code to update the outer atoms of the TorsionModel --- src/Structure/Builder.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 22886d03ca..6668b9b0fc 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1641,6 +1641,24 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vectorIdx()+1, topIn.AtomMaskName(it->Idx()).c_str(), + (int)it->Known(), it->Pos()[0], it->Pos()[1], it->Pos()[2]); + Marray::iterator itx = find_mock_atom(sorted_ax_, it->Idx()); + if (itx != sorted_ax_.end()) { + *itx = *it; + } else { + itx = find_mock_atom(sorted_ay_, it->Idx()); + if (itx != sorted_ay_.end()) { + *itx = *it; + } else { + mprinterr("Internal Error: TorsionModel::BuildMockExternals(): Could not update mock atom.\n"); + return 1; + } + } + } return 0; } From af6a010b22de91b878681797657d6d5a2b34aba1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 16:40:00 -0500 Subject: [PATCH 0454/1492] Test the model coords --- src/Structure/Builder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 6668b9b0fc..401da3643f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1947,7 +1947,7 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str()); return 1; } - return 0; // FIXME DEBUG + //return 0; // FIXME DEBUG } else { mprintf("Completely free in assigning new torsions for: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); From 9b754d9b1716b059cdd998134391ce1bc5f94850 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 6 Feb 2024 16:44:57 -0500 Subject: [PATCH 0455/1492] Start code for restricting which atoms get ICs assigned --- src/Structure/Builder.cpp | 10 +++++----- src/Structure/Builder.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 401da3643f..e524130edd 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1865,7 +1865,7 @@ std::vector Builder::getExistingInternals(int ax, int ay) const /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ -int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) { // Save addresses of zmatrix, frame, topology, and hasPosition. // These are required for the createSpXSpX routines. TODO zero them at the end? @@ -1921,9 +1921,9 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co Hy = H2; } static const char* hstr[] = { "SP", "SP2", "SP3", "Unknown" }; - mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s)\n", + mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s), aAtomIdx= %i\n", topIn.AtomMaskName(ax).c_str(), hstr[Hx], - topIn.AtomMaskName(ay).c_str(), hstr[Hy]); + topIn.AtomMaskName(ay).c_str(), hstr[Hy], aAtomIdx); TorsionModel mT; if (mT.InitTorsion( ax, ay, frameIn, topIn, hasPosition )) { mprinterr("Error: Could not init model torsion.\n"); @@ -2003,7 +2003,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { - if (assignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition )) { + if (assignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition, -1 )) { mprinterr("Error Assign torsions around bond %s - %s failed.\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); @@ -2034,7 +2034,7 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& mprintf("ISHOULDBE= %i ITORSIONS= %zu\n", iShouldBe, iTorsions.size()); if (iShouldBe != (int)iTorsions.size()) { Zmatrix tmpz; // FIXME - assignTorsionsAroundBond(tmpz, *bat, *cat, frameIn, topIn, hasPosition); + assignTorsionsAroundBond(tmpz, *bat, *cat, frameIn, topIn, hasPosition, at); } } } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 8897d5f6f4..d2ae985d9c 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -72,7 +72,7 @@ class Builder { /// Create ICs around SP2-SP2 linkage void createSp2Sp2Torsions(TorsionModel const&); /// Model torsions around a bond in the same manner as LEaP - int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); + int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&, int); /// Get any existing internal coords from currentZmatrix around specified atoms std::vector getExistingInternals(int, int) const; /// Build mock coordinates around given torsion From 88fbcaaf1a5804ce24e33504621d0de26bcf1821 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 09:50:34 -0500 Subject: [PATCH 0456/1492] Implement search for existing torsions. Indicate whether internals actually need to be built for atoms or not. --- src/Structure/Builder.cpp | 194 ++++++++++++++++++++++---------------- src/Structure/Builder.h | 2 + 2 files changed, 113 insertions(+), 83 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index e524130edd..db85441237 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1207,23 +1207,27 @@ const class MockAtom { public: /// CONSTRUCTOR - MockAtom() : idx_(-1), pos_(0.0), known_(false) {} + MockAtom() : idx_(-1), pos_(0.0), known_(false), buildInternals_(false) {} /// CONSTRUCTOR - index, position - MockAtom(int idx, Vec3 const& pos) : idx_(idx), pos_(pos), known_(true) {} + MockAtom(int idx, Vec3 const& pos) : idx_(idx), pos_(pos), known_(true), buildInternals_(false) {} /// CONSTRUCTOR - index, unknown position - MockAtom(int idx) : idx_(idx), pos_(0.0), known_(false) {} + MockAtom(int idx) : idx_(idx), pos_(0.0), known_(false), buildInternals_(false) {} /// Set position void SetPos(Vec3 const& p) { pos_ = p; known_ = true; } - /// Set unknown + /// Set position status to unknown void SetUnknown() { pos_ = Vec3(0.0); known_ = false; } + /// Set build internals status + void SetBuildInternals(bool b) { buildInternals_ = b; } int Idx() const { return idx_; } Vec3 const& Pos() const { return pos_; } bool Known() const { return known_; } + bool BuildInternals() const { return buildInternals_; } private: int idx_; ///< Atom index Vec3 pos_; ///< Atom position bool known_; ///< True if atom position is known + bool buildInternals_; ///< True if internals should be built for this atom }; // ----------------------------------------------- @@ -1236,7 +1240,7 @@ class Cpptraj::Structure::Builder::TorsionModel { /// CONSTRUCTOR - AX and AY atom indices //TorsionModel(int ax, int ay) : ax_(ax), ay_(ay), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} /// Initialize torsions around bonded atoms - int InitTorsion(int, int, Frame const&, Topology const&, std::vector const&); + int InitTorsion(int, int, Frame const&, Topology const&, std::vector const&, int); /// Set up torsions around bonded atoms int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn); /// Build mock externals from given internals @@ -1414,7 +1418,8 @@ static inline double calculateOrientation(MockAtom const& iX, MockAtom const& iA int Cpptraj::Structure::Builder::TorsionModel::InitTorsion(int ax, int ay, Frame const& frameIn, Topology const& topIn, - std::vector const& hasPosition) + std::vector const& hasPosition, + int aAtomIdx) { if (hasPosition[ax]) atX_ = MockAtom(ax, frameIn.XYZ(ax)); @@ -1437,6 +1442,7 @@ int Cpptraj::Structure::Builder::TorsionModel::InitTorsion(int ax, int ay, sorted_ax_.push_back( MockAtom(*bat, frameIn.XYZ(*bat)) ); } else sorted_ax_.push_back( MockAtom(*bat) ); + sorted_ax_.back().SetBuildInternals( (aAtomIdx == -1 || aAtomIdx == *bat) ); } } // Create array of AY bonded atoms @@ -1450,6 +1456,7 @@ int Cpptraj::Structure::Builder::TorsionModel::InitTorsion(int ax, int ay, sorted_ay_.push_back( MockAtom(*bat, frameIn.XYZ(*bat)) ); } else sorted_ay_.push_back( MockAtom(*bat) ); + sorted_ay_.back().SetBuildInternals( (aAtomIdx == -1 || aAtomIdx == *bat) ); } } return 0; @@ -1489,12 +1496,12 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); for (Marray::const_iterator it = sorted_ax_.begin(); it != sorted_ax_.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ax_.begin(), *(topIn[it->Idx()].Name())); + mprintf("Atom %li: %s (%i) (build=%i)\n", it - sorted_ax_.begin(), *(topIn[it->Idx()].Name()), (int)it->Known(), (int)it->BuildInternals()); mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation_); //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); for (Marray::const_iterator it = sorted_ay_.begin(); it != sorted_ay_.end(); ++it) - mprintf("Atom %li: %s\n", it - sorted_ay_.begin(), *(topIn[it->Idx()].Name())); + mprintf("Atom %li: %s (%i) (build=%i)\n", it - sorted_ay_.begin(), *(topIn[it->Idx()].Name()), (int)it->Known(), (int)it->BuildInternals()); // Calculate the actual torsion angle between A-X-Y-D if (sorted_ax_[0].Known() && atX_.Known() && @@ -1641,18 +1648,18 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vectorIdx()+1, topIn.AtomMaskName(it->Idx()).c_str(), (int)it->Known(), it->Pos()[0], it->Pos()[1], it->Pos()[2]); Marray::iterator itx = find_mock_atom(sorted_ax_, it->Idx()); if (itx != sorted_ax_.end()) { - *itx = *it; + itx->SetPos( it->Pos() ); } else { itx = find_mock_atom(sorted_ay_, it->Idx()); if (itx != sorted_ay_.end()) { - *itx = *it; + itx->SetPos( it->Pos() ); } else { mprinterr("Internal Error: TorsionModel::BuildMockExternals(): Could not update mock atom.\n"); return 1; @@ -1664,6 +1671,37 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vector Builder::getExistingInternals(int ax, int ay) const { + std::vector iTorsions; + if (currentZmatrix_ != 0) { + for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) + { + if (it->AtJ() == ax && it->AtK() == ay) { + iTorsions.push_back( *it ); + } + } + } + return iTorsions; +} + +/** \return index of internal coords matching the 4 given atoms, -1 for no match. */ // TODO put in Zmatrix? +int Builder::getExistingInternalIdx(int ai, int aj, int ak, int al) const { + int idx = -1; + if (currentZmatrix_ != 0) { + for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) + { + if ( (it->AtI() == ai && it->AtJ() == aj && it->AtK() == ak && it->AtL() == al) || + (it->AtI() == al && it->AtJ() == ak && it->AtK() == aj && it->AtL() == ai) ) + { + idx = (int)(currentZmatrix_->begin() - it); + break; + } + } + } + return idx; +} + /** Model torsion */ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dvalIn) { @@ -1671,48 +1709,21 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned iBondY >= MT.SortedAy().size()) return; mprintf("CALLING ModelTorsion for iBondX=%u iBondY=%u dVal=%g\n",iBondX,iBondY,dvalIn*Constants::RADDEG); - int aa = MT.SortedAx()[iBondX].Idx(); - int ax = MT.AtX().Idx(); - int ay = MT.AtY().Idx(); - int ad = MT.SortedAy()[iBondY].Idx(); - // Get bond lengths FIXME deal with unknown positions - double l0, l1; - if (AssignLength(l0, aa, ax, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign length between %s and %s\n", - currentTop_->AtomMaskName(aa).c_str(), - currentTop_->AtomMaskName(ax).c_str()); - return; - } - if (AssignLength(l1, ad, ay, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign length between %s and %s\n", - currentTop_->AtomMaskName(ad).c_str(), - currentTop_->AtomMaskName(ay).c_str()); - return; - } - // Get angles - double t0, t1; - if (AssignTheta(t0, aa, ax, ay, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign angle between %s and %s and %s\n", - currentTop_->AtomMaskName(aa).c_str(), - currentTop_->AtomMaskName(ax).c_str(), - currentTop_->AtomMaskName(ay).c_str()); - return; - } - if (AssignTheta(t1, ad, ay, ax, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign angle between %s and %s and %s\n", - currentTop_->AtomMaskName(ad).c_str(), - currentTop_->AtomMaskName(ay).c_str(), - currentTop_->AtomMaskName(ax).c_str()); + MockAtom const& AA = MT.SortedAx()[iBondX]; + MockAtom const& AX = MT.AtX(); + MockAtom const& AY = MT.AtY(); + MockAtom const& AD = MT.SortedAy()[iBondY]; + if ( !(AA.BuildInternals() || AD.BuildInternals()) ) { + mprintf("%s does not need internals.\n", *((*currentTop_)[AA.Idx()].Name())); return; } + int aa = AA.Idx(); + int ax = AX.Idx(); + int ay = AY.Idx(); + int ad = AD.Idx(); // If the coordinates for the atoms are defined then // measure the torsion angle between them and use that for // the internal. - MockAtom const& AA = MT.SortedAx()[iBondX]; - MockAtom const& AX = MT.AtX(); - MockAtom const& AY = MT.AtY(); - MockAtom const& AD = MT.SortedAy()[iBondY]; - double phiVal = dvalIn; if (AA.Known() && AX.Known() && @@ -1723,16 +1734,52 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned AX.Pos().Dptr(), AY.Pos().Dptr(), AD.Pos().Dptr() ); + mprintf(" %s replacing dval with %f\n", currentTop_->LeapName(aa).c_str(), phiVal*Constants::RADDEG); + } + // Look for an existing internal + int icIdx = getExistingInternalIdx( aa, ax, ay, ad ); + if (icIdx < 0) { + // Get bond lengths FIXME deal with unknown positions + double l0, l1; + if (AssignLength(l0, aa, ax, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign length between %s and %s\n", + currentTop_->AtomMaskName(aa).c_str(), + currentTop_->AtomMaskName(ax).c_str()); + return; + } + if (AssignLength(l1, ad, ay, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign length between %s and %s\n", + currentTop_->AtomMaskName(ad).c_str(), + currentTop_->AtomMaskName(ay).c_str()); + return; + } + // Get angles + double t0, t1; + if (AssignTheta(t0, aa, ax, ay, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign angle between %s and %s and %s\n", + currentTop_->AtomMaskName(aa).c_str(), + currentTop_->AtomMaskName(ax).c_str(), + currentTop_->AtomMaskName(ay).c_str()); + return; + } + if (AssignTheta(t1, ad, ay, ax, *currentTop_, *currentFrm_, *hasPosition_)) { + mprinterr("Error: Could not assign angle between %s and %s and %s\n", + currentTop_->AtomMaskName(ad).c_str(), + currentTop_->AtomMaskName(ay).c_str(), + currentTop_->AtomMaskName(ax).c_str()); + return; + } + + mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", phiVal*Constants::RADDEG, + currentTop_->LeapName(aa).c_str(), + currentTop_->LeapName(ax).c_str(), + currentTop_->LeapName(ay).c_str(), + currentTop_->LeapName(ad).c_str()); + newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); + newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); } else { - mprinterr("Internal Error: Need to implement torsion lookup.\n"); - } - mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", phiVal*Constants::RADDEG, - currentTop_->LeapName(aa).c_str(), - currentTop_->LeapName(ax).c_str(), - currentTop_->LeapName(ay).c_str(), - currentTop_->LeapName(ad).c_str()); - newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); - newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); + mprintf( "Torsional INTERNAL already exists\n" ); + } } /** Create torsions around SP3-SP3. */ @@ -1849,21 +1896,6 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { return; } -/** Find any existing internal coords around ax-ay. */ -std::vector Builder::getExistingInternals(int ax, int ay) const { - std::vector iTorsions; - if (currentZmatrix_ != 0) { - for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) - { - if (it->AtJ() == ax && it->AtK() == ay) { - iTorsions.push_back( *it ); - } - } - } - return iTorsions; -} - - /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) { @@ -1921,11 +1953,13 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co Hy = H2; } static const char* hstr[] = { "SP", "SP2", "SP3", "Unknown" }; - mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s), aAtomIdx= %i\n", + mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s), aAtomIdx= %i", topIn.AtomMaskName(ax).c_str(), hstr[Hx], - topIn.AtomMaskName(ay).c_str(), hstr[Hy], aAtomIdx); + topIn.AtomMaskName(ay).c_str(), hstr[Hy], aAtomIdx+1); + if (aAtomIdx != -1) mprintf(" %s", topIn.AtomMaskName(aAtomIdx).c_str()); // DEBUG + mprintf("\n"); // DEBUG TorsionModel mT; - if (mT.InitTorsion( ax, ay, frameIn, topIn, hasPosition )) { + if (mT.InitTorsion( ax, ay, frameIn, topIn, hasPosition, aAtomIdx )) { mprinterr("Error: Could not init model torsion.\n"); return 1; } @@ -2062,18 +2096,12 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, return 1; } // In order to mimic the way LEaP does things, mark all atoms before - // this residue as having position, the first known atom of this residue - // has having position, and all other atoms as not having position. + // this residue as having position, and all other atoms as not having + // position. Residue const& R0 = topIn.Res(A0.ResNum()); Barray tmpHasPosition( topIn.Natom(), false ); for (int at = 0; at < R0.FirstAtom(); at++) tmpHasPosition[at] = true; - for (int at = R0.FirstAtom(); at != R0.LastAtom(); at++) { - if (hasPosition[at]) { - tmpHasPosition[at] = true; - break; - } - } // Create spanning tree across the link std::vector span_atoms = GenerateSpanningTree(at0, at1, 4, topIn.Atoms()); for (std::vector::const_iterator it = span_atoms.begin(); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index d2ae985d9c..8c40d5a179 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -75,6 +75,8 @@ class Builder { int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&, int); /// Get any existing internal coords from currentZmatrix around specified atoms std::vector getExistingInternals(int, int) const; + /// Get specific internal coords from currentZmatrix + int getExistingInternalIdx(int, int, int, int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Generate internal coords for a given atom From e00896e690f74de1f0ea90c2625dbc22d9d2ae24 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 10:47:45 -0500 Subject: [PATCH 0457/1492] Add more debug --- src/Structure/Builder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index db85441237..9060386c5a 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1778,7 +1778,7 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); } else { - mprintf( "Torsional INTERNAL already exists\n" ); + mprintf( "Torsional INTERNAL already exists: %f\n", (*currentZmatrix_)[icIdx].Phi() ); } } @@ -1985,7 +1985,7 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co } else { mprintf("Completely free in assigning new torsions for: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); - return 0; // FIXME DEBUG + //return 0; // FIXME DEBUG } } else { // Use existing atoms to determine torsions From a6dc13fd6e54ac579ba82ce13cb6e78729ae9b6a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 11:12:52 -0500 Subject: [PATCH 0458/1492] Generate spanning tree in exactly the same way as leap (without the recursion) --- src/Structure/GenerateConnectivityArrays.cpp | 53 +++++++++----------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 9dada227b4..d81ccc13d0 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -60,34 +60,7 @@ BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& resi return out; } -static inline void visit_tree_atom(std::vector& out, - int at, int targetDepth, int currentDepth, - std::vector& atomSeen, - std::vector const& atoms) -{ - if (currentDepth == targetDepth) return; - if (!atomSeen[at]) { - out.push_back( at ); - atomSeen[at] = true; - } - for (Atom::bond_iterator bat = atoms[at].bondbegin(); - bat != atoms[at].bondend(); - ++bat) - { - if (!atomSeen[*bat]) { - out.push_back( *bat ); - atomSeen[*bat] = true; - } - } - for (Atom::bond_iterator bat = atoms[at].bondbegin(); - bat != atoms[at].bondend(); - ++bat) - { - if (atoms[*bat].Nbonds() > 1) - visit_tree_atom(out, *bat, targetDepth, currentDepth+1, atomSeen, atoms); - } -} - +/** Generate a spanning tree around two atoms in the same manner as LEaP. */ // FIXME at1 not strictly needed std::vector Cpptraj::Structure::GenerateSpanningTree(int at0, int at1, int targetDepth, std::vector const& atoms) { @@ -95,7 +68,29 @@ std::vector Cpptraj::Structure::GenerateSpanningTree(int at0, int at1, int std::vector atomSeen(atoms.size(), false); - visit_tree_atom(out, at0, targetDepth, 0, atomSeen, atoms); + std::vector queue; + std::vector depth; + + out.push_back( at0 ); + queue.push_back( at0 ); + depth.push_back( 0 ); + atomSeen[at0] = true; + unsigned int idx = 0; + while (idx < queue.size()) { + Atom const& currentAt = atoms[queue[idx]]; + for (Atom::bond_iterator bat = currentAt.bondbegin(); bat != currentAt.bondend(); ++bat) + { + if (!atomSeen[*bat]) { + out.push_back( *bat ); + atomSeen[*bat] = true; + if (depth[idx] + 1 < targetDepth && atoms[*bat].Nbonds() > 1) { + queue.push_back( *bat ); + depth.push_back( depth[idx]+1 ); + } + } + } + idx++; + } return out; } From 91979ececb10b2562ed066203301931469fc80d1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 13:26:16 -0500 Subject: [PATCH 0459/1492] Only use structureBuilder --- src/Exec_Build.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index b2ed9419aa..3e73ffdce7 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -395,9 +395,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, resIsBuilt.push_back( false ); } - Cpptraj::Structure::Builder linkBuilder; - linkBuilder.SetDebug( 1 ); // FIXME - linkBuilder.SetParameters( &mainParmSet ); +// Cpptraj::Structure::Builder linkBuilder; +// linkBuilder.SetDebug( 1 ); // FIXME +// linkBuilder.SetParameters( &mainParmSet ); bool buildFailed = false; TermTypeArray::const_iterator termType = ResTypes.begin(); // FIXME is termType needed? for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) @@ -411,7 +411,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); zmatrix->print(&topOut); - linkBuilder.SetZmatrix( zmatrix ); +// linkBuilder.SetZmatrix( zmatrix ); // Is this residue connected to an earlier residue? for (IParray::const_iterator resBonds = resBondingAtoms[ires].begin(); resBonds != resBondingAtoms[ires].end(); ++resBonds) @@ -463,7 +463,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // return 1; // } // Update internal coords from known positions - if (linkBuilder.UpdateICsFromFrame( *zmatrix, frameOut, ires, topOut, hasPosition )) { + if (structureBuilder.UpdateICsFromFrame( *zmatrix, frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } From ca03b6ab46697b6c6cf443eef018f2118f54a4a5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 13:27:09 -0500 Subject: [PATCH 0460/1492] Do a better search for existing internals. Dont add to the temp Zmatrix --- src/Structure/Builder.cpp | 25 +++++++++++++++++++++---- src/Structure/Builder.h | 2 +- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9060386c5a..46ea20ae9a 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1681,6 +1681,24 @@ std::vector Builder::getExistingInternals(int ax, int ay) const iTorsions.push_back( *it ); } } + for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) + { + if (it->AtJ() == ay && it->AtK() == ax) { + // Avoid duplicates FIXME just track torsions eventually not the whole zmatrix + bool duplicate = false; + for (std::vector::const_iterator jt = iTorsions.begin(); jt != iTorsions.end(); ++jt) { + if (jt->AtI() == it->AtL() && + jt->AtJ() == it->AtK() && + jt->AtK() == it->AtJ() && + jt->AtL() == it->AtI()) + { + duplicate = true; + break; + } + } + if (!duplicate) iTorsions.push_back( *it ); + } + } } return iTorsions; } @@ -2050,7 +2068,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology } /** Build internal coordinates around an atom. */ -int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::generateAtomInternals(Zmatrix& zmatrix, int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { mprintf( "Building internals for: %s\n", topIn.LeapName(at).c_str()); Atom const& AtA = topIn[at]; @@ -2067,8 +2085,7 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& int iShouldBe = (AtB.Nbonds() - 1) * (AtC.Nbonds() - 1); mprintf("ISHOULDBE= %i ITORSIONS= %zu\n", iShouldBe, iTorsions.size()); if (iShouldBe != (int)iTorsions.size()) { - Zmatrix tmpz; // FIXME - assignTorsionsAroundBond(tmpz, *bat, *cat, frameIn, topIn, hasPosition, at); + assignTorsionsAroundBond(zmatrix, *bat, *cat, frameIn, topIn, hasPosition, at); } } } @@ -2108,7 +2125,7 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, it != span_atoms.end(); ++it) { //mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); - if (generateAtomInternals(*it, frameIn, topIn, tmpHasPosition)) { + if (generateAtomInternals(zmatrix, *it, frameIn, topIn, tmpHasPosition)) { mprinterr("Error: Could not generate internals for atom %s\n", topIn.AtomMaskName(*it).c_str()); return 1; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 8c40d5a179..ffe6d47ac0 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -80,7 +80,7 @@ class Builder { /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Generate internal coords for a given atom - int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); + int generateAtomInternals(Zmatrix&, int, Frame const&, Topology const&, Barray const&); int debug_; ParameterSet const* params_; From 9a40eba79b9d2d24a4c0eb6f2bab3992056b69cd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 14:29:47 -0500 Subject: [PATCH 0461/1492] Start reformatting for saving internals --- src/Exec_Build.cpp | 39 +++--- src/Structure/Builder.cpp | 261 +++++++++++++------------------------- src/Structure/Builder.h | 63 ++++++--- 3 files changed, 159 insertions(+), 204 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 3e73ffdce7..942821ddf6 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -184,7 +184,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, hasPosition.reserve( newNatom ); // Hold Z-matrices for residues that have missing atoms - typedef std::vector Zarray; + typedef std::vector Zarray; Zarray ResZmatrices; ResZmatrices.reserve( topIn.Nres() ); @@ -194,9 +194,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, typedef std::vector ResAtArray; ResAtArray interResBonds; - Cpptraj::Structure::Builder structureBuilder; - structureBuilder.SetDebug( 1 ); - structureBuilder.SetParameters( &mainParmSet ); + //Cpptraj::Structure::Builder structureBuilder; + //structureBuilder.SetDebug( 1 ); + //structureBuilder.SetParameters( &mainParmSet ); // For holding bonded atom pairs typedef std::pair Ipair; @@ -303,21 +303,23 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (atomsNeedBuilding) { Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); - Cpptraj::Structure::Zmatrix* zmatrix = new Cpptraj::Structure::Zmatrix(); + Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); + structureBuilder->SetDebug( 1 ); // DEBUG FIXME + structureBuilder->SetParameters( &mainParmSet ); //if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { // if (zmatrix->GenerateInternals( templateFrame, resTemplate->Top() )) { // mprinterr("Error: Could not set up residue template zmatrix.\n"); // return 1; // } - if (structureBuilder.GenerateInternals(*zmatrix, templateFrame, resTemplate->Top(), + if (structureBuilder->GenerateInternals(templateFrame, resTemplate->Top(), std::vector(resTemplate->Top().Natom(), true))) { mprinterr("Error: Generate internals for residue template failed.\n"); return 1; } // zmatrix->print( resTemplate->TopPtr() ); - zmatrix->OffsetIcIndices( atomOffset ); - ResZmatrices.push_back( zmatrix ); + structureBuilder->UpdateIndicesWithOffset( atomOffset ); + ResZmatrices.push_back( structureBuilder ); // zmatrix->print( &topOut ); //for (Iarray::const_iterator jres = resConnections[ires].begin(); // jres != resConnections[ires].end(); ++jres) @@ -403,14 +405,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) { long int ires = it-ResZmatrices.begin(); - Cpptraj::Structure::Zmatrix* zmatrix = *it; - if (zmatrix != 0) { + Cpptraj::Structure::Builder* structureBuilder = *it; + if (structureBuilder != 0) { mprintf("DEBUG: ***** BUILD residue %li %s *****\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); - mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, - topOut.TruncResNameOnumId(ires).c_str()); - zmatrix->print(&topOut); + //mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, + // topOut.TruncResNameOnumId(ires).c_str()); + //zmatrix->print(&topOut); // linkBuilder.SetZmatrix( zmatrix ); // Is this residue connected to an earlier residue? for (IParray::const_iterator resBonds = resBondingAtoms[ires].begin(); @@ -422,8 +424,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AtomMaskName(resBonds->second).c_str()); topOut.AddBond(resBonds->first, resBonds->second); // FIXME DEBUG - structureBuilder.SetZmatrix( zmatrix ); - if (structureBuilder.GenerateInternalsAroundLink(*zmatrix, resBonds->first, resBonds->second, + //structureBuilder.SetZmatrix( zmatrix ); + if (structureBuilder->GenerateInternalsAroundLink(resBonds->first, resBonds->second, frameOut, topOut, hasPosition)) { mprinterr("Error: Assign torsions around inter-residue link %s - %s failed.\n", @@ -463,7 +465,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // return 1; // } // Update internal coords from known positions - if (structureBuilder.UpdateICsFromFrame( *zmatrix, frameOut, ires, topOut, hasPosition )) { + if (structureBuilder->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } @@ -472,8 +474,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); // buildFailed = true; //} else { - zmatrix->SetDebug( 1 ); // DEBUG - if (zmatrix->SetToFrame( frameOut, hasPosition )) { + Cpptraj::Structure::Zmatrix tmpz; // FIXME + tmpz.SetDebug( 1 ); // DEBUG + if (tmpz.SetToFrame( frameOut, hasPosition )) { mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 46ea20ae9a..669fe56490 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -17,11 +17,9 @@ using namespace Cpptraj::Structure; Builder::Builder() : debug_(0), params_(0), - currentZmatrix_(0), currentTop_(0), currentFrm_(0), - hasPosition_(0), - newZmatrix_(0) + hasPosition_(0) {} /** Set optional parameter set. */ @@ -33,15 +31,6 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { params_ = paramsIn; } -/** Set optional Zmatrix. */ -void Cpptraj::Structure::Builder::SetZmatrix(Zmatrix const* zmatrixIn) { - if (zmatrixIn == 0) { - mprinterr("Internal Error: Builder::SetZmatrix called with null set.\n"); - return; - } - currentZmatrix_ = zmatrixIn; -} - // ----------------------------------------------------------------------------- /** Get length from parameter set if present. * \return 1 if a length parameter was found. @@ -158,7 +147,9 @@ const topIn.LeapName(aj).c_str(), topIn.LeapName(atomk).c_str(), ajTheta * Constants::RADDEG); - } else if (currentZmatrix_ != 0) { // FIXME faster search? + } else { + mprinterr("Internal Error: Implement angle lookup.\n"); + /*} else if (currentZmatrix_ != 0) { // FIXME faster search? for (Zmatrix::const_iterator ic = currentZmatrix_->begin(); ic != currentZmatrix_->end(); ++ic) { if (ic->AtI() == atomi && ic->AtJ() == aj && ic->AtK() == atomk) { // TODO: Check that repeats are equal? @@ -171,7 +162,7 @@ const ic->Theta()); break; } - } + }*/ } thetaVals.push_back( ajTheta ); } // END inner loop over bonds to AJ @@ -1087,114 +1078,58 @@ const /** For existing torsions, see if all coordinates in that torsion * exist. If so, update the IC from the existing coordinates. */ -int Builder::UpdateICsFromFrame(Zmatrix& zmatrix, Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) -const +int Builder::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) { - // Update bond/angle values for atoms with no position. -// for (unsigned int idx = 0; idx != zmatrix.N_IC(); idx++) -// { -/* InternalCoords& thisIc = zmatrix.ModifyIC(idx); - if (hasPosition[thisIc.AtI()] && hasPosition[thisIc.AtJ()]) { - // Bond exists. - double dist = DIST2_NoImage( frameIn.XYZ(thisIc.AtI()), frameIn.XYZ(thisIc.AtJ()) ); - mprintf("DEBUG: Replacing existing bond length %g for %s - %s with existing length %g\n", - thisIc.Dist(), topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), dist); - thisIc.SetDist( dist ); - if (hasPosition[thisIc.AtK()]) { - // Angle also exists - double theta = CalcAngle(frameIn.XYZ(thisIc.AtI()), - frameIn.XYZ(thisIc.AtJ()), - frameIn.XYZ(thisIc.AtK())); - theta *= Constants::RADDEG; - mprintf("DEBUG: Replacing existing angle %g for %s - %s - %s with existing angle %g\n", - thisIc.Theta(), topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), topIn.AtomMaskName(thisIc.AtK()).c_str(), - theta); - thisIc.SetTheta( theta ); - } - }*/ -/* - if (!hasPosition[thisIc.AtI()]) { - double dist = 0; - if (getLengthParam( dist, thisIc.AtI(), thisIc.AtJ(), topIn )) { - mprintf("DEBUG: Replacing existing bond length %g for %s - %s with parameter %g\n", - thisIc.Dist(), topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), dist); - thisIc.SetDist( dist ); - } - double theta = 0; - if (getAngleParam( theta, thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), topIn)) { - theta *= Constants::RADDEG; - mprintf("DEBUG: Replacing existing angle %g for %s - %s - %s with parameter %g\n", - thisIc.Theta(), topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), topIn.AtomMaskName(thisIc.AtK()).c_str(), - theta); - thisIc.SetTheta( theta ); - } - } -*/ -// } // END loop over zmatrix ICs - // Update torsions - Barray isUsed( zmatrix.N_IC(), false ); - //unsigned int Nused = 0; - // Get list of bonds + // Update torsions. + // Get list of bonds. BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) { if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { - mprintf("DEBUG: Looking at torsions around: %s - %s\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); // Find all ICs that share atoms 1 and 2 (J and K) - Iarray bondICs; + mprintf("DEBUG: Looking at torsions around: %s - %s\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); + // Find all ICs that share atoms 1 and 2 (J and K) bool needsUpdate = false; double tDiff = 0; - for (unsigned int idx = 0; idx != zmatrix.N_IC(); idx++) + Tarray iTorsions = getExistingTorsions(bnd->A1(), bnd->A2()); + for (unsigned int idx = 0; idx != iTorsions.size(); idx++) { - if (!isUsed[idx]) { - InternalCoords& thisIc = zmatrix.ModifyIC(idx); - if ( (bnd->A1() == thisIc.AtJ() && bnd->A2() == thisIc.AtK()) || - (bnd->A2() == thisIc.AtJ() && bnd->A1() == thisIc.AtK()) ) - { - // This IC has this bond at the center - bondICs.push_back( idx ); - isUsed[idx] = true; - //MARK(idx, isUsed, Nused); - if (hasPosition[thisIc.AtI()] && - hasPosition[thisIc.AtJ()] && - hasPosition[thisIc.AtK()] && - hasPosition[thisIc.AtL()]) - { - mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", - topIn.LeapName(thisIc.AtI()).c_str(), - topIn.LeapName(thisIc.AtJ()).c_str(), - topIn.LeapName(thisIc.AtK()).c_str(), - topIn.LeapName(thisIc.AtL()).c_str()); - InternalCoords frameIc = calcKnownAtomIc(thisIc.AtI(), thisIc.AtJ(), thisIc.AtK(), thisIc.AtL(), frameIn); - double dTorsion = frameIc.Phi() * Constants::DEGRAD; - double dInternalValue = thisIc.Phi() * Constants::DEGRAD; - tDiff = (dTorsion - dInternalValue) * Constants::RADDEG; - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); - thisIc = frameIc; - needsUpdate = true; - } // END all IC coords present - } // END this IC matches current bond - } // END IC is not used - } // END loop searching for ICs matching current bond + InternalTorsion const& thisIc = internalTorsions_[idx]; + if (hasPosition[thisIc.AtI()] && + hasPosition[thisIc.AtJ()] && + hasPosition[thisIc.AtK()] && + hasPosition[thisIc.AtL()]) + { + mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", + topIn.LeapName(thisIc.AtI()).c_str(), + topIn.LeapName(thisIc.AtJ()).c_str(), + topIn.LeapName(thisIc.AtK()).c_str(), + topIn.LeapName(thisIc.AtL()).c_str()); + double dTorsion = Torsion(frameIn.XYZ(thisIc.AtI()), + frameIn.XYZ(thisIc.AtJ()), + frameIn.XYZ(thisIc.AtK()), + frameIn.XYZ(thisIc.AtL())); + double dInternalValue = thisIc.PhiVal(); + tDiff = (dTorsion - dInternalValue); + mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion*Constants::RADDEG, dInternalValue*Constants::RADDEG); + needsUpdate = true; + } // END all coords present + } // END loop over torsions matching current bond // If any difference was found, shift all of the torsions if (needsUpdate) { mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str(), tDiff); - for (Iarray::const_iterator it = bondICs.begin(); it != bondICs.end(); ++it) - { - InternalCoords& thisIc = zmatrix.ModifyIC(*it); - double dNew = thisIc.Phi() + tDiff; - mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - mprintf("DEBUG:\t------- From %f to %f\n", thisIc.Phi(), dNew); - thisIc.SetPhi( dNew ); + for (unsigned int idx = 0; idx != iTorsions.size(); idx++) + { + InternalTorsion& thisIc = internalTorsions_[idx]; + double dNew = thisIc.PhiVal() + tDiff; + mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", + topIn.AtomMaskName(thisIc.AtI()).c_str(), + topIn.AtomMaskName(thisIc.AtJ()).c_str(), + topIn.AtomMaskName(thisIc.AtK()).c_str(), + topIn.AtomMaskName(thisIc.AtL()).c_str()); + mprintf("DEBUG:\t------- From %f to %f\n", thisIc.PhiVal()*Constants::RADDEG, dNew*Constants::RADDEG); + thisIc.SetPhiVal( dNew ); } } // END ICs need update } // END both bond atoms belong to this residue @@ -1244,7 +1179,7 @@ class Cpptraj::Structure::Builder::TorsionModel { /// Set up torsions around bonded atoms int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn); /// Build mock externals from given internals - int BuildMockExternals(std::vector const&, Topology const&); + int BuildMockExternals(Tarray const&, Topology const&); /// \return Value of A-X-Y-D torsion in radians double Absolute() const { return dAbsolute_; } @@ -1533,7 +1468,7 @@ static inline std::vector::iterator find_mock_atom(std::vector const& iaTorsions, +int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Tarray const& iaTorsions, Topology const& topIn) // DEBUG topIn for debug only { if (iaTorsions.empty()) { @@ -1542,14 +1477,13 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vector::const_iterator ic = iaTorsions.begin(); - ic != iaTorsions.end(); ++ic) + for (Tarray::const_iterator ic = iaTorsions.begin(); ic != iaTorsions.end(); ++ic) mprintf("------- Known torsion: %s - %s - %s - %s %f\n", topIn.LeapName(ic->AtI()).c_str(), topIn.LeapName(ic->AtJ()).c_str(), topIn.LeapName(ic->AtK()).c_str(), topIn.LeapName(ic->AtL()).c_str(), - ic->Phi()); + ic->PhiVal()*Constants::RADDEG); // Define coordinates for the central atoms. //Vec3 posX(0, 0, 0); @@ -1570,8 +1504,7 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vector::const_iterator ic = iaTorsions.begin(); - ic != iaTorsions.end(); ++ic) + for (Tarray::const_iterator ic = iaTorsions.begin(); ic != iaTorsions.end(); ++ic) { if (ic == iaTorsions.begin()) { // Define first outer atom as being in the XY plane @@ -1599,7 +1532,7 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vectorKnown(), (int)tmpAt4->Known()); // Now build the coordinate for the target atom - tgt->SetPos( Zmatrix::AtomIposition(maPC1, maPC2, knownAt->Pos(), 1.0, 90.0, iInt.Phi()) ); + tgt->SetPos( Zmatrix::AtomIposition(maPC1, maPC2, knownAt->Pos(), 1.0, 90.0, iInt.PhiVal()*Constants::RADDEG) ); mprintf("ZMatrixAll: %f,%f,%f\n", tgt->Pos()[0], tgt->Pos()[1], tgt->Pos()[2]); used[jdx] = true; nused++; @@ -1671,50 +1604,36 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(std::vector Builder::getExistingInternals(int ax, int ay) const { - std::vector iTorsions; - if (currentZmatrix_ != 0) { - for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) - { - if (it->AtJ() == ax && it->AtK() == ay) { - iTorsions.push_back( *it ); - } - } - for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) +/** Update all indices in internals according to the given offset. */ +void Builder::UpdateIndicesWithOffset(int atomOffset) { + for (Tarray::iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) + it->OffsetIndices( atomOffset ); +} + +/** Find any existing torsions around ax-ay. */ +Builder::Tarray Builder::getExistingTorsions(int ax, int ay) const { + Tarray iTorsions; + for (Tarray::const_iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) + { + if ((it->AtJ() == ax && it->AtK() == ay) || + (it->AtJ() == ay && it->AtJ() == ax)) { - if (it->AtJ() == ay && it->AtK() == ax) { - // Avoid duplicates FIXME just track torsions eventually not the whole zmatrix - bool duplicate = false; - for (std::vector::const_iterator jt = iTorsions.begin(); jt != iTorsions.end(); ++jt) { - if (jt->AtI() == it->AtL() && - jt->AtJ() == it->AtK() && - jt->AtK() == it->AtJ() && - jt->AtL() == it->AtI()) - { - duplicate = true; - break; - } - } - if (!duplicate) iTorsions.push_back( *it ); - } + iTorsions.push_back( *it ); } } return iTorsions; } -/** \return index of internal coords matching the 4 given atoms, -1 for no match. */ // TODO put in Zmatrix? -int Builder::getExistingInternalIdx(int ai, int aj, int ak, int al) const { +/** \return index of existing torsion matching the 4 given atoms, -1 for no match. */ +int Builder::getExistingTorsionIdx(int ai, int aj, int ak, int al) const { int idx = -1; - if (currentZmatrix_ != 0) { - for (Zmatrix::const_iterator it = currentZmatrix_->begin(); it != currentZmatrix_->end(); ++it) + for (Tarray::const_iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) + { + if ( (it->AtI() == ai && it->AtJ() == aj && it->AtK() == ak && it->AtL() == al) || + (it->AtI() == al && it->AtJ() == ak && it->AtK() == aj && it->AtL() == ai) ) { - if ( (it->AtI() == ai && it->AtJ() == aj && it->AtK() == ak && it->AtL() == al) || - (it->AtI() == al && it->AtJ() == ak && it->AtK() == aj && it->AtL() == ai) ) - { - idx = (int)(currentZmatrix_->begin() - it); - break; - } + idx = (int)(internalTorsions_.begin() - it); + break; } } return idx; @@ -1755,9 +1674,9 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned mprintf(" %s replacing dval with %f\n", currentTop_->LeapName(aa).c_str(), phiVal*Constants::RADDEG); } // Look for an existing internal - int icIdx = getExistingInternalIdx( aa, ax, ay, ad ); + int icIdx = getExistingTorsionIdx( aa, ax, ay, ad ); if (icIdx < 0) { - // Get bond lengths FIXME deal with unknown positions +/* // Get bond lengths FIXME deal with unknown positions double l0, l1; if (AssignLength(l0, aa, ax, *currentTop_, *currentFrm_, *hasPosition_)) { mprinterr("Error: Could not assign length between %s and %s\n", @@ -1786,17 +1705,18 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned currentTop_->AtomMaskName(ay).c_str(), currentTop_->AtomMaskName(ax).c_str()); return; - } + }*/ mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", phiVal*Constants::RADDEG, currentTop_->LeapName(aa).c_str(), currentTop_->LeapName(ax).c_str(), currentTop_->LeapName(ay).c_str(), currentTop_->LeapName(ad).c_str()); - newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); - newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); + internalTorsions_.push_back( InternalTorsion(aa, ax, ay, ad, phiVal) ); + //newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); + //newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); } else { - mprintf( "Torsional INTERNAL already exists: %f\n", (*currentZmatrix_)[icIdx].Phi() ); + mprintf( "Torsional INTERNAL already exists: %f\n", internalTorsions_[icIdx].PhiVal()*Constants::RADDEG ); } } @@ -1915,11 +1835,10 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { } /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ -int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) +int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) { // Save addresses of zmatrix, frame, topology, and hasPosition. // These are required for the createSpXSpX routines. TODO zero them at the end? - newZmatrix_ = &zmatrix; currentFrm_ = &frameIn; currentTop_ = &topIn; hasPosition_ = &hasPosition; @@ -1988,7 +1907,7 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co mprintf("bKnownX=%i bKnownY=%i\n", (int)mT.AxHasKnownAtoms(), (int)mT.AyHasKnownAtoms()); if (!(mT.AxHasKnownAtoms() && mT.AyHasKnownAtoms())) { // Find any existing internal coords around ax-ay - std::vector iTorsions = getExistingInternals(ax, ay); + Tarray iTorsions = getExistingTorsions(ax, ay); if (!iTorsions.empty()) { mprintf("Using INTERNALs to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); @@ -2046,16 +1965,16 @@ int Builder::assignTorsionsAroundBond(Zmatrix& zmatrix, int a1, int a2, Frame co /** Generate internal coordinates in the same * manner as LEaP's BuildInternalsForContainer/ModelAssignTorsionsAround. */ -int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { mprintf("DEBUG: ----- Entering Builder::GenerateInternals. -----\n"); - zmatrix.clear(); +// zmatrix.clear(); // First generate the bond array BondArray bonds = GenerateBondArray( topIn.Residues(), topIn.Atoms() ); // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { - if (assignTorsionsAroundBond( zmatrix, bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition, -1 )) { + if (assignTorsionsAroundBond( bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition, -1 )) { mprinterr("Error Assign torsions around bond %s - %s failed.\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); @@ -2068,7 +1987,7 @@ int Builder::GenerateInternals(Zmatrix& zmatrix, Frame const& frameIn, Topology } /** Build internal coordinates around an atom. */ -int Builder::generateAtomInternals(Zmatrix& zmatrix, int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { mprintf( "Building internals for: %s\n", topIn.LeapName(at).c_str()); Atom const& AtA = topIn[at]; @@ -2081,11 +2000,11 @@ int Builder::generateAtomInternals(Zmatrix& zmatrix, int at, Frame const& frameI topIn.LeapName(at).c_str(), topIn.LeapName(*bat).c_str(), topIn.LeapName(*cat).c_str()); - std::vector iTorsions = getExistingInternals(*bat, *cat); + Tarray iTorsions = getExistingTorsions(*bat, *cat); int iShouldBe = (AtB.Nbonds() - 1) * (AtC.Nbonds() - 1); mprintf("ISHOULDBE= %i ITORSIONS= %zu\n", iShouldBe, iTorsions.size()); if (iShouldBe != (int)iTorsions.size()) { - assignTorsionsAroundBond(zmatrix, *bat, *cat, frameIn, topIn, hasPosition, at); + assignTorsionsAroundBond(*bat, *cat, frameIn, topIn, hasPosition, at); } } } @@ -2100,7 +2019,7 @@ int Builder::generateAtomInternals(Zmatrix& zmatrix, int at, Frame const& frameI * \param at0 Atom in residue we are linking to (i.e. the current residue). * \param at1 Atom in resiude we are linking from. */ -int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, +int Builder::GenerateInternalsAroundLink(int at0, int at1, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { @@ -2125,7 +2044,7 @@ int Builder::GenerateInternalsAroundLink(Zmatrix& zmatrix, int at0, int at1, it != span_atoms.end(); ++it) { //mprintf("SPANNING TREE ATOM: %s\n", topIn.LeapName(*it).c_str()); - if (generateAtomInternals(zmatrix, *it, frameIn, topIn, tmpHasPosition)) { + if (generateAtomInternals(*it, frameIn, topIn, tmpHasPosition)) { mprinterr("Error: Could not generate internals for atom %s\n", topIn.AtomMaskName(*it).c_str()); return 1; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index ffe6d47ac0..bc9ff7b8b3 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -19,26 +19,30 @@ class Builder { void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); - /// Set optional Zmatrix with current ICs - void SetZmatrix(Zmatrix const*); /// Combine second fragment into first fragment and bond int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; /// Model the coordinates around a bond given only some coordinates are known int ModelCoordsAroundBond(Frame const&, Topology const&, int, int, Zmatrix&, Barray const&) const; - /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters - int UpdateICsFromFrame(Zmatrix&, Frame const&, int, Topology const&, Barray const&) const; + + /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters + int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Generate internal coordinates in the same manner as LEaP - int GenerateInternals(Zmatrix&, Frame const&, Topology const&, Barray const&); + int GenerateInternals(Frame const&, Topology const&, Barray const&); /// Generate internal coordinates around a link between residues in same manner as LEaP - int GenerateInternalsAroundLink(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&); - + int GenerateInternalsAroundLink(int, int, Frame const&, Topology const&, Barray const&); + /// Update existing indices with given offset + void UpdateIndicesWithOffset(int); private: typedef std::vector Iarray; /// Used to hold parameters for modeling a torsion class TorsionModel; + /// Hold torsion + class InternalTorsion; + + typedef std::vector Tarray; /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; @@ -72,24 +76,53 @@ class Builder { /// Create ICs around SP2-SP2 linkage void createSp2Sp2Torsions(TorsionModel const&); /// Model torsions around a bond in the same manner as LEaP - int assignTorsionsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&, int); - /// Get any existing internal coords from currentZmatrix around specified atoms - std::vector getExistingInternals(int, int) const; - /// Get specific internal coords from currentZmatrix - int getExistingInternalIdx(int, int, int, int) const; + int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&, int); + /// Get any existing internal coords from internalTorsions_ around specified atoms + Tarray getExistingTorsions(int, int) const; + /// Get specific internal coords from internalTorsions_ + int getExistingTorsionIdx(int, int, int, int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Generate internal coords for a given atom - int generateAtomInternals(Zmatrix&, int, Frame const&, Topology const&, Barray const&); + int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); int debug_; ParameterSet const* params_; - Zmatrix const* currentZmatrix_; ///< Any existing internal coordinates Topology const* currentTop_; ///< Topology for the createSpXSpXTorsions/ModelTorsion routines Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines - Zmatrix* newZmatrix_; ///< Hold output ICs from assignTorsionsAroundBond + Tarray internalTorsions_; +}; +/// ----- Hold torsion internal ------------------ +class Cpptraj::Structure::Builder::InternalTorsion { + public: + /// CONSTRUCTOR + InternalTorsion() : ai_(-1), aj_(-1), ak_(-1), al_(-1), phi_(0) {} + /// CONSTRUCTOR + InternalTorsion(int i, int j, int k, int l, double p) : + ai_(i), aj_(j), ak_(k), al_(l), phi_(p) {} + /// Set the phi value in radians + void SetPhiVal(double p) { phi_ = p; } + /// Offset indices by given value + void OffsetIndices(int o) { + ai_ += 0; + aj_ += 0; + ak_ += 0; + al_ += 0; + } + + int AtI() const { return ai_; } + int AtJ() const { return aj_; } + int AtK() const { return ak_; } + int AtL() const { return al_; } + double PhiVal() const { return phi_; } + private: + int ai_; + int aj_; + int ak_; + int al_; + double phi_; }; } } From 45ce40613c3aa2cb30f4129fdf7d30281421ab56 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 15:00:13 -0500 Subject: [PATCH 0462/1492] Angle internals --- src/Structure/Builder.cpp | 63 ++++++++++++++++++++ src/Structure/Builder.h | 33 ++++++++++ src/Structure/GenerateConnectivityArrays.cpp | 12 ++-- 3 files changed, 102 insertions(+), 6 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 669fe56490..08952082b2 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1639,6 +1639,50 @@ int Builder::getExistingTorsionIdx(int ai, int aj, int ak, int al) const { return idx; } +/** Mode angle */ +double Builder::ModelBondAngle(int ai, int aj, int ak, Topology const& topIn) const { + // First look up parameter + double theta = 0; + if (getAngleParam(theta, ai, aj, ak, topIn)) { + return theta; + } + Atom const& AJ = topIn[aj]; + // Figure out hybridization and chirality of atom j. + if (debug_ > 0) { + mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); + mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); + mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); + } + AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; + // Check params for hybrid + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) + hybrid = it->second.Hybridization(); + } + // Guess hybrid if needed + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) + hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); + // Set from number of bonds if still unknown. This is a pretty crude guess. + if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { + switch (AJ.Nbonds()) { + case 4 : hybrid = AtomType::SP3; break; + case 3 : hybrid = AtomType::SP2; break; + case 2 : hybrid = AtomType::SP; break; + default : mprinterr("Internal Error: AssignTheta(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; + } + } + + // Assign a theta based on hybridization + switch (hybrid) { + case AtomType::SP3 : theta = 109.5 * Constants::DEGRAD; break; + case AtomType::SP2 : theta = 120.0 * Constants::DEGRAD; break; + case AtomType::SP : theta = 180.0 * Constants::DEGRAD; break; + default : mprinterr("Internal Error: AssignTheta(): Unhandled hybridization for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; + } + return theta; +} + /** Model torsion */ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned int iBondY, double dvalIn) { @@ -1981,6 +2025,25 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr return 1; } } + // Loop over angles + AngleArray angles = GenerateAngleArray( topIn.Residues(), topIn.Atoms() ); + for (AngleArray::const_iterator ang = angles.begin(); ang != angles.end(); ++ang) + { + double dValue = 0; + if (hasPosition[ang->A1()] && + hasPosition[ang->A2()] && + hasPosition[ang->A3()]) + { + dValue = CalcAngle( frameIn.XYZ(ang->A1()), frameIn.XYZ(ang->A2()), frameIn.XYZ(ang->A3()) ); + } else { + dValue = ModelBondAngle( ang->A1(), ang->A2(), ang->A3(), topIn ); + } + internalAngles_.push_back( InternalAngle(ang->A1(), ang->A2(), ang->A3(), dValue) ); + mprintf("++++Angle INTERNAL: %f for %s - %s - %s\n", dValue*Constants::RADDEG, + topIn.LeapName(ang->A1()).c_str(), + topIn.LeapName(ang->A2()).c_str(), + topIn.LeapName(ang->A3()).c_str()); + } //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index bc9ff7b8b3..562393e026 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -41,8 +41,11 @@ class Builder { class TorsionModel; /// Hold torsion class InternalTorsion; + /// Hold angle + class InternalAngle; typedef std::vector Tarray; + typedef std::vector Aarray; /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; @@ -69,6 +72,8 @@ class Builder { /// Create IC for a torsion void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); + /// Get angle value + double ModelBondAngle(int, int, int, Topology const&) const; /// Create ICs around SP3-SP3 linkage void createSp3Sp3Torsions(TorsionModel const&); /// Create ICs around SP3-SP2 linkage @@ -93,6 +98,7 @@ class Builder { Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines Tarray internalTorsions_; + Aarray internalAngles_; }; /// ----- Hold torsion internal ------------------ class Cpptraj::Structure::Builder::InternalTorsion { @@ -124,6 +130,33 @@ class Cpptraj::Structure::Builder::InternalTorsion { int al_; double phi_; }; +// ----- Hold angle internal --------------------- +class Cpptraj::Structure::Builder::InternalAngle { + public: + /// CONSTRUCTOR + InternalAngle() : ai_(-1), aj_(-1), ak_(-1), theta_(0) {} + /// CONSTRUCTOR + InternalAngle(int i, int j, int k, double t) : + ai_(i), aj_(j), ak_(k), theta_(t) {} + /// Set the phi value in radians + void SetThetaVal(double t) { theta_ = t; } + /// Offset indices by given value + void OffsetIndices(int o) { + ai_ += 0; + aj_ += 0; + ak_ += 0; + } + + int AtI() const { return ai_; } + int AtJ() const { return aj_; } + int AtK() const { return ak_; } + double ThetaVal() const { return theta_; } + private: + int ai_; + int aj_; + int ak_; + double theta_; +}; } } #endif diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index d81ccc13d0..0cdc011937 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -101,7 +101,7 @@ AngleArray Cpptraj::Structure::GenerateAngleArray(std::vector const& re { AngleArray out; // ANGLES TODO combine above - int aidx = 0; +// int aidx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { int start, end, offset; @@ -116,7 +116,7 @@ AngleArray Cpptraj::Structure::GenerateAngleArray(std::vector const& re for (int bidx2 = 0; bidx2 < At2.Nbonds(); bidx2++) { int iat3 = At2.Bond(bidx2); if (iat1 < iat3) { - mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, iat1+1, iat2+1, iat3+1, iat1*3, iat2*3, iat3*3); + //mprintf("DEBUG: ANGLE i= %i %i - %i - %i (%i %i %i)\n", aidx++, iat1+1, iat2+1, iat3+1, iat1*3, iat2*3, iat3*3); out.push_back( AngleType(iat1, iat2, iat3, -1) ); } } @@ -132,7 +132,7 @@ DihedralArray Cpptraj::Structure::GenerateDihedralArray(std::vector con { DihedralArray out; // TORSIONS TODO combine above - int didx = 0; +// int didx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { int start, end, offset; @@ -151,7 +151,7 @@ DihedralArray Cpptraj::Structure::GenerateDihedralArray(std::vector con for (int bidx3 = 0; bidx3 < At3.Nbonds(); bidx3++) { int iat4 = At3.Bond(bidx3); if (iat4 != iat2 && iat1 < iat4) { - mprintf("DEBUG: DIHEDRAL i= %i %i - %i - %i - %i (%i %i %i %i)\n", didx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + //mprintf("DEBUG: DIHEDRAL i= %i %i - %i - %i - %i (%i %i %i %i)\n", didx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); out.push_back( DihedralType( iat1, iat2, iat3, iat4, -1 ) ); } } @@ -188,7 +188,7 @@ DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector con std::vector const& atoms) { DihedralArray out; - int iidx = 0; +// int iidx = 0; for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) { int start, end, offset; @@ -204,7 +204,7 @@ DihedralArray Cpptraj::Structure::GenerateImproperArray(std::vector con int iat1 = AJ.BondIdxArray()[bidx0]; int iat2 = AJ.BondIdxArray()[bidx1]; int iat4 = AJ.BondIdxArray()[bidx2]; - mprintf("DEBUG: IMPROPER i= %i %i - %i - %i - %i (%i %i %i %i)\n", iidx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); + //mprintf("DEBUG: IMPROPER i= %i %i - %i - %i - %i (%i %i %i %i)\n", iidx++, iat1+1, iat2+1, iat3+1, iat4+1, iat1*3, iat2*3, iat3*3, iat4*3); int indices[3]; indices[0] = iat1; indices[1] = iat2; From cd46874372395a91729f9c7fd99d5c5b110d1fc0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 15:21:47 -0500 Subject: [PATCH 0463/1492] Bond internals --- src/Structure/Builder.cpp | 74 +++++++++++++++++++++++++++++++++++++-- src/Structure/Builder.h | 31 ++++++++++++++++ 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 08952082b2..716b7b7da3 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1075,6 +1075,7 @@ const return 0; } +// ============================================================================== /** For existing torsions, see if all coordinates in that torsion * exist. If so, update the IC from the existing coordinates. */ @@ -1137,7 +1138,6 @@ int Builder::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& return 0; } -// ------------------------------------------------------------------------------ /// Used to track atoms for mock externals class MockAtom { public: @@ -1639,7 +1639,60 @@ int Builder::getExistingTorsionIdx(int ai, int aj, int ak, int al) const { return idx; } -/** Mode angle */ +/** Model bond */ +double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { + // First look up parameter + double dist = 0; + if (getLengthParam(dist, ai, aj, topIn)) { + return dist; + } + Atom const& AI = topIn[ai]; + Atom const& AJ = topIn[aj]; + AtomType::HybridizationType hybridI = AtomType::UNKNOWN_HYBRIDIZATION; + AtomType::HybridizationType hybridJ = AtomType::UNKNOWN_HYBRIDIZATION; + // Check params for hybrid + if (params_ != 0) { + ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AI.Type()) ); + if (it != params_->AT().end()) + hybridI = it->second.Hybridization(); + it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); + if (it != params_->AT().end()) + hybridJ = it->second.Hybridization(); + } + if (hybridI == AtomType::UNKNOWN_HYBRIDIZATION || + hybridJ == AtomType::UNKNOWN_HYBRIDIZATION) + { + // Default to bond length based on elements + dist = Atom::GetBondLength( AI.Element(), AJ.Element() ); + } else { + // Use leap method based on atom hybridization + AtomType::HybridizationType hybrid1, hybrid2; + if (hybridI < hybridJ) { + hybrid1 = hybridI; + hybrid2 = hybridJ; + } else { + hybrid1 = hybridJ; + hybrid2 = hybridI; + } + if (hybrid1 == AtomType::SP3 && hybrid2 == AtomType::SP3) + dist = 1.5; + else if (hybrid1 == AtomType::SP2 && hybrid2 == AtomType::SP3) + dist = 1.4; + else if (hybrid1 == AtomType::SP && hybrid2 == AtomType::SP3) + dist = 1.3; + else if (hybrid1 == AtomType::SP2 && hybrid2 == AtomType::SP2) + dist = 1.35; + else if (hybrid1 == AtomType::SP && hybrid2 == AtomType::SP2) + dist = 1.3; + else if (hybrid1 == AtomType::SP && hybrid2 == AtomType::SP) + dist = 1.1; + else + dist = Atom::GetBondLength( AI.Element(), AJ.Element() ); + } + return dist; +} + +/** Model angle */ double Builder::ModelBondAngle(int ai, int aj, int ak, Topology const& topIn) const { // First look up parameter double theta = 0; @@ -2044,6 +2097,23 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr topIn.LeapName(ang->A2()).c_str(), topIn.LeapName(ang->A3()).c_str()); } + // Loop over bonds + for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) + { + double dValue = 0; + if (hasPosition[bnd->A1()] && + hasPosition[bnd->A2()]) + { + dValue = sqrt(DIST2_NoImage( frameIn.XYZ(bnd->A1()), frameIn.XYZ(bnd->A2()) ) ); + } else { + dValue = ModelBondLength( bnd->A1(), bnd->A2(), topIn ); + } + internalBonds_.push_back( InternalBond(bnd->A1(), bnd->A2(), dValue) ); + mprintf("++++Bond INTERNAL: %f for %s - %s\n", dValue, + topIn.LeapName(bnd->A1()).c_str(), + topIn.LeapName(bnd->A2()).c_str()); + } + //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 562393e026..6932c677f5 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -43,9 +43,12 @@ class Builder { class InternalTorsion; /// Hold angle class InternalAngle; + /// Hold bond + class InternalBond; typedef std::vector Tarray; typedef std::vector Aarray; + typedef std::vector Larray; /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; @@ -74,6 +77,8 @@ class Builder { void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); /// Get angle value double ModelBondAngle(int, int, int, Topology const&) const; + /// Get bond length + double ModelBondLength(int, int, Topology const&) const; /// Create ICs around SP3-SP3 linkage void createSp3Sp3Torsions(TorsionModel const&); /// Create ICs around SP3-SP2 linkage @@ -99,6 +104,7 @@ class Builder { Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines Tarray internalTorsions_; Aarray internalAngles_; + Larray internalBonds_; }; /// ----- Hold torsion internal ------------------ class Cpptraj::Structure::Builder::InternalTorsion { @@ -157,6 +163,31 @@ class Cpptraj::Structure::Builder::InternalAngle { int ak_; double theta_; }; +// ----- Hold bond internal ---------------------- +class Cpptraj::Structure::Builder::InternalBond { + public: + /// CONSTRUCTOR + InternalBond() : ai_(-1), aj_(-1), dist_(0) {} + /// CONSTRUCTOR + InternalBond(int i, int j, double d) : + ai_(i), aj_(j), dist_(d) {} + /// Set the distance value in angstroms + void SetDistVal(double d) { dist_ = d; } + /// Offset indices by given value + void OffsetIndices(int o) { + ai_ += 0; + aj_ += 0; + } + + int AtI() const { return ai_; } + int AtJ() const { return aj_; } + double DistVal() const { return dist_; } + private: + int ai_; + int aj_; + double dist_; +}; + } } #endif From b174a5e343ab6e112b934a0c4792ac51e187308f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 15:28:13 -0500 Subject: [PATCH 0464/1492] Fix offset updates --- src/Structure/Builder.cpp | 4 ++++ src/Structure/Builder.h | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 716b7b7da3..9493a6a87e 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1608,6 +1608,10 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Tarray const& void Builder::UpdateIndicesWithOffset(int atomOffset) { for (Tarray::iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) it->OffsetIndices( atomOffset ); + for (Aarray::iterator it = internalAngles_.begin(); it != internalAngles_.end(); ++it) + it->OffsetIndices( atomOffset ); + for (Larray::iterator it = internalBonds_.begin(); it != internalBonds_.end(); ++it) + it->OffsetIndices( atomOffset ); } /** Find any existing torsions around ax-ay. */ diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 6932c677f5..9da6196161 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -118,10 +118,10 @@ class Cpptraj::Structure::Builder::InternalTorsion { void SetPhiVal(double p) { phi_ = p; } /// Offset indices by given value void OffsetIndices(int o) { - ai_ += 0; - aj_ += 0; - ak_ += 0; - al_ += 0; + ai_ += o; + aj_ += o; + ak_ += o; + al_ += o; } int AtI() const { return ai_; } @@ -148,9 +148,9 @@ class Cpptraj::Structure::Builder::InternalAngle { void SetThetaVal(double t) { theta_ = t; } /// Offset indices by given value void OffsetIndices(int o) { - ai_ += 0; - aj_ += 0; - ak_ += 0; + ai_ += o; + aj_ += o; + ak_ += o; } int AtI() const { return ai_; } @@ -175,8 +175,8 @@ class Cpptraj::Structure::Builder::InternalBond { void SetDistVal(double d) { dist_ = d; } /// Offset indices by given value void OffsetIndices(int o) { - ai_ += 0; - aj_ += 0; + ai_ += o; + aj_ += o; } int AtI() const { return ai_; } From 1fcbea59cf682233d0fa57631b5a38f3c50c2441 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 7 Feb 2024 15:56:42 -0500 Subject: [PATCH 0465/1492] Fix index --- src/Structure/Builder.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9493a6a87e..78e5a67750 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1620,7 +1620,7 @@ Builder::Tarray Builder::getExistingTorsions(int ax, int ay) const { for (Tarray::const_iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) { if ((it->AtJ() == ax && it->AtK() == ay) || - (it->AtJ() == ay && it->AtJ() == ax)) + (it->AtJ() == ay && it->AtK() == ax)) { iTorsions.push_back( *it ); } @@ -1630,13 +1630,16 @@ Builder::Tarray Builder::getExistingTorsions(int ax, int ay) const { /** \return index of existing torsion matching the 4 given atoms, -1 for no match. */ int Builder::getExistingTorsionIdx(int ai, int aj, int ak, int al) const { + //mprintf("SEARCHING FOR %i %i %i %i\n", ai, aj, ak, al); int idx = -1; for (Tarray::const_iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) { + //mprintf("\t\t%i %i %i %i\n", it->AtI(), it->AtJ(), it->AtK(), it->AtL()); if ( (it->AtI() == ai && it->AtJ() == aj && it->AtK() == ak && it->AtL() == al) || (it->AtI() == al && it->AtJ() == ak && it->AtK() == aj && it->AtL() == ai) ) { - idx = (int)(internalTorsions_.begin() - it); + idx = (int)(it - internalTorsions_.begin()); + //mprintf("FOUND at index %i\n", idx); break; } } @@ -2140,6 +2143,15 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& Tarray iTorsions = getExistingTorsions(*bat, *cat); int iShouldBe = (AtB.Nbonds() - 1) * (AtC.Nbonds() - 1); mprintf("ISHOULDBE= %i ITORSIONS= %zu\n", iShouldBe, iTorsions.size()); + if (iShouldBe == 6 && iTorsions.size() == 6) { // FIXME DEBUG + for (Tarray::const_iterator it = iTorsions.begin(); it != iTorsions.end(); ++it) + mprintf("*** %s - %s - %s - %s : %f\n", + topIn.LeapName(it->AtI()).c_str(), + topIn.LeapName(it->AtJ()).c_str(), + topIn.LeapName(it->AtK()).c_str(), + topIn.LeapName(it->AtL()).c_str(), + it->PhiVal()*Constants::RADDEG); + } if (iShouldBe != (int)iTorsions.size()) { assignTorsionsAroundBond(*bat, *cat, frameIn, topIn, hasPosition, at); } From a5ed820823a913d27703078fe20f2af743d3e006 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 09:23:44 -0500 Subject: [PATCH 0466/1492] Generate angle internals for one atom --- src/Structure/Builder.cpp | 49 +++++++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 26 ++++++++++++--------- 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 78e5a67750..ca8b28bf50 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1646,6 +1646,21 @@ int Builder::getExistingTorsionIdx(int ai, int aj, int ak, int al) const { return idx; } +/** \return Index of existing angle matching the 3 given atoms, -1 for no match. */ +int Builder::getExistingAngleIdx(int ai, int aj, int ak) const { + int idx = -1; + for (Aarray::const_iterator it = internalAngles_.begin(); it != internalAngles_.end(); ++it) + { + if ((it->AtI() == ai && it->AtJ() == aj && it->AtK() == ak) || + (it->AtI() == ak && it->AtJ() == aj && it->AtK() == ai)) + { + idx = (int)(it - internalAngles_.begin()); + break; + } + } + return idx; +} + /** Model bond */ double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { // First look up parameter @@ -2130,6 +2145,7 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { mprintf( "Building internals for: %s\n", topIn.LeapName(at).c_str()); + // Torsions Atom const& AtA = topIn[at]; for (Atom::bond_iterator bat = AtA.bondbegin(); bat != AtA.bondend(); ++bat) { Atom const& AtB = topIn[*bat]; @@ -2158,6 +2174,39 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& } } } + // Angles + for (Atom::bond_iterator bat = AtA.bondbegin(); bat != AtA.bondend(); ++bat) { + Atom const& AtB = topIn[*bat]; + for (Atom::bond_iterator cat = AtB.bondbegin(); cat != AtB.bondend(); ++cat) { + if (*cat != at) { + mprintf("Building angle INTERNAL for: %s - %s - %s\n", + topIn.LeapName(at).c_str(), + topIn.LeapName(*bat).c_str(), + topIn.LeapName(*cat).c_str()); + int aidx = getExistingAngleIdx(at, *bat, *cat); + if (aidx < 0) { + double dValue = 0; + if (hasPosition[at] && + hasPosition[*bat] && + hasPosition[*cat]) + { + mprintf("Got bond angle from externals\n"); + dValue = CalcAngle(frameIn.XYZ(at), frameIn.XYZ(*bat), frameIn.XYZ(*cat)); + } else { + mprintf("Got bond angle from model builder\n"); + dValue = ModelBondAngle(at, *bat, *cat, topIn); + } + mprintf("++++Angle INTERNAL: %f for %s - %s - %s\n", dValue*Constants::RADDEG, + topIn.LeapName(at).c_str(), + topIn.LeapName(*bat).c_str(), + topIn.LeapName(*cat).c_str()); + internalAngles_.push_back(InternalAngle(at, *bat, *cat, dValue)); + } else { + mprintf("Angle INTERNAL was already defined\n"); + } + } + } // END loop over atoms bonded to B + } // END loop over atoms bonded to A return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 9da6196161..1b784bb05e 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -52,10 +52,12 @@ class Builder { /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; - /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known - int AssignLength(double&, int, int, Topology const&, Frame const&, Barray const&) const; /// Get angle parameter for atoms. int getAngleParam(double&, int, int, int, Topology const&) const; + + // =========================================== + /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known + int AssignLength(double&, int, int, Topology const&, Frame const&, Barray const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I int AssignTheta(double&, int, int, int, Topology const&, Frame const&, Barray const&) const; /// Calculate an internal coordinate for known atoms @@ -72,25 +74,27 @@ class Builder { int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, Barray const&, Barray const&, BuildAtom const&, BuildAtom const&) const; - - /// Create IC for a torsion + // =========================================== + /// Calculte phi value for a torsion in a TorsionModel void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); - /// Get angle value + /// Get angle parameter/model an angle value double ModelBondAngle(int, int, int, Topology const&) const; - /// Get bond length + /// Get bond parameter/model a bond length double ModelBondLength(int, int, Topology const&) const; - /// Create ICs around SP3-SP3 linkage + /// Create torsion around SP3-SP3 linkage void createSp3Sp3Torsions(TorsionModel const&); - /// Create ICs around SP3-SP2 linkage + /// Create torsion around SP3-SP2 linkage void createSp3Sp2Torsions(TorsionModel const&); - /// Create ICs around SP2-SP2 linkage + /// Create torsion around SP2-SP2 linkage void createSp2Sp2Torsions(TorsionModel const&); /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&, int); - /// Get any existing internal coords from internalTorsions_ around specified atoms + /// Get any existing internal torsion around specified atoms Tarray getExistingTorsions(int, int) const; - /// Get specific internal coords from internalTorsions_ + /// Get specific internal torsion int getExistingTorsionIdx(int, int, int, int) const; + /// Get specific internal angle + int getExistingAngleIdx(int, int, int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Generate internal coords for a given atom From 0f9f0302cd4a9e3777d574281764e788f51ac8e0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 09:35:28 -0500 Subject: [PATCH 0467/1492] Bond internals for one atom --- src/Structure/Builder.cpp | 40 +++++++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 2 ++ 2 files changed, 42 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index ca8b28bf50..b6fcf155c9 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1661,6 +1661,21 @@ int Builder::getExistingAngleIdx(int ai, int aj, int ak) const { return idx; } +/** \return Index of existing bond matching the 2 given atoms, -1 for no match. */ +int Builder::getExistingBondIdx(int ai, int aj) const { + int idx = -1; + for (Larray::const_iterator it = internalBonds_.begin(); it != internalBonds_.end(); ++it) + { + if ((it->AtI() == ai && it->AtJ() == aj) || + (it->AtI() == aj && it->AtJ() == ai)) + { + idx = (int)(it - internalBonds_.begin()); + break; + } + } + return idx; +} + /** Model bond */ double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { // First look up parameter @@ -2207,6 +2222,31 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& } } // END loop over atoms bonded to B } // END loop over atoms bonded to A + // Bonds + for (Atom::bond_iterator bat = AtA.bondbegin(); bat != AtA.bondend(); ++bat) { + mprintf("Building bond INTERNAL for: %s - %s\n", + topIn.LeapName(at).c_str(), + topIn.LeapName(*bat).c_str()); + int bidx = getExistingBondIdx(at, *bat); + if (bidx < 0) { + double dValue = 0; + if (hasPosition[at] && + hasPosition[*bat]) + { + mprintf("Got bond length from externals\n"); + dValue = sqrt(DIST2_NoImage(frameIn.XYZ(at), frameIn.XYZ(*bat))); + } else { + mprintf("Got bond length from the model builder\n"); + dValue = ModelBondLength(at, *bat, topIn); + } + mprintf("++++Bond INTERNAL: %f for %s - %s\n", dValue, + topIn.LeapName(at).c_str(), + topIn.LeapName(*bat).c_str()); + internalBonds_.push_back(InternalBond(at, *bat, dValue)); + } else { + mprintf( "Bond length INTERNAL already defined\n" ); + } + } // END loop over atoms bonded to A return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 1b784bb05e..d44b332d22 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -95,6 +95,8 @@ class Builder { int getExistingTorsionIdx(int, int, int, int) const; /// Get specific internal angle int getExistingAngleIdx(int, int, int) const; + /// Get specific internal bond + int getExistingBondIdx(int, int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Generate internal coords for a given atom From 5246dbe97bd86ec9e3763a3d0f0551d4430e235b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 09:50:18 -0500 Subject: [PATCH 0468/1492] Create zmatrix from internals --- src/Structure/Builder.cpp | 54 ++++++++++++++++++++++++++++++++++++--- src/Structure/Builder.h | 2 ++ 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index b6fcf155c9..3e9f84fa10 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2096,8 +2096,8 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo return 0; } -/** Generate internal coordinates in the same - * manner as LEaP's BuildInternalsForContainer/ModelAssignTorsionsAround. +/** Generate internal coordinates in the same manner as LEaP's + * BuildInternalsForContainer. */ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { @@ -2150,7 +2150,7 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str()); } - + // FIXME do chirality //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; @@ -2247,6 +2247,7 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& mprintf( "Bond length INTERNAL already defined\n" ); } } // END loop over atoms bonded to A + // FIXME do chirality return 0; } @@ -2297,3 +2298,50 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, mprintf("DEBUG: ----- Leaving Builder::GenerateInternalsAroundLink. -----\n"); return 0; } + +/** Generate a Zmatrix from the current internals. TODO only for atoms that need it? */ +int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) const { + zmatrix.clear(); + + for (Tarray::const_iterator dih = internalTorsions_.begin(); dih != internalTorsions_.end(); ++dih) + { + // Get angles i-j-k and j-k-l + int aidx0 = getExistingAngleIdx(dih->AtI(), dih->AtJ(), dih->AtK()); + int aidx1 = getExistingAngleIdx(dih->AtJ(), dih->AtK(), dih->AtL()); + if (aidx0 < 0) { + mprinterr("Error: Missing angle internal for %s - %s - %s\n", + topIn.AtomMaskName(dih->AtI()).c_str(), + topIn.AtomMaskName(dih->AtJ()).c_str(), + topIn.AtomMaskName(dih->AtK()).c_str()); + return 1; + } + if (aidx1 < 0) { + mprinterr("Error: Missing angle internal for %s - %s - %s\n", + topIn.AtomMaskName(dih->AtJ()).c_str(), + topIn.AtomMaskName(dih->AtK()).c_str(), + topIn.AtomMaskName(dih->AtL()).c_str()); + return 1; + } + // Get Bonds i-j and k-l + int bidx0 = getExistingBondIdx(dih->AtI(), dih->AtJ()); + int bidx1 = getExistingBondIdx(dih->AtK(), dih->AtL()); + if (bidx0 < 0) { + mprinterr("Error: Missing bond internal for %s - %s\n", + topIn.AtomMaskName(dih->AtI()).c_str(), + topIn.AtomMaskName(dih->AtJ()).c_str()); + } + if (bidx1 < 0) { + mprinterr("Error: Missing bond internal for %s - %s\n", + topIn.AtomMaskName(dih->AtK()).c_str(), + topIn.AtomMaskName(dih->AtL()).c_str()); + } + // Add internal coordinates + zmatrix.AddIC( InternalCoords(dih->AtI(), dih->AtJ(), dih->AtK(), dih->AtL(), dih->PhiVal()*Constants::RADDEG, + internalAngles_[aidx0].ThetaVal()*Constants::RADDEG, + internalBonds_[bidx0].DistVal()) ); + zmatrix.AddIC( InternalCoords(dih->AtL(), dih->AtK(), dih->AtJ(), dih->AtI(), dih->PhiVal()*Constants::RADDEG, + internalAngles_[aidx1].ThetaVal()*Constants::RADDEG, + internalBonds_[bidx1].DistVal()) ); + } // END loop over internal torsions + return 0; +} diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index d44b332d22..739e916579 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -34,6 +34,8 @@ class Builder { int GenerateInternalsAroundLink(int, int, Frame const&, Topology const&, Barray const&); /// Update existing indices with given offset void UpdateIndicesWithOffset(int); + /// \return Zmatrix from current internals + int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; private: typedef std::vector Iarray; From f637ac5791c986ad13d2ba163360dcb3552a63bf Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 10:38:53 -0500 Subject: [PATCH 0469/1492] Try to actually build coords. Seems to fail miserably --- src/Exec_Build.cpp | 6 +++- src/Structure/Builder.cpp | 71 +++++++++++++++++++++++++++++++++++---- src/Structure/Builder.h | 4 +++ 3 files changed, 74 insertions(+), 7 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 942821ddf6..181e8b2f8f 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -474,8 +474,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); // buildFailed = true; //} else { - Cpptraj::Structure::Zmatrix tmpz; // FIXME + Cpptraj::Structure::Zmatrix tmpz; tmpz.SetDebug( 1 ); // DEBUG + if (structureBuilder->GetZmatrixFromInternals(tmpz, topOut)) { + mprinterr("Error: Could not get Zmatrix from internals.\n"); + return 1; + } if (tmpz.SetToFrame( frameOut, hasPosition )) { mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 3e9f84fa10..ccd7df49db 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2096,6 +2096,45 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo return 0; } +/** Build angle internal. */ +void Builder::buildAngleInternal(int a1, int a2, int a3, Frame const& frameIn, Topology const& topIn, + Barray const& hasPosition) +{ + double dValue = 0; + if (hasPosition[a1] && + hasPosition[a2] && + hasPosition[a3]) + { + dValue = CalcAngle( frameIn.XYZ(a1), frameIn.XYZ(a2), frameIn.XYZ(a3) ); + } else { + dValue = ModelBondAngle( a1, a2, a3, topIn ); + } + internalAngles_.push_back( InternalAngle(a1, a2, a3, dValue) ); + mprintf("++++Angle INTERNAL: %f for %s - %s - %s\n", dValue*Constants::RADDEG, + topIn.LeapName(a1).c_str(), + topIn.LeapName(a2).c_str(), + topIn.LeapName(a3).c_str()); +} + +/** Build bond internal. */ +void Builder::buildBondInternal(int a1, int a2, Frame const& frameIn, Topology const& topIn, + Barray const& hasPosition) +{ + double dValue = 0; + if (hasPosition[a1] && + hasPosition[a2]) + { + dValue = sqrt(DIST2_NoImage( frameIn.XYZ(a1), frameIn.XYZ(a2) ) ); + } else { + dValue = ModelBondLength( a1, a2, topIn ); + } + internalBonds_.push_back( InternalBond(a1, a2, dValue) ); + mprintf("++++Bond INTERNAL: %f for %s - %s\n", dValue, + topIn.LeapName(a1).c_str(), + topIn.LeapName(a2).c_str()); +} + + /** Generate internal coordinates in the same manner as LEaP's * BuildInternalsForContainer. */ @@ -2295,12 +2334,26 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, // topIn.AtomMaskName(at1).c_str()); // return 1; //} + // FIXME this is a hack to make certain we have all the angle/bond terms we need + for (Tarray::const_iterator dih = internalTorsions_.begin(); dih != internalTorsions_.end(); ++dih) + { + int idx = getExistingAngleIdx(dih->AtI(), dih->AtJ(), dih->AtK()); + if (idx < 0) buildAngleInternal( dih->AtI(), dih->AtJ(), dih->AtK(), frameIn, topIn, hasPosition ); + idx = getExistingAngleIdx(dih->AtJ(), dih->AtK(), dih->AtL()); + if (idx < 0) buildAngleInternal( dih->AtJ(), dih->AtK(), dih->AtL(), frameIn, topIn, hasPosition ); + idx = getExistingBondIdx(dih->AtI(), dih->AtJ()); + if (idx < 0) buildBondInternal( dih->AtI(), dih->AtJ(), frameIn, topIn, hasPosition ); + idx = getExistingBondIdx(dih->AtK(), dih->AtL()); + if (idx < 0) buildBondInternal( dih->AtK(), dih->AtL(), frameIn, topIn, hasPosition ); + } + mprintf("DEBUG: ----- Leaving Builder::GenerateInternalsAroundLink. -----\n"); return 0; } /** Generate a Zmatrix from the current internals. TODO only for atoms that need it? */ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) const { + mprintf("DEBUG: ----- Enter GetZmatrixFromInternals -----\n"); zmatrix.clear(); for (Tarray::const_iterator dih = internalTorsions_.begin(); dih != internalTorsions_.end(); ++dih) @@ -2309,14 +2362,14 @@ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) co int aidx0 = getExistingAngleIdx(dih->AtI(), dih->AtJ(), dih->AtK()); int aidx1 = getExistingAngleIdx(dih->AtJ(), dih->AtK(), dih->AtL()); if (aidx0 < 0) { - mprinterr("Error: Missing angle internal for %s - %s - %s\n", + mprinterr("Error: Missing angle0 internal for %s - %s - %s\n", topIn.AtomMaskName(dih->AtI()).c_str(), topIn.AtomMaskName(dih->AtJ()).c_str(), topIn.AtomMaskName(dih->AtK()).c_str()); return 1; } if (aidx1 < 0) { - mprinterr("Error: Missing angle internal for %s - %s - %s\n", + mprinterr("Error: Missing angle1 internal for %s - %s - %s\n", topIn.AtomMaskName(dih->AtJ()).c_str(), topIn.AtomMaskName(dih->AtK()).c_str(), topIn.AtomMaskName(dih->AtL()).c_str()); @@ -2326,12 +2379,17 @@ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) co int bidx0 = getExistingBondIdx(dih->AtI(), dih->AtJ()); int bidx1 = getExistingBondIdx(dih->AtK(), dih->AtL()); if (bidx0 < 0) { - mprinterr("Error: Missing bond internal for %s - %s\n", - topIn.AtomMaskName(dih->AtI()).c_str(), - topIn.AtomMaskName(dih->AtJ()).c_str()); + mprinterr("Error: Missing bond0 internal for %s - %s\n", + topIn.LeapName(dih->AtI()).c_str(), + topIn.LeapName(dih->AtJ()).c_str()); + //mprintf("DEBUG: Internal %s - %s - %s - %s\n", + // topIn.LeapName(dih->AtI()).c_str(), + // topIn.LeapName(dih->AtJ()).c_str(), + // topIn.LeapName(dih->AtK()).c_str(), + // topIn.LeapName(dih->AtL()).c_str()); } if (bidx1 < 0) { - mprinterr("Error: Missing bond internal for %s - %s\n", + mprinterr("Error: Missing bond1 internal for %s - %s\n", topIn.AtomMaskName(dih->AtK()).c_str(), topIn.AtomMaskName(dih->AtL()).c_str()); } @@ -2343,5 +2401,6 @@ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) co internalAngles_[aidx1].ThetaVal()*Constants::RADDEG, internalBonds_[bidx1].DistVal()) ); } // END loop over internal torsions + mprintf("DEBUG: ----- Exit GetZmatrixFromInternals -----\n"); return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 739e916579..74169e534b 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -101,6 +101,10 @@ class Builder { int getExistingBondIdx(int, int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; + /// Build angle internal + void buildAngleInternal(int, int, int, Frame const&, Topology const&, Barray const&); + /// Build bond internal + void buildBondInternal(int, int, Frame const&, Topology const&, Barray const&); /// Generate internal coords for a given atom int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); From e330a262900ef84564862f6be1e5a9d0e886fdb1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 10:41:40 -0500 Subject: [PATCH 0470/1492] Use buildX routines --- src/Structure/Builder.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index ccd7df49db..23f80d3306 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2158,7 +2158,8 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr AngleArray angles = GenerateAngleArray( topIn.Residues(), topIn.Atoms() ); for (AngleArray::const_iterator ang = angles.begin(); ang != angles.end(); ++ang) { - double dValue = 0; + buildAngleInternal(ang->A1(), ang->A2(), ang->A3(), frameIn, topIn, hasPosition); +/* double dValue = 0; if (hasPosition[ang->A1()] && hasPosition[ang->A2()] && hasPosition[ang->A3()]) @@ -2171,12 +2172,13 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr mprintf("++++Angle INTERNAL: %f for %s - %s - %s\n", dValue*Constants::RADDEG, topIn.LeapName(ang->A1()).c_str(), topIn.LeapName(ang->A2()).c_str(), - topIn.LeapName(ang->A3()).c_str()); + topIn.LeapName(ang->A3()).c_str());*/ } // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { - double dValue = 0; + buildBondInternal(bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition); +/* double dValue = 0; if (hasPosition[bnd->A1()] && hasPosition[bnd->A2()]) { @@ -2187,7 +2189,7 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr internalBonds_.push_back( InternalBond(bnd->A1(), bnd->A2(), dValue) ); mprintf("++++Bond INTERNAL: %f for %s - %s\n", dValue, topIn.LeapName(bnd->A1()).c_str(), - topIn.LeapName(bnd->A2()).c_str()); + topIn.LeapName(bnd->A2()).c_str());*/ } // FIXME do chirality //zmatrix.print( &topIn ); From 636320fc4376f48386e0ecfab0bd15b698a7bf46 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:08:22 -0500 Subject: [PATCH 0471/1492] Add debug messages for comparing to leap --- src/Structure/Zmatrix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Structure/Zmatrix.cpp b/src/Structure/Zmatrix.cpp index 15aba9eb12..beb03c7f5a 100644 --- a/src/Structure/Zmatrix.cpp +++ b/src/Structure/Zmatrix.cpp @@ -1097,6 +1097,9 @@ int Zmatrix::SetToFrame(Frame& frameOut, Barray& hasPosition) const { mprintf("DEBUG: Next IC to use is %i : %i %i %i %i r=%g theta=%g phi=%g\n", icIdx+1, ic.AtI()+1, ic.AtJ()+1, ic.AtK()+1, ic.AtL()+1, ic.Dist(), ic.Theta(), ic.Phi()); + mprintf( "Torsion = %f\n", ic.Phi() ); + mprintf( "Angle = %f\n", ic.Theta() ); + mprintf( "Bond = %f\n", ic.Dist() ); Vec3 posI = AtomIposition(ic, frameOut); frameOut.SetXYZ( ic.AtI(), posI ); From 49c634031fd2438ddcd7edee007390b82d157042 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:09:16 -0500 Subject: [PATCH 0472/1492] Fix values passed into InternalCoords (was flipped). When searching for existing torsion internals around a bond, return indices into torsionInternals instead of copies since we want to modify them sometimes. --- src/Structure/Builder.cpp | 137 ++++++++++++++++++-------------------- src/Structure/Builder.h | 4 +- 2 files changed, 68 insertions(+), 73 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 23f80d3306..cd7430c045 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1086,51 +1086,51 @@ int Builder::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) { if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { - mprintf("DEBUG: Looking at torsions around: %s - %s\n", topIn.AtomMaskName(bnd->A1()).c_str(), topIn.AtomMaskName(bnd->A2()).c_str()); + mprintf("Looking at torsions around: %s - %s\n", topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str()); // Find all ICs that share atoms 1 and 2 (J and K) bool needsUpdate = false; double tDiff = 0; - Tarray iTorsions = getExistingTorsions(bnd->A1(), bnd->A2()); - for (unsigned int idx = 0; idx != iTorsions.size(); idx++) + Iarray iTorsions = getExistingTorsionIdxs(bnd->A1(), bnd->A2()); + for (Iarray::const_iterator idx = iTorsions.begin(); idx != iTorsions.end(); ++idx) { - InternalTorsion const& thisIc = internalTorsions_[idx]; - if (hasPosition[thisIc.AtI()] && - hasPosition[thisIc.AtJ()] && - hasPosition[thisIc.AtK()] && - hasPosition[thisIc.AtL()]) + InternalTorsion const& dih = internalTorsions_[*idx]; + if (hasPosition[dih.AtI()] && + hasPosition[dih.AtJ()] && + hasPosition[dih.AtK()] && + hasPosition[dih.AtL()]) { - mprintf("DEBUG:\tMeasuring torsion of fixed atoms: %s - %s - %s - %s\n", - topIn.LeapName(thisIc.AtI()).c_str(), - topIn.LeapName(thisIc.AtJ()).c_str(), - topIn.LeapName(thisIc.AtK()).c_str(), - topIn.LeapName(thisIc.AtL()).c_str()); - double dTorsion = Torsion(frameIn.XYZ(thisIc.AtI()), - frameIn.XYZ(thisIc.AtJ()), - frameIn.XYZ(thisIc.AtK()), - frameIn.XYZ(thisIc.AtL())); - double dInternalValue = thisIc.PhiVal(); + mprintf("Measuring torsion of fixed atoms: %s - %s - %s - %s\n", + topIn.LeapName(dih.AtI()).c_str(), + topIn.LeapName(dih.AtJ()).c_str(), + topIn.LeapName(dih.AtK()).c_str(), + topIn.LeapName(dih.AtL()).c_str()); + double dTorsion = Torsion(frameIn.XYZ(dih.AtI()), + frameIn.XYZ(dih.AtJ()), + frameIn.XYZ(dih.AtK()), + frameIn.XYZ(dih.AtL())); + double dInternalValue = dih.PhiVal(); tDiff = (dTorsion - dInternalValue); - mprintf("DEBUG:\tdTorsion= %f dInternalValue= %f\n", dTorsion*Constants::RADDEG, dInternalValue*Constants::RADDEG); + mprintf("\tdTorsion= %f dInternalValue= %f\n", dTorsion, dInternalValue); needsUpdate = true; } // END all coords present } // END loop over torsions matching current bond // If any difference was found, shift all of the torsions if (needsUpdate) { - mprintf("DEBUG: Twisting torsions centered on %s - %s by %f degrees\n", + mprintf("Twisting torsions centered on %s - %s by %f degrees\n", topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str(), - tDiff); - for (unsigned int idx = 0; idx != iTorsions.size(); idx++) - { - InternalTorsion& thisIc = internalTorsions_[idx]; - double dNew = thisIc.PhiVal() + tDiff; - mprintf("DEBUG:\tTwisting torsion for atoms: %s-%s-%s-%s\n", - topIn.AtomMaskName(thisIc.AtI()).c_str(), - topIn.AtomMaskName(thisIc.AtJ()).c_str(), - topIn.AtomMaskName(thisIc.AtK()).c_str(), - topIn.AtomMaskName(thisIc.AtL()).c_str()); - mprintf("DEBUG:\t------- From %f to %f\n", thisIc.PhiVal()*Constants::RADDEG, dNew*Constants::RADDEG); - thisIc.SetPhiVal( dNew ); + tDiff*Constants::RADDEG); + for (Iarray::const_iterator idx = iTorsions.begin(); idx != iTorsions.end(); ++idx) + { + InternalTorsion& dih = internalTorsions_[*idx]; + double dNew = dih.PhiVal() + tDiff; + mprintf("Twisting torsion for atoms: %s-%s-%s-%s\n", + *(topIn[dih.AtI()].Name()), + *(topIn[dih.AtJ()].Name()), + *(topIn[dih.AtK()].Name()), + *(topIn[dih.AtL()].Name())); + mprintf("------- From %f to %f\n", dih.PhiVal()*Constants::RADDEG, dNew*Constants::RADDEG); + dih.SetPhiVal( dNew ); } } // END ICs need update } // END both bond atoms belong to this residue @@ -1179,7 +1179,7 @@ class Cpptraj::Structure::Builder::TorsionModel { /// Set up torsions around bonded atoms int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn); /// Build mock externals from given internals - int BuildMockExternals(Tarray const&, Topology const&); + int BuildMockExternals(Iarray const&, Tarray const&, Topology const&); /// \return Value of A-X-Y-D torsion in radians double Absolute() const { return dAbsolute_; } @@ -1468,22 +1468,25 @@ static inline std::vector::iterator find_mock_atom(std::vectorAtI()).c_str(), - topIn.LeapName(ic->AtJ()).c_str(), - topIn.LeapName(ic->AtK()).c_str(), - topIn.LeapName(ic->AtL()).c_str(), - ic->PhiVal()*Constants::RADDEG); + topIn.LeapName(ic.AtI()).c_str(), + topIn.LeapName(ic.AtJ()).c_str(), + topIn.LeapName(ic.AtK()).c_str(), + topIn.LeapName(ic.AtL()).c_str(), + ic.PhiVal()*Constants::RADDEG); + } // Define coordinates for the central atoms. //Vec3 posX(0, 0, 0); @@ -1504,19 +1507,20 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Tarray const& Marray outerAtoms; // Define outer atoms - for (Tarray::const_iterator ic = iaTorsions.begin(); ic != iaTorsions.end(); ++ic) + for (Iarray::const_iterator idx = iaTorsions.begin(); idx != iaTorsions.end(); ++idx) { - if (ic == iaTorsions.begin()) { + InternalTorsion const& ic = internalTorsionsIn[*idx]; + if (idx == iaTorsions.begin()) { // Define first outer atom as being in the XY plane - outerAtoms.push_back( MockAtom(ic->AtI(), Vec3(1, 1, 0)) ); + outerAtoms.push_back( MockAtom(ic.AtI(), Vec3(1, 1, 0)) ); } else { - Marray::iterator mi = find_mock_atom( outerAtoms, ic->AtI() ); + Marray::iterator mi = find_mock_atom( outerAtoms, ic.AtI() ); if (mi == outerAtoms.end()) - outerAtoms.push_back( MockAtom(ic->AtI()) ); + outerAtoms.push_back( MockAtom(ic.AtI()) ); } - Marray::iterator ml = find_mock_atom( outerAtoms, ic->AtL() ); + Marray::iterator ml = find_mock_atom( outerAtoms, ic.AtL() ); if (ml == outerAtoms.end()) - outerAtoms.push_back( MockAtom(ic->AtL()) ); + outerAtoms.push_back( MockAtom(ic.AtL()) ); } mprintf("DEBUG: Outer atoms:\n"); for (Marray::const_iterator it = outerAtoms.begin(); it != outerAtoms.end(); ++it) @@ -1532,7 +1536,7 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Tarray const& //bool gotOne = false; for (unsigned int jdx = 0; jdx != iaTorsions.size(); jdx++) { if (!used[jdx]) { - InternalTorsion const& iInt = iaTorsions[jdx]; + InternalTorsion const& iInt = internalTorsionsIn[iaTorsions[jdx]]; Marray::iterator tmpAt1 = find_mock_atom(outerAtoms, iInt.AtI()); Marray::iterator tmpAt4 = find_mock_atom(outerAtoms, iInt.AtL()); if (tmpAt1 == outerAtoms.end()) { @@ -1615,14 +1619,14 @@ void Builder::UpdateIndicesWithOffset(int atomOffset) { } /** Find any existing torsions around ax-ay. */ -Builder::Tarray Builder::getExistingTorsions(int ax, int ay) const { - Tarray iTorsions; +Builder::Iarray Builder::getExistingTorsionIdxs(int ax, int ay) const { + Iarray iTorsions; for (Tarray::const_iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) { if ((it->AtJ() == ax && it->AtK() == ay) || (it->AtJ() == ay && it->AtK() == ax)) { - iTorsions.push_back( *it ); + iTorsions.push_back( it - internalTorsions_.begin() ); } } return iTorsions; @@ -1805,7 +1809,7 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned AX.Pos().Dptr(), AY.Pos().Dptr(), AD.Pos().Dptr() ); - mprintf(" %s replacing dval with %f\n", currentTop_->LeapName(aa).c_str(), phiVal*Constants::RADDEG); + mprintf(" %s replacing dval with %f\n", *((*currentTop_)[aa].Name()), phiVal*Constants::RADDEG); } // Look for an existing internal int icIdx = getExistingTorsionIdx( aa, ax, ay, ad ); @@ -2041,13 +2045,11 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo mprintf("bKnownX=%i bKnownY=%i\n", (int)mT.AxHasKnownAtoms(), (int)mT.AyHasKnownAtoms()); if (!(mT.AxHasKnownAtoms() && mT.AyHasKnownAtoms())) { // Find any existing internal coords around ax-ay - Tarray iTorsions = getExistingTorsions(ax, ay); + Iarray iTorsions = getExistingTorsionIdxs(ax, ay); if (!iTorsions.empty()) { mprintf("Using INTERNALs to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); - //for (std::vector::const_iterator ic = iTorsions.begin(); ic != iTorsions.end(); ++ic) - // ic->printIC( topIn ); - if (mT.BuildMockExternals(iTorsions, topIn)) { + if (mT.BuildMockExternals(iTorsions, internalTorsions_, topIn)) { mprinterr("Error: Building mock externals around %s - %s failed.\n", topIn.AtomMaskName(ax).c_str(), topIn.AtomMaskName(ay).c_str()); return 1; @@ -2212,18 +2214,9 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& topIn.LeapName(at).c_str(), topIn.LeapName(*bat).c_str(), topIn.LeapName(*cat).c_str()); - Tarray iTorsions = getExistingTorsions(*bat, *cat); + Iarray iTorsions = getExistingTorsionIdxs(*bat, *cat); int iShouldBe = (AtB.Nbonds() - 1) * (AtC.Nbonds() - 1); mprintf("ISHOULDBE= %i ITORSIONS= %zu\n", iShouldBe, iTorsions.size()); - if (iShouldBe == 6 && iTorsions.size() == 6) { // FIXME DEBUG - for (Tarray::const_iterator it = iTorsions.begin(); it != iTorsions.end(); ++it) - mprintf("*** %s - %s - %s - %s : %f\n", - topIn.LeapName(it->AtI()).c_str(), - topIn.LeapName(it->AtJ()).c_str(), - topIn.LeapName(it->AtK()).c_str(), - topIn.LeapName(it->AtL()).c_str(), - it->PhiVal()*Constants::RADDEG); - } if (iShouldBe != (int)iTorsions.size()) { assignTorsionsAroundBond(*bat, *cat, frameIn, topIn, hasPosition, at); } @@ -2396,12 +2389,14 @@ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) co topIn.AtomMaskName(dih->AtL()).c_str()); } // Add internal coordinates - zmatrix.AddIC( InternalCoords(dih->AtI(), dih->AtJ(), dih->AtK(), dih->AtL(), dih->PhiVal()*Constants::RADDEG, + zmatrix.AddIC( InternalCoords(dih->AtI(), dih->AtJ(), dih->AtK(), dih->AtL(), + internalBonds_[bidx0].DistVal(), internalAngles_[aidx0].ThetaVal()*Constants::RADDEG, - internalBonds_[bidx0].DistVal()) ); - zmatrix.AddIC( InternalCoords(dih->AtL(), dih->AtK(), dih->AtJ(), dih->AtI(), dih->PhiVal()*Constants::RADDEG, + dih->PhiVal()*Constants::RADDEG) ); + zmatrix.AddIC( InternalCoords(dih->AtL(), dih->AtK(), dih->AtJ(), dih->AtI(), + internalBonds_[bidx1].DistVal(), internalAngles_[aidx1].ThetaVal()*Constants::RADDEG, - internalBonds_[bidx1].DistVal()) ); + dih->PhiVal()*Constants::RADDEG) ); } // END loop over internal torsions mprintf("DEBUG: ----- Exit GetZmatrixFromInternals -----\n"); return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 74169e534b..2ad3005720 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -91,8 +91,8 @@ class Builder { void createSp2Sp2Torsions(TorsionModel const&); /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&, int); - /// Get any existing internal torsion around specified atoms - Tarray getExistingTorsions(int, int) const; + /// Get any existing internal torsion indices around specified atoms + Iarray getExistingTorsionIdxs(int, int) const; /// Get specific internal torsion int getExistingTorsionIdx(int, int, int, int) const; /// Get specific internal angle From bbffa76b35d196dbfee8c378fc629b222635fcbc Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:16:26 -0500 Subject: [PATCH 0473/1492] Add message so we know when we are looking for extra params --- src/Structure/Builder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index cd7430c045..7a0c333b27 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2330,6 +2330,7 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, // return 1; //} // FIXME this is a hack to make certain we have all the angle/bond terms we need + mprintf("DEBUG: LOOKING FOR MISSING ANGLE/BOND PARAMS.\n"); for (Tarray::const_iterator dih = internalTorsions_.begin(); dih != internalTorsions_.end(); ++dih) { int idx = getExistingAngleIdx(dih->AtI(), dih->AtJ(), dih->AtK()); From 276090d8e16cb1bd3abb0b91817f856ca9de81be Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:17:03 -0500 Subject: [PATCH 0474/1492] Rework the order in which things are done so that internals are only generated for each residue as it is being built. This should keep memory costs under control. --- src/Exec_Build.cpp | 135 +++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 78 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 181e8b2f8f..a14c9e83c8 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -184,9 +184,13 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, hasPosition.reserve( newNatom ); // Hold Z-matrices for residues that have missing atoms - typedef std::vector Zarray; - Zarray ResZmatrices; - ResZmatrices.reserve( topIn.Nres() ); +// typedef std::vector Zarray; +// Zarray ResZmatrices; +// ResZmatrices.reserve( topIn.Nres() ); + // Hold atom offsets needed when building residues + typedef std::vector Iarray; + Iarray AtomOffsets; + AtomOffsets.reserve( topIn.Nres() ); // For inter-residue bonding, use residue # and atom name since // atom numbering may change if atoms are added from templates. @@ -214,7 +218,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, IParray intraResBonds; if (resTemplate == 0) { // ----- No template. Just add the atoms. ------------ - ResZmatrices.push_back( 0 ); + //ResZmatrices.push_back( 0 ); + AtomOffsets.push_back( -1 ); for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { // Track intra-residue bonds @@ -301,25 +306,16 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("\t%i source atoms not mapped to template.\n", nTgtAtomsMissing); // Save zmatrix if atoms need to be built if (atomsNeedBuilding) { - Frame templateFrame = resTemplate->AllocateFrame(); - resTemplate->GetFrame( 0, templateFrame ); - Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); - structureBuilder->SetDebug( 1 ); // DEBUG FIXME - structureBuilder->SetParameters( &mainParmSet ); + AtomOffsets.push_back( atomOffset ); + //if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { // if (zmatrix->GenerateInternals( templateFrame, resTemplate->Top() )) { // mprinterr("Error: Could not set up residue template zmatrix.\n"); // return 1; // } - if (structureBuilder->GenerateInternals(templateFrame, resTemplate->Top(), - std::vector(resTemplate->Top().Natom(), true))) - { - mprinterr("Error: Generate internals for residue template failed.\n"); - return 1; - } + // zmatrix->print( resTemplate->TopPtr() ); - structureBuilder->UpdateIndicesWithOffset( atomOffset ); - ResZmatrices.push_back( structureBuilder ); +// ResZmatrices.push_back( structureBuilder ); // zmatrix->print( &topOut ); //for (Iarray::const_iterator jres = resConnections[ires].begin(); // jres != resConnections[ires].end(); ++jres) @@ -327,7 +323,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // mprintf("DEBUG:\t\tConnected residue %s\n", topIn.TruncResNameOnumId(*jres).c_str()); //} } else - ResZmatrices.push_back( 0 ); + AtomOffsets.push_back( -1 ); +// ResZmatrices.push_back( 0 ); } // END template exists // Add intra-residue bonds for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) @@ -381,17 +378,17 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Internal Error: hasPosition size %zu != newNatom size %i\n", hasPosition.size(), newNatom); return 1; } - if (ResZmatrices.size() != (unsigned int)topOut.Nres()) { - mprinterr("Internal Error: ResZmatrices size %zu != newNres size %i\n", ResZmatrices.size(), topOut.Nres()); + if (AtomOffsets.size() != (unsigned int)topOut.Nres()) { + mprinterr("Internal Error: AtomOffsets size %zu != newNres size %i\n", AtomOffsets.size(), topOut.Nres()); return 1; } // ----------------------------------- // Build using internal coords if needed. std::vector resIsBuilt; // TODO is this needed? - resIsBuilt.reserve( ResZmatrices.size() ); - for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) { - if ( *it == 0 ) + resIsBuilt.reserve( AtomOffsets.size() ); + for (Iarray::const_iterator it = AtomOffsets.begin(); it != AtomOffsets.end(); ++it) { + if ( *it < 0 ) resIsBuilt.push_back( true ); else resIsBuilt.push_back( false ); @@ -402,11 +399,26 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // linkBuilder.SetParameters( &mainParmSet ); bool buildFailed = false; TermTypeArray::const_iterator termType = ResTypes.begin(); // FIXME is termType needed? - for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) + //for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) + for (Iarray::const_iterator it = AtomOffsets.begin(); it != AtomOffsets.end(); ++it) { - long int ires = it-ResZmatrices.begin(); - Cpptraj::Structure::Builder* structureBuilder = *it; - if (structureBuilder != 0) { + long int ires = it-AtomOffsets.begin(); + //Cpptraj::Structure::Builder* structureBuilder = *it; + if (*it > -1) { + Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); + structureBuilder->SetDebug( 1 ); // DEBUG FIXME + structureBuilder->SetParameters( &mainParmSet ); + DataSet_Coords* resTemplate = ResTemplates[ires]; + Frame templateFrame = resTemplate->AllocateFrame(); + resTemplate->GetFrame( 0, templateFrame ); + if (structureBuilder->GenerateInternals(templateFrame, resTemplate->Top(), + std::vector(resTemplate->Top().Natom(), true))) + { + mprinterr("Error: Generate internals for residue template failed.\n"); + return 1; + } + structureBuilder->UpdateIndicesWithOffset( *it ); + mprintf("DEBUG: ***** BUILD residue %li %s *****\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); @@ -423,10 +435,9 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AtomMaskName(resBonds->first).c_str(), topOut.AtomMaskName(resBonds->second).c_str()); topOut.AddBond(resBonds->first, resBonds->second); - // FIXME DEBUG - //structureBuilder.SetZmatrix( zmatrix ); + // Generate internals around the link if (structureBuilder->GenerateInternalsAroundLink(resBonds->first, resBonds->second, - frameOut, topOut, hasPosition)) + frameOut, topOut, hasPosition)) { mprinterr("Error: Assign torsions around inter-residue link %s - %s failed.\n", topOut.AtomMaskName(resBonds->first).c_str(), @@ -436,57 +447,25 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, //tmpz.print(&topOut); } } -/* - if ( *termType != Cpptraj::Structure::BEG_TERMINAL ) { - for (int at = topOut.Res(ires).FirstAtom(); at != topOut.Res(ires).LastAtom(); ++at) - { - for (Atom::bond_iterator bat = topOut[at].bondbegin(); bat != topOut[at].bondend(); ++bat) - { - long int jres = (long int)topOut[*bat].ResNum(); - if (jres < ires) { - mprintf("DEBUG: Connected to residue %s\n", topOut.TruncResNameNum(jres).c_str()); - if (linkBuilder.ModelCoordsAroundBond(frameOut, topOut, at, *bat, - *zmatrix, hasPosition)) - { - mprinterr("Error: Model coords around bond failed between %s and %s\n", - topOut.AtomMaskName(at).c_str(), topOut.AtomMaskName(*bat).c_str()); - return 1; - } - - } - } - } - } -*/ - // TEST FIXME -// Cpptraj::Structure::Zmatrix testZ; -// if (testZ.BuildZmatrixFromTop(frameOut, topOut, ires, mainParmSet.AT(), hasPosition)) { -// mprinterr("Error: Failed to create zmatrix from topology.\n"); -// return 1; -// } // Update internal coords from known positions if (structureBuilder->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } - // Update zmatrix seeds - //if (zmatrix->AutoSetSeedsWithPositions( frameOut, topOut, ires, hasPosition )) { - // mprinterr("Error: Could not set up seed atoms for Zmatrix.\n"); - // buildFailed = true; - //} else { - Cpptraj::Structure::Zmatrix tmpz; - tmpz.SetDebug( 1 ); // DEBUG - if (structureBuilder->GetZmatrixFromInternals(tmpz, topOut)) { - mprinterr("Error: Could not get Zmatrix from internals.\n"); - return 1; - } - if (tmpz.SetToFrame( frameOut, hasPosition )) { - mprinterr("Error: Building residue %s failed.\n", - topOut.TruncResNameOnumId(ires).c_str()); - buildFailed = true; - } else - resIsBuilt[ires] = true; - //} + // Convert to Zmatrix and assign missing atom positions + Cpptraj::Structure::Zmatrix tmpz; + tmpz.SetDebug( 1 ); // DEBUG + if (structureBuilder->GetZmatrixFromInternals(tmpz, topOut)) { + mprinterr("Error: Could not get Zmatrix from internals.\n"); + return 1; + } + if (tmpz.SetToFrame( frameOut, hasPosition )) { + mprinterr("Error: Building residue %s failed.\n", + topOut.TruncResNameOnumId(ires).c_str()); + buildFailed = true; + } else + resIsBuilt[ires] = true; + delete structureBuilder; } } @@ -501,8 +480,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } // Clean up zmatrices - for (Zarray::iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) - if (*it != 0) delete *it; + //for (Zarray::iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) + // if (*it != 0) delete *it; // Finalize topology topOut.CommonSetup(); // TODO dont assign default bond parameters here From 4ceda1bcdb9aac264f026e8264341f0cd418e501 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:32:31 -0500 Subject: [PATCH 0475/1492] Get rid of old code. Dont try to assign default bond parameters to built topology --- src/Exec_Build.cpp | 142 +++++++-------------------------------------- 1 file changed, 22 insertions(+), 120 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index a14c9e83c8..ab5f2200f6 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -74,64 +74,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Topology const& topIn, Frame const& frameIn, ParameterSet const& mainParmSet) { - // Residue terminal status - - // Track which residues are terminal - //typedef std::vector Iarray; - //typedef std::vector IIarray; - //IIarray molTermResidues; -/* - // Track residue connections - IIarray resConnections( topIn.Nres() ); - for (int ires = 0; ires != topIn.Nres(); ires++) - { - Residue const& currentRes = topIn.Res(ires); - int n_connections = 0; - for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); at++) - { - //if (topIn[at].Element() != Atom::HYDROGEN && topIn[at].Nbonds() > 1) { - for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) - { - if (topIn[*bat].ResNum() != topIn[at].ResNum()) { - n_connections++; - resConnections[ ires ].push_back( topIn[*bat].ResNum() ); - } - } - //} - } - mprintf("DEBUG: Res %s has %i connections.\n", topIn.TruncResNameOnumId(ires).c_str(), n_connections); - if (n_connections == 1) { - int molnum = topIn[currentRes.FirstAtom()].MolNum(); - molTermResidues[ molnum ].push_back( ires ); - } - } - // DEBUG Print residue connections - mprintf("DEBUG: Residue connections:\n"); - for (IIarray::const_iterator rit = resConnections.begin(); rit != resConnections.end(); ++rit) - { - mprintf("DEBUG:\t\t%s to", topIn.TruncResNameOnumId(rit-resConnections.begin()).c_str()); - for (Iarray::const_iterator it = rit->begin(); it != rit->end(); ++it) - mprintf(" %s", topIn.TruncResNameOnumId( *it ).c_str()); - mprintf("\n"); - } - typedef std::vector Tarray; - Tarray residueTerminalStatus( topIn.Nres(), REGULAR ); - mprintf("\tTerminal residues:\n"); - for (IIarray::const_iterator mit = molTermResidues.begin(); mit != molTermResidues.end(); ++mit) - { - mprintf("\t\tMol %li:", mit - molTermResidues.begin() + 1); - for (Iarray::const_iterator it = mit->begin(); it != mit->end(); ++it) { - mprintf(" %s", topIn.TruncResNameOnumId( *it ).c_str()); - if (it == mit->begin()) - residueTerminalStatus[*it] = BEG_TERMINAL; - else - residueTerminalStatus[*it] = END_TERMINAL; - mprintf("(%i)", (int)residueTerminalStatus[*it]); - } - mprintf("\n"); - } -*/ - // ----------------------------------- // Array of templates for each residue std::vector ResTemplates; ResTemplates.reserve( topIn.Nres() ); @@ -159,8 +101,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } else { resTermType = Cpptraj::Structure::NON_TERMINAL; } - mprintf("DEBUG: Residue type: %s\n", Cpptraj::Structure::terminalStr(resTermType)); - ResTypes.push_back( resTermType ); + mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(resTermType)); // Identify a template based on the residue name. DataSet_Coords* resTemplate = IdTemplateFromName(Templates, currentRes.Name(), resTermType); if (resTemplate == 0) { @@ -183,10 +124,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Cpptraj::Structure::Zmatrix::Barray hasPosition; hasPosition.reserve( newNatom ); - // Hold Z-matrices for residues that have missing atoms -// typedef std::vector Zarray; -// Zarray ResZmatrices; -// ResZmatrices.reserve( topIn.Nres() ); // Hold atom offsets needed when building residues typedef std::vector Iarray; Iarray AtomOffsets; @@ -198,10 +135,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, typedef std::vector ResAtArray; ResAtArray interResBonds; - //Cpptraj::Structure::Builder structureBuilder; - //structureBuilder.SetDebug( 1 ); - //structureBuilder.SetParameters( &mainParmSet ); - // For holding bonded atom pairs typedef std::pair Ipair; typedef std::vector IParray; @@ -218,7 +151,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, IParray intraResBonds; if (resTemplate == 0) { // ----- No template. Just add the atoms. ------------ - //ResZmatrices.push_back( 0 ); AtomOffsets.push_back( -1 ); for (int itgt = currentRes.FirstAtom(); itgt != currentRes.LastAtom(); ++itgt) { @@ -275,7 +207,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } //} } - // TODO connect atoms for inter-residue connections + // TODO check connect atoms for inter-residue connections templateAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds topOut.AddTopAtom( templateAtom, currentRes ); if (map[iref] == -1) { @@ -304,27 +236,11 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (pdb[itgt] == -1) nTgtAtomsMissing++; mprintf("\t%i source atoms not mapped to template.\n", nTgtAtomsMissing); - // Save zmatrix if atoms need to be built - if (atomsNeedBuilding) { + // Save atom offset if atoms need to be built + if (atomsNeedBuilding) AtomOffsets.push_back( atomOffset ); - - //if (zmatrix->SetFromFrameAndConnect( templateFrame, resTemplate->Top() )) { -// if (zmatrix->GenerateInternals( templateFrame, resTemplate->Top() )) { -// mprinterr("Error: Could not set up residue template zmatrix.\n"); -// return 1; -// } - -// zmatrix->print( resTemplate->TopPtr() ); -// ResZmatrices.push_back( structureBuilder ); -// zmatrix->print( &topOut ); - //for (Iarray::const_iterator jres = resConnections[ires].begin(); - // jres != resConnections[ires].end(); ++jres) - //{ - // mprintf("DEBUG:\t\tConnected residue %s\n", topIn.TruncResNameOnumId(*jres).c_str()); - //} - } else + else AtomOffsets.push_back( -1 ); -// ResZmatrices.push_back( 0 ); } // END template exists // Add intra-residue bonds for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) @@ -338,7 +254,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); // ----------------------------------- - // Add inter-residue bonds + // Check inter-residue bonds std::vector resBondingAtoms(topOut.Nres()); for (ResAtArray::const_iterator it = interResBonds.begin(); it != interResBonds.end(); ++it) { @@ -358,7 +274,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Atom %s not found in residue %i\n", *(ra1.second), ra1.first); return 1; } - //topOut.AddBond(at0, at1); // Save bonding atoms resBondingAtoms[ra0.first].push_back( Ipair(at0, at1) ); resBondingAtoms[ra1.first].push_back( Ipair(at1, at0) ); @@ -385,29 +300,25 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // ----------------------------------- // Build using internal coords if needed. - std::vector resIsBuilt; // TODO is this needed? - resIsBuilt.reserve( AtomOffsets.size() ); - for (Iarray::const_iterator it = AtomOffsets.begin(); it != AtomOffsets.end(); ++it) { - if ( *it < 0 ) - resIsBuilt.push_back( true ); - else - resIsBuilt.push_back( false ); - } +// std::vector resIsBuilt; // TODO is this needed? +// resIsBuilt.reserve( AtomOffsets.size() ); +// for (Iarray::const_iterator it = AtomOffsets.begin(); it != AtomOffsets.end(); ++it) { +// if ( *it < 0 ) +// resIsBuilt.push_back( true ); +// else +// resIsBuilt.push_back( false ); +// } -// Cpptraj::Structure::Builder linkBuilder; -// linkBuilder.SetDebug( 1 ); // FIXME -// linkBuilder.SetParameters( &mainParmSet ); bool buildFailed = false; - TermTypeArray::const_iterator termType = ResTypes.begin(); // FIXME is termType needed? - //for (Zarray::const_iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it, ++termType) for (Iarray::const_iterator it = AtomOffsets.begin(); it != AtomOffsets.end(); ++it) { long int ires = it-AtomOffsets.begin(); - //Cpptraj::Structure::Builder* structureBuilder = *it; if (*it > -1) { + // Residue has atom offset which indicates it needs something built. Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); structureBuilder->SetDebug( 1 ); // DEBUG FIXME structureBuilder->SetParameters( &mainParmSet ); + // Generate internals from the template, update indices to this topology. DataSet_Coords* resTemplate = ResTemplates[ires]; Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); @@ -421,11 +332,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("DEBUG: ***** BUILD residue %li %s *****\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); - mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); - //mprintf("DEBUG: Zmatrix for building residue %li %s\n", ires + 1, - // topOut.TruncResNameOnumId(ires).c_str()); - //zmatrix->print(&topOut); -// linkBuilder.SetZmatrix( zmatrix ); + //mprintf("DEBUG: Residue type: %s terminal\n", Cpptraj::Structure::terminalStr(*termType)); // Is this residue connected to an earlier residue? for (IParray::const_iterator resBonds = resBondingAtoms[ires].begin(); resBonds != resBondingAtoms[ires].end(); ++resBonds) @@ -444,7 +351,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AtomMaskName(resBonds->second).c_str()); return 1; } - //tmpz.print(&topOut); } } // Update internal coords from known positions @@ -463,11 +369,11 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; - } else - resIsBuilt[ires] = true; + }// else + // resIsBuilt[ires] = true; delete structureBuilder; } - } + } // END loop over atom offsets // DEBUG - Print new top/coords for (int iat = 0; iat != topOut.Natom(); iat++) @@ -479,12 +385,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, (int)hasPosition[iat], XYZ[0], XYZ[1], XYZ[2]); } - // Clean up zmatrices - //for (Zarray::iterator it = ResZmatrices.begin(); it != ResZmatrices.end(); ++it) - // if (*it != 0) delete *it; - - // Finalize topology - topOut.CommonSetup(); // TODO dont assign default bond parameters here + // Finalize topology - determine molecules, dont renumber residues, dont assign default bond params + topOut.CommonSetup(true, false, false); topOut.Summary(); if (buildFailed) return 1; From 024a9127409b7292a079681f5e60bc78baa9a952 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:38:32 -0500 Subject: [PATCH 0476/1492] Add comment line --- src/Structure/Builder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 7a0c333b27..5b578f0af7 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -101,6 +101,7 @@ const return 0; } +// ----------------------------------------------------------------------------- /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. */ From 1c777e6af3e5cf524200247c8e6f5922ce27288f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 12:58:29 -0500 Subject: [PATCH 0477/1492] Start new sequnce --- src/Exec_Sequence.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 89127f23cb..768cfc5e0b 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "AssociatedData_Connect.h" #include "Structure/Builder.h" +#include "Structure/Zmatrix.h" /** Generate and build the specified sequence. */ int Exec_Sequence::generate_sequence(DataSet_Coords* OUT, @@ -85,6 +86,74 @@ const for (unsigned int idx = 0; idx < Units.size(); idx++) mprintf("\tUnit %s HEAD %i TAIL %i\n", Units[idx]->legend(), connectAt0[idx]+1, connectAt1[idx]+1); + Topology topOut; + Frame frameOut; + mprintf("\tFinal structure should have %i atoms.\n", total_natom); + frameOut.SetupFrame( total_natom ); + // Clear frame so that AddXYZ can be used + frameOut.ClearAtoms(); + + // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building + Cpptraj::Structure::Zmatrix::Barray hasPosition; + hasPosition.reserve( total_natom ); + + // Hold atom offsets needed when building residues + typedef std::vector Iarray; + Iarray AtomOffsets; + AtomOffsets.reserve( Units.size() ); // FIXME assuming 1 residue per unit + + // For holding bonded atom pairs + typedef std::pair Ipair; + typedef std::vector IParray; + + // Loop for setting up atoms in the topology from units + for (unsigned int idx = 0; idx < Units.size(); idx++) + { + DataSet_Coords* unit = Units[idx]; + mprintf("\tAdding atoms for unit %s\n", unit->legend()); + Residue const& currentRes = unit->Top().Res(0); // FIXME assuming 1 unit + int atomOffset = topOut.Natom(); + mprintf("DEBUG: atom offset is %i\n", atomOffset); + // Add the unit atoms. Only the first unit has known position. + bool atomPosKnown = (idx == 0); + Frame unitFrm = unit->AllocateFrame(); + unit->GetFrame(0, unitFrm); + IParray intraResBonds; + for (int itgt = 0; itgt < unit->Top().Natom(); itgt++) + { + Atom sourceAtom = unit->Top()[itgt]; + // Save the bonds + int at0 = itgt + atomOffset; + for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { + int at1 = *bat + atomOffset; + if (at1 > at0) { + mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); + intraResBonds.push_back( Ipair(at0, at1) ); + } + } + sourceAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds + topOut.AddTopAtom( sourceAtom, currentRes ); + frameOut.AddVec3( Vec3(unitFrm.XYZ(itgt)) ); + hasPosition.push_back( atomPosKnown ); + } + // Add the bonds + // Add intra-residue bonds + for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) + { + //mprintf("DEBUG: Intra-res bond: Res %s atom %s to res %s atom %s\n", + // topOut.TruncResNameOnumId(topOut[it->first].ResNum()).c_str(), *(topOut[it->first].Name()), + // topOut.TruncResNameOnumId(topOut[it->second].ResNum()).c_str(), *(topOut[it->second].Name())); + topOut.AddBond(it->first, it->second); + } + + // All units after the first need building + if (atomPosKnown) + AtomOffsets.push_back( -1 ); + else + AtomOffsets.push_back( atomOffset ); + } // END loop over units + + Topology combinedTop; combinedTop.SetDebug( debug_ ); combinedTop.SetParmName( OUT->Meta().Name(), FileName() ); From b309d3bfd283da4b4e50f99e8e02730279f4601e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 13:01:16 -0500 Subject: [PATCH 0478/1492] Fix comments --- src/Exec_Sequence.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 768cfc5e0b..f1b5d591e6 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -122,7 +122,7 @@ const for (int itgt = 0; itgt < unit->Top().Natom(); itgt++) { Atom sourceAtom = unit->Top()[itgt]; - // Save the bonds + // Save the intra-residue bonds int at0 = itgt + atomOffset; for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { int at1 = *bat + atomOffset; @@ -136,7 +136,6 @@ const frameOut.AddVec3( Vec3(unitFrm.XYZ(itgt)) ); hasPosition.push_back( atomPosKnown ); } - // Add the bonds // Add intra-residue bonds for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) { From bb15f5498887238d0cbc8ddbf3e9ff40cac231c4 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 13:28:23 -0500 Subject: [PATCH 0479/1492] Do the inter-residue bonds --- src/Exec_DataSetCmd.cpp | 2 ++ src/Exec_Sequence.cpp | 29 +++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/Exec_DataSetCmd.cpp b/src/Exec_DataSetCmd.cpp index 9d60c346f8..93778e6b48 100644 --- a/src/Exec_DataSetCmd.cpp +++ b/src/Exec_DataSetCmd.cpp @@ -385,6 +385,8 @@ Exec::RetType Exec_DataSetCmd::SetConnect(CpptrajState& State, ArgList& argIn) { mprinterr("Error: Neither head atom nor tail atom could be set via mask.\n"); return CpptrajState::ERR; } + if (head > -1) mprintf("\tHead atom# %i\n", head+1); + if (tail > -1) mprintf("\tTail atom# %i\n", tail+1); connect = AssociatedData_Connect(head, tail); } // Check for existing associated data diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index f1b5d591e6..10774e9aa9 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -107,12 +107,26 @@ const typedef std::vector IParray; // Loop for setting up atoms in the topology from units + int prevTailAtom = -1; for (unsigned int idx = 0; idx < Units.size(); idx++) { + int atomOffset = topOut.Natom(); DataSet_Coords* unit = Units[idx]; - mprintf("\tAdding atoms for unit %s\n", unit->legend()); + // Needs to have connect associated data + AssociatedData* ad = unit->GetAssociatedData(AssociatedData::CONNECT); + if (ad == 0) { + mprinterr("Error: Unit '%s' does not have CONNECT data.\n", unit->legend()); + return 1; + } + AssociatedData_Connect const& CONN = static_cast( *ad ); + if (CONN.NconnectAtoms() < 2) { + mprinterr("Error: Not enough connect atoms in unit '%s'\n", unit->legend()); + return 1; + } + int headAtom = CONN.Connect()[0] + atomOffset; + int tailAtom = CONN.Connect()[1] + atomOffset; + mprintf("\tAdding atoms for unit %s (head %i tail %i)\n", unit->legend(), headAtom+1, tailAtom+1); Residue const& currentRes = unit->Top().Res(0); // FIXME assuming 1 unit - int atomOffset = topOut.Natom(); mprintf("DEBUG: atom offset is %i\n", atomOffset); // Add the unit atoms. Only the first unit has known position. bool atomPosKnown = (idx == 0); @@ -144,6 +158,17 @@ const // topOut.TruncResNameOnumId(topOut[it->second].ResNum()).c_str(), *(topOut[it->second].Name())); topOut.AddBond(it->first, it->second); } + // Connect HEAD atom of this residue to TAIL of previous residue + if (idx > 0) { + if (prevTailAtom < 0 || headAtom < 0) { + mprinterr("Error: Could not find connect atoms for previous residue (%i) and/or this residue (%i)\n", + prevTailAtom+1, headAtom+1); + return 1; + } + mprintf("Will add bond between %i and %i\n", prevTailAtom+1, headAtom+1); + topOut.AddBond(prevTailAtom, headAtom); + } + prevTailAtom = tailAtom; // All units after the first need building if (atomPosKnown) From 8a6333feb863c5e0056fd24505e8eb96026b2f2b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 13:41:38 -0500 Subject: [PATCH 0480/1492] Start using new build routines in sequence --- src/Exec_Sequence.cpp | 67 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 10774e9aa9..9c63ebfbc5 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -107,6 +107,7 @@ const typedef std::vector IParray; // Loop for setting up atoms in the topology from units + IParray interResBonds; int prevTailAtom = -1; for (unsigned int idx = 0; idx < Units.size(); idx++) { @@ -130,7 +131,7 @@ const mprintf("DEBUG: atom offset is %i\n", atomOffset); // Add the unit atoms. Only the first unit has known position. bool atomPosKnown = (idx == 0); - Frame unitFrm = unit->AllocateFrame(); + Frame unitFrm = unit->AllocateFrame(); // FIXME only first res unit->GetFrame(0, unitFrm); IParray intraResBonds; for (int itgt = 0; itgt < unit->Top().Natom(); itgt++) @@ -166,8 +167,10 @@ const return 1; } mprintf("Will add bond between %i and %i\n", prevTailAtom+1, headAtom+1); - topOut.AddBond(prevTailAtom, headAtom); - } + interResBonds.push_back( Ipair(prevTailAtom, headAtom) ); + } else + // Placeholder + interResBonds.push_back( Ipair(-1, -1) ); prevTailAtom = tailAtom; // All units after the first need building @@ -177,6 +180,64 @@ const AtomOffsets.push_back( atomOffset ); } // END loop over units + // Build + bool buildFailed = false; + for (Iarray::const_iterator it = AtomOffsets.begin(); it != AtomOffsets.end(); ++it) + { + long int ires = it-AtomOffsets.begin(); + if (*it > -1) { + // Residue has atom offset which indicates it needs something built. + Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); + structureBuilder->SetDebug( 1 ); // DEBUG FIXME + //structureBuilder->SetParameters( &mainParmSet ); TODO import parameters? + // Generate internals from the template, update indices to this topology. + DataSet_Coords* unit = Units[ires]; + Frame unitFrm = unit->AllocateFrame(); + unit->GetFrame(0, unitFrm); + if (structureBuilder->GenerateInternals(unitFrm, unit->Top(), + std::vector(unit->Top().Natom(), true))) + { + mprinterr("Error: Generate internals for unit failed.\n"); + return 1; + } + structureBuilder->UpdateIndicesWithOffset( *it ); + + mprintf("DEBUG: ***** BUILD unit %li %s *****\n", ires + 1, + topOut.TruncResNameOnumId(ires).c_str()); + + // Connect unit + topOut.AddBond( interResBonds[ires].first, interResBonds[ires].second ); + // Generate internals around the link + if (structureBuilder->GenerateInternalsAroundLink(interResBonds[ires].first, interResBonds[ires].second, + frameOut, topOut, hasPosition)) + { + mprinterr("Error: Assign torsions around inter-unit link %s - %s failed.\n", + topOut.AtomMaskName(interResBonds[ires].first).c_str(), + topOut.AtomMaskName(interResBonds[ires].second).c_str()); + return 1; + } + // Update internal coords from known positions + if (structureBuilder->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { + mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); + return 1; + } + // Convert to Zmatrix and assign missing atom positions + Cpptraj::Structure::Zmatrix tmpz; + tmpz.SetDebug( 1 ); // DEBUG + if (structureBuilder->GetZmatrixFromInternals(tmpz, topOut)) { + mprinterr("Error: Could not get Zmatrix from internals.\n"); + return 1; + } + if (tmpz.SetToFrame( frameOut, hasPosition )) { + mprinterr("Error: Building residue %s failed.\n", + topOut.TruncResNameOnumId(ires).c_str()); + buildFailed = true; + } + delete structureBuilder; + } + } + + Topology combinedTop; combinedTop.SetDebug( debug_ ); From b714d0b97ac23ee66c9d3cf4e35597f2899e774c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 15:10:38 -0500 Subject: [PATCH 0481/1492] Add some debug info --- src/Exec_Sequence.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 9c63ebfbc5..ea2fc78c3f 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -206,6 +206,9 @@ const topOut.TruncResNameOnumId(ires).c_str()); // Connect unit + mprintf("DEBUG: Linking atoms %s and %s\n", + topOut.AtomMaskName(interResBonds[ires].first).c_str(), + topOut.AtomMaskName(interResBonds[ires].second).c_str()); topOut.AddBond( interResBonds[ires].first, interResBonds[ires].second ); // Generate internals around the link if (structureBuilder->GenerateInternalsAroundLink(interResBonds[ires].first, interResBonds[ires].second, From 60cef5da2b8fde8e7a71b9e53f484709ca169b6d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 8 Feb 2024 15:37:14 -0500 Subject: [PATCH 0482/1492] Determine chirality around atom --- src/Structure/Builder.cpp | 35 ++++++++++++++++++++++++++++++++++- src/Structure/Builder.h | 2 ++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 5b578f0af7..1267cc1750 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2137,6 +2137,35 @@ void Builder::buildBondInternal(int a1, int a2, Frame const& frameIn, Topology c topIn.LeapName(a2).c_str()); } +/** Determine chirality around a single atom. */ +int Builder::determineChirality(int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +{ + BuildAtom bldAt; + if (topIn[at].Nbonds() > 2 && hasPosition[at]) { + // All bonded atoms must have position + bool bonded_atoms_have_position = true; + for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) + { + if (!hasPosition[*bat]) { + bonded_atoms_have_position = false; + break; + } + } + if (bonded_atoms_have_position) { + if (bldAt.DetermineChirality(at, topIn, frameIn, 0)) {// FIXME debug level + mprinterr("Error: Problem determining chirality of atom %s\n", + topIn.AtomMaskName(at).c_str()); + return 1; + } + } + mprintf("Got chirality from external coordinates\n" ); + mprintf("++++Chirality INTERNAL: %f for %s\n", bldAt.TorsionVal()*Constants::RADDEG, + topIn.LeapName(at).c_str()); + } else { + mprintf("Left chirality undefined for %s\n",topIn.LeapName(at).c_str() ); + } + return 0; +} /** Generate internal coordinates in the same manner as LEaP's * BuildInternalsForContainer. @@ -2194,7 +2223,11 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str());*/ } - // FIXME do chirality + // Chirality + for (int at = 0; at != topIn.Natom(); ++at) { + if (determineChirality(at, frameIn, topIn, hasPosition)) + return 1; + } //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 2ad3005720..80b0ef850e 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -105,6 +105,8 @@ class Builder { void buildAngleInternal(int, int, int, Frame const&, Topology const&, Barray const&); /// Build bond internal void buildBondInternal(int, int, Frame const&, Topology const&, Barray const&); + /// Determine chirality around an atom + int determineChirality(int, Frame const&, Topology const&, Barray const&); /// Generate internal coords for a given atom int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); From 63c7a262061e70f50f41675bac1045db112c2a0f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 09:27:08 -0500 Subject: [PATCH 0483/1492] Add leap chirality calc --- src/Structure/Builder.cpp | 153 ++++++++++++++++++++++++++++++++++++-- src/Structure/Builder.h | 9 ++- 2 files changed, 155 insertions(+), 7 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 1267cc1750..396d822dc8 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1311,7 +1311,7 @@ std::vector /** LEaP routine for determining atom chirality. * This is done by crossing A to B and then dotting the - * result with C. TODO use Chirality in BuildAtom? + * result with C. TODO use Chirality in BuildAtom? Use an Enum? * The chirality of the vectors is determined by the sign of * the result, which is determined by whether or not C has * a component in the direction AxB or in the opposite direction. @@ -1330,6 +1330,56 @@ static inline double VectorAtomChirality(Vec3 const& Center, Vec3 const& A, Vec3 return 0.0; } +/** LEaP routine for determining atom chirality when positions may or + * may not be defined. Currently the criteria for chirality is + * absolute orientation of the vectors joining this atom to its neighbors. + * The neighbors are passed as vPA, vPB, vPC, vPD and bA, bB, bC, bD + * define whether or not the position is defined. + * + * This routine calculates the chirality using the defined vectors and + * then flips the sign depending on which vectors were used to calculate + * the chirality. If the ATOMs have (fKnown) set then their coordinate + * is considered to be known. + */ +static inline double VectorAtomNormalizedChirality(Vec3 const& Center, + Vec3 const& vPA, bool bA, + Vec3 const& vPB, bool bB, + Vec3 const& vPC, bool bC, + Vec3 const& vPD, bool bD) +{ + double dChi = 0; + + if (!bA) { + // If A is not known then use B,C,D to calc chirality. + // The chirality calculated will be negative w.r.t. the + // correct chirality. + if (!bB || !bC || !bD) return dChi; + dChi = -VectorAtomChirality( Center, vPB, vPC, vPD ); + return dChi; + } + + if (!bB) { + // If B is not known then use A,C,D to calc chirality. + // The chirality calculated will be correct. + if (!bB || !bD) return dChi; + dChi = VectorAtomChirality( Center, vPA, vPC, vPD ); + return dChi; + } + + if (!bC) { + // If C is not known then use A,B,D to calc chirality. + // The chirality calculated will be negative w.r.t. the + // correct chirality. + if (!bD) return dChi; + dChi = -VectorAtomChirality( Center, vPA, vPB, vPD ); + return dChi; + } + + dChi = VectorAtomChirality( Center, vPA, vPB, vPC ); + + return dChi; +} + /** Assuming atoms have been ordered with SortBondedAtomsLikeLeap, * calculate the orientation of the iB atom with respect to the * triangle (iA, iX, iY). This orientation will be used by the @@ -2137,9 +2187,94 @@ void Builder::buildBondInternal(int a1, int a2, Frame const& frameIn, Topology c topIn.LeapName(a2).c_str()); } -/** Determine chirality around a single atom. */ -int Builder::determineChirality(int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +/** \return index of atom less than all others but larger than aLast */ +int Builder::findLeastLargerThan(Atom const& aAtom, int aLast) +{ + int aSmall = -1; + for (Atom::bond_iterator aCur = aAtom.bondbegin(); aCur != aAtom.bondend(); ++aCur) + { + if (aLast != -1) { + if (aLast >= *aCur) continue; + } + if (aSmall == -1) + aSmall = *aCur; + else if ( *aCur < aSmall ) + aSmall = *aCur; + } + return aSmall; +} + +/** Sort neighbors of given atom in the same manner as LEaP. */ +void Builder::chiralityOrderNeighbors(Atom const& aAtom, + int& aPAtomA, int& aPAtomB, + int& aPAtomC, int& aPAtomD) { + aPAtomA = -1; + aPAtomB = -1; + aPAtomC = -1; + aPAtomD = -1; + + if (aAtom.Nbonds() < 1) return; + + aPAtomA = findLeastLargerThan(aAtom, -1); + if (aAtom.Nbonds() < 2) return; + + aPAtomB = findLeastLargerThan(aAtom, aPAtomA); + if (aAtom.Nbonds() < 3) return; + + aPAtomC = findLeastLargerThan(aAtom, aPAtomB); + if (aAtom.Nbonds() < 4) return; + + aPAtomD = findLeastLargerThan(aAtom, aPAtomC); +} + +/** Determine chirality around a single atom. + * \return 1 if chirality was determined, 0 if left undefined. + */ +int Builder::determineChirality(double& dChi, int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) +{ + dChi = 0.0; + if (!hasPosition[at]) { + return 0; + } + // Only check atoms with 3 or 4 bonds + Atom const& A0 = topIn[at]; + mprintf("CHIRALITY CALCULATION FOR %s (nbonds= %i)\n", *(A0.Name()), A0.Nbonds()); + for (Atom::bond_iterator bat = A0.bondbegin(); bat != A0.bondend(); ++bat) + mprintf("\tneighbor %s (id= %i) [%i]\n", *(topIn[*bat].Name()), *bat, (int)hasPosition[*bat]); + if ( A0.Nbonds() == 3 || + A0.Nbonds() == 4 ) + { + int aAtomA = -1; + int aAtomB = -1; + int aAtomC = -1; + int aAtomD = -1; + chiralityOrderNeighbors(A0, aAtomA, aAtomB, aAtomC, aAtomD); + + bool knowA = (aAtomA != -1 && hasPosition[aAtomA]); + bool knowB = (aAtomB != -1 && hasPosition[aAtomB]); + bool knowC = (aAtomC != -1 && hasPosition[aAtomC]); + bool knowD = (aAtomD != -1 && hasPosition[aAtomD]); + + if (knowA) mprintf("Chirality order A %s %i\n", *(topIn[aAtomA].Name()), aAtomA); + if (knowB) mprintf("Chirality order B %s %i\n", *(topIn[aAtomB].Name()), aAtomB); + if (knowC) mprintf("Chirality order C %s %i\n", *(topIn[aAtomC].Name()), aAtomC); + if (knowD) mprintf("Chirality order D %s %i\n", *(topIn[aAtomD].Name()), aAtomD); + + Vec3 vPA, vPB, vPC, vPD; + if (knowA) vPA = Vec3(frameIn.XYZ(aAtomA)); + if (knowB) vPB = Vec3(frameIn.XYZ(aAtomB)); + if (knowC) vPC = Vec3(frameIn.XYZ(aAtomC)); + if (knowD) vPD = Vec3(frameIn.XYZ(aAtomD)); + + dChi = VectorAtomNormalizedChirality( Vec3(frameIn.XYZ(at)), + vPA, knowA, + vPB, knowB, + vPC, knowC, + vPD, knowD ); + return 1; + } +/* BuildAtom bldAt; if (topIn[at].Nbonds() > 2 && hasPosition[at]) { // All bonded atoms must have position @@ -2163,7 +2298,7 @@ int Builder::determineChirality(int at, Frame const& frameIn, Topology const& to topIn.LeapName(at).c_str()); } else { mprintf("Left chirality undefined for %s\n",topIn.LeapName(at).c_str() ); - } + }*/ return 0; } @@ -2225,8 +2360,14 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr } // Chirality for (int at = 0; at != topIn.Natom(); ++at) { - if (determineChirality(at, frameIn, topIn, hasPosition)) - return 1; + double dValue = 0; + if (determineChirality(dValue, at, frameIn, topIn, hasPosition)) { + mprintf("Got chirality from external coordinates\n" ); + mprintf("++++Chirality INTERNAL: %f for %s\n", dValue, + topIn.LeapName(at).c_str()); + } else { + mprintf("Left chirality undefined for %s\n",topIn.LeapName(at).c_str() ); + } } //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 80b0ef850e..b0503d37ca 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -1,6 +1,7 @@ #ifndef INC_STRUCTURE_BUILDER_H #define INC_STRUCTURE_BUILDER_H #include +class Atom; class Topology; class Frame; class ParameterSet; @@ -105,8 +106,14 @@ class Builder { void buildAngleInternal(int, int, int, Frame const&, Topology const&, Barray const&); /// Build bond internal void buildBondInternal(int, int, Frame const&, Topology const&, Barray const&); + + /// Find index of bonded atom less than all others but larger than last + static inline int findLeastLargerThan(Atom const&, int); + /// Sort neighbors of atom. Used in determineChirality + static void chiralityOrderNeighbors(Atom const&, int&, int&, int&, int&); /// Determine chirality around an atom - int determineChirality(int, Frame const&, Topology const&, Barray const&); + int determineChirality(double&, int, Frame const&, Topology const&, Barray const&); + /// Generate internal coords for a given atom int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); From 6291a8d13b7323a85a91162a766764c12d65baf0 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 10:10:24 -0500 Subject: [PATCH 0484/1492] Store chiralities from template. Check against calculated values --- src/Structure/Builder.cpp | 72 ++++++++++++++++++++++----------------- src/Structure/Builder.h | 38 +++++++++++++++++++++ 2 files changed, 78 insertions(+), 32 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 396d822dc8..b0416cd132 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1667,6 +1667,8 @@ void Builder::UpdateIndicesWithOffset(int atomOffset) { it->OffsetIndices( atomOffset ); for (Larray::iterator it = internalBonds_.begin(); it != internalBonds_.end(); ++it) it->OffsetIndices( atomOffset ); + for (Carray::iterator it = internalChirality_.begin(); it != internalChirality_.end(); ++it) + it->OffsetIndices( atomOffset ); } /** Find any existing torsions around ax-ay. */ @@ -1731,6 +1733,19 @@ int Builder::getExistingBondIdx(int ai, int aj) const { return idx; } +/** \return Index of existing chirality value matching given atom, 1 for no match. */ +int Builder::getExistingChiralityIdx(int ai) const { + int idx = -1; + for (Carray::const_iterator it = internalChirality_.begin(); it != internalChirality_.end(); ++it) + { + if (it->AtI() == ai) { + idx = (int)(it - internalChirality_.begin()); + break; + } + } + return idx; +} + /** Model bond */ double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { // First look up parameter @@ -2308,10 +2323,9 @@ int Builder::determineChirality(double& dChi, int at, Frame const& frameIn, Topo int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { mprintf("DEBUG: ----- Entering Builder::GenerateInternals. -----\n"); -// zmatrix.clear(); - // First generate the bond array + // First generate the bond array for use in determining torsions. BondArray bonds = GenerateBondArray( topIn.Residues(), topIn.Atoms() ); - // Loop over bonds + // Loop over bonds to determine torsions. for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { if (assignTorsionsAroundBond( bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition, -1 )) { @@ -2321,42 +2335,16 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr return 1; } } - // Loop over angles + // Loop over angles. AngleArray angles = GenerateAngleArray( topIn.Residues(), topIn.Atoms() ); for (AngleArray::const_iterator ang = angles.begin(); ang != angles.end(); ++ang) { buildAngleInternal(ang->A1(), ang->A2(), ang->A3(), frameIn, topIn, hasPosition); -/* double dValue = 0; - if (hasPosition[ang->A1()] && - hasPosition[ang->A2()] && - hasPosition[ang->A3()]) - { - dValue = CalcAngle( frameIn.XYZ(ang->A1()), frameIn.XYZ(ang->A2()), frameIn.XYZ(ang->A3()) ); - } else { - dValue = ModelBondAngle( ang->A1(), ang->A2(), ang->A3(), topIn ); - } - internalAngles_.push_back( InternalAngle(ang->A1(), ang->A2(), ang->A3(), dValue) ); - mprintf("++++Angle INTERNAL: %f for %s - %s - %s\n", dValue*Constants::RADDEG, - topIn.LeapName(ang->A1()).c_str(), - topIn.LeapName(ang->A2()).c_str(), - topIn.LeapName(ang->A3()).c_str());*/ } // Loop over bonds for (BondArray::const_iterator bnd = bonds.begin(); bnd != bonds.end(); ++bnd) { buildBondInternal(bnd->A1(), bnd->A2(), frameIn, topIn, hasPosition); -/* double dValue = 0; - if (hasPosition[bnd->A1()] && - hasPosition[bnd->A2()]) - { - dValue = sqrt(DIST2_NoImage( frameIn.XYZ(bnd->A1()), frameIn.XYZ(bnd->A2()) ) ); - } else { - dValue = ModelBondLength( bnd->A1(), bnd->A2(), topIn ); - } - internalBonds_.push_back( InternalBond(bnd->A1(), bnd->A2(), dValue) ); - mprintf("++++Bond INTERNAL: %f for %s - %s\n", dValue, - topIn.LeapName(bnd->A1()).c_str(), - topIn.LeapName(bnd->A2()).c_str());*/ } // Chirality for (int at = 0; at != topIn.Natom(); ++at) { @@ -2368,8 +2356,8 @@ int Builder::GenerateInternals(Frame const& frameIn, Topology const& topIn, Barr } else { mprintf("Left chirality undefined for %s\n",topIn.LeapName(at).c_str() ); } + internalChirality_.push_back( InternalChirality(at, dValue) ); } - //zmatrix.print( &topIn ); mprintf("DEBUG: ----- Leaving Builder::GenerateInternals. ------\n"); return 0; } @@ -2456,7 +2444,27 @@ int Builder::generateAtomInternals(int at, Frame const& frameIn, Topology const& mprintf( "Bond length INTERNAL already defined\n" ); } } // END loop over atoms bonded to A - // FIXME do chirality + // Chirality + double dChi = 0; + int cidx = getExistingChiralityIdx(at); + if (determineChirality(dChi, at, frameIn, topIn, hasPosition)) { + mprintf("Got chirality from external coordinates\n" ); + mprintf("++++Chirality INTERNAL: %f for %s\n", dChi, + topIn.LeapName(at).c_str()); + if (cidx == -1) + internalChirality_.push_back( InternalChirality(at, dChi) ); + else { + // Check that this chirality matches previously determine chirality + if (!internalChirality_[cidx].ChiralityMatches(dChi)) + mprintf("Warning: Atom %s chirality (%f) does not match previous chirality (%f)\n", + topIn.AtomMaskName(at).c_str(), dChi, internalChirality_[cidx].ChiralVal()); + } + } else { + if (cidx == -1) + mprintf("Left chirality undefined for %s\n",topIn.LeapName(at).c_str() ); + else + mprintf("Using already-defined chirality (%f).\n", internalChirality_[cidx].ChiralVal()); + } return 0; } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index b0503d37ca..18ab848aaf 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -48,10 +48,13 @@ class Builder { class InternalAngle; /// Hold bond class InternalBond; + /// Hold chirality + class InternalChirality; typedef std::vector Tarray; typedef std::vector Aarray; typedef std::vector Larray; + typedef std::vector Carray; /// Get length parameter for atoms int getLengthParam(double&, int, int, Topology const&) const; @@ -100,6 +103,8 @@ class Builder { int getExistingAngleIdx(int, int, int) const; /// Get specific internal bond int getExistingBondIdx(int, int) const; + /// Get specific chirality + int getExistingChiralityIdx(int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Build angle internal @@ -126,6 +131,7 @@ class Builder { Tarray internalTorsions_; Aarray internalAngles_; Larray internalBonds_; + Carray internalChirality_; }; /// ----- Hold torsion internal ------------------ class Cpptraj::Structure::Builder::InternalTorsion { @@ -208,7 +214,39 @@ class Cpptraj::Structure::Builder::InternalBond { int aj_; double dist_; }; +// ----- Hold chirality value -------------------- +class Cpptraj::Structure::Builder::InternalChirality { + public: + /// CONSTRUCTOR + InternalChirality() : ai_(-1), dChi_(0) {} + /// CONSTRUCTOR + InternalChirality(int i, double d) : ai_(i), dChi_(d) {} + /// Set the chirality value TODO use enum? + void SetChiralVal(double d) { dChi_ = d; } + /// Offset indices by given value + void OffsetIndices(int o) { ai_ += o; } + + /// \return true if given chirality matches this one + bool ChiralityMatches(double d) const { + int thisC = 0; + if (dChi_ > 0) + thisC = 1; + else if (dChi_ < 0) + thisC = -1; + int otherC = 0; + if (d > 0) + otherC = 1; + else if (d < 0) + otherC = -1; + return (thisC == otherC); + } + int AtI() const { return ai_; } + double ChiralVal() const { return dChi_; } + private: + int ai_; + double dChi_; +}; } } #endif From 47c9896678939a9c10718c4f6f1a41b0c940bd0f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 10:50:24 -0500 Subject: [PATCH 0485/1492] Pass in chi values if they exist --- src/Structure/Builder.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index b0416cd132..f33998f407 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1178,7 +1178,7 @@ class Cpptraj::Structure::Builder::TorsionModel { /// Initialize torsions around bonded atoms int InitTorsion(int, int, Frame const&, Topology const&, std::vector const&, int); /// Set up torsions around bonded atoms - int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn); + int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn, double, double); /// Build mock externals from given internals int BuildMockExternals(Iarray const&, Tarray const&, Topology const&); @@ -1451,7 +1451,8 @@ int Cpptraj::Structure::Builder::TorsionModel::InitTorsion(int ax, int ay, /** Set up model torsion for bonded atoms. */ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::HybridizationType Hx, AtomType::HybridizationType Hy, - Topology const& topIn) + Topology const& topIn, + double chiX, double chiY) { if (Hx != AtomType::UNKNOWN_HYBRIDIZATION && Hy != AtomType::UNKNOWN_HYBRIDIZATION) { if (Hy > Hx) { @@ -2132,8 +2133,15 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); } - - if (mT.SetupTorsion(Hx, Hy, topIn)) { + // Get chiralities around X and Y if they exist + double chiX = 0; + int Xcidx = getExistingChiralityIdx( ax ); + if (Xcidx != -1) chiX = internalChirality_[Xcidx].ChiralVal(); + double chiY = 0; + int Ycidx = getExistingChiralityIdx( ay ); + if (Ycidx != -1) chiY = internalChirality_[Ycidx].ChiralVal(); + // Set up the torsion model + if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY)) { mprinterr("Error: Could not set up torsions around %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); From a78388f77b9020b43ecaf38124d29b9f186945af Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 10:51:57 -0500 Subject: [PATCH 0486/1492] Pass in chi values to calculateOrientation --- src/Structure/Builder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index f33998f407..9551d11443 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1385,7 +1385,7 @@ static inline double VectorAtomNormalizedChirality(Vec3 const& Center, * triangle (iA, iX, iY). This orientation will be used by the * CreateSpXSpX routines to determine which torsion values to use. */ -static inline double calculateOrientation(MockAtom const& iX, MockAtom const& iA, MockAtom const& iY, MockAtom const& iB) +static inline double calculateOrientation(MockAtom const& iX, double chiX, MockAtom const& iA, MockAtom const& iY, MockAtom const& iB) { double dOrientation = 1.0; if (iX.Known() && @@ -1469,12 +1469,12 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat // Calculate the chirality around atom X Xorientation_ = 0; if (Hx == AtomType::SP3) { - Xorientation_ = calculateOrientation( atX_, sorted_ax_[0], atY_, sorted_ax_[1] ); + Xorientation_ = calculateOrientation( atX_, chiX, sorted_ax_[0], atY_, sorted_ax_[1] ); } // Calculate the chirality around atom Y Yorientation_ = 0; if (Hy == AtomType::SP3) { - Yorientation_ = calculateOrientation( atY_, sorted_ay_[0], atX_, sorted_ay_[1] ); + Yorientation_ = calculateOrientation( atY_, chiY, sorted_ay_[0], atX_, sorted_ay_[1] ); } // DEBUG Atom const& AX = topIn[atX_.Idx()]; From 2775ba9a2bb0768239c513d5e3f6f79c84117649 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 10:54:37 -0500 Subject: [PATCH 0487/1492] Report chi values --- src/Structure/Builder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 9551d11443..d878c9ceae 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1479,12 +1479,12 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat // DEBUG Atom const& AX = topIn[atX_.Idx()]; Atom const& AY = topIn[atY_.Idx()]; - mprintf("Orientation around: %s = %f\n", *(AX.Name()), Xorientation_); + mprintf("Orientation around: %s = %f (chiX= %f)\n", *(AX.Name()), Xorientation_, chiX); //for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); for (Marray::const_iterator it = sorted_ax_.begin(); it != sorted_ax_.end(); ++it) mprintf("Atom %li: %s (%i) (build=%i)\n", it - sorted_ax_.begin(), *(topIn[it->Idx()].Name()), (int)it->Known(), (int)it->BuildInternals()); - mprintf("Orientation around: %s = %f\n", *(AY.Name()), Yorientation_); + mprintf("Orientation around: %s = %f (chiY= %f)\n", *(AY.Name()), Yorientation_, chiY); //for (Atom::bond_iterator bat = AY.bondbegin(); bat != AY.bondend(); ++bat) mprintf(" %s", *(topIn[*bat].Name())); //mprintf("}\n"); for (Marray::const_iterator it = sorted_ay_.begin(); it != sorted_ay_.end(); ++it) From c75b6bbb795706e44124aeb0b669704c68769124 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 10:57:44 -0500 Subject: [PATCH 0488/1492] Make static --- src/Structure/Builder.cpp | 81 ++++++++++++++++++++------------------- src/Structure/Builder.h | 4 +- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index d878c9ceae..c96319f68f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1380,6 +1380,47 @@ static inline double VectorAtomNormalizedChirality(Vec3 const& Center, return dChi; } +/** \return index of atom less than all others but larger than aLast */ +static inline int findLeastLargerThan(Atom const& aAtom, int aLast) +{ + int aSmall = -1; + for (Atom::bond_iterator aCur = aAtom.bondbegin(); aCur != aAtom.bondend(); ++aCur) + { + if (aLast != -1) { + if (aLast >= *aCur) continue; + } + if (aSmall == -1) + aSmall = *aCur; + else if ( *aCur < aSmall ) + aSmall = *aCur; + } + return aSmall; +} + +/** Sort neighbors of given atom in the same manner as LEaP. */ +static inline void chiralityOrderNeighbors(Atom const& aAtom, + int& aPAtomA, int& aPAtomB, + int& aPAtomC, int& aPAtomD) +{ + aPAtomA = -1; + aPAtomB = -1; + aPAtomC = -1; + aPAtomD = -1; + + if (aAtom.Nbonds() < 1) return; + + aPAtomA = findLeastLargerThan(aAtom, -1); + if (aAtom.Nbonds() < 2) return; + + aPAtomB = findLeastLargerThan(aAtom, aPAtomA); + if (aAtom.Nbonds() < 3) return; + + aPAtomC = findLeastLargerThan(aAtom, aPAtomB); + if (aAtom.Nbonds() < 4) return; + + aPAtomD = findLeastLargerThan(aAtom, aPAtomC); +} + /** Assuming atoms have been ordered with SortBondedAtomsLikeLeap, * calculate the orientation of the iB atom with respect to the * triangle (iA, iX, iY). This orientation will be used by the @@ -2210,46 +2251,6 @@ void Builder::buildBondInternal(int a1, int a2, Frame const& frameIn, Topology c topIn.LeapName(a2).c_str()); } -/** \return index of atom less than all others but larger than aLast */ -int Builder::findLeastLargerThan(Atom const& aAtom, int aLast) -{ - int aSmall = -1; - for (Atom::bond_iterator aCur = aAtom.bondbegin(); aCur != aAtom.bondend(); ++aCur) - { - if (aLast != -1) { - if (aLast >= *aCur) continue; - } - if (aSmall == -1) - aSmall = *aCur; - else if ( *aCur < aSmall ) - aSmall = *aCur; - } - return aSmall; -} - -/** Sort neighbors of given atom in the same manner as LEaP. */ -void Builder::chiralityOrderNeighbors(Atom const& aAtom, - int& aPAtomA, int& aPAtomB, - int& aPAtomC, int& aPAtomD) -{ - aPAtomA = -1; - aPAtomB = -1; - aPAtomC = -1; - aPAtomD = -1; - - if (aAtom.Nbonds() < 1) return; - - aPAtomA = findLeastLargerThan(aAtom, -1); - if (aAtom.Nbonds() < 2) return; - - aPAtomB = findLeastLargerThan(aAtom, aPAtomA); - if (aAtom.Nbonds() < 3) return; - - aPAtomC = findLeastLargerThan(aAtom, aPAtomB); - if (aAtom.Nbonds() < 4) return; - - aPAtomD = findLeastLargerThan(aAtom, aPAtomC); -} /** Determine chirality around a single atom. * \return 1 if chirality was determined, 0 if left undefined. diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 18ab848aaf..282df5c974 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -113,9 +113,9 @@ class Builder { void buildBondInternal(int, int, Frame const&, Topology const&, Barray const&); /// Find index of bonded atom less than all others but larger than last - static inline int findLeastLargerThan(Atom const&, int); + //static inline int findLeastLargerThan(Atom const&, int); /// Sort neighbors of atom. Used in determineChirality - static void chiralityOrderNeighbors(Atom const&, int&, int&, int&, int&); + //static void chiralityOrderNeighbors(Atom const&, int&, int&, int&, int&); /// Determine chirality around an atom int determineChirality(double&, int, Frame const&, Topology const&, Barray const&); From 641b1eb0a3da05061a22ae3a0cc8f73090debe84 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 11:15:12 -0500 Subject: [PATCH 0489/1492] Add 2 new chirality routines. --- src/Structure/Builder.cpp | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index c96319f68f..c27ad6a0bd 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -10,6 +10,7 @@ #include "../Topology.h" #include "../TorsionRoutines.h" #include // std::copy +#include // fabs using namespace Cpptraj::Structure; @@ -1421,6 +1422,78 @@ static inline void chiralityOrderNeighbors(Atom const& aAtom, aPAtomD = findLeastLargerThan(aAtom, aPAtomC); } +/** Transform the orientation that has been measured with + * respect to the ordering in aaOrig[4] to the ordering + * in aaNew[4]. Return the result. + * + * The transformation is done by swapping ATOMs in aaOrig until + * the order matches that of aaNew, each time two ATOMs are swapped, + * flip the sign of the orientation. + * + * SIDE EFFECT: The order in aaOrig is changed. + */ +static inline void chiralityTransformOrientation(double dOrig, int* aaOrig, double& dPNew, const int* aaNew) +{ + dPNew = dOrig; + for (int i=0; i<4; i++ ) { + int j = i; + for ( ; j<4; j++ ) { + if ( aaOrig[j] == aaNew[i] ) + break; + } + if ( j >= 4 ) { + mprinterr("Error: Comparing atoms %i %i %i aand %i to atoms %i %i %i and %i.\n", + aaOrig[0]+1, aaOrig[1]+1, aaOrig[2]+1, aaOrig[3]+1, + aaNew[0]+1, aaNew[1]+1, aaNew[2]+1, aaNew[3]+1); + mprinterr("Error: This error may be due to faulty Connection atoms.\n"); + // TODO fatal + } + // Swap elements and flip sign + if ( j != i ) { + std::swap( aaOrig[j], aaOrig[i] ); + dPNew = -dPNew; + } + } +} + +/** Transform the chirality which has been measured with + * respect to ATOM ID ordering to an arbitrary ordering. + */ +static inline double chiralityToOrientation(double dChirality, Atom const& aCenter, + int aAtomA, int aAtomB, int aAtomC, int aAtomD) +{ + if (fabs(dChirality) < Constants::SMALL) return 0.0; + + int aaOrig[4]; + chiralityOrderNeighbors( aCenter, aaOrig[0], aaOrig[1], aaOrig[2], aaOrig[3] ); + + int aaNew[4]; + aaNew[0] = aAtomA; + aaNew[1] = aAtomB; + aaNew[2] = aAtomC; + aaNew[3] = aAtomD; + + bool newNull = (aaNew[3] == -1); + bool origNull = (aaOrig[3] == -1); + if (newNull && !origNull) { + for (int i = 0; i < 4; i++) { + bool found = false; + for (int j=0; j<3; j++) found |= (aaOrig[i] == aaNew[j]); + if ( !found ) { + aaNew[3] = aaOrig[i]; + break; + } + } + } else if (!newNull && origNull) { + mprinterr("Error: Only three neighbors around: aCenter, but orientation has 4\n"); + } + + double dOrient; + chiralityTransformOrientation( dChirality, aaOrig, dOrient, aaNew ); + + return dOrient; +} + /** Assuming atoms have been ordered with SortBondedAtomsLikeLeap, * calculate the orientation of the iB atom with respect to the * triangle (iA, iX, iY). This orientation will be used by the From 4b69c9c06a500d78df160f616a412fb3de821e71 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 11:56:24 -0500 Subject: [PATCH 0490/1492] Get orientation when unknown positions are present --- src/Structure/Builder.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index c27ad6a0bd..c812f2851c 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1499,7 +1499,7 @@ static inline double chiralityToOrientation(double dChirality, Atom const& aCent * triangle (iA, iX, iY). This orientation will be used by the * CreateSpXSpX routines to determine which torsion values to use. */ -static inline double calculateOrientation(MockAtom const& iX, double chiX, MockAtom const& iA, MockAtom const& iY, MockAtom const& iB) +static inline double calculateOrientation(MockAtom const& iX, double chiX, Atom const& AX, MockAtom const& iA, MockAtom const& iY, MockAtom const& iB) { double dOrientation = 1.0; if (iX.Known() && @@ -1509,7 +1509,12 @@ static inline double calculateOrientation(MockAtom const& iX, double chiX, MockA { dOrientation = VectorAtomChirality( iX.Pos(), iA.Pos(), iY.Pos(), iB.Pos() ); } else { - mprinterr("Internal Error: Builder::calculateOrientation not yet set up for unknown positions.\n"); + double dChi = chiX; + if (fabs(dChi) < Constants::SMALL) { + mprintf("default chirality on\n"); + dChi = 1.0; + } + dOrientation = chiralityToOrientation(dChi, AX, iA.Idx(), iY.Idx(), iB.Idx(), -1); } return dOrientation; } @@ -1583,12 +1588,12 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat // Calculate the chirality around atom X Xorientation_ = 0; if (Hx == AtomType::SP3) { - Xorientation_ = calculateOrientation( atX_, chiX, sorted_ax_[0], atY_, sorted_ax_[1] ); + Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); } // Calculate the chirality around atom Y Yorientation_ = 0; if (Hy == AtomType::SP3) { - Yorientation_ = calculateOrientation( atY_, chiY, sorted_ay_[0], atX_, sorted_ay_[1] ); + Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); } // DEBUG Atom const& AX = topIn[atX_.Idx()]; From dde8d85de42dfe06ea4a02e641175275a8cb5163 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 12:37:24 -0500 Subject: [PATCH 0491/1492] Determine chirality same way as leap --- src/Structure/Builder.cpp | 44 ++++++++++++++++++++++++++++++++++----- src/Structure/Builder.h | 3 +++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index c812f2851c..5baca3cd5f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -2158,6 +2158,40 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { return; } +/** Determine hybridization in the same manner as leap */ +AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom) const { + AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; + if (params_ != 0) { + ParmHolder::const_iterator it; + if (aAtom.HasType()) { + it = params_->AT().GetParam( TypeNameHolder(aAtom.Type()) ); + if (it != params_->AT().end()) + H1 = it->second.Hybridization(); + } + } + if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) { + // TODO bond orders? + int iSingle = 0; + int iDouble = 0; + int iTriple = 0; + int iAromatic = 0; + for (int i = 0; i < aAtom.Nbonds(); i++) + iSingle++; + //printf("iAtomHybridization: %s isingle=%i\n", iSingle); + if ( iAromatic != 0 ) H1 = AtomType::SP2; + // one or more triple bonds makes the atom SP1 + else if ( iTriple != 0 ) H1 = AtomType::SP; + // Two or more double bonds makes the atom linear, SP1 + else if ( iDouble >= 2 ) H1 = AtomType::SP; + // One double bond makes the atom SP2 + else if ( iDouble != 0 ) H1 = AtomType::SP2; + // Otherwise the atom is SP3 + else H1 = AtomType::SP3; + } + + return H1; +} + /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) { @@ -2170,9 +2204,9 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo if (topIn[a1].Nbonds() < 2 || topIn[a2].Nbonds() < 2) return 0; // Get atom hybridizations - AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; - AtomType::HybridizationType H2 = AtomType::UNKNOWN_HYBRIDIZATION; - if (params_ != 0) { + AtomType::HybridizationType H1 = getAtomHybridization( topIn[a1] ); + AtomType::HybridizationType H2 = getAtomHybridization( topIn[a2] );//AtomType::UNKNOWN_HYBRIDIZATION; +/* if (params_ != 0) { ParmHolder::const_iterator it; if (topIn[a1].HasType()) { it = params_->AT().GetParam( TypeNameHolder(topIn[a1].Type()) ); @@ -2188,7 +2222,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) H1 = GuessAtomHybridization(topIn[a1], topIn.Atoms()); if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) - H2 = GuessAtomHybridization(topIn[a2], topIn.Atoms()); + H2 = GuessAtomHybridization(topIn[a2], topIn.Atoms());*/ if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) mprintf("Warning: No hybridization set for atom %s\n", topIn.AtomMaskName(a1).c_str()); if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) @@ -2248,7 +2282,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo } } else { // Use existing atoms to determine torsions - mprintf("DEBUG: Using externals to fit new torsions around: %s - %s\n", + mprintf("Using externals to fit new torsions around: %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); } diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 282df5c974..6493737708 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -1,6 +1,7 @@ #ifndef INC_STRUCTURE_BUILDER_H #define INC_STRUCTURE_BUILDER_H #include +#include "../AtomType.h" class Atom; class Topology; class Frame; @@ -93,6 +94,8 @@ class Builder { void createSp3Sp2Torsions(TorsionModel const&); /// Create torsion around SP2-SP2 linkage void createSp2Sp2Torsions(TorsionModel const&); + /// Dtermine atom hybridization in the same way as leap + AtomType::HybridizationType getAtomHybridization(Atom const&) const; /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&, int); /// Get any existing internal torsion indices around specified atoms From d297c8afd2924a595a2b4384f2da1e61624eb9aa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 15:10:06 -0500 Subject: [PATCH 0492/1492] Fix orientation calc when not enough bonded atoms --- src/Exec_Sequence.cpp | 9 ++++++++- src/Structure/Builder.cpp | 12 ++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index ea2fc78c3f..4dd327205d 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -240,8 +240,15 @@ const } } + // Finalize topology - determine molecules, dont renumber residues, assign default bond params + topOut.CommonSetup(true, false, true); + topOut.Summary(); + OUT->CoordsSetup(topOut, frameOut.CoordsInfo()); + OUT->AddFrame( frameOut ); + if (buildFailed) return 1; +/* Topology combinedTop; combinedTop.SetDebug( debug_ ); combinedTop.SetParmName( OUT->Meta().Name(), FileName() ); @@ -285,7 +292,7 @@ const //} OUT->CoordsSetup(combinedTop, CombinedFrame.CoordsInfo()); - OUT->AddFrame( CombinedFrame ); + OUT->AddFrame( CombinedFrame );*/ return 0; } diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 5baca3cd5f..a78c8235ff 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1508,12 +1508,14 @@ static inline double calculateOrientation(MockAtom const& iX, double chiX, Atom iB.Known()) { dOrientation = VectorAtomChirality( iX.Pos(), iA.Pos(), iY.Pos(), iB.Pos() ); + mprintf("ORIENTATION: known = %f\n", dOrientation); } else { double dChi = chiX; if (fabs(dChi) < Constants::SMALL) { mprintf("default chirality on\n"); dChi = 1.0; } + mprintf("ORIENTATION: Chirality %f\n", dChi); dOrientation = chiralityToOrientation(dChi, AX, iA.Idx(), iY.Idx(), iB.Idx(), -1); } return dOrientation; @@ -1588,12 +1590,18 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat // Calculate the chirality around atom X Xorientation_ = 0; if (Hx == AtomType::SP3) { - Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); + if (sorted_ax_.size() < 2) + Xorientation_ = 1.0; + else + Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); } // Calculate the chirality around atom Y Yorientation_ = 0; if (Hy == AtomType::SP3) { - Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); + if (sorted_ay_.size() < 2) + Yorientation_ = 1.0; + else + Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); } // DEBUG Atom const& AX = topIn[atX_.Idx()]; From 77ba3086437c9cbd7220849be6fcc11b55b18332 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 9 Feb 2024 15:34:40 -0500 Subject: [PATCH 0493/1492] Use leap guess hybridization in model angle/bond --- src/Exec_Sequence.cpp | 3 +- src/Structure/Builder.cpp | 112 ++++++++++++++------------------------ 2 files changed, 43 insertions(+), 72 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 4dd327205d..f51d3aec7e 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -167,7 +167,8 @@ const return 1; } mprintf("Will add bond between %i and %i\n", prevTailAtom+1, headAtom+1); - interResBonds.push_back( Ipair(prevTailAtom, headAtom) ); + // To preserve compat. with LEaP, make first atom the head atom. + interResBonds.push_back( Ipair(headAtom, prevTailAtom) ); } else // Placeholder interResBonds.push_back( Ipair(-1, -1) ); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index a78c8235ff..181c8cc856 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1874,6 +1874,40 @@ int Builder::getExistingChiralityIdx(int ai) const { return idx; } +/** Determine hybridization in the same manner as leap */ +AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom) const { + AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; + if (params_ != 0) { + ParmHolder::const_iterator it; + if (aAtom.HasType()) { + it = params_->AT().GetParam( TypeNameHolder(aAtom.Type()) ); + if (it != params_->AT().end()) + H1 = it->second.Hybridization(); + } + } + if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) { + // TODO bond orders? + int iSingle = 0; + int iDouble = 0; + int iTriple = 0; + int iAromatic = 0; + for (int i = 0; i < aAtom.Nbonds(); i++) + iSingle++; + //printf("iAtomHybridization: %s isingle=%i\n", iSingle); + if ( iAromatic != 0 ) H1 = AtomType::SP2; + // one or more triple bonds makes the atom SP1 + else if ( iTriple != 0 ) H1 = AtomType::SP; + // Two or more double bonds makes the atom linear, SP1 + else if ( iDouble >= 2 ) H1 = AtomType::SP; + // One double bond makes the atom SP2 + else if ( iDouble != 0 ) H1 = AtomType::SP2; + // Otherwise the atom is SP3 + else H1 = AtomType::SP3; + } + + return H1; +} + /** Model bond */ double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { // First look up parameter @@ -1883,17 +1917,9 @@ double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { } Atom const& AI = topIn[ai]; Atom const& AJ = topIn[aj]; - AtomType::HybridizationType hybridI = AtomType::UNKNOWN_HYBRIDIZATION; - AtomType::HybridizationType hybridJ = AtomType::UNKNOWN_HYBRIDIZATION; - // Check params for hybrid - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AI.Type()) ); - if (it != params_->AT().end()) - hybridI = it->second.Hybridization(); - it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) - hybridJ = it->second.Hybridization(); - } + AtomType::HybridizationType hybridI = getAtomHybridization( AI ); + AtomType::HybridizationType hybridJ = getAtomHybridization( AJ ); + if (hybridI == AtomType::UNKNOWN_HYBRIDIZATION || hybridJ == AtomType::UNKNOWN_HYBRIDIZATION) { @@ -1941,16 +1967,11 @@ double Builder::ModelBondAngle(int ai, int aj, int ak, Topology const& topIn) co mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); } - AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; - // Check params for hybrid - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) - hybrid = it->second.Hybridization(); - } + AtomType::HybridizationType hybrid = getAtomHybridization( AJ ); + // Guess hybrid if needed - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) - hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); + //if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) + // hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); // Set from number of bonds if still unknown. This is a pretty crude guess. if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { switch (AJ.Nbonds()) { @@ -2166,40 +2187,6 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { return; } -/** Determine hybridization in the same manner as leap */ -AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom) const { - AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; - if (params_ != 0) { - ParmHolder::const_iterator it; - if (aAtom.HasType()) { - it = params_->AT().GetParam( TypeNameHolder(aAtom.Type()) ); - if (it != params_->AT().end()) - H1 = it->second.Hybridization(); - } - } - if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) { - // TODO bond orders? - int iSingle = 0; - int iDouble = 0; - int iTriple = 0; - int iAromatic = 0; - for (int i = 0; i < aAtom.Nbonds(); i++) - iSingle++; - //printf("iAtomHybridization: %s isingle=%i\n", iSingle); - if ( iAromatic != 0 ) H1 = AtomType::SP2; - // one or more triple bonds makes the atom SP1 - else if ( iTriple != 0 ) H1 = AtomType::SP; - // Two or more double bonds makes the atom linear, SP1 - else if ( iDouble >= 2 ) H1 = AtomType::SP; - // One double bond makes the atom SP2 - else if ( iDouble != 0 ) H1 = AtomType::SP2; - // Otherwise the atom is SP3 - else H1 = AtomType::SP3; - } - - return H1; -} - /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) { @@ -2214,23 +2201,6 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo // Get atom hybridizations AtomType::HybridizationType H1 = getAtomHybridization( topIn[a1] ); AtomType::HybridizationType H2 = getAtomHybridization( topIn[a2] );//AtomType::UNKNOWN_HYBRIDIZATION; -/* if (params_ != 0) { - ParmHolder::const_iterator it; - if (topIn[a1].HasType()) { - it = params_->AT().GetParam( TypeNameHolder(topIn[a1].Type()) ); - if (it != params_->AT().end()) - H1 = it->second.Hybridization(); - } - if (topIn[a2].HasType()) { - it = params_->AT().GetParam( TypeNameHolder(topIn[a2].Type()) ); - if (it != params_->AT().end()) - H2 = it->second.Hybridization(); - } - } - if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) - H1 = GuessAtomHybridization(topIn[a1], topIn.Atoms()); - if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) - H2 = GuessAtomHybridization(topIn[a2], topIn.Atoms());*/ if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) mprintf("Warning: No hybridization set for atom %s\n", topIn.AtomMaskName(a1).c_str()); if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) From 96209684d22f1256b2b9cec43b0aa724338ea2ae Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 10 Feb 2024 08:02:00 -0500 Subject: [PATCH 0494/1492] This is much closer to what leap produces --- test/Test_Sequence/Mol.mol2.save | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/test/Test_Sequence/Mol.mol2.save b/test/Test_Sequence/Mol.mol2.save index c1b6440f8a..23ccbc3d64 100644 --- a/test/Test_Sequence/Mol.mol2.save +++ b/test/Test_Sequence/Mol.mol2.save @@ -6,23 +6,23 @@ USER_CHARGES @ATOM - 1 C1 -1.9010 -1.2979 -0.5927 CT 1 MOC 1.387300 - 2 H2 -2.2470 -2.2143 -0.1146 H1 1 MOC -0.288000 - 3 H3 -2.3292 -1.2263 -1.5925 H1 1 MOC -0.288000 - 4 H4 -2.2160 -0.4385 -0.0008 H1 1 MOC -0.288000 - 5 O5 -0.4741 -1.3169 -0.6848 OS 1 MOC -0.523200 - 6 N 0.0540 -0.2256 0.0153 N 2 CNALA -0.570310 - 7 H -0.4149 0.5139 0.5357 H 2 CNALA 0.364710 - 8 CA 1.5127 -0.0215 0.0706 CX 2 CNALA 0.118030 - 9 HA 1.9976 -0.8599 -0.4376 H1 2 CNALA 0.105630 - 10 CB 1.8871 1.2873 -0.6522 CT 2 CNALA -0.214290 - 11 HB1 1.5308 1.2705 -1.6848 HC 2 CNALA 0.081710 - 12 HB2 1.4452 2.1491 -0.1463 HC 2 CNALA 0.081710 - 13 HB3 2.9715 1.4185 -0.6703 HC 2 CNALA 0.081710 - 14 C 2.0167 -0.0042 1.5042 C 2 CNALA 0.597740 - 15 O 1.3510 0.3674 2.4498 O 2 CNALA -0.533510 - 16 OXT 3.2954 -0.2516 1.6078 OH 2 CNALA -0.566290 - 17 HXT 3.6319 -0.4443 0.7168 HO 2 CNALA 0.453160 + 1 C1 -1.1655 0.1889 -0.0001 CT 1 MOC 1.387300 + 2 H2 -2.0028 -0.4954 -0.0001 H1 1 MOC -0.288000 + 3 H3 -1.2286 0.8227 -0.8832 H1 1 MOC -0.288000 + 4 H4 -1.2287 0.8227 0.8831 H1 1 MOC -0.288000 + 5 O5 0.0000 -0.5708 0.0000 OS 1 MOC -0.523200 + 6 N 1.1916 0.3403 0.0000 N 2 CNALA -0.570310 + 7 H 1.1430 0.8923 -0.8547 H 2 CNALA 0.364710 + 8 CA 2.4264 -0.4645 0.0001 CX 2 CNALA 0.118030 + 9 HA 2.4901 -0.9979 0.9529 H1 2 CNALA 0.105630 + 10 CB 2.3829 -1.4921 -1.1479 CT 2 CNALA -0.214290 + 11 HB1 1.4987 -2.1277 -1.0603 HC 2 CNALA 0.081710 + 12 HB2 2.3542 -0.9887 -2.1172 HC 2 CNALA 0.081710 + 13 HB3 3.2659 -2.1348 -1.1206 HC 2 CNALA 0.081710 + 14 C 3.6613 0.4137 -0.1142 C 2 CNALA 0.597740 + 15 O 3.6774 1.4856 -0.6854 O 2 CNALA -0.533510 + 16 OXT 4.7542 -0.1713 0.2984 OH 2 CNALA -0.566290 + 17 HXT 4.5091 -1.0471 0.6406 HO 2 CNALA 0.453160 @BOND 1 1 5 1 2 6 8 1 @@ -30,7 +30,7 @@ USER_CHARGES 4 8 14 1 5 14 15 1 6 14 16 1 - 7 5 6 1 + 7 6 5 1 8 1 2 1 9 1 3 1 10 1 4 1 From 72f11c351f7b0939a21e37cf48aebdccb201736c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 11 Feb 2024 13:45:16 -0500 Subject: [PATCH 0495/1492] Dont use new --- src/Exec_Build.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index ab5f2200f6..49fff328e5 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -315,20 +315,20 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, long int ires = it-AtomOffsets.begin(); if (*it > -1) { // Residue has atom offset which indicates it needs something built. - Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); - structureBuilder->SetDebug( 1 ); // DEBUG FIXME - structureBuilder->SetParameters( &mainParmSet ); + Cpptraj::Structure::Builder structureBuilder;// = new Cpptraj::Structure::Builder(); + structureBuilder.SetDebug( 1 ); // DEBUG FIXME + structureBuilder.SetParameters( &mainParmSet ); // Generate internals from the template, update indices to this topology. DataSet_Coords* resTemplate = ResTemplates[ires]; Frame templateFrame = resTemplate->AllocateFrame(); resTemplate->GetFrame( 0, templateFrame ); - if (structureBuilder->GenerateInternals(templateFrame, resTemplate->Top(), + if (structureBuilder.GenerateInternals(templateFrame, resTemplate->Top(), std::vector(resTemplate->Top().Natom(), true))) { mprinterr("Error: Generate internals for residue template failed.\n"); return 1; } - structureBuilder->UpdateIndicesWithOffset( *it ); + structureBuilder.UpdateIndicesWithOffset( *it ); mprintf("DEBUG: ***** BUILD residue %li %s *****\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); @@ -343,7 +343,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, topOut.AtomMaskName(resBonds->second).c_str()); topOut.AddBond(resBonds->first, resBonds->second); // Generate internals around the link - if (structureBuilder->GenerateInternalsAroundLink(resBonds->first, resBonds->second, + if (structureBuilder.GenerateInternalsAroundLink(resBonds->first, resBonds->second, frameOut, topOut, hasPosition)) { mprinterr("Error: Assign torsions around inter-residue link %s - %s failed.\n", @@ -354,14 +354,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } } // Update internal coords from known positions - if (structureBuilder->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { + if (structureBuilder.UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } // Convert to Zmatrix and assign missing atom positions Cpptraj::Structure::Zmatrix tmpz; tmpz.SetDebug( 1 ); // DEBUG - if (structureBuilder->GetZmatrixFromInternals(tmpz, topOut)) { + if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { mprinterr("Error: Could not get Zmatrix from internals.\n"); return 1; } @@ -371,7 +371,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, buildFailed = true; }// else // resIsBuilt[ires] = true; - delete structureBuilder; + //delete structureBuilder; } } // END loop over atom offsets From accc6b276987028f559cf3615d2f8e7925648d73 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 11 Feb 2024 13:45:42 -0500 Subject: [PATCH 0496/1492] Use Builder --- src/Exec_Sequence.cpp | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index f51d3aec7e..1d96f2cf55 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -15,10 +15,10 @@ const typedef std::vector Uarray; Uarray Units; Units.reserve( main_sequence.size() ); - typedef std::vector Iarray; - Iarray connectAt0, connectAt1; - connectAt0.reserve( Units.size() ); - connectAt1.reserve( Units.size() ); +// typedef std::vector Iarray; +// Iarray connectAt0, connectAt1; +// connectAt0.reserve( Units.size() ); +// connectAt1.reserve( Units.size() ); int total_natom = 0; for (Sarray::const_iterator it = main_sequence.begin(); it != main_sequence.end(); ++it) @@ -61,20 +61,20 @@ const mprintf("Warning: Unit '%s' has more than 1 frame. Only using first frame.\n", unit->legend()); } // Needs to have connect associated data - AssociatedData* ad = unit->GetAssociatedData(AssociatedData::CONNECT); - if (ad == 0) { - mprinterr("Error: Unit '%s' does not have CONNECT data.\n", unit->legend()); - return 1; - } - AssociatedData_Connect const& C = static_cast( *ad ); - if (C.NconnectAtoms() < 2) { - mprinterr("Error: Not enough connect atoms in unit '%s'\n", unit->legend()); - return 1; - } - // Update connect atom 1 indices based on their position in the sequence. - // Do not update connect atom 0 indices since they will not yet be connected. - connectAt0.push_back( C.Connect()[0] ); - connectAt1.push_back( C.Connect()[1] + total_natom ); +// AssociatedData* ad = unit->GetAssociatedData(AssociatedData::CONNECT); +// if (ad == 0) { +// mprinterr("Error: Unit '%s' does not have CONNECT data.\n", unit->legend()); +// return 1; +// } +// AssociatedData_Connect const& C = static_cast( *ad ); +// if (C.NconnectAtoms() < 2) { +// mprinterr("Error: Not enough connect atoms in unit '%s'\n", unit->legend()); +// return 1; +// } +// // Update connect atom 1 indices based on their position in the sequence. +// // Do not update connect atom 0 indices since they will not yet be connected. +// connectAt0.push_back( C.Connect()[0] ); +// connectAt1.push_back( C.Connect()[1] + total_natom ); Units.push_back( unit ); total_natom += unit->Top().Natom(); } // END loop over sequence @@ -83,8 +83,8 @@ const mprinterr("Error: No units.\n"); return 1; } - for (unsigned int idx = 0; idx < Units.size(); idx++) - mprintf("\tUnit %s HEAD %i TAIL %i\n", Units[idx]->legend(), connectAt0[idx]+1, connectAt1[idx]+1); +// for (unsigned int idx = 0; idx < Units.size(); idx++) +// mprintf("\tUnit %s HEAD %i TAIL %i\n", Units[idx]->legend(), connectAt0[idx]+1, connectAt1[idx]+1); Topology topOut; Frame frameOut; @@ -188,20 +188,20 @@ const long int ires = it-AtomOffsets.begin(); if (*it > -1) { // Residue has atom offset which indicates it needs something built. - Cpptraj::Structure::Builder* structureBuilder = new Cpptraj::Structure::Builder(); - structureBuilder->SetDebug( 1 ); // DEBUG FIXME + Cpptraj::Structure::Builder structureBuilder;// = new Cpptraj::Structure::Builder(); + structureBuilder.SetDebug( 1 ); // DEBUG FIXME //structureBuilder->SetParameters( &mainParmSet ); TODO import parameters? // Generate internals from the template, update indices to this topology. DataSet_Coords* unit = Units[ires]; Frame unitFrm = unit->AllocateFrame(); unit->GetFrame(0, unitFrm); - if (structureBuilder->GenerateInternals(unitFrm, unit->Top(), + if (structureBuilder.GenerateInternals(unitFrm, unit->Top(), std::vector(unit->Top().Natom(), true))) { mprinterr("Error: Generate internals for unit failed.\n"); return 1; } - structureBuilder->UpdateIndicesWithOffset( *it ); + structureBuilder.UpdateIndicesWithOffset( *it ); mprintf("DEBUG: ***** BUILD unit %li %s *****\n", ires + 1, topOut.TruncResNameOnumId(ires).c_str()); @@ -212,7 +212,7 @@ const topOut.AtomMaskName(interResBonds[ires].second).c_str()); topOut.AddBond( interResBonds[ires].first, interResBonds[ires].second ); // Generate internals around the link - if (structureBuilder->GenerateInternalsAroundLink(interResBonds[ires].first, interResBonds[ires].second, + if (structureBuilder.GenerateInternalsAroundLink(interResBonds[ires].first, interResBonds[ires].second, frameOut, topOut, hasPosition)) { mprinterr("Error: Assign torsions around inter-unit link %s - %s failed.\n", @@ -221,14 +221,14 @@ const return 1; } // Update internal coords from known positions - if (structureBuilder->UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { + if (structureBuilder.UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } // Convert to Zmatrix and assign missing atom positions Cpptraj::Structure::Zmatrix tmpz; tmpz.SetDebug( 1 ); // DEBUG - if (structureBuilder->GetZmatrixFromInternals(tmpz, topOut)) { + if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { mprinterr("Error: Could not get Zmatrix from internals.\n"); return 1; } @@ -237,7 +237,7 @@ const topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; } - delete structureBuilder; + //delete structureBuilder; } } From c97ff999a00a99b944e121546630b7fcd68d5c17 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 08:46:46 -0500 Subject: [PATCH 0497/1492] Add some more debug info --- src/Structure/Builder.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 181c8cc856..26d6940071 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1442,7 +1442,7 @@ static inline void chiralityTransformOrientation(double dOrig, int* aaOrig, doub break; } if ( j >= 4 ) { - mprinterr("Error: Comparing atoms %i %i %i aand %i to atoms %i %i %i and %i.\n", + mprinterr("Error: Comparing atoms %i %i %i and %i to atoms %i %i %i and %i.\n", aaOrig[0]+1, aaOrig[1]+1, aaOrig[2]+1, aaOrig[3]+1, aaNew[0]+1, aaNew[1]+1, aaNew[2]+1, aaNew[3]+1); mprinterr("Error: This error may be due to faulty Connection atoms.\n"); @@ -2579,12 +2579,13 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, Barray const& hasPosition) { mprintf("DEBUG: ----- Entering Builder::GenerateInternalsAroundLink. -----\n"); + mprintf("DEBUG: Link: %s to %s\n", topIn.AtomMaskName(at0).c_str(), topIn.AtomMaskName(at1).c_str()); // Sanity check Atom const& A0 = topIn[at0]; Atom const& A1 = topIn[at1]; if (A0.ResNum() == A1.ResNum()) { - mprinterr("Internal Error: Builder::GenerateInternalsAroundLink(): Atoms are in the same residue.\n"); - return 1; + mprintf("Warning: Builder::GenerateInternalsAroundLink(): Atoms are in the same residue.\n"); + //return 1; } // In order to mimic the way LEaP does things, mark all atoms before // this residue as having position, and all other atoms as not having From 69c98ac0d159eff548a9ef4baabd07b7a2f95eba Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 08:51:36 -0500 Subject: [PATCH 0498/1492] Use builder in graft --- src/Exec_Graft.cpp | 118 ++++++++++++++++++++++++++++++++++++++++++++- src/cpptrajdepend | 6 +-- 2 files changed, 119 insertions(+), 5 deletions(-) diff --git a/src/Exec_Graft.cpp b/src/Exec_Graft.cpp index be97ea5c0c..207dbae367 100644 --- a/src/Exec_Graft.cpp +++ b/src/Exec_Graft.cpp @@ -2,7 +2,9 @@ #include "CpptrajStdio.h" #include "DataSet_Coords.h" #include "Structure/Builder.h" +#include "Structure/Zmatrix.h" #include // std::copy +#include // std::pair using namespace Cpptraj::Structure; @@ -297,7 +299,119 @@ const return 1; } - // Combine topologies. + for (int at = 0; at != mol0Top.Natom(); at++) + mprintf("\t%6i %s %s\n", at+1, mol0Top.AtomMaskName(at).c_str(), *(mol0Top.Res(mol0Top[at].ResNum()).Name())); + mprintf("BOND ATOM 0 %i\n", bondat0+1); + for (int at = 0; at != mol1Top.Natom(); at++) + mprintf("\t%6i %s %s\n", at+1, mol1Top.AtomMaskName(at).c_str(), *(mol1Top.Res(mol1Top[at].ResNum()).Name())); + mprintf("BOND ATOM 1 %i\n", bondat1+1); + + // Combine topologies. TODO save original chiralities + Topology topOut; + Frame frameOut; + int total_natom = mol0Top.Natom() + mol1Top.Natom(); + frameOut.SetupFrame( total_natom ); + // Clear frame so that AddXYZ can be used + frameOut.ClearAtoms(); + // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building + Cpptraj::Structure::Zmatrix::Barray hasPosition; + hasPosition.reserve( total_natom ); + // For saving intra-res bonds + typedef std::pair Ipair; + typedef std::vector IParray; + IParray intraResBonds; + // Add mol0 atoms to topology + topOut.SetDebug( debug_ ); + topOut.SetParmName( outCoords->Meta().Name(), FileName() ); + topOut.SetParmBox( mol0frm.BoxCrd() ); + for (int at = 0; at < mol0Top.Natom(); at++) { + Atom sourceAtom = mol0Top[at]; + for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { + if (*bat > at) { + mprintf("Will add bond between %i and %i\n", at+1, *bat+1); + intraResBonds.push_back( Ipair(at, *bat) ); + } + } + sourceAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds + topOut.AddTopAtom( sourceAtom, mol0Top.Res(mol0Top[at].ResNum()) ); + frameOut.AddVec3( Vec3(mol0frm.XYZ(at)) ); + hasPosition.push_back( true ); + } + // Add mol1 atoms + int atomOffset = mol0Top.Natom(); + mprintf("DEBUG: Atom offset is %i\n", atomOffset); + for (int itgt = 0; itgt < mol1Top.Natom(); itgt++) { + Atom sourceAtom = mol1Top[itgt]; + int at0 = itgt + atomOffset; + for (Atom::bond_iterator bat = sourceAtom.bondbegin(); bat != sourceAtom.bondend(); ++bat) { + int at1 = *bat + atomOffset; + if (at1 > at0) { + mprintf("Will add bond between %i and %i (original %i and %i)\n", at0+1, at1+1, itgt+1, *bat + 1); + intraResBonds.push_back( Ipair(at0, at1) ); + } + } + sourceAtom.ClearBonds(); // FIXME AddTopAtom should clear bonds + topOut.AddTopAtom( sourceAtom, mol1Top.Res(mol1Top[itgt].ResNum()) ); + frameOut.AddVec3( Vec3(mol1frm.XYZ(itgt)) ); + hasPosition.push_back( false ); + } + //Add intra-residue bonds + for (IParray::const_iterator it = intraResBonds.begin(); it != intraResBonds.end(); ++it) + { + //mprintf("DEBUG: Intra-res bond: Res %s atom %s to res %s atom %s\n", + // topOut.TruncResNameOnumId(topOut[it->first].ResNum()).c_str(), *(topOut[it->first].Name()), + // topOut.TruncResNameOnumId(topOut[it->second].ResNum()).c_str(), *(topOut[it->second].Name())); + topOut.AddBond(it->first, it->second); + } + // FIXME + for (int at = 0; at != topOut.Natom(); at++) + mprintf("\t%6i %s %s\n", at+1, topOut.AtomMaskName(at).c_str(), *(topOut.Res(topOut[at].ResNum()).Name())); + // Build + Cpptraj::Structure::Builder structureBuilder; + structureBuilder.SetDebug( 1 ); // DEBUG FIXME + if (structureBuilder.GenerateInternals( mol1frm, mol1Top, + std::vector(mol1Top.Natom(), true) )) + { + mprinterr("Error: Generate internals for %s failed.\n", mol1Top.c_str()); + return 1; + } + structureBuilder.UpdateIndicesWithOffset( atomOffset ); + // Connect unit. Head atom of second unit comes first to match LEaP. + mprintf("\tConnect %s (%i) and %s (%i, original %s and %s)\n", + topOut.AtomMaskName(bondat1+atomOffset).c_str(), bondat1+atomOffset+1, + topOut.AtomMaskName(bondat0).c_str(), bondat0+1, + mol1Top.AtomMaskName(bondat1).c_str(), + mol0Top.AtomMaskName(bondat0).c_str()); + topOut.AddBond( bondat1 + atomOffset, bondat0 ); + // Generate internals around the link + if (structureBuilder.GenerateInternalsAroundLink( bondat1 + atomOffset, + bondat0, + frameOut, topOut, hasPosition ) ) + { + mprinterr("Error: Assign torsions around graft bond atoms %s - %s failed.\n", + topOut.AtomMaskName(bondat1 + atomOffset).c_str(), + topOut.AtomMaskName(bondat0).c_str()); + return 1; + } + // Convert to Zmatrix and assign missing atom positions + Cpptraj::Structure::Zmatrix tmpz; + tmpz.SetDebug( 1 ); // DEBUG + if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { + mprinterr("Error: Could not get Zmatrix from internals.\n"); + return 1; + } + if (tmpz.SetToFrame( frameOut, hasPosition )) { + mprinterr("Error: Grafting %s with %s build from internals failed.\n", + mol0Top.c_str(), mol1Top.c_str()); + return 1; + } + // Finalize topology - determine molecules, dont renumber residues, assign default bond params + topOut.CommonSetup(true, false, true); + topOut.Summary(); + // Add to output data set + if (outCoords->CoordsSetup(topOut, frameOut.CoordsInfo())) return 1; + outCoords->AddFrame( frameOut ); +/* Topology combinedTop; combinedTop.SetDebug( debug_ ); combinedTop.SetParmName( outCoords->Meta().Name(), FileName() ); @@ -318,7 +432,7 @@ const if (outCoords->CoordsSetup(combinedTop, CombinedFrame.CoordsInfo())) return 1; // Add frame to the output data set - outCoords->AddFrame( CombinedFrame ); + outCoords->AddFrame( CombinedFrame );*/ return 0; } diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 8ee99a7068..87b530f95e 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -312,7 +312,7 @@ Exec_Emin.o : Exec_Emin.cpp Action.h ActionList.h ActionState.h Analysis.h Analy Exec_ExtendedComparison.o : Exec_ExtendedComparison.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ExtendedComparison.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Flatten.o : Exec_Flatten.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Flatten.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OnlineVarT.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_GenerateAmberRst.o : Exec_GenerateAmberRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h DistRoutines.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_GenerateAmberRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h ImageOption.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Graft.o : Exec_Graft.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Graft.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Graft.o : Exec_Graft.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Graft.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Help.o : Exec_Help.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Help.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_HmassRepartition.o : Exec_HmassRepartition.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_HmassRepartition.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_LoadCrd.o : Exec_LoadCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_LoadCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -334,7 +334,7 @@ Exec_ReadInput.o : Exec_ReadInput.cpp Action.h ActionList.h ActionState.h Analys Exec_RotateDihedral.o : Exec_RotateDihedral.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DihedralSearch.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RotateDihedral.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_RunAnalysis.o : Exec_RunAnalysis.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_RunAnalysis.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_ScaleDihedralK.o : Exec_ScaleDihedralK.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ScaleDihedralK.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Sequence.o : Exec_Sequence.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Sequence.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_SequenceAlign.o : Exec_SequenceAlign.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_SequenceAlign.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Set.o : Exec_Set.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Set.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Show.o : Exec_Show.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_StringVar.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Show.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -459,7 +459,7 @@ Structure/Sugar.o : Structure/Sugar.cpp Atom.h AtomMask.h AtomType.h Box.h Const Structure/SugarBuilder.o : Structure/SugarBuilder.cpp ArgList.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DistRoutines.h FileIO.h FileName.h Frame.h ImageOption.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/LinkAtom.h Structure/ResStatArray.h Structure/StructureEnum.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarBuilder.h Structure/SugarLinkAtoms.h Structure/SugarToken.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarLinkAtoms.o : Structure/SugarLinkAtoms.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StringRoutines.h Structure/LinkAtom.h Structure/SugarLinkAtoms.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/SugarToken.o : Structure/SugarToken.cpp ArgList.h CpptrajStdio.h Structure/SugarToken.h -Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Zmatrix.o : Structure/Zmatrix.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h StructureCheck.o : StructureCheck.cpp Atom.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h ExclusionArray.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureCheck.h SymbolExporting.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h StructureMapper.o : StructureMapper.cpp AssociatedData.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h FileIO.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h StructureMapper.h SymbolExporting.h TextFormat.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h SymmetricRmsdCalc.o : SymmetricRmsdCalc.cpp ArrayIterator.h Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h Hungarian.h ImageOption.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h SymbolExporting.h SymmetricRmsdCalc.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 6953052c739f92c0cabd0560a9c064550576ed3b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 09:01:45 -0500 Subject: [PATCH 0499/1492] Comment out unused code --- src/Structure/Builder.cpp | 410 +++++++++++++++++++------------------- src/Structure/Builder.h | 26 +-- 2 files changed, 218 insertions(+), 218 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 26d6940071..0daf80510d 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -56,23 +56,6 @@ const return 0; } -/** Assign reasonable value for bond distance. */ -int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) -const -{ - if (atomPositionKnown[ai] && atomPositionKnown[aj]) { - dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); - return 0; - } - - // One or both positions unknown. Use estimated bond length or parameters. - if (getLengthParam(dist, ai, aj, topIn)) return 0; - - // Default to bond length based on elements - dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); - return 0; -} - /** Get angle parameter if present. * \return 1 if parameter found. */ @@ -103,10 +86,27 @@ const } // ----------------------------------------------------------------------------- +/** Assign reasonable value for bond distance. */ +/*int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) +const +{ + if (atomPositionKnown[ai] && atomPositionKnown[aj]) { + dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); + return 0; + } + + // One or both positions unknown. Use estimated bond length or parameters. + if (getLengthParam(dist, ai, aj, topIn)) return 0; + + // Default to bond length based on elements + dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); + return 0; +}*/ + /** Attempt to assign a reasonable value for theta internal coordinate for * atom i given that atoms j and k have known positions. */ -int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) +/*int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) const { if (debug_ > 0) @@ -151,20 +151,20 @@ const ajTheta * Constants::RADDEG); } else { mprinterr("Internal Error: Implement angle lookup.\n"); - /*} else if (currentZmatrix_ != 0) { // FIXME faster search? - for (Zmatrix::const_iterator ic = currentZmatrix_->begin(); ic != currentZmatrix_->end(); ++ic) { - if (ic->AtI() == atomi && ic->AtJ() == aj && ic->AtK() == atomk) { - // TODO: Check that repeats are equal? - ajTheta = ic->Theta() * Constants::DEGRAD; - numKnown++; - mprintf("DEBUG: AssignTheta(): IC angle centered on atomJ: %s - %s - %s = %g\n", - topIn.LeapName(atomi).c_str(), - topIn.LeapName(aj).c_str(), - topIn.LeapName(atomk).c_str(), - ic->Theta()); - break; - } - }*/ + //} else if (currentZmatrix_ != 0) { // FIXME faster search? + // for (Zmatrix::const_iterator ic = currentZmatrix_->begin(); ic != currentZmatrix_->end(); ++ic) { + // if (ic->AtI() == atomi && ic->AtJ() == aj && ic->AtK() == atomk) { + // // TODO: Check that repeats are equal? + // ajTheta = ic->Theta() * Constants::DEGRAD; + // numKnown++; + // mprintf("DEBUG: AssignTheta(): IC angle centered on atomJ: %s - %s - %s = %g\n", + // topIn.LeapName(atomi).c_str(), + // topIn.LeapName(aj).c_str(), + // topIn.LeapName(atomk).c_str(), + // ic->Theta()); + // break; + // } + // } } thetaVals.push_back( ajTheta ); } // END inner loop over bonds to AJ @@ -231,10 +231,10 @@ const } return 0; -} +}*/ /** Calculate internal coordinate for atoms i j k l with known positions. */ -Cpptraj::Structure::InternalCoords Builder::calcKnownAtomIc(int ai, int aj, int ak, int al, Frame const& frameIn) +/*Cpptraj::Structure::InternalCoords Builder::calcKnownAtomIc(int ai, int aj, int ak, int al, Frame const& frameIn) { double newDist = DIST2_NoImage(frameIn.XYZ(ai), frameIn.XYZ(aj)); @@ -245,10 +245,10 @@ Cpptraj::Structure::InternalCoords Builder::calcKnownAtomIc(int ai, int aj, int frameIn.XYZ(ak), frameIn.XYZ(al) ); return InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG); -} +}*/ /** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ -int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, +/*int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, int ai, int aj, int ak, int al, double newPhi, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) @@ -274,10 +274,10 @@ const } zmatrix.AddIC( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); return 0; -} +}*/ /// Recursive function to return depth from an atom along bonds -static int atom_depth(int& depth, +/*static int atom_depth(int& depth, int at, Topology const& topIn, std::vector& visited, int maxdepth) { if (depth == maxdepth) return 0; @@ -290,20 +290,20 @@ static int atom_depth(int& depth, depthFromHere += atom_depth( depth, *bat, topIn, visited, maxdepth ); } return depthFromHere; -} +}*/ /// Wrap given value between -PI and PI -static inline double wrap360(double phi) { +/*static inline double wrap360(double phi) { if (phi > Constants::PI) return phi - Constants::TWOPI; else if (phi < -Constants::PI) return phi + Constants::TWOPI; else return phi; -} +}*/ /** Assign internal coordinates for atoms I for torsions around J-K-L. */ -int Cpptraj::Structure::Builder::AssignICsAroundBond(Zmatrix& zmatrix, +/*int Cpptraj::Structure::Builder::AssignICsAroundBond(Zmatrix& zmatrix, int aj, int ak, int al, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown, @@ -548,11 +548,11 @@ const } return 0; -} +}*/ // ----------------------------------------------------------------------------- /** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ -int Builder::Combine(Topology& frag0Top, Frame& frag0frm, +/*int Builder::Combine(Topology& frag0Top, Frame& frag0frm, Topology const& frag1Top, Frame const& frag1frm, int bondAt0, int bondAt1) const @@ -664,7 +664,7 @@ const } return 0; -} +}*/ /// \return The total number of atoms whose position is known for the specified residue /*static inline int known_count(int ires, Topology const& topIn, std::vector const& hasPosition) @@ -680,7 +680,7 @@ const * by bondAt0 (in residue0) and bondAt1 in (residue1). * */ -int Builder::ModelCoordsAroundBond(Frame const& frameIn, Topology const& topIn, int bondAt0, int bondAt1, +/*int Builder::ModelCoordsAroundBond(Frame const& frameIn, Topology const& topIn, int bondAt0, int bondAt1, Zmatrix& zmatrix0, Barray const& hasPosition) const { @@ -773,7 +773,7 @@ const // } return 0; -} +}*/ /** Given two bonded atoms A and B, where B has a depth of at least 2 * (i.e., it is possible to have B be atom J where we can form J-K-L), @@ -781,7 +781,7 @@ const * direction of atom A. This means all internal coordinates with A and B * as I and J (should be only 1), as J and K, and as K and L. */ -int Builder::SetupICsAroundBond(Zmatrix& zmatrix, +/*int Builder::SetupICsAroundBond(Zmatrix& zmatrix, int atA, int atB, Frame const& frameIn, Topology const& topIn, Barray const& atomPositionKnown, Barray const& hasICin, @@ -916,166 +916,166 @@ const mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); // FIXME // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- -/* if (debug_ > 0) - mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); - double newDist = 0; - if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: length (i j) assignment failed.\n"); - return 1; - } - if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); - double newTheta = 0; - if (model.AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: theta (i j) assignment failed.\n"); - return 1; - } - if (debug_ > 0) mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); - double newPhi = 0; - if (model.AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, - atomPositionKnown, AtomB)) - { - mprinterr("Error: phi (i j) assignment failed.\n"); - return 1; - } - if (debug_ > 0) mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( atA, atB, atk0, atl0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - if (debug_ > 0) { - mprintf("DEBUG: MODEL I J IC: "); - IC_.back().printIC(topIn); - } - MARK( atA, hasIC, nHasIC );*/ -/* - // ----- J K: Set up ICs for X atA atB K --------------------------- - Atom const& AJ1 = topIn[atA]; - int ati = -1; - //Atom const& AK1 = topIn[atB]; - //Atom const& AL1 = topIn[atk0]; - for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) - { - if (*iat != atB) { - if (ati == -1) ati = *iat; -/ // Set bond dist - if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: length (j k) assignment failed.\n"); - return 1; - } - // Set theta for I atA atB - newTheta = 0; - if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: theta (j k) assignment failed.\n"); - return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); - // Set phi for I atA atB K - newPhi = 0; - if (model.AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, - atomPositionKnown, AtomA)) - { - mprinterr("Error: phi (j k) assignment failed.\n"); - return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( *iat, atA, atB, atk0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - if (debug_ > 0) { - mprintf("DEBUG: MODEL J K IC: "); - IC_.back().printIC(topIn); - } - MARK( *iat, hasIC, nHasIC ); - // ----- K L: Set up ICs for X iat atA atB --------------------- - Atom const& AJ2 = topIn[*iat]; - for (Atom::bond_iterator i2at = AJ2.bondbegin(); i2at != AJ2.bondend(); ++i2at) - { - if (*i2at != atA && *i2at != atB && !hasIC[*i2at]) { - mprintf("DEBUG: MODEL K L IC: %s %s %s %s %i %i %i %i\n", - topIn.AtomMaskName(*i2at).c_str(), - topIn.AtomMaskName(*iat).c_str(), - topIn.AtomMaskName(atA).c_str(), - topIn.AtomMaskName(atB).c_str(), - *i2at+1, *iat+1, atA+1, atB+1); - if (model.AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: length (k l) assignment failed.\n"); - return 1; - } - mprintf("DEBUG: K L distance= %g\n", newDist); - //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); - if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: theta (k l) assignment failed.\n"); - return 1; - } - mprintf("DEBUG: K L angle= %g\n", newTheta*Constants::RADDEG); - // Set phi for X iat atA atB - BuildAtom AtomC; - if (topIn[*iat].Nbonds() > 2) { - if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; - } - newPhi = 0; - //model.SetDebug( 1 ); // FIXME - if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, - atomPositionKnown, AtomC)) - { - mprinterr("Error: phi (k l) assignment failed.\n"); - return 1; - } - mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); - IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); - mprintf("DEBUG: MODEL K L IC: "); - IC_.back().printIC(topIn); - MARK( *i2at, hasIC, nHasIC ); - // Trace from atA *iat *i2at outwards - //ToTrace.push_back(atA); - //ToTrace.push_back(*iat); - //ToTrace.push_back(*i2at); - //if (traceMol(atA, *iat, *i2at, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) return 1; +// if (debug_ > 0) +// mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); +// double newDist = 0; +// if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { +// mprinterr("Error: length (i j) assignment failed.\n"); +// return 1; +// } +// if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); +// double newTheta = 0; +// if (model.AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown)) { +// mprinterr("Error: theta (i j) assignment failed.\n"); +// return 1; +// } +// if (debug_ > 0) mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); +// double newPhi = 0; +// if (model.AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, +// atomPositionKnown, AtomB)) +// { +// mprinterr("Error: phi (i j) assignment failed.\n"); +// return 1; +// } +// if (debug_ > 0) mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); +// IC_.push_back(InternalCoords( atA, atB, atk0, atl0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); +// if (debug_ > 0) { +// mprintf("DEBUG: MODEL I J IC: "); +// IC_.back().printIC(topIn); +// } +// MARK( atA, hasIC, nHasIC ); +// +// // ----- J K: Set up ICs for X atA atB K --------------------------- +// Atom const& AJ1 = topIn[atA]; +// int ati = -1; +// //Atom const& AK1 = topIn[atB]; +// //Atom const& AL1 = topIn[atk0]; +// for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) +// { +// if (*iat != atB) { +// if (ati == -1) ati = *iat; +// // Set bond dist +// if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { +// mprinterr("Error: length (j k) assignment failed.\n"); +// return 1; +// } +// // Set theta for I atA atB +// newTheta = 0; +// if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { +// mprinterr("Error: theta (j k) assignment failed.\n"); +// return 1; +// } +// if (debug_ > 0) +// mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); +// // Set phi for I atA atB K +// newPhi = 0; +// if (model.AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, +// atomPositionKnown, AtomA)) +// { +// mprinterr("Error: phi (j k) assignment failed.\n"); +// return 1; +// } +// if (debug_ > 0) +// mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); +// IC_.push_back(InternalCoords( *iat, atA, atB, atk0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); +// if (debug_ > 0) { +// mprintf("DEBUG: MODEL J K IC: "); +// IC_.back().printIC(topIn); +// } +// MARK( *iat, hasIC, nHasIC ); +// // ----- K L: Set up ICs for X iat atA atB --------------------- +// Atom const& AJ2 = topIn[*iat]; +// for (Atom::bond_iterator i2at = AJ2.bondbegin(); i2at != AJ2.bondend(); ++i2at) +// { +// if (*i2at != atA && *i2at != atB && !hasIC[*i2at]) { +// mprintf("DEBUG: MODEL K L IC: %s %s %s %s %i %i %i %i\n", +// topIn.AtomMaskName(*i2at).c_str(), +// topIn.AtomMaskName(*iat).c_str(), +// topIn.AtomMaskName(atA).c_str(), +// topIn.AtomMaskName(atB).c_str(), +// *i2at+1, *iat+1, atA+1, atB+1); +// if (model.AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown)) { +// mprinterr("Error: length (k l) assignment failed.\n"); +// return 1; +// } +// mprintf("DEBUG: K L distance= %g\n", newDist); +// //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); +// if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { +// mprinterr("Error: theta (k l) assignment failed.\n"); +// return 1; +// } +// mprintf("DEBUG: K L angle= %g\n", newTheta*Constants::RADDEG); +// // Set phi for X iat atA atB +// BuildAtom AtomC; +// if (topIn[*iat].Nbonds() > 2) { +// if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; +// } +// newPhi = 0; +// //model.SetDebug( 1 ); // FIXME +// if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, +// atomPositionKnown, AtomC)) +// { +// mprinterr("Error: phi (k l) assignment failed.\n"); +// return 1; +// } +// mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); +// IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); +// mprintf("DEBUG: MODEL K L IC: "); +// IC_.back().printIC(topIn); +// MARK( *i2at, hasIC, nHasIC ); +// // Trace from atA *iat *i2at outwards +// //ToTrace.push_back(atA); +// //ToTrace.push_back(*iat); +// //ToTrace.push_back(*i2at); +// //if (traceMol(atA, *iat, *i2at, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) return 1; +// +// } +// } +// } +// } - } - } - } - } -*/ -/* - // Handle remaining atoms. - if (AJ1.Nbonds() > 1) { - if (AJ1.Nbonds() == 2) { - if (debug_ > 0) mprintf("DEBUG: 2 bonds to %s.\n", topIn.AtomMaskName(atA).c_str()); - if (traceMol(atB, atA, ati, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - } else { - // 3 or more bonds - std::vector const& priority = AtomA.Priority(); - int at0 = -1; - int at1 = -1; - std::vector remainingAtoms; - if (debug_ > 0) mprintf("DEBUG: %i bonds to %s\n", AJ1.Nbonds(), topIn.AtomMaskName(atA).c_str()); - for (std::vector::const_iterator it = priority.begin(); it != priority.end(); ++it) { - if (*it != atB) { - if (debug_ > 0) mprintf("DEBUG:\t\t%s\n", topIn.AtomMaskName(*it).c_str()); - if (at0 == -1) - at0 = *it; - else if (at1 == -1) - at1 = *it; - else - remainingAtoms.push_back( *it ); - } - } - // at0 atA at1 - if (traceMol(at1, atA, at0, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - // at1 atA, at0 - if (traceMol(at0, atA, at1, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - // Remaining atoms. - for (std::vector::const_iterator it = remainingAtoms.begin(); it != remainingAtoms.end(); ++it) { - if (traceMol(at0, atA, *it, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) - return 1; - } - } - } -*/ +// +//// Handle remaining atoms. +//if (AJ1.Nbonds() > 1) { +// if (AJ1.Nbonds() == 2) { +// if (debug_ > 0) mprintf("DEBUG: 2 bonds to %s.\n", topIn.AtomMaskName(atA).c_str()); +// if (traceMol(atB, atA, ati, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) +// return 1; +// } else { +// // 3 or more bonds +// std::vector const& priority = AtomA.Priority(); +// int at0 = -1; +// int at1 = -1; +// std::vector remainingAtoms; +// if (debug_ > 0) mprintf("DEBUG: %i bonds to %s\n", AJ1.Nbonds(), topIn.AtomMaskName(atA).c_str()); +// for (std::vector::const_iterator it = priority.begin(); it != priority.end(); ++it) { +// if (*it != atB) { +// if (debug_ > 0) mprintf("DEBUG:\t\t%s\n", topIn.AtomMaskName(*it).c_str()); +// if (at0 == -1) +// at0 = *it; +// else if (at1 == -1) +// at1 = *it; +// else +// remainingAtoms.push_back( *it ); +// } +// } +// // at0 atA at1 +// if (traceMol(at1, atA, at0, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) +// return 1; +// // at1 atA, at0 +// if (traceMol(at0, atA, at1, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) +// return 1; +// // Remaining atoms. +// for (std::vector::const_iterator it = remainingAtoms.begin(); it != remainingAtoms.end(); ++it) { +// if (traceMol(at0, atA, *it, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) +// return 1; +// } +// } +//} +// return 0; -} +}*/ // ============================================================================== /** For existing torsions, see if all coordinates in that torsion diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 6493737708..a168684f17 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -23,9 +23,9 @@ class Builder { void SetParameters(ParameterSet const*); /// Combine second fragment into first fragment and bond - int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; +// int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; /// Model the coordinates around a bond given only some coordinates are known - int ModelCoordsAroundBond(Frame const&, Topology const&, int, int, Zmatrix&, Barray const&) const; +// int ModelCoordsAroundBond(Frame const&, Topology const&, int, int, Zmatrix&, Barray const&) const; /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters @@ -64,23 +64,23 @@ class Builder { // =========================================== /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known - int AssignLength(double&, int, int, Topology const&, Frame const&, Barray const&) const; +// int AssignLength(double&, int, int, Topology const&, Frame const&, Barray const&) const; /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I - int AssignTheta(double&, int, int, int, Topology const&, Frame const&, Barray const&) const; +// int AssignTheta(double&, int, int, int, Topology const&, Frame const&, Barray const&) const; /// Calculate an internal coordinate for known atoms - static inline InternalCoords calcKnownAtomIc(int, int, int, int, Frame const&); +// static inline InternalCoords calcKnownAtomIc(int, int, int, int, Frame const&); /// Insert an internal coord into a zmatrix - int insertIc(Zmatrix&, int, int, int, int, double, - Topology const&, Frame const&, Barray const&) const; +// int insertIc(Zmatrix&, int, int, int, int, double, +// Topology const&, Frame const&, Barray const&) const; /// Assign internal coordinates for atoms I for torsions around J-K-L. - int AssignICsAroundBond(Zmatrix&, int, int, int, - Topology const&, Frame const&, Barray const&, - BuildAtom const&) const; +// int AssignICsAroundBond(Zmatrix&, int, int, int, +// Topology const&, Frame const&, Barray const&, +// BuildAtom const&) const; /// Model coordinates around a bond - int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, - Barray const&, Barray const&, - BuildAtom const&, BuildAtom const&) const; +// int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, +// Barray const&, Barray const&, +// BuildAtom const&, BuildAtom const&) const; // =========================================== /// Calculte phi value for a torsion in a TorsionModel void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); From ff13e3ae36d5c5efa7633d9f0ae0cb4caaffaa4c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 09:08:12 -0500 Subject: [PATCH 0500/1492] Get rid of old code --- src/Structure/Builder.cpp | 998 +--------------------------------- src/Structure/Builder.h | 30 +- src/Structure/structuredepend | 4 +- src/cpptrajdepend | 2 +- 4 files changed, 6 insertions(+), 1028 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 0daf80510d..06c639abfc 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1,5 +1,4 @@ #include "Builder.h" -#include "BuildAtom.h" #include "GenerateConnectivityArrays.h" #include "Zmatrix.h" #include "../Constants.h" @@ -32,7 +31,6 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { params_ = paramsIn; } -// ----------------------------------------------------------------------------- /** Get length from parameter set if present. * \return 1 if a length parameter was found. */ @@ -85,999 +83,6 @@ const return 0; } -// ----------------------------------------------------------------------------- -/** Assign reasonable value for bond distance. */ -/*int Cpptraj::Structure::Builder::AssignLength(double& dist, int ai, int aj, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) -const -{ - if (atomPositionKnown[ai] && atomPositionKnown[aj]) { - dist = sqrt( DIST2_NoImage( frameIn.XYZ(ai), frameIn.XYZ(aj) ) ); - return 0; - } - - // One or both positions unknown. Use estimated bond length or parameters. - if (getLengthParam(dist, ai, aj, topIn)) return 0; - - // Default to bond length based on elements - dist = Atom::GetBondLength( topIn[ai].Element(), topIn[aj].Element() ); - return 0; -}*/ - -/** Attempt to assign a reasonable value for theta internal coordinate for - * atom i given that atoms j and k have known positions. - */ -/*int Cpptraj::Structure::Builder::AssignTheta(double& theta, int ai, int aj, int ak, Topology const& topIn, Frame const& frameIn, Barray const& atomPositionKnown) -const -{ - if (debug_ > 0) - mprintf("DEBUG: AssignTheta for atom j : %s\n", topIn.AtomMaskName(aj).c_str()); - Atom const& AJ = topIn[aj]; - - // Sanity check - if (AJ.Nbonds() < 2) { - mprinterr("Internal Error: AssignTheta() called for atom J %s with fewer than 2 bonds.\n", topIn.AtomMaskName(aj).c_str()); - return 1; - } - - // Check if all positions are already known - if (atomPositionKnown[ai] && atomPositionKnown[aj] && atomPositionKnown[ak]) - { - theta = CalcAngle(frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak)); - return 0; - } - - // Figure out angles from known atoms + ICs - int nAngles = (AJ.Nbonds() * (AJ.Nbonds()-1)) / 2; - if (nAngles == 3) { - mprintf("DEBUG: Expect %i angles around AJ.\n", nAngles); - std::vector thetaVals; - int tgtIdx = -1; - int numKnown = 0; - for (int idx0 = 0; idx0 < AJ.Nbonds(); idx0++) { - int atomi = AJ.Bond(idx0); - for (int idx1 = idx0 + 1; idx1 < AJ.Nbonds(); idx1++) { - int atomk = AJ.Bond(idx1); - mprintf("DEBUG: AssignTheta(): Angle %zu atoms %i - %i - %i\n", thetaVals.size(), atomi+1, aj+1, atomk+1); - if (ai == atomi && ak == atomk) - tgtIdx = (int)thetaVals.size(); - double ajTheta = 0; - if (atomPositionKnown[atomi] && atomPositionKnown[aj] && atomPositionKnown[atomk]) { - ajTheta = CalcAngle(frameIn.XYZ(atomi), frameIn.XYZ(aj), frameIn.XYZ(atomk)); - numKnown++; - mprintf("DEBUG: AssignTheta(): Known angle centered on atom J: %s - %s - %s = %g\n", - topIn.LeapName(atomi).c_str(), - topIn.LeapName(aj).c_str(), - topIn.LeapName(atomk).c_str(), - ajTheta * Constants::RADDEG); - } else { - mprinterr("Internal Error: Implement angle lookup.\n"); - //} else if (currentZmatrix_ != 0) { // FIXME faster search? - // for (Zmatrix::const_iterator ic = currentZmatrix_->begin(); ic != currentZmatrix_->end(); ++ic) { - // if (ic->AtI() == atomi && ic->AtJ() == aj && ic->AtK() == atomk) { - // // TODO: Check that repeats are equal? - // ajTheta = ic->Theta() * Constants::DEGRAD; - // numKnown++; - // mprintf("DEBUG: AssignTheta(): IC angle centered on atomJ: %s - %s - %s = %g\n", - // topIn.LeapName(atomi).c_str(), - // topIn.LeapName(aj).c_str(), - // topIn.LeapName(atomk).c_str(), - // ic->Theta()); - // break; - // } - // } - } - thetaVals.push_back( ajTheta ); - } // END inner loop over bonds to AJ - } // END outer loop over bonds to AJ - mprintf("DEBUG: AssignTheta(): thetaVals="); - for (std::vector::const_iterator it = thetaVals.begin(); it != thetaVals.end(); ++it) { - mprintf(" %g", *it * Constants::RADDEG); - if (tgtIdx == it - thetaVals.begin()) mprintf("*"); - } - mprintf("\n"); - if (tgtIdx != -1 && numKnown >= 2) { - double sumTheta = 0; - for (std::vector::const_iterator it = thetaVals.begin(); it != thetaVals.end(); ++it) { - if (it - thetaVals.begin() != tgtIdx) { - double tval = *it; - if (tval < 0) - tval += Constants::TWOPI; - else if (tval > Constants::TWOPI) - tval -= Constants::TWOPI; - sumTheta += tval; - } - } - theta = Constants::TWOPI - sumTheta; - mprintf("DEBUG: AssignTheta(): Setting from existing atoms/ICs: %g\n", theta * Constants::RADDEG); - return 0; - } - } - - // See if a parameter is defined for these atom types - if (getAngleParam(theta, ai, aj, ak, topIn)) return 0; - - // Figure out hybridization and chirality of atom j. - if (debug_ > 0) { - mprintf("DEBUG:\t\tI %s Nbonds: %i\n", topIn[ai].ElementName(), topIn[ai].Nbonds()); - mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); - mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); - } - AtomType::HybridizationType hybrid = AtomType::UNKNOWN_HYBRIDIZATION; - // Check params for hybrid - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) - hybrid = it->second.Hybridization(); - } - // Guess hybrid if needed - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) - hybrid = GuessAtomHybridization(AJ, topIn.Atoms()); - // Set from number of bonds if still unknown. This is a pretty crude guess. - if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) { - switch (AJ.Nbonds()) { - case 4 : hybrid = AtomType::SP3; break; - case 3 : hybrid = AtomType::SP2; break; - case 2 : hybrid = AtomType::SP; break; - default : mprinterr("Internal Error: AssignTheta(): Unhandled # bonds for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; - } - } - - // Assign a theta based on hybridization - switch (hybrid) { - case AtomType::SP3 : theta = 109.5 * Constants::DEGRAD; break; - case AtomType::SP2 : theta = 120.0 * Constants::DEGRAD; break; - case AtomType::SP : theta = 180.0 * Constants::DEGRAD; break; - default : mprinterr("Internal Error: AssignTheta(): Unhandled hybridization for %s (%i)\n", topIn.AtomMaskName(aj).c_str(), AJ.Nbonds()); return 1; - } - - return 0; -}*/ - -/** Calculate internal coordinate for atoms i j k l with known positions. */ -/*Cpptraj::Structure::InternalCoords Builder::calcKnownAtomIc(int ai, int aj, int ak, int al, Frame const& frameIn) -{ - double newDist = DIST2_NoImage(frameIn.XYZ(ai), frameIn.XYZ(aj)); - - double newTheta = CalcAngle( frameIn.XYZ(ai), frameIn.XYZ(aj), frameIn.XYZ(ak) ); - - double newPhi = Torsion( frameIn.XYZ(ai), - frameIn.XYZ(aj), - frameIn.XYZ(ak), - frameIn.XYZ(al) ); - return InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG); -}*/ - -/** Insert internal coordinates with bond i-j, angle i-j-k, and torsion i-j-k-l. */ -/*int Cpptraj::Structure::Builder::insertIc(Zmatrix& zmatrix, - int ai, int aj, int ak, int al, double newPhi, - Topology const& topIn, Frame const& frameIn, - Barray const& atomPositionKnown) -const -{ - if (atomPositionKnown[ai]) { - mprintf("DEBUG:\tAtom position already known for %s, skipping IC.\n", topIn.AtomMaskName(ai).c_str()); - return 0; - } - double newDist = 0; - if (AssignLength(newDist, ai, aj, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: AssignLength failed for %s - %s \n", - topIn.AtomMaskName(ai).c_str(), topIn.AtomMaskName(aj).c_str()); - return 1; - } - double newTheta = 0; - if (AssignTheta(newTheta, ai, aj, ak, topIn, frameIn, atomPositionKnown)) { - mprinterr("Error: AssignTheta failed for %s - %s - %s\n", - topIn.AtomMaskName(ai).c_str(), - topIn.AtomMaskName(aj).c_str(), - topIn.AtomMaskName(ak).c_str()); - return 1; - } - zmatrix.AddIC( InternalCoords(ai, aj, ak, al, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG) ); - return 0; -}*/ - -/// Recursive function to return depth from an atom along bonds -/*static int atom_depth(int& depth, - int at, Topology const& topIn, std::vector& visited, int maxdepth) -{ - if (depth == maxdepth) return 0; - depth++; - visited[at] = true; - int depthFromHere = 1; - for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) - { - if (!visited[*bat]) - depthFromHere += atom_depth( depth, *bat, topIn, visited, maxdepth ); - } - return depthFromHere; -}*/ - -/// Wrap given value between -PI and PI -/*static inline double wrap360(double phi) { - if (phi > Constants::PI) - return phi - Constants::TWOPI; - else if (phi < -Constants::PI) - return phi + Constants::TWOPI; - else - return phi; -}*/ - -/** Assign internal coordinates for atoms I for torsions around J-K-L. */ -/*int Cpptraj::Structure::Builder::AssignICsAroundBond(Zmatrix& zmatrix, - int aj, int ak, int al, - Topology const& topIn, Frame const& frameIn, - Barray const& atomPositionKnown, - BuildAtom const& AtomJ) -const -{ - mprintf("DEBUG: AssignICsAroundBond: X - %s - %s - %s %i - %i - %i\n", - topIn.AtomMaskName(aj).c_str(), - topIn.AtomMaskName(ak).c_str(), - topIn.AtomMaskName(al).c_str(), - aj+1, ak+1, al+1); - // Ideally, atoms J K and L should be known - if (!atomPositionKnown[aj] || - !atomPositionKnown[ak] || - !atomPositionKnown[al]) - { - mprintf("Warning: AssignICsAroundBond(): Not all atom positions known.\n" - "Warning: %i %s (%i) - %i %s (%i) - %i %s (%i)\n", - aj+1, topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj], - ak+1, topIn.AtomMaskName(ak).c_str(), (int)atomPositionKnown[ak], - al+1, topIn.AtomMaskName(al).c_str(), (int)atomPositionKnown[al]); - //return 1; - } - Atom const& AJ = topIn[aj]; - // If atom J has only 1 bond this is not needed. - if (AJ.Nbonds() < 2) return 0; - - - if (debug_ > 0) mprintf("DEBUG:\t\tNbonds: %i\n", AJ.Nbonds()); - // If atom J only has 2 bonds, ai-aj-ak-al is the only possibility. - if (AJ.Nbonds() < 3) { - if (debug_ > 0) - mprintf("DEBUG:\t\tFewer than 3 bonds. Setting phi to -180.\n"); - double newPhi = -180 * Constants::DEGRAD; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - if (AJ.Bond(idx) != ak) { - int ai = AJ.Bond(idx); - if (insertIc(zmatrix, ai, aj, ak, al, newPhi, topIn, frameIn, atomPositionKnown)) return 1; - break; - } - } - return 0; - } // END only 2 bonds - - // 3 or more bonds. - std::vector const& priority = AtomJ.Priority(); - ChiralType chirality = AtomJ.Chirality(); - - if (debug_ > 0) { - mprintf("DEBUG:\t\tOriginal chirality around J %s is %s\n", topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - mprintf("DEBUG:\t\tPriority around J %s(%i) is", - topIn.AtomMaskName(aj).c_str(), (int)atomPositionKnown[aj]); - for (int idx = 0; idx < AJ.Nbonds(); idx++) - mprintf(" %s(%i)", topIn.AtomMaskName(priority[idx]).c_str(), (int)atomPositionKnown[priority[idx]]); - for (int idx = 0; idx < AJ.Nbonds(); idx++) - mprintf(" %i", priority[idx]); - mprintf("\n"); - } - - // Get index of atom K in the priority list, starting from least priority. - int kPriorityIdx = -1; - for (int idx = AJ.Nbonds()-1; idx > -1; idx--) { - if (priority[idx] == ak) { - kPriorityIdx = AJ.Nbonds() - 1 - idx; - break; - } - } - mprintf("DEBUG:\t\tK priority index is %i\n", kPriorityIdx); - if (kPriorityIdx < 0) { - mprinterr("Error: Could not find atom K %s in atom J %s bond list.\n", - topIn.AtomMaskName(ak).c_str(), topIn.AtomMaskName(aj).c_str()); - return 1; - } - - // Fill in what values we can for known atoms - std::vector knownPhi( AJ.Nbonds() ); - Barray isKnown( AJ.Nbonds(), false ); - int knownIdx = -1; - double knownInterval = 0; - bool hasKnownInterval = false; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak && atomPositionKnown[atnum] && - atomPositionKnown[aj] && - atomPositionKnown[ak] && - atomPositionKnown[al]) - { - knownPhi[idx] = Torsion(frameIn.XYZ(atnum), - frameIn.XYZ(aj), - frameIn.XYZ(ak), - frameIn.XYZ(al)); - isKnown[idx] = true; - if (debug_ > 0) - mprintf("DEBUG:\t\tKnown phi for %s (pos=%i) = %g\n", topIn.AtomMaskName(atnum).c_str(), idx, knownPhi[idx]*Constants::RADDEG); - if (knownIdx == -1) knownIdx = idx; // FIXME handle more than 1 known - if (idx > 0 && isKnown[idx-1] && isKnown[idx]) { - knownInterval = wrap360(knownPhi[idx] - knownPhi[idx-1]); - hasKnownInterval = true; - } - } - } - - // Check known interval if set - if (hasKnownInterval) { - mprintf("DEBUG:\t\tKnown interval = %g\n", knownInterval * Constants::RADDEG); - if (chirality == IS_UNKNOWN_CHIRALITY) { - mprintf("DEBUG:\t\tSetting chirality from known interval.\n"); - if (knownInterval < 0) - chirality = IS_S; - else - chirality = IS_R; - } else if (chirality == IS_S) { - if (knownInterval > 0) - mprinterr("Error: Detected chirality S does not match known interval %g\n", knownInterval*Constants::RADDEG); - } else if (chirality == IS_R) { - if (knownInterval < 0) - mprinterr("Error: Detected chriality R does not match known interval %g\n", knownInterval*Constants::RADDEG); - } - } - - // If still no chirality use the detected orientation - if (chirality == IS_UNKNOWN_CHIRALITY) { - chirality = AtomJ.Orientation(); - mprintf("Warning: Unknown chirality around %s; using detected orientation of %s\n", - topIn.AtomMaskName(aj).c_str(), chiralStr(chirality)); - } - - // Determine the interval - bool intervalIsSet = false; - double interval = 0; - if (params_ != 0) { - ParmHolder::const_iterator it = params_->AT().GetParam( TypeNameHolder(AJ.Type()) ); - if (it != params_->AT().end()) { - if (it->second.Hybridization() == AtomType::SP2) { - interval = 180 * Constants::DEGRAD; - intervalIsSet = true; - } else if (it->second.Hybridization() == AtomType::SP3) { - interval = 120 * Constants::DEGRAD; - intervalIsSet = true; - } - } - if (intervalIsSet) mprintf("DEBUG:\t\tInterval was set from atom J hybridization.\n"); - } - if (!intervalIsSet) { - // The interval will be 360 / (number of bonds - 1) - interval = Constants::TWOPI / (AJ.Nbonds() - 1); - mprintf("DEBUG:\t\tInterval was set from number of bonds.\n"); - } - - // Adjust interval based on chirality and priority of the k atom - if (chirality == IS_S || chirality == IS_UNKNOWN_CHIRALITY) - interval = -interval; - if ( (kPriorityIdx%2) == 0 ) { - mprintf("DEBUG:\t\tFlipping interval based on priority index of %i\n", kPriorityIdx); - interval = -interval; - } - - // If there is a known interval, compare it to the determined one. - if (hasKnownInterval) { - double deltaInterval = fabs(interval - knownInterval); - mprintf("DEBUG:\t\tDetermined interval %g, known interval %g, delta %g\n", - interval*Constants::RADDEG, knownInterval*Constants::RADDEG, deltaInterval*Constants::RADDEG); - interval = fabs(knownInterval); - } - - // If we have to assign an initial phi, make trans the longer branch - if (knownIdx == -1) { - Barray visited = atomPositionKnown; - // TODO: Ensure bonded atoms are not yet visited? - visited[aj] = true; - visited[ak] = true; - //std::vector depth( AJ.Nbonds() ); - int max_depth = 0; - int max_idx = -1; - for (int idx = 0; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - int currentDepth = 0; - //depth[idx] = atom_depth(currentDepth, atnum, topIn, visited, 10); - int depth = atom_depth(currentDepth, atnum, topIn, visited, 10); - if (debug_ > 0) - mprintf("DEBUG:\t\tAJ %s depth from %s is %i\n", - topIn.AtomMaskName(aj).c_str(), topIn.AtomMaskName(atnum).c_str(), depth); - //if (knownIdx == -1 && depth[idx] < 3) { - // knownIdx = idx; - // knownPhi[idx] = 0; - //} - if (max_idx == -1 || depth > max_depth) { - max_depth = depth; - max_idx = idx; - } - } - } - mprintf("DEBUG:\t\tLongest depth is for atom %s (%i)\n", topIn.AtomMaskName(priority[max_idx]).c_str(), max_depth); - knownIdx = max_idx; - knownPhi[max_idx] = interval;// -180 * Constants::DEGRAD; - isKnown[max_idx] = true; - } - - // Sanity check - if (knownIdx < 0) { - mprinterr("Internal Error: AssignPhi(): knownIdx is < 0\n"); - return 1; - } - - if (debug_ > 0) { - mprintf("DEBUG:\t\tStart phi is %g degrees\n", knownPhi[knownIdx]*Constants::RADDEG); - mprintf("DEBUG:\t\tInterval is %g, chirality around J is %s\n", interval*Constants::RADDEG, chiralStr(chirality)); - } - - // Forwards from the known index - double currentPhi = knownPhi[knownIdx]; - for (int idx = knownIdx; idx < AJ.Nbonds(); idx++) { - int atnum = priority[idx]; - if (atnum != ak) { - if (isKnown[idx]) - currentPhi = knownPhi[idx]; - else - currentPhi = wrap360(currentPhi + interval); - //if (atnum == ai) phi = currentPhi; - //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); - } - } - // Backwards from the known index - currentPhi = knownPhi[knownIdx]; - for (int idx = knownIdx - 1; idx > -1; idx--) { - int atnum = priority[idx]; - if (atnum != ak) { - if (isKnown[idx]) - currentPhi = knownPhi[idx]; - else - currentPhi = wrap360(currentPhi - interval); - //if (atnum == ai) phi = currentPhi; - //IC.push_back( InternalCoords(atnum, aj, ak, al, 0, 0, currentPhi) ); - if (insertIc(zmatrix, atnum, aj, ak, al, currentPhi, topIn, frameIn, atomPositionKnown)) return 1; - if (debug_ > 0) - mprintf("DEBUG:\t\t\t%s (at# %i) phi= %g\n", topIn.AtomMaskName(atnum).c_str(), atnum+1, currentPhi*Constants::RADDEG); - } - } - - return 0; -}*/ - -// ----------------------------------------------------------------------------- -/** Combine two units. Fragment 1 will be merged into Fragment 0 and bonded. */ -/*int Builder::Combine(Topology& frag0Top, Frame& frag0frm, - Topology const& frag1Top, Frame const& frag1frm, - int bondAt0, int bondAt1) -const -{ - mprintf("DEBUG: Calling COMBINE between %s and %s\n", - frag0Top.AtomMaskName(bondAt0).c_str(), - frag1Top.AtomMaskName(bondAt1).c_str()); - int natom0 = frag0Top.Natom(); - int newNatom = natom0 + frag1Top.Natom(); - - // Determine which "direction" we will be combining the fragments. - // Make atA belong to the smaller fragment. atB fragment will be "known". - // Ensure atB index is what it will be after fragments are combined. - Barray posKnown( newNatom, false ); - int atA, atB; - Zmatrix zmatrixA; - if (frag0Top.HeavyAtomCount() < frag1Top.HeavyAtomCount()) { - // Fragment 1 is larger - atA = bondAt0; - atB = bondAt1 + natom0; - for (int at = frag0Top.Natom(); at != newNatom; at++) - posKnown[at] = true; - zmatrixA.SetFromFrameAndConnect( frag0frm, frag0Top ); - } else { - // Fragment 0 is larger or equal - atA = bondAt1 + natom0; - atB = bondAt0; - for (int at = 0; at != natom0; at++) - posKnown[at] = true; - zmatrixA.SetFromFrameAndConnect( frag1frm, frag1Top ); - zmatrixA.OffsetIcIndices( natom0 ); - } - - // Combine fragment1 into fragment 0 topology - Topology& combinedTop = frag0Top; - combinedTop.AppendTop( frag1Top ); - // Combined fragment1 into fragment 0 coords. - // Need to save the original coords in frame0 since SetupFrameV does not preserve. - double* tmpcrd0 = new double[natom0*3]; - std::copy( frag0frm.xAddress(), frag0frm.xAddress()+frag0frm.size(), tmpcrd0 ); - frag0frm.SetupFrameV( combinedTop.Atoms(), CoordinateInfo(frag0frm.BoxCrd(), false, false, false)); - std::copy( tmpcrd0, tmpcrd0+natom0*3, frag0frm.xAddress() ); - std::copy( frag1frm.xAddress(), frag1frm.xAddress()+frag1frm.size(), frag0frm.xAddress()+natom0*3 ); - Frame& CombinedFrame = frag0frm; - delete[] tmpcrd0; - - int chiralityDebug; - if (debug_ < 1) - chiralityDebug = 0; - else - chiralityDebug = debug_ - 1; - // Get the chirality around each atom before the bond is added. - BuildAtom AtomA; - if (combinedTop[atA].Nbonds() > 2) { - if (AtomA.DetermineChirality(atA, combinedTop, CombinedFrame, chiralityDebug)) return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\tAtom %4s chirality before bonding is %6s\n", combinedTop.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); - BuildAtom AtomB; - if (combinedTop[atB].Nbonds() > 2) { - if (AtomB.DetermineChirality(atB, combinedTop, CombinedFrame, chiralityDebug)) return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\tAtom %4s chirality before bonding is %6s\n", combinedTop.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); - - // Create the bond - if (debug_ > 0) - mprintf("DEBUG: Bonding atom %s to %s\n", combinedTop.AtomMaskName(atA).c_str(), combinedTop.AtomMaskName(atB).c_str()); - combinedTop.AddBond( atA, atB ); // TODO pseudo-parameter? - // // Regenerate the molecule info FIXME should Topology just do this? - if (combinedTop.DetermineMolecules()) return 1; - - // Determine new priorities around atoms that were just bonded - if (combinedTop[atA].Nbonds() > 2) { - if (AtomA.SetPriority(atA, combinedTop, CombinedFrame, chiralityDebug)) return 1; - } - if (combinedTop[atB].Nbonds() > 2) { - if (AtomB.SetPriority(atB, combinedTop, CombinedFrame, chiralityDebug)) return 1; - } - - // Generate Zmatrix only for ICs involving bonded atoms - Zmatrix bondZmatrix; - - // Note which atoms already have an IC in zmatrixA - Barray hasIC(combinedTop.Natom(), false); - for (Zmatrix::const_iterator it = zmatrixA.begin(); it != zmatrixA.end(); ++it) - hasIC[it->AtI()] = true; - - //bondZmatrix.SetDebug( debug_ ); - bondZmatrix.SetDebug( 1 ); // FIXME - if (SetupICsAroundBond(bondZmatrix, atA, atB, CombinedFrame, combinedTop, posKnown, hasIC, AtomA, AtomB)) { - mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", - combinedTop.AtomMaskName(atA).c_str(), - combinedTop.AtomMaskName(atB).c_str()); - return 1; - } - mprintf("DEBUG: CONVERT WITH bondZmatrix.\n"); - //if (debug_ > 0) - bondZmatrix.print(&combinedTop); - if (bondZmatrix.SetToFrame( CombinedFrame, posKnown )) { - mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); - return 1; - } - mprintf("DEBUG: CONVERT WITH zmatrixA.\n"); - zmatrixA.print( &combinedTop ); - if (zmatrixA.SetToFrame( CombinedFrame, posKnown )) { - mprinterr("Error: Conversion from zmatrixA to Cartesian coords failed.\n"); - return 1; - } - - return 0; -}*/ - -/// \return The total number of atoms whose position is known for the specified residue -/*static inline int known_count(int ires, Topology const& topIn, std::vector const& hasPosition) -{ - int count = 0; - for (int at = topIn.Res(ires).FirstAtom(); at != topIn.Res(ires).LastAtom(); at++) - if (hasPosition[at]) - count++; - return count; -}*/ - -/** Model the internal coordinates around a bond between two residues defined - * by bondAt0 (in residue0) and bondAt1 in (residue1). - * - */ -/*int Builder::ModelCoordsAroundBond(Frame const& frameIn, Topology const& topIn, int bondAt0, int bondAt1, - Zmatrix& zmatrix0, Barray const& hasPosition) -const -{ - mprintf("DEBUG: Model coords around bond %s - %s\n", topIn.AtomMaskName(bondAt0).c_str(), topIn.AtomMaskName(bondAt1).c_str()); - int res0 = topIn[bondAt0].ResNum(); - int res1 = topIn[bondAt1].ResNum(); - if (res0 == res1) { - mprinterr("Internal Error: ModelCoordsAroundBond(): Atoms are in the same residue.\n"); - return 1; - } - // Determine which "direction" we will be combining the fragments. - // Ensure atA belongs to the less-known fragment. atB fragment will be "known". -// int known0 = known_count(res0, topIn, hasPosition); -// int known1 = known_count(res1, topIn, hasPosition); -//// int atA, atB; -// if (known0 > known1) { -// mprinterr("Internal Error: ModelCoordsAroundBond(): Residue0 '%s' is more well-known than Residue1 '%s'\n", -// topIn.TruncResNameNum( topIn[bondAt0].ResNum() ).c_str(), -// topIn.TruncResNameNum( topIn[bondAt1].ResNum() ).c_str()); -// return 1; -// } - int atA = bondAt0; - int atB = bondAt1; - Zmatrix* zA = &zmatrix0; // FIXME -// Zmatrix const* zA; -// if (known0 < known1) { -// // Fragment 1 is better-known -// atA = bondAt0; -// atB = bondAt1; -// zA = zmatrix0; -// //zB = zmatrix1; -// } else { -// // Fragment 0 is better or equally known -// atA = bondAt1; -// atB = bondAt0; -// zA = zmatrix1; -// //zB = zmatrix0; -// } - - mprintf("DEBUG: More well-known atom: %s\n", topIn.AtomMaskName(atB).c_str()); - mprintf("DEBUG: Less well-known atom: %s has zmatrix= %i\n", topIn.AtomMaskName(atA).c_str(), (int)(zA != 0)); - - int chiralityDebug; - if (debug_ < 1) - chiralityDebug = 0; - else - chiralityDebug = debug_ - 1; - - // Get the chirality around each atom before the bond is added. - // Determine priorities - BuildAtom AtomA; - if (topIn[atA].Nbonds() > 2) { - if (AtomA.DetermineChirality(atA, topIn, frameIn, chiralityDebug)) return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atA).c_str(), chiralStr(AtomA.Chirality())); - BuildAtom AtomB; - if (topIn[atB].Nbonds() > 2) { - if (AtomB.DetermineChirality(atB, topIn, frameIn, chiralityDebug)) return 1; - } - if (debug_ > 0) - mprintf("DEBUG:\tAtom %4s chirality %6s\n", topIn.AtomMaskName(atB).c_str(), chiralStr(AtomB.Chirality())); - - // Generate Zmatrix only for ICs involving bonded atoms - Zmatrix bondZmatrix; - - // Note which atoms already have an IC in zmatrix A - Barray hasIC(topIn.Natom(), false); - if (zA != 0) { - for (Zmatrix::const_iterator it = zA->begin(); it != zA->end(); ++it) - hasIC[it->AtI()] = true; - } - - bondZmatrix.SetDebug( debug_ ); - if (SetupICsAroundBond(bondZmatrix, atA, atB, frameIn, topIn, hasPosition, hasIC, AtomA, AtomB)) { - mprinterr("Error: Zmatrix setup for ICs around %s and %s failed.\n", - topIn.AtomMaskName(atA).c_str(), - topIn.AtomMaskName(atB).c_str()); - return 1; - } - // Add the remaining ICs FIXME check for duplicates - for (Zmatrix::const_iterator it = zmatrix0.begin(); it != zmatrix0.end(); ++it) - bondZmatrix.AddIC( *it ); - if (debug_ > 0) - bondZmatrix.print(&topIn); - zmatrix0 = bondZmatrix; -// if (bondZmatrix.SetToFrame( frameIn, hasPosition )) { -// mprinterr("Error: Conversion from bondZmatrix to Cartesian coords failed.\n"); -// return 1; -// } - - return 0; -}*/ - -/** Given two bonded atoms A and B, where B has a depth of at least 2 - * (i.e., it is possible to have B be atom J where we can form J-K-L), - * set up a complete set of internal coordinates involving A and B in the - * direction of atom A. This means all internal coordinates with A and B - * as I and J (should be only 1), as J and K, and as K and L. - */ -/*int Builder::SetupICsAroundBond(Zmatrix& zmatrix, - int atA, int atB, Frame const& frameIn, Topology const& topIn, - Barray const& atomPositionKnown, - Barray const& hasICin, - BuildAtom const& AtomA, BuildAtom const& AtomB) -const -{ - if (debug_ > 0) - mprintf("DEBUG: SetupICsAroundBond: atA= %s (%i) atB= %s (%i) total # atoms %i\n", - topIn.AtomMaskName(atA).c_str(), atA+1, - topIn.AtomMaskName(atB).c_str(), atB+1, - topIn.Natom()); -// zmatrix.clear(); - - //Barray hasIC( topIn.Natom(), false ); - Barray hasIC = hasICin; - unsigned int nHasIC = 0; - for (Barray::const_iterator it = hasIC.begin(); it != hasIC.end(); ++it) { - if (*it) { - nHasIC++; - mprintf("DEBUG:\tAtom %s already has an IC.\n", topIn.AtomMaskName(it-hasIC.begin()).c_str()); - } - } - // Mark known atoms as already having IC - for (Barray::const_iterator it = atomPositionKnown.begin(); - it != atomPositionKnown.end(); ++it) - { - //mprintf("DEBUG: MARKING KNOWN ATOMS. %li\n", it - atomPositionKnown.begin()); - if (*it) { //MARK( it - atomPositionKnown.begin(), hasIC, nHasIC ); - hasIC[it - atomPositionKnown.begin()] = true; - nHasIC++; - } - } - - // First, make sure atom B as a bond depth of at least 2. - // Choose K and L atoms given atA is I and atB is J. - Atom const& AJ = topIn[atB]; - typedef std::pair Apair; - std::vector KLpairs; - for (Atom::bond_iterator kat = AJ.bondbegin(); kat != AJ.bondend(); ++kat) - { - if (*kat != atA) { - //mprintf("DEBUG: kat= %s\n", topIn.AtomMaskName(*kat).c_str()); - Atom const& AK = topIn[*kat]; - for (Atom::bond_iterator lat = AK.bondbegin(); lat != AK.bondend(); ++lat) - { - if (*lat != atB && *lat != atA) { - //mprintf("DEBUG: lat= %s\n", topIn.AtomMaskName(*lat).c_str()); - KLpairs.push_back( Apair(*kat, *lat) ); - } - } - } - } - if (debug_ > 0) { - for (std::vector::const_iterator it = KLpairs.begin(); - it != KLpairs.end(); ++it) - mprintf("DEBUG:\t\tKL pair %s - %s\n", topIn.AtomMaskName(it->first).c_str(), - topIn.AtomMaskName(it->second).c_str()); - } - if (KLpairs.empty()) { - mprinterr("Error: SetFromFrameAroundBond(): Could not find an atom pair bonded to atom %s\n", - topIn.AtomMaskName(atB).c_str()); - return 1; - } - // TODO be smarter about how K and L are selected? - double maxMass = topIn[KLpairs[0].first].Mass() + topIn[KLpairs[0].second].Mass(); - unsigned int maxIdx = 0; - for (unsigned int idx = 1; idx < KLpairs.size(); idx++) { - double sumMass = topIn[KLpairs[idx].first].Mass() + topIn[KLpairs[idx].second].Mass(); - if (sumMass > maxMass) { - maxMass = sumMass; - maxIdx = idx; - } - } - int atk0 = KLpairs[maxIdx].first; - int atl0 = KLpairs[maxIdx].second; - int modelDebug = 0; - if (debug_ > 0) { - mprintf("DEBUG: Chosen KL pair: %s - %s\n",topIn.AtomMaskName(atk0).c_str(), - topIn.AtomMaskName(atl0).c_str()); - modelDebug = debug_ - 1; - } - //Cpptraj::Structure::Model model; - //model.SetDebug( modelDebug ); //FIXME - //model.SetDebug( 1 ); - // FIXME - mprintf("DEBUG: ------------------------------------------------\n"); - //std::vector tmpic; - // I J: Set up ICs for X atB K L - if (AssignICsAroundBond(zmatrix, atB, atk0, atl0, topIn, frameIn, atomPositionKnown, AtomB)) { - mprinterr("Error: AssignICsAroundBond (I J) failed.\n"); - return 1; - } - // J K: Set up ICs for X atA atB K - if (AssignICsAroundBond(zmatrix, atA, atB, atk0, topIn, frameIn, atomPositionKnown, AtomA)) { - mprinterr("Error: AssignICsAroundBond (J K) failed.\n"); - return 1; - } - // K L: Set up ICs for X iat atA atB - Atom const& AJ1 = topIn[atA]; - for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) - { - if (*iat != atB) { - // Only do this if one or more of the atoms bonded to iat does not - // already have an IC. - unsigned int needsKLic = 0; - for (Atom::bond_iterator bat = topIn[*iat].bondbegin(); bat != topIn[*iat].bondend(); ++bat) { - if ( *bat != atA && !hasIC[*bat] ) { - mprintf("DEBUG:\tAtom %s around %s has no IC.\n", topIn.AtomMaskName(*bat).c_str(), topIn.AtomMaskName(*iat).c_str()); - needsKLic++; - } - } - if (needsKLic > 0) { - BuildAtom AtomC; - if (topIn[*iat].Nbonds() > 2) { - if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; - } - mprintf("DEBUG: K L IC needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); - if (AssignICsAroundBond(zmatrix, *iat, atA, atB, topIn, frameIn, atomPositionKnown, AtomC)) { - mprinterr("Error: AssignICsAroundBond (K L) failed.\n"); - return 1; - } - } else { - mprintf("DEBUG: K L IC not needed for %s.\n", topIn.AtomMaskName(*iat).c_str()); - } - } - } - // Mark/Print ICs - for (Zmatrix::const_iterator it = zmatrix.begin(); it != zmatrix.end(); ++it) { - it->printIC( topIn ); // DEBUG - //MARK( it->AtI(), hasIC, nHasIC ); - } - mprintf("DEBUG: END AssignICsAroundBond ------------------------\n"); - // FIXME - // ---- I J: Set dist, theta, phi for atA atB K L internal coord --- -// if (debug_ > 0) -// mprintf("DEBUG: IC (i j) %i - %i - %i - %i\n", atA+1, atB+1, atk0+1, atl0+1); -// double newDist = 0; -// if (model.AssignLength(newDist, atA, atB, topIn, frameIn, atomPositionKnown)) { -// mprinterr("Error: length (i j) assignment failed.\n"); -// return 1; -// } -// if (debug_ > 0) mprintf("DEBUG:\t\tnewDist= %g\n", newDist); -// double newTheta = 0; -// if (model.AssignTheta(newTheta, atA, atB, atk0, topIn, frameIn, atomPositionKnown)) { -// mprinterr("Error: theta (i j) assignment failed.\n"); -// return 1; -// } -// if (debug_ > 0) mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); -// double newPhi = 0; -// if (model.AssignPhi(newPhi, atA, atB, atk0, atl0, topIn, frameIn, -// atomPositionKnown, AtomB)) -// { -// mprinterr("Error: phi (i j) assignment failed.\n"); -// return 1; -// } -// if (debug_ > 0) mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); -// IC_.push_back(InternalCoords( atA, atB, atk0, atl0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); -// if (debug_ > 0) { -// mprintf("DEBUG: MODEL I J IC: "); -// IC_.back().printIC(topIn); -// } -// MARK( atA, hasIC, nHasIC ); -// -// // ----- J K: Set up ICs for X atA atB K --------------------------- -// Atom const& AJ1 = topIn[atA]; -// int ati = -1; -// //Atom const& AK1 = topIn[atB]; -// //Atom const& AL1 = topIn[atk0]; -// for (Atom::bond_iterator iat = AJ1.bondbegin(); iat != AJ1.bondend(); ++iat) -// { -// if (*iat != atB) { -// if (ati == -1) ati = *iat; -// // Set bond dist -// if (model.AssignLength(newDist, *iat, atA, topIn, frameIn, atomPositionKnown)) { -// mprinterr("Error: length (j k) assignment failed.\n"); -// return 1; -// } -// // Set theta for I atA atB -// newTheta = 0; -// if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { -// mprinterr("Error: theta (j k) assignment failed.\n"); -// return 1; -// } -// if (debug_ > 0) -// mprintf("DEBUG:\t\tnewTheta = %g\n", newTheta*Constants::RADDEG); -// // Set phi for I atA atB K -// newPhi = 0; -// if (model.AssignPhi(newPhi, *iat, atA, atB, atk0, topIn, frameIn, -// atomPositionKnown, AtomA)) -// { -// mprinterr("Error: phi (j k) assignment failed.\n"); -// return 1; -// } -// if (debug_ > 0) -// mprintf("DEBUG:\t\tnewPhi = %g\n", newPhi*Constants::RADDEG); -// IC_.push_back(InternalCoords( *iat, atA, atB, atk0, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); -// if (debug_ > 0) { -// mprintf("DEBUG: MODEL J K IC: "); -// IC_.back().printIC(topIn); -// } -// MARK( *iat, hasIC, nHasIC ); -// // ----- K L: Set up ICs for X iat atA atB --------------------- -// Atom const& AJ2 = topIn[*iat]; -// for (Atom::bond_iterator i2at = AJ2.bondbegin(); i2at != AJ2.bondend(); ++i2at) -// { -// if (*i2at != atA && *i2at != atB && !hasIC[*i2at]) { -// mprintf("DEBUG: MODEL K L IC: %s %s %s %s %i %i %i %i\n", -// topIn.AtomMaskName(*i2at).c_str(), -// topIn.AtomMaskName(*iat).c_str(), -// topIn.AtomMaskName(atA).c_str(), -// topIn.AtomMaskName(atB).c_str(), -// *i2at+1, *iat+1, atA+1, atB+1); -// if (model.AssignLength(newDist, *i2at, *iat, topIn, frameIn, atomPositionKnown)) { -// mprinterr("Error: length (k l) assignment failed.\n"); -// return 1; -// } -// mprintf("DEBUG: K L distance= %g\n", newDist); -// //newTheta = CalcAngle( frameIn.XYZ(*i2at), frameIn.XYZ(*iat), frameIn.XYZ(atA) ); -// if (model.AssignTheta(newTheta, *iat, atA, atB, topIn, frameIn, atomPositionKnown)) { -// mprinterr("Error: theta (k l) assignment failed.\n"); -// return 1; -// } -// mprintf("DEBUG: K L angle= %g\n", newTheta*Constants::RADDEG); -// // Set phi for X iat atA atB -// BuildAtom AtomC; -// if (topIn[*iat].Nbonds() > 2) { -// if (AtomC.DetermineChirality(*iat, topIn, frameIn, modelDebug)) return 1; -// } -// newPhi = 0; -// //model.SetDebug( 1 ); // FIXME -// if (model.AssignPhi(newPhi, *i2at, *iat, atA, atB, topIn, frameIn, -// atomPositionKnown, AtomC)) -// { -// mprinterr("Error: phi (k l) assignment failed.\n"); -// return 1; -// } -// mprintf("DEBUG: K L Phi = %g\n", newPhi*Constants::RADDEG); -// IC_.push_back(InternalCoords( *i2at, *iat, atA, atB, newDist, newTheta*Constants::RADDEG, newPhi*Constants::RADDEG )); -// mprintf("DEBUG: MODEL K L IC: "); -// IC_.back().printIC(topIn); -// MARK( *i2at, hasIC, nHasIC ); -// // Trace from atA *iat *i2at outwards -// //ToTrace.push_back(atA); -// //ToTrace.push_back(*iat); -// //ToTrace.push_back(*i2at); -// //if (traceMol(atA, *iat, *i2at, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) return 1; -// -// } -// } -// } -// } - - -// -//// Handle remaining atoms. -//if (AJ1.Nbonds() > 1) { -// if (AJ1.Nbonds() == 2) { -// if (debug_ > 0) mprintf("DEBUG: 2 bonds to %s.\n", topIn.AtomMaskName(atA).c_str()); -// if (traceMol(atB, atA, ati, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) -// return 1; -// } else { -// // 3 or more bonds -// std::vector const& priority = AtomA.Priority(); -// int at0 = -1; -// int at1 = -1; -// std::vector remainingAtoms; -// if (debug_ > 0) mprintf("DEBUG: %i bonds to %s\n", AJ1.Nbonds(), topIn.AtomMaskName(atA).c_str()); -// for (std::vector::const_iterator it = priority.begin(); it != priority.end(); ++it) { -// if (*it != atB) { -// if (debug_ > 0) mprintf("DEBUG:\t\t%s\n", topIn.AtomMaskName(*it).c_str()); -// if (at0 == -1) -// at0 = *it; -// else if (at1 == -1) -// at1 = *it; -// else -// remainingAtoms.push_back( *it ); -// } -// } -// // at0 atA at1 -// if (traceMol(at1, atA, at0, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) -// return 1; -// // at1 atA, at0 -// if (traceMol(at0, atA, at1, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) -// return 1; -// // Remaining atoms. -// for (std::vector::const_iterator it = remainingAtoms.begin(); it != remainingAtoms.end(); ++it) { -// if (traceMol(at0, atA, *it, frameIn, topIn, topIn.Natom(), nHasIC, hasIC)) -// return 1; -// } -// } -//} -// - return 0; -}*/ - -// ============================================================================== /** For existing torsions, see if all coordinates in that torsion * exist. If so, update the IC from the existing coordinates. */ @@ -1140,6 +145,7 @@ int Builder::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& return 0; } +// ----------------------------------------------------------------------------- /// Used to track atoms for mock externals class MockAtom { public: @@ -1167,7 +173,7 @@ class MockAtom { bool buildInternals_; ///< True if internals should be built for this atom }; -// ----------------------------------------------- +// ----------------------------------------------------------------------------- /** Store info for modelling torsions around X-Y */ class Cpptraj::Structure::Builder::TorsionModel { public: diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index a168684f17..5a1c17eb5f 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -8,7 +8,6 @@ class Frame; class ParameterSet; namespace Cpptraj { namespace Structure { -class BuildAtom; class Zmatrix; class InternalCoords; /// Used to attach different topology/frame combos using internal coordinates @@ -21,13 +20,6 @@ class Builder { void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); - - /// Combine second fragment into first fragment and bond -// int Combine(Topology&, Frame&, Topology const&, Frame const&, int, int) const; - /// Model the coordinates around a bond given only some coordinates are known -// int ModelCoordsAroundBond(Frame const&, Topology const&, int, int, Zmatrix&, Barray const&) const; - - /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); /// Generate internal coordinates in the same manner as LEaP @@ -36,6 +28,7 @@ class Builder { int GenerateInternalsAroundLink(int, int, Frame const&, Topology const&, Barray const&); /// Update existing indices with given offset void UpdateIndicesWithOffset(int); + /// \return Zmatrix from current internals int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; private: @@ -61,27 +54,6 @@ class Builder { int getLengthParam(double&, int, int, Topology const&) const; /// Get angle parameter for atoms. int getAngleParam(double&, int, int, int, Topology const&) const; - - // =========================================== - /// Assign a reasonable value for bond distance given 2 atoms whose position may or may not be known -// int AssignLength(double&, int, int, Topology const&, Frame const&, Barray const&) const; - /// Given atoms J and K, attempt to assign a reasonable value for theta for atom I -// int AssignTheta(double&, int, int, int, Topology const&, Frame const&, Barray const&) const; - /// Calculate an internal coordinate for known atoms -// static inline InternalCoords calcKnownAtomIc(int, int, int, int, Frame const&); - /// Insert an internal coord into a zmatrix -// int insertIc(Zmatrix&, int, int, int, int, double, -// Topology const&, Frame const&, Barray const&) const; - /// Assign internal coordinates for atoms I for torsions around J-K-L. -// int AssignICsAroundBond(Zmatrix&, int, int, int, -// Topology const&, Frame const&, Barray const&, -// BuildAtom const&) const; - - /// Model coordinates around a bond -// int SetupICsAroundBond(Zmatrix&, int, int, Frame const&, Topology const&, -// Barray const&, Barray const&, -// BuildAtom const&, BuildAtom const&) const; - // =========================================== /// Calculte phi value for a torsion in a TorsionModel void ModelTorsion(TorsionModel const&, unsigned int, unsigned int, double); /// Get angle parameter/model an angle value diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index c2874b3e7e..0343bb0aa9 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,5 +1,5 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h -Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h Builder.h GenerateConnectivityArrays.h InternalCoords.h StructureEnum.h Zmatrix.h +Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Builder.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h @@ -12,4 +12,4 @@ Sugar.o : Sugar.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants. SugarBuilder.o : SugarBuilder.cpp ../ArgList.h ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../CharMask.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DistRoutines.h ../FileIO.h ../FileName.h ../Frame.h ../ImageOption.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h FunctionalGroup.h FxnGroupBuilder.h LinkAtom.h ResStatArray.h StructureEnum.h StructureRoutines.h Sugar.h SugarBuilder.h SugarLinkAtoms.h SugarToken.h SugarLinkAtoms.o : SugarLinkAtoms.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../StringRoutines.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h LinkAtom.h SugarLinkAtoms.h SugarToken.o : SugarToken.cpp ../ArgList.h ../CpptrajStdio.h SugarToken.h -Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h InternalCoords.h Zmatrix.h +Zmatrix.o : Zmatrix.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 87b530f95e..2a8695bccc 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -446,7 +446,7 @@ Spline.o : Spline.cpp CpptrajStdio.h Spline.h SplineFxnTable.o : SplineFxnTable.cpp Constants.h CpptrajStdio.h Spline.h SplineFxnTable.h StringRoutines.h StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 3a7f5316a5edbaeb5c20f31892fa46761ae64938 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 09:24:45 -0500 Subject: [PATCH 0501/1492] Try and use CPPTRAJ guess at hybridization if parameter not defined. If it comes back with SP, incremement to SP2 --- src/Structure/Builder.cpp | 23 ++++++++++++++++------- src/Structure/Builder.h | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 06c639abfc..2763ac310f 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -881,8 +881,9 @@ int Builder::getExistingChiralityIdx(int ai) const { } /** Determine hybridization in the same manner as leap */ -AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom) const { +AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom, std::vector const& atoms) const { AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; + // Check if hybridization is defined in the parameter set. if (params_ != 0) { ParmHolder::const_iterator it; if (aAtom.HasType()) { @@ -891,6 +892,14 @@ AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom) con H1 = it->second.Hybridization(); } } + // Use the cpptraj guess. + H1 = GuessAtomHybridization(aAtom, atoms); + // FIXME this is a bit of a hack. If we get an SP type here its likely we + // are generating internals for a fragment that has not been bonded + // yet. Do SP2 instead. + if (H1 == AtomType::SP) + H1 = AtomType::SP2; + // Guess in the same way leap does if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) { // TODO bond orders? int iSingle = 0; @@ -923,8 +932,8 @@ double Builder::ModelBondLength(int ai, int aj, Topology const& topIn) const { } Atom const& AI = topIn[ai]; Atom const& AJ = topIn[aj]; - AtomType::HybridizationType hybridI = getAtomHybridization( AI ); - AtomType::HybridizationType hybridJ = getAtomHybridization( AJ ); + AtomType::HybridizationType hybridI = getAtomHybridization( AI, topIn.Atoms() ); + AtomType::HybridizationType hybridJ = getAtomHybridization( AJ, topIn.Atoms() ); if (hybridI == AtomType::UNKNOWN_HYBRIDIZATION || hybridJ == AtomType::UNKNOWN_HYBRIDIZATION) @@ -973,7 +982,7 @@ double Builder::ModelBondAngle(int ai, int aj, int ak, Topology const& topIn) co mprintf("DEBUG:\t\tJ %s Nbonds: %i\n", AJ.ElementName(), AJ.Nbonds()); mprintf("DEBUG:\t\tK %s Nbonds: %i\n", topIn[ak].ElementName(), topIn[ak].Nbonds()); } - AtomType::HybridizationType hybrid = getAtomHybridization( AJ ); + AtomType::HybridizationType hybrid = getAtomHybridization( AJ, topIn.Atoms() ); // Guess hybrid if needed //if (hybrid == AtomType::UNKNOWN_HYBRIDIZATION) @@ -1205,8 +1214,8 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo if (topIn[a1].Nbonds() < 2 || topIn[a2].Nbonds() < 2) return 0; // Get atom hybridizations - AtomType::HybridizationType H1 = getAtomHybridization( topIn[a1] ); - AtomType::HybridizationType H2 = getAtomHybridization( topIn[a2] );//AtomType::UNKNOWN_HYBRIDIZATION; + AtomType::HybridizationType H1 = getAtomHybridization( topIn[a1], topIn.Atoms() ); + AtomType::HybridizationType H2 = getAtomHybridization( topIn[a2], topIn.Atoms() );//AtomType::UNKNOWN_HYBRIDIZATION; if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) mprintf("Warning: No hybridization set for atom %s\n", topIn.AtomMaskName(a1).c_str()); if (H2 == AtomType::UNKNOWN_HYBRIDIZATION) @@ -1231,7 +1240,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo Hx = H1; Hy = H2; } - static const char* hstr[] = { "SP", "SP2", "SP3", "Unknown" }; + static const char* hstr[] = { "SP1", "SP2", "SP3", "Unknown" }; mprintf("DEBUG: assignTorsionsAroundBond: AX= %s (%s) AY= %s (%s), aAtomIdx= %i", topIn.AtomMaskName(ax).c_str(), hstr[Hx], topIn.AtomMaskName(ay).c_str(), hstr[Hy], aAtomIdx+1); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 5a1c17eb5f..fcdabd2886 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -67,7 +67,7 @@ class Builder { /// Create torsion around SP2-SP2 linkage void createSp2Sp2Torsions(TorsionModel const&); /// Dtermine atom hybridization in the same way as leap - AtomType::HybridizationType getAtomHybridization(Atom const&) const; + AtomType::HybridizationType getAtomHybridization(Atom const&, std::vector const&) const; /// Model torsions around a bond in the same manner as LEaP int assignTorsionsAroundBond(int, int, Frame const&, Topology const&, Barray const&, int); /// Get any existing internal torsion indices around specified atoms From e087ea39117fcd70c09917f917841a95f032122f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 09:36:37 -0500 Subject: [PATCH 0502/1492] Update for new IC handling --- test/Test_Graft/IC.Final.graft.mol2.save | 70 ++++++++++++------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/test/Test_Graft/IC.Final.graft.mol2.save b/test/Test_Graft/IC.Final.graft.mol2.save index e4af61be0c..0355474365 100644 --- a/test/Test_Graft/IC.Final.graft.mol2.save +++ b/test/Test_Graft/IC.Final.graft.mol2.save @@ -6,40 +6,40 @@ USER_CHARGES @ATOM - 1 N 5.0262 1.0605 2.4857 N 1 TYR -0.415700 - 2 H 4.3432 1.6530 2.9356 H 1 TYR 0.271900 - 3 CA 5.5045 1.4387 1.1713 CX 1 TYR -0.001400 - 4 HA 6.5833 1.5906 1.2064 H1 1 TYR 0.087600 - 5 CB 5.1981 0.3552 0.1428 CT 1 TYR -0.015200 - 6 HB2 5.6866 -0.5735 0.4378 HC 1 TYR 0.029500 - 7 HB3 5.5697 0.6663 -0.8336 HC 1 TYR 0.029500 - 8 C 4.8470 2.7276 0.6990 C 1 TYR 0.597300 - 9 O 4.0264 3.3055 1.4083 O 1 TYR -0.567900 - 10 C2 3.6760 0.1340 0.0670 CA 2 PRY 0.033204 - 11 C3 3.1370 -1.1220 0.3590 CA 2 PRY -0.149016 - 12 H4 3.7940 -1.9290 0.6360 HA 2 PRY 0.153372 - 13 C4 1.7830 -1.3560 0.3010 CA 2 PRY -0.336291 - 14 H5 1.3750 -2.3240 0.5260 HA 2 PRY 0.167425 - 15 C5 0.9070 -0.3310 -0.0550 CA 2 PRY 0.423974 - 16 O1 -0.4020 -0.6590 -0.0810 OS 2 PRY -0.391815 - 17 C6 1.4180 0.9200 -0.3470 CA 2 PRY -0.336291 - 18 H6 0.7760 1.7340 -0.6230 HA 2 PRY 0.167425 - 19 C7 2.7930 1.1360 -0.2830 CA 2 PRY -0.149016 - 20 H7 3.1680 2.1180 -0.5140 HA 2 PRY 0.153372 - 21 C8 -1.3580 0.3020 -0.4580 CT 2 PRY 0.358047 - 22 C9 -2.6930 -0.3810 -0.4700 CM 2 PRY -0.496680 - 23 C10 -3.8370 0.0490 0.0400 CM 2 PRY 0.317549 - 24 C11 -5.0960 -0.7730 -0.1000 CT 2 PRY -0.394216 - 25 C12 -4.0350 1.3480 0.7820 CT 2 PRY -0.394216 - 26 H8 -1.1210 0.6720 -1.4540 H1 2 PRY 0.001584 - 27 H9 -1.3270 1.1410 0.2250 H1 2 PRY 0.001584 - 28 H10 -2.6800 -1.3290 -0.9820 HA 2 PRY 0.192041 - 29 H11 -5.8660 -0.2140 -0.6260 HC 2 PRY 0.110363 - 30 H12 -5.5010 -1.0240 0.8780 HC 2 PRY 0.110363 - 31 H13 -4.9190 -1.6950 -0.6400 HC 2 PRY 0.110363 - 32 H14 -4.7240 1.9910 0.2380 HC 2 PRY 0.110363 - 33 H15 -3.1210 1.9030 0.9400 HC 2 PRY 0.110363 - 34 H16 -4.4820 1.1590 1.7540 HC 2 PRY 0.110363 + 1 N 3.3258 1.5479 -0.0000 N 1 TYR -0.415700 + 2 H 3.9094 0.7236 -0.0000 H 1 TYR 0.271900 + 3 CA 3.9700 2.8458 -0.0000 CX 1 TYR -0.001400 + 4 HA 3.6717 3.4001 -0.8898 H1 1 TYR 0.087600 + 5 CB 3.5770 3.6538 1.2321 CT 1 TYR -0.015200 + 6 HB2 2.4970 3.8011 1.2414 HC 1 TYR 0.029500 + 7 HB3 3.8775 3.1158 2.1312 HC 1 TYR 0.029500 + 8 C 5.4855 2.7052 -0.0000 C 1 TYR 0.597300 + 9 O 6.0088 1.5932 -0.0000 O 1 TYR -0.567900 + 10 C2 4.2167 4.8987 1.1983 CA 2 PRY 0.033204 + 11 C3 4.0500 5.8609 2.1981 CA 2 PRY -0.149016 + 12 H4 3.4057 5.6495 3.0346 HA 2 PRY 0.153372 + 13 C4 4.6895 7.0771 2.1412 CA 2 PRY -0.336291 + 14 H5 4.5566 7.8128 2.9127 HA 2 PRY 0.167425 + 15 C5 5.5298 7.3802 1.0703 CA 2 PRY 0.423974 + 16 O1 6.1127 8.5970 1.1066 OS 2 PRY -0.391815 + 17 C6 5.7104 6.4428 0.0703 CA 2 PRY -0.336291 + 18 H6 6.3501 6.6384 -0.7684 HA 2 PRY 0.167425 + 19 C7 5.0526 5.2168 0.1465 CA 2 PRY -0.149016 + 20 H7 5.2076 4.5030 -0.6439 HA 2 PRY 0.153372 + 21 C8 6.9535 9.0030 0.0541 CT 2 PRY 0.358047 + 22 C9 7.3730 10.4140 0.3402 CM 2 PRY -0.496680 + 23 C10 8.5864 10.9389 0.2629 CM 2 PRY 0.317549 + 24 C11 8.8094 12.4021 0.5624 CT 2 PRY -0.394216 + 25 C12 9.8424 10.1956 -0.1206 CT 2 PRY -0.394216 + 26 H8 6.4004 8.9625 -0.8827 H1 2 PRY 0.001584 + 27 H9 7.7956 8.3279 -0.0270 H1 2 PRY 0.001584 + 28 H10 6.5519 11.0514 0.6242 HA 2 PRY 0.192041 + 29 H11 9.2372 12.9117 -0.2975 HC 2 PRY 0.110363 + 30 H12 9.5134 12.5228 1.3829 HC 2 PRY 0.110363 + 31 H13 7.8882 12.9051 0.8297 HC 2 PRY 0.110363 + 32 H14 10.2558 10.6045 -1.0404 HC 2 PRY 0.110363 + 33 H15 9.6929 9.1354 -0.2690 HC 2 PRY 0.110363 + 34 H16 10.6002 10.3206 0.6478 HC 2 PRY 0.110363 @BOND 1 1 3 1 2 3 5 1 @@ -57,7 +57,7 @@ USER_CHARGES 14 22 23 1 15 23 24 1 16 23 25 1 - 17 5 10 1 + 17 10 5 1 18 1 2 1 19 3 4 1 20 5 6 1 From 21a2eded99d4bcc6ee5d9d280680e620eb83d156 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 10:23:01 -0500 Subject: [PATCH 0503/1492] Add function for getting internal coords that can be used to construct an atom. --- src/Structure/Builder.cpp | 53 +++++++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 2 ++ 2 files changed, 55 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 2763ac310f..6e2d33e7b8 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1645,6 +1645,59 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, return 0; } +/** Find internal coordinates for given atom. + * Find torsion that contains this atom as one of the end atoms. The other + * three atoms must have known position. + * There must be a bond and angle that lie on the torsion and include + * the given atom as a terminal atom. + * \return 1 if complete internal coords were found, 0 if not. + */ +int Builder::getIcFromInternals(InternalCoords& icOut, int at, Barray const& hasPosition) const +{ + for (Tarray::const_iterator dih = internalTorsions_.begin(); dih != internalTorsions_.end(); ++dih) + { + if (at == dih->AtI()) { + if (hasPosition[dih->AtJ()] && + hasPosition[dih->AtK()] && + hasPosition[dih->AtL()]) + { + int bidx = getExistingBondIdx(dih->AtI(), dih->AtJ()); + if (bidx > -1) { + int aidx = getExistingAngleIdx(dih->AtI(), dih->AtJ(), dih->AtK()); + if (aidx > -1) { + icOut = InternalCoords(dih->AtI(), dih->AtJ(), dih->AtK(), dih->AtL(), + internalBonds_[bidx].DistVal(), + internalAngles_[aidx].ThetaVal()*Constants::RADDEG, + dih->PhiVal()*Constants::RADDEG); + return 1; + } + } + } + } else if (at == dih->AtL()) { + if (hasPosition[dih->AtK()] && + hasPosition[dih->AtJ()] && + hasPosition[dih->AtI()]) + { + int bidx = getExistingBondIdx(dih->AtL(), dih->AtK()); + if (bidx > -1) { + int aidx = getExistingAngleIdx(dih->AtL(), dih->AtK(), dih->AtJ()); + if (aidx > -1) { + icOut = InternalCoords(dih->AtL(), dih->AtK(), dih->AtJ(), dih->AtI(), + internalBonds_[bidx].DistVal(), + internalAngles_[aidx].ThetaVal()*Constants::RADDEG, + dih->PhiVal()*Constants::RADDEG); + return 1; + } + } + } + } + } // END loop over internal torsions + return 0; +} + + +//int Builder::BuildFromInternals + /** Generate a Zmatrix from the current internals. TODO only for atoms that need it? */ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) const { mprintf("DEBUG: ----- Enter GetZmatrixFromInternals -----\n"); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index fcdabd2886..0f300f815a 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -96,6 +96,8 @@ class Builder { /// Generate internal coords for a given atom int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); + /// Get complete internal coords that can be used to construct specified atom + int getIcFromInternals(InternalCoords&, int, Barray const&) const; int debug_; ParameterSet const* params_; From 652901ca5a28f954a8caaca1629673049f404c3f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 10:47:38 -0500 Subject: [PATCH 0504/1492] Add function to build from internals --- src/Structure/Builder.cpp | 70 +++++++++++++++++++++++++++++++++++++-- src/Structure/Builder.h | 3 ++ 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 6e2d33e7b8..4098c8f9a5 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1694,9 +1694,75 @@ int Builder::getIcFromInternals(InternalCoords& icOut, int at, Barray const& has } // END loop over internal torsions return 0; } - -//int Builder::BuildFromInternals +/** Build coordinates for any atom of the specified residue that does + * not have its position set. + */ +int Builder::BuildFromInternals(Frame& frameOut, int ires, Topology const& topIn, Barray& hasPosition) +const +{ + Residue const& currentRes = topIn.Res(ires); + // Count how many atoms need their positions set + unsigned int nAtomsThatNeedPositions = 0; + for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); ++at) + if (!hasPosition[at]) + nAtomsThatNeedPositions++; + mprintf("DEBUG: %u atoms need positions in residue %s\n", nAtomsThatNeedPositions, topIn.TruncResNameNum(ires).c_str()); + if (nAtomsThatNeedPositions == 0) return 0; + + // Loop over residue atoms + while (nAtomsThatNeedPositions > 0) { + unsigned int nAtomsBuilt = 0; + for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); ++at) + { + int atToBuildAround = -1; + if (!hasPosition[at]) { + // Position of atom is not known. + mprintf("BUILD: Position of %s is not known.\n", *(topIn[at].Name())); + // Is this bonded to an atom with known position? + for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) { + if (hasPosition[*bat]) { + atToBuildAround = *bat; + break; + } + } + } else { + // Position of atom is known. + mprintf("BUILD: Position of %s is known.\n", *(topIn[at].Name())); + atToBuildAround = at; + } + // Build unknown positions around known atom + if (atToBuildAround != -1) { + mprintf("Building externals from %s\n", topIn.LeapName(atToBuildAround).c_str()); + Atom const& bAtom = topIn[atToBuildAround]; + for (Atom::bond_iterator bat = bAtom.bondbegin(); bat != bAtom.bondend(); ++bat) + { + if (!hasPosition[*bat]) { + // Find an internal coordinate. + InternalCoords ic; + if (getIcFromInternals(ic, *bat, hasPosition)) { + mprintf("Building atom %s using torsion/angle/bond\n", topIn.LeapName(*bat).c_str()); + mprintf( "Torsion = %f\n", ic.Phi() ); + mprintf( "Angle = %f\n", ic.Theta() ); + mprintf( "Bond = %f\n", ic.Dist() ); + Vec3 posI = Zmatrix::AtomIposition(ic, frameOut); + frameOut.SetXYZ( ic.AtI(), posI ); + hasPosition[ ic.AtI() ] = true; + nAtomsBuilt++; + nAtomsThatNeedPositions--; + } + } + } // END loop over atoms bonded to atom with known position + } + } // END loop over residue atoms + // If we built no atoms this is a problem + if (nAtomsBuilt < 1) { + mprinterr("Error: No more atoms could be built for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + return 1; + } + } // END loop while atoms need position + return 0; +} /** Generate a Zmatrix from the current internals. TODO only for atoms that need it? */ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) const { diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 0f300f815a..774757517f 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -29,6 +29,9 @@ class Builder { /// Update existing indices with given offset void UpdateIndicesWithOffset(int); + /// Build position from internals for any atom in residue with unset position + int BuildFromInternals(Frame&, int, Topology const&, Barray&) const; + /// \return Zmatrix from current internals int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; private: From fa2aae51bd9a8dd943176a36f24d36baa1a2ee72 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 11:02:04 -0500 Subject: [PATCH 0505/1492] This should build things in the exact same order as leap --- src/Exec_Build.cpp | 15 ++++++++------- src/Structure/Builder.cpp | 11 ++++++++++- src/Structure/GenerateConnectivityArrays.cpp | 15 +++++++++++++++ src/Structure/GenerateConnectivityArrays.h | 2 ++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 49fff328e5..343a73c497 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -359,13 +359,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, return 1; } // Convert to Zmatrix and assign missing atom positions - Cpptraj::Structure::Zmatrix tmpz; - tmpz.SetDebug( 1 ); // DEBUG - if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { - mprinterr("Error: Could not get Zmatrix from internals.\n"); - return 1; - } - if (tmpz.SetToFrame( frameOut, hasPosition )) { + //Cpptraj::Structure::Zmatrix tmpz; + //tmpz.SetDebug( 1 ); // DEBUG + //if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { + // mprinterr("Error: Could not get Zmatrix from internals.\n"); + // return 1; + //} + //if (tmpz.SetToFrame( frameOut, hasPosition )) { + if (structureBuilder.BuildFromInternals(frameOut, ires, topOut, hasPosition)) { mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 4098c8f9a5..3756424f1c 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1710,11 +1710,16 @@ const mprintf("DEBUG: %u atoms need positions in residue %s\n", nAtomsThatNeedPositions, topIn.TruncResNameNum(ires).c_str()); if (nAtomsThatNeedPositions == 0) return 0; + // Generate array over residue in same order that leap would do + std::vector resIndices = GenerateAtomArray(std::vector(1, topIn.Res(ires)), topIn.Atoms()); + // Loop over residue atoms while (nAtomsThatNeedPositions > 0) { unsigned int nAtomsBuilt = 0; - for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); ++at) + for (std::vector::const_iterator idx = resIndices.begin(); + idx != resIndices.end(); ++idx) { + int at = *idx; int atToBuildAround = -1; if (!hasPosition[at]) { // Position of atom is not known. @@ -1742,6 +1747,10 @@ const InternalCoords ic; if (getIcFromInternals(ic, *bat, hasPosition)) { mprintf("Building atom %s using torsion/angle/bond\n", topIn.LeapName(*bat).c_str()); + mprintf("Using - %s - %s - %s\n", + topIn.LeapName(ic.AtJ()).c_str(), + topIn.LeapName(ic.AtK()).c_str(), + topIn.LeapName(ic.AtL()).c_str()); mprintf( "Torsion = %f\n", ic.Phi() ); mprintf( "Angle = %f\n", ic.Theta() ); mprintf( "Bond = %f\n", ic.Dist() ); diff --git a/src/Structure/GenerateConnectivityArrays.cpp b/src/Structure/GenerateConnectivityArrays.cpp index 0cdc011937..2366ea616a 100644 --- a/src/Structure/GenerateConnectivityArrays.cpp +++ b/src/Structure/GenerateConnectivityArrays.cpp @@ -31,6 +31,21 @@ static inline void set_indices(int& start, int& end, int& offset, int firstatom, } } +/** Generate atom array in same order as LEaP. */ +std::vector Cpptraj::Structure::GenerateAtomArray(std::vector const& residues, + std::vector const& atoms) +{ + std::vector out; + for (std::vector::const_iterator res = residues.begin(); res != residues.end(); ++res) + { + int start, end, offset; + set_indices(start, end, offset, res->FirstAtom(), res->LastAtom()); + for (int iat = start; iat != end; iat += offset) + out.push_back( iat ); + } + return out; +} + /** From atom connectivity, generate a bond array in the same order as LEaP. */ // TODO use in GenerateBAT BondArray Cpptraj::Structure::GenerateBondArray(std::vector const& residues, std::vector const& atoms) diff --git a/src/Structure/GenerateConnectivityArrays.h b/src/Structure/GenerateConnectivityArrays.h index 9fe70514e7..7efd766dc8 100644 --- a/src/Structure/GenerateConnectivityArrays.h +++ b/src/Structure/GenerateConnectivityArrays.h @@ -12,6 +12,8 @@ namespace Structure { enum AtomScanDirectionType { SCAN_ATOMS_BACKWARDS = 0, SCAN_ATOMS_FORWARDS }; /// Set default atom scan direction void SetAtomScanDirection(AtomScanDirectionType); +/// Generate array of atom indices in same order as leap +std::vector GenerateAtomArray(std::vector const&, std::vector const&); /// Generate bond array in same order as leap BondArray GenerateBondArray(std::vector const&, std::vector const&); /// Generate a spanning tree From 1ac8e820642a63b7f9b0f08bf497feddd2a9afeb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 14:12:31 -0500 Subject: [PATCH 0506/1492] Do not do per residue since units might have more than 1 residue --- src/Exec_Build.cpp | 2 +- src/Exec_Graft.cpp | 19 ++++++++++------ src/Structure/Builder.cpp | 47 +++++++++++++++++++++++++++++---------- src/Structure/Builder.h | 4 ++-- 4 files changed, 50 insertions(+), 22 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 343a73c497..a9453040a3 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -366,7 +366,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // return 1; //} //if (tmpz.SetToFrame( frameOut, hasPosition )) { - if (structureBuilder.BuildFromInternals(frameOut, ires, topOut, hasPosition)) { + if (structureBuilder.BuildFromInternals(frameOut, topOut, hasPosition)) { mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; diff --git a/src/Exec_Graft.cpp b/src/Exec_Graft.cpp index 207dbae367..23ed2a8e58 100644 --- a/src/Exec_Graft.cpp +++ b/src/Exec_Graft.cpp @@ -394,17 +394,22 @@ const return 1; } // Convert to Zmatrix and assign missing atom positions - Cpptraj::Structure::Zmatrix tmpz; - tmpz.SetDebug( 1 ); // DEBUG - if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { - mprinterr("Error: Could not get Zmatrix from internals.\n"); - return 1; - } - if (tmpz.SetToFrame( frameOut, hasPosition )) { + if (structureBuilder.BuildFromInternals(frameOut, topOut, hasPosition)) { mprinterr("Error: Grafting %s with %s build from internals failed.\n", mol0Top.c_str(), mol1Top.c_str()); return 1; } +// Cpptraj::Structure::Zmatrix tmpz; +// tmpz.SetDebug( 1 ); // DEBUG +// if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { +// mprinterr("Error: Could not get Zmatrix from internals.\n"); +// return 1; +// } +// if (tmpz.SetToFrame( frameOut, hasPosition )) { +// mprinterr("Error: Grafting %s with %s build from internals failed.\n", +// mol0Top.c_str(), mol1Top.c_str()); +// return 1; +// } // Finalize topology - determine molecules, dont renumber residues, assign default bond params topOut.CommonSetup(true, false, true); topOut.Summary(); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 3756424f1c..ce1ce28886 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1695,29 +1695,52 @@ int Builder::getIcFromInternals(InternalCoords& icOut, int at, Barray const& has return 0; } -/** Build coordinates for any atom of the specified residue that does +/** Build coordinates for any atom with an internal that does * not have its position set. */ -int Builder::BuildFromInternals(Frame& frameOut, int ires, Topology const& topIn, Barray& hasPosition) +int Builder::BuildFromInternals(Frame& frameOut, Topology const& topIn, Barray& hasPosition) const { - Residue const& currentRes = topIn.Res(ires); + // Create a list of residues that have atoms that need positions + std::vector residues; + std::vector Rnums; + for (Tarray::const_iterator dih = internalTorsions_.begin(); + dih != internalTorsions_.end(); ++dih) + { + if (!hasPosition[dih->AtI()]) { + int rnum = topIn[dih->AtI()].ResNum(); + bool has_rnum = false; + for (std::vector::const_iterator it = Rnums.begin(); it != Rnums.end(); ++it) { + if (*it == rnum) { + has_rnum = true; + break; + } + } + if (!has_rnum) { + mprintf("DEBUG: Need to build for residue %s\n", topIn.TruncResNameNum(rnum).c_str()); + residues.push_back( topIn.Res(rnum) ); + Rnums.push_back(rnum); + } + } + } + // Generate array over residue in same order that leap would do + std::vector atomIndices = GenerateAtomArray(residues, topIn.Atoms()); + residues.clear(); + Rnums.clear(); // Count how many atoms need their positions set unsigned int nAtomsThatNeedPositions = 0; - for (int at = currentRes.FirstAtom(); at != currentRes.LastAtom(); ++at) - if (!hasPosition[at]) + for (std::vector::const_iterator it = atomIndices.begin(); + it != atomIndices.end(); ++it) + if (!hasPosition[*it]) nAtomsThatNeedPositions++; - mprintf("DEBUG: %u atoms need positions in residue %s\n", nAtomsThatNeedPositions, topIn.TruncResNameNum(ires).c_str()); + mprintf("DEBUG: %u atoms need positions.\n", nAtomsThatNeedPositions); if (nAtomsThatNeedPositions == 0) return 0; - // Generate array over residue in same order that leap would do - std::vector resIndices = GenerateAtomArray(std::vector(1, topIn.Res(ires)), topIn.Atoms()); - // Loop over residue atoms while (nAtomsThatNeedPositions > 0) { unsigned int nAtomsBuilt = 0; - for (std::vector::const_iterator idx = resIndices.begin(); - idx != resIndices.end(); ++idx) + for (std::vector::const_iterator idx = atomIndices.begin(); + idx != atomIndices.end(); ++idx) { int at = *idx; int atToBuildAround = -1; @@ -1766,7 +1789,7 @@ const } // END loop over residue atoms // If we built no atoms this is a problem if (nAtomsBuilt < 1) { - mprinterr("Error: No more atoms could be built for residue %s\n", topIn.TruncResNameNum(ires).c_str()); + mprinterr("Error: No more atoms could be built for %s\n", topIn.c_str()); return 1; } } // END loop while atoms need position diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 774757517f..0df4b17291 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -29,8 +29,8 @@ class Builder { /// Update existing indices with given offset void UpdateIndicesWithOffset(int); - /// Build position from internals for any atom in residue with unset position - int BuildFromInternals(Frame&, int, Topology const&, Barray&) const; + /// Build position from internals for any atom with unset position + int BuildFromInternals(Frame&, Topology const&, Barray&) const; /// \return Zmatrix from current internals int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; From aa62a76f471f90317863f54f797b3028375ff688 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 14:34:30 -0500 Subject: [PATCH 0507/1492] Print all internals when building atoms for debugging. Make leap name closer to what leap actually puts --- src/Exec_Sequence.cpp | 15 ++++++++------- src/Structure/Builder.cpp | 33 +++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 2 ++ src/Topology.cpp | 3 ++- 4 files changed, 45 insertions(+), 8 deletions(-) diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 1d96f2cf55..192753eca6 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -226,13 +226,14 @@ const return 1; } // Convert to Zmatrix and assign missing atom positions - Cpptraj::Structure::Zmatrix tmpz; - tmpz.SetDebug( 1 ); // DEBUG - if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { - mprinterr("Error: Could not get Zmatrix from internals.\n"); - return 1; - } - if (tmpz.SetToFrame( frameOut, hasPosition )) { + //Cpptraj::Structure::Zmatrix tmpz; + //tmpz.SetDebug( 1 ); // DEBUG + //if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { + // mprinterr("Error: Could not get Zmatrix from internals.\n"); + // return 1; + //} + //if (tmpz.SetToFrame( frameOut, hasPosition )) { + if (structureBuilder.BuildFromInternals(frameOut, topOut, hasPosition)) { mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index ce1ce28886..6874eba012 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1645,6 +1645,37 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, return 0; } +void Builder::printAllInternalsForAtom(int at, Topology const& topIn, Barray const& hasPosition) const +{ + mprintf("DEBUG: All internals for atom %s\n", topIn.LeapName(at).c_str()); + for (Tarray::const_iterator dih = internalTorsions_.begin(); dih != internalTorsions_.end(); ++dih) + { + if (at == dih->AtI()) { + if (hasPosition[dih->AtJ()] && + hasPosition[dih->AtK()] && + hasPosition[dih->AtL()]) + { + mprintf("DEBUG:\t\t%s - %s - %s Phi= %f\n", + topIn.LeapName(dih->AtJ()).c_str(), + topIn.LeapName(dih->AtK()).c_str(), + topIn.LeapName(dih->AtL()).c_str(), + dih->PhiVal()*Constants::RADDEG); + } + } else if (at == dih->AtL()) { + if (hasPosition[dih->AtK()] && + hasPosition[dih->AtJ()] && + hasPosition[dih->AtI()]) + { + mprintf("DEBUG:\t\t%s - %s - %s Phi= %f\n", + topIn.LeapName(dih->AtK()).c_str(), + topIn.LeapName(dih->AtJ()).c_str(), + topIn.LeapName(dih->AtI()).c_str(), + dih->PhiVal()*Constants::RADDEG); + } + } + } +} + /** Find internal coordinates for given atom. * Find torsion that contains this atom as one of the end atoms. The other * three atoms must have known position. @@ -1769,6 +1800,8 @@ const // Find an internal coordinate. InternalCoords ic; if (getIcFromInternals(ic, *bat, hasPosition)) { + printAllInternalsForAtom(*bat, topIn, hasPosition); // DEBUG + mprintf("Building atom %s using torsion/angle/bond\n", topIn.LeapName(*bat).c_str()); mprintf("Using - %s - %s - %s\n", topIn.LeapName(ic.AtJ()).c_str(), diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 0df4b17291..51805c7dda 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -101,6 +101,8 @@ class Builder { int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); /// Get complete internal coords that can be used to construct specified atom int getIcFromInternals(InternalCoords&, int, Barray const&) const; + // For debug + void printAllInternalsForAtom(int, Topology const&, Barray const&) const; int debug_; ParameterSet const* params_; diff --git a/src/Topology.cpp b/src/Topology.cpp index 48046ba4ac..79a884f402 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -337,8 +337,9 @@ std::string Topology::TruncAtomNameNum(int atom) const { /** Given an atom number, return a string in LEaP-style format. */ std::string Topology::LeapName(int at) const { int rnum = atoms_[at].ResNum(); + int idx = at - residues_[rnum].FirstAtom() + 1; std::string out( ".R<" + residues_[rnum].Name().Truncated() + " " + integerToString(rnum+1) + - ">.A<" + atoms_[at].Name().Truncated() + " " + integerToString(at+1) + ">"); + ">.A<" + atoms_[at].Name().Truncated() + " " + integerToString(idx) + ">"); return out; } From 631b620f6333f48d3b8bebd03ab868e5d43fef32 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 15:01:07 -0500 Subject: [PATCH 0508/1492] Get rid of unused vars --- src/Structure/Builder.cpp | 41 +++------------------------------------ src/Structure/Builder.h | 2 -- 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 6874eba012..5d08f5efba 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -17,9 +17,7 @@ using namespace Cpptraj::Structure; Builder::Builder() : debug_(0), params_(0), - currentTop_(0), - currentFrm_(0), - hasPosition_(0) + currentTop_(0) {} /** Set optional parameter set. */ @@ -1044,37 +1042,6 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned // Look for an existing internal int icIdx = getExistingTorsionIdx( aa, ax, ay, ad ); if (icIdx < 0) { -/* // Get bond lengths FIXME deal with unknown positions - double l0, l1; - if (AssignLength(l0, aa, ax, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign length between %s and %s\n", - currentTop_->AtomMaskName(aa).c_str(), - currentTop_->AtomMaskName(ax).c_str()); - return; - } - if (AssignLength(l1, ad, ay, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign length between %s and %s\n", - currentTop_->AtomMaskName(ad).c_str(), - currentTop_->AtomMaskName(ay).c_str()); - return; - } - // Get angles - double t0, t1; - if (AssignTheta(t0, aa, ax, ay, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign angle between %s and %s and %s\n", - currentTop_->AtomMaskName(aa).c_str(), - currentTop_->AtomMaskName(ax).c_str(), - currentTop_->AtomMaskName(ay).c_str()); - return; - } - if (AssignTheta(t1, ad, ay, ax, *currentTop_, *currentFrm_, *hasPosition_)) { - mprinterr("Error: Could not assign angle between %s and %s and %s\n", - currentTop_->AtomMaskName(ad).c_str(), - currentTop_->AtomMaskName(ay).c_str(), - currentTop_->AtomMaskName(ax).c_str()); - return; - }*/ - mprintf("++++Torsion INTERNAL: %f to %s - %s - %s - %s\n", phiVal*Constants::RADDEG, currentTop_->LeapName(aa).c_str(), currentTop_->LeapName(ax).c_str(), @@ -1205,11 +1172,9 @@ void Builder::createSp2Sp2Torsions(TorsionModel const& MT) { /** Assign torsions around bonded atoms in manner similar to LEaP's ModelAssignTorsionsAround. */ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition, int aAtomIdx) { - // Save addresses of zmatrix, frame, topology, and hasPosition. - // These are required for the createSpXSpX routines. TODO zero them at the end? - currentFrm_ = &frameIn; + // Save address of current topology. + // These are required for the ModelTorsion routine. TODO zero at the end? currentTop_ = &topIn; - hasPosition_ = &hasPosition; // No need to do this if either atom only has 1 bond. if (topIn[a1].Nbonds() < 2 || topIn[a2].Nbonds() < 2) return 0; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 51805c7dda..7fa3fc2791 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -108,8 +108,6 @@ class Builder { ParameterSet const* params_; Topology const* currentTop_; ///< Topology for the createSpXSpXTorsions/ModelTorsion routines - Frame const* currentFrm_; ///< Frame for the createSpXSpXTorsions routines - Barray const* hasPosition_; ///< Array indicating which atoms have position for createSpXSpXTorsions/ModelTorsion routines Tarray internalTorsions_; Aarray internalAngles_; Larray internalBonds_; From 6849c64b2587503a365950a61d6dae4b0551b46b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 12 Feb 2024 15:16:51 -0500 Subject: [PATCH 0509/1492] Make UpdateICsFromFrame not depend on residue number --- src/Exec_Build.cpp | 2 +- src/Exec_Graft.cpp | 5 +++++ src/Exec_Sequence.cpp | 2 +- src/Structure/Builder.cpp | 36 +++++++++++++++++++++++++++--------- src/Structure/Builder.h | 7 ++++--- 5 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index a9453040a3..e92251914a 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -354,7 +354,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } } // Update internal coords from known positions - if (structureBuilder.UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { + if (structureBuilder.UpdateICsFromFrame( frameOut, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } diff --git a/src/Exec_Graft.cpp b/src/Exec_Graft.cpp index 23ed2a8e58..e1b33151fb 100644 --- a/src/Exec_Graft.cpp +++ b/src/Exec_Graft.cpp @@ -393,6 +393,11 @@ const topOut.AtomMaskName(bondat0).c_str()); return 1; } + // Update internal coords from known positions + if (structureBuilder.UpdateICsFromFrame( frameOut, topOut, hasPosition )) { + mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); + return 1; + } // Convert to Zmatrix and assign missing atom positions if (structureBuilder.BuildFromInternals(frameOut, topOut, hasPosition)) { mprinterr("Error: Grafting %s with %s build from internals failed.\n", diff --git a/src/Exec_Sequence.cpp b/src/Exec_Sequence.cpp index 192753eca6..eaa5c7840a 100644 --- a/src/Exec_Sequence.cpp +++ b/src/Exec_Sequence.cpp @@ -221,7 +221,7 @@ const return 1; } // Update internal coords from known positions - if (structureBuilder.UpdateICsFromFrame( frameOut, ires, topOut, hasPosition )) { + if (structureBuilder.UpdateICsFromFrame( frameOut, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); return 1; } diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 5d08f5efba..24254687a7 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -82,15 +82,34 @@ const } /** For existing torsions, see if all coordinates in that torsion - * exist. If so, update the IC from the existing coordinates. + * exist. If so, update the torsion from the existing coordinates. */ -int Builder::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& topIn, Barray const& hasPosition) +int Builder::UpdateICsFromFrame(Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { - // Update torsions. + // Create a list of residues that have atoms with internals + std::vector residues; + std::vector Rnums; + for (Tarray::const_iterator dih = internalTorsions_.begin(); + dih != internalTorsions_.end(); ++dih) + { + int rnum = topIn[dih->AtI()].ResNum(); + bool has_rnum = false; + for (std::vector::const_iterator it = Rnums.begin(); it != Rnums.end(); ++it) { + if (*it == rnum) { + has_rnum = true; + break; + } + } + if (!has_rnum) { + mprintf("DEBUG: Residue %s has internals.\n", topIn.TruncResNameNum(rnum).c_str()); + residues.push_back( topIn.Res(rnum) ); + Rnums.push_back(rnum); + } + } // Get list of bonds. - BondArray myBonds = GenerateBondArray( std::vector(1, topIn.Res(ires)), topIn.Atoms() ); + BondArray myBonds = GenerateBondArray( residues, topIn.Atoms() ); for (BondArray::const_iterator bnd = myBonds.begin(); bnd != myBonds.end(); ++bnd) { - if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { + //if (topIn[bnd->A1()].ResNum() == ires && topIn[bnd->A2()].ResNum() == ires) { mprintf("Looking at torsions around: %s - %s\n", topIn.LeapName(bnd->A1()).c_str(), topIn.LeapName(bnd->A2()).c_str()); // Find all ICs that share atoms 1 and 2 (J and K) bool needsUpdate = false; @@ -138,7 +157,7 @@ int Builder::UpdateICsFromFrame(Frame const& frameIn, int ires, Topology const& dih.SetPhiVal( dNew ); } } // END ICs need update - } // END both bond atoms belong to this residue + //} // END both bond atoms belong to this residue } // END loop over bonds return 0; } @@ -1048,8 +1067,6 @@ void Builder::ModelTorsion(TorsionModel const& MT, unsigned int iBondX, unsigned currentTop_->LeapName(ay).c_str(), currentTop_->LeapName(ad).c_str()); internalTorsions_.push_back( InternalTorsion(aa, ax, ay, ad, phiVal) ); - //newZmatrix_->AddIC( InternalCoords(aa, ax, ay, ad, l0, t0*Constants::RADDEG, phiVal*Constants::RADDEG) ); - //newZmatrix_->AddIC( InternalCoords(ad, ay, ax, aa, l1, t1*Constants::RADDEG, phiVal*Constants::RADDEG) ); } else { mprintf( "Torsional INTERNAL already exists: %f\n", internalTorsions_[icIdx].PhiVal()*Constants::RADDEG ); } @@ -1795,6 +1812,7 @@ const } /** Generate a Zmatrix from the current internals. TODO only for atoms that need it? */ +/* int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) const { mprintf("DEBUG: ----- Enter GetZmatrixFromInternals -----\n"); zmatrix.clear(); @@ -1848,4 +1866,4 @@ int Builder::GetZmatrixFromInternals(Zmatrix& zmatrix, Topology const& topIn) co } // END loop over internal torsions mprintf("DEBUG: ----- Exit GetZmatrixFromInternals -----\n"); return 0; -} +}*/ diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 7fa3fc2791..e1a15cdbeb 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -20,8 +20,8 @@ class Builder { void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); - /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters - int UpdateICsFromFrame(Frame const&, int, Topology const&, Barray const&); + /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters TODO combine into BuildFromInternals? + int UpdateICsFromFrame(Frame const&, Topology const&, Barray const&); /// Generate internal coordinates in the same manner as LEaP int GenerateInternals(Frame const&, Topology const&, Barray const&); /// Generate internal coordinates around a link between residues in same manner as LEaP @@ -33,7 +33,7 @@ class Builder { int BuildFromInternals(Frame&, Topology const&, Barray&) const; /// \return Zmatrix from current internals - int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; + //int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; private: typedef std::vector Iarray; @@ -112,6 +112,7 @@ class Builder { Aarray internalAngles_; Larray internalBonds_; Carray internalChirality_; + Iarray Rnums_; ///< Hold residue indices pertaining to current internals }; /// ----- Hold torsion internal ------------------ class Cpptraj::Structure::Builder::InternalTorsion { From cd378e01db81817a0a6b17f743bacb34bcb68099 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 08:58:49 -0500 Subject: [PATCH 0510/1492] Move leap chirality routines into a separate file --- src/Structure/Builder.cpp | 187 +------------------------------- src/Structure/CMakeLists.txt | 1 + src/Structure/Chirality.cpp | 193 ++++++++++++++++++++++++++++++++++ src/Structure/Chirality.h | 23 ++++ src/Structure/structuredepend | 3 +- src/Structure/structurefiles | 1 + src/cpptrajdepend | 3 +- 7 files changed, 225 insertions(+), 186 deletions(-) create mode 100644 src/Structure/Chirality.cpp create mode 100644 src/Structure/Chirality.h diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 24254687a7..b40e1a7e0e 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1,4 +1,5 @@ #include "Builder.h" +#include "Chirality.h" #include "GenerateConnectivityArrays.h" #include "Zmatrix.h" #include "../Constants.h" @@ -333,190 +334,6 @@ std::vector return known_out; } -/** LEaP routine for determining atom chirality. - * This is done by crossing A to B and then dotting the - * result with C. TODO use Chirality in BuildAtom? Use an Enum? - * The chirality of the vectors is determined by the sign of - * the result, which is determined by whether or not C has - * a component in the direction AxB or in the opposite direction. - */ -static inline double VectorAtomChirality(Vec3 const& Center, Vec3 const& A, Vec3 const& B, Vec3 const& C) -{ - Vec3 vA = A - Center; - Vec3 vB = B - Center; - Vec3 vC = C - Center; - Vec3 vCross = vA.Cross( vB ); - double dot = vCross * vC; - if (dot > 0) - return 1.0; - else if (dot < 0) - return -1.0; - return 0.0; -} - -/** LEaP routine for determining atom chirality when positions may or - * may not be defined. Currently the criteria for chirality is - * absolute orientation of the vectors joining this atom to its neighbors. - * The neighbors are passed as vPA, vPB, vPC, vPD and bA, bB, bC, bD - * define whether or not the position is defined. - * - * This routine calculates the chirality using the defined vectors and - * then flips the sign depending on which vectors were used to calculate - * the chirality. If the ATOMs have (fKnown) set then their coordinate - * is considered to be known. - */ -static inline double VectorAtomNormalizedChirality(Vec3 const& Center, - Vec3 const& vPA, bool bA, - Vec3 const& vPB, bool bB, - Vec3 const& vPC, bool bC, - Vec3 const& vPD, bool bD) -{ - double dChi = 0; - - if (!bA) { - // If A is not known then use B,C,D to calc chirality. - // The chirality calculated will be negative w.r.t. the - // correct chirality. - if (!bB || !bC || !bD) return dChi; - dChi = -VectorAtomChirality( Center, vPB, vPC, vPD ); - return dChi; - } - - if (!bB) { - // If B is not known then use A,C,D to calc chirality. - // The chirality calculated will be correct. - if (!bB || !bD) return dChi; - dChi = VectorAtomChirality( Center, vPA, vPC, vPD ); - return dChi; - } - - if (!bC) { - // If C is not known then use A,B,D to calc chirality. - // The chirality calculated will be negative w.r.t. the - // correct chirality. - if (!bD) return dChi; - dChi = -VectorAtomChirality( Center, vPA, vPB, vPD ); - return dChi; - } - - dChi = VectorAtomChirality( Center, vPA, vPB, vPC ); - - return dChi; -} - -/** \return index of atom less than all others but larger than aLast */ -static inline int findLeastLargerThan(Atom const& aAtom, int aLast) -{ - int aSmall = -1; - for (Atom::bond_iterator aCur = aAtom.bondbegin(); aCur != aAtom.bondend(); ++aCur) - { - if (aLast != -1) { - if (aLast >= *aCur) continue; - } - if (aSmall == -1) - aSmall = *aCur; - else if ( *aCur < aSmall ) - aSmall = *aCur; - } - return aSmall; -} - -/** Sort neighbors of given atom in the same manner as LEaP. */ -static inline void chiralityOrderNeighbors(Atom const& aAtom, - int& aPAtomA, int& aPAtomB, - int& aPAtomC, int& aPAtomD) -{ - aPAtomA = -1; - aPAtomB = -1; - aPAtomC = -1; - aPAtomD = -1; - - if (aAtom.Nbonds() < 1) return; - - aPAtomA = findLeastLargerThan(aAtom, -1); - if (aAtom.Nbonds() < 2) return; - - aPAtomB = findLeastLargerThan(aAtom, aPAtomA); - if (aAtom.Nbonds() < 3) return; - - aPAtomC = findLeastLargerThan(aAtom, aPAtomB); - if (aAtom.Nbonds() < 4) return; - - aPAtomD = findLeastLargerThan(aAtom, aPAtomC); -} - -/** Transform the orientation that has been measured with - * respect to the ordering in aaOrig[4] to the ordering - * in aaNew[4]. Return the result. - * - * The transformation is done by swapping ATOMs in aaOrig until - * the order matches that of aaNew, each time two ATOMs are swapped, - * flip the sign of the orientation. - * - * SIDE EFFECT: The order in aaOrig is changed. - */ -static inline void chiralityTransformOrientation(double dOrig, int* aaOrig, double& dPNew, const int* aaNew) -{ - dPNew = dOrig; - for (int i=0; i<4; i++ ) { - int j = i; - for ( ; j<4; j++ ) { - if ( aaOrig[j] == aaNew[i] ) - break; - } - if ( j >= 4 ) { - mprinterr("Error: Comparing atoms %i %i %i and %i to atoms %i %i %i and %i.\n", - aaOrig[0]+1, aaOrig[1]+1, aaOrig[2]+1, aaOrig[3]+1, - aaNew[0]+1, aaNew[1]+1, aaNew[2]+1, aaNew[3]+1); - mprinterr("Error: This error may be due to faulty Connection atoms.\n"); - // TODO fatal - } - // Swap elements and flip sign - if ( j != i ) { - std::swap( aaOrig[j], aaOrig[i] ); - dPNew = -dPNew; - } - } -} - -/** Transform the chirality which has been measured with - * respect to ATOM ID ordering to an arbitrary ordering. - */ -static inline double chiralityToOrientation(double dChirality, Atom const& aCenter, - int aAtomA, int aAtomB, int aAtomC, int aAtomD) -{ - if (fabs(dChirality) < Constants::SMALL) return 0.0; - - int aaOrig[4]; - chiralityOrderNeighbors( aCenter, aaOrig[0], aaOrig[1], aaOrig[2], aaOrig[3] ); - - int aaNew[4]; - aaNew[0] = aAtomA; - aaNew[1] = aAtomB; - aaNew[2] = aAtomC; - aaNew[3] = aAtomD; - - bool newNull = (aaNew[3] == -1); - bool origNull = (aaOrig[3] == -1); - if (newNull && !origNull) { - for (int i = 0; i < 4; i++) { - bool found = false; - for (int j=0; j<3; j++) found |= (aaOrig[i] == aaNew[j]); - if ( !found ) { - aaNew[3] = aaOrig[i]; - break; - } - } - } else if (!newNull && origNull) { - mprinterr("Error: Only three neighbors around: aCenter, but orientation has 4\n"); - } - - double dOrient; - chiralityTransformOrientation( dChirality, aaOrig, dOrient, aaNew ); - - return dOrient; -} - /** Assuming atoms have been ordered with SortBondedAtomsLikeLeap, * calculate the orientation of the iB atom with respect to the * triangle (iA, iX, iY). This orientation will be used by the @@ -524,6 +341,7 @@ static inline double chiralityToOrientation(double dChirality, Atom const& aCent */ static inline double calculateOrientation(MockAtom const& iX, double chiX, Atom const& AX, MockAtom const& iA, MockAtom const& iY, MockAtom const& iB) { + using namespace Cpptraj::Structure::Chirality; double dOrientation = 1.0; if (iX.Known() && iA.Known() && @@ -1344,6 +1162,7 @@ void Builder::buildBondInternal(int a1, int a2, Frame const& frameIn, Topology c */ int Builder::determineChirality(double& dChi, int at, Frame const& frameIn, Topology const& topIn, Barray const& hasPosition) { + using namespace Cpptraj::Structure::Chirality; dChi = 0.0; if (!hasPosition[at]) { return 0; diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index a7cebdea51..b434c765d1 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -2,6 +2,7 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/BuildAtom.cpp ${CMAKE_CURRENT_LIST_DIR}/Builder.cpp + ${CMAKE_CURRENT_LIST_DIR}/Chirality.cpp ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp diff --git a/src/Structure/Chirality.cpp b/src/Structure/Chirality.cpp new file mode 100644 index 0000000000..96b6c5c653 --- /dev/null +++ b/src/Structure/Chirality.cpp @@ -0,0 +1,193 @@ +#include "Chirality.h" +#include "../Atom.h" +#include "../Constants.h" +#include "../CpptrajStdio.h" +#include "../Vec3.h" +#include // fabs + +/** LEaP routine for determining atom chirality. + * This is done by crossing A to B and then dotting the + * result with C. TODO use Chirality in BuildAtom? Use an Enum? + * The chirality of the vectors is determined by the sign of + * the result, which is determined by whether or not C has + * a component in the direction AxB or in the opposite direction. + */ +double Cpptraj::Structure::Chirality::VectorAtomChirality(Vec3 const& Center, + Vec3 const& A, Vec3 const& B, Vec3 const& C) +{ + Vec3 vA = A - Center; + Vec3 vB = B - Center; + Vec3 vC = C - Center; + Vec3 vCross = vA.Cross( vB ); + double dot = vCross * vC; + if (dot > 0) + return 1.0; + else if (dot < 0) + return -1.0; + return 0.0; +} + +/** LEaP routine for determining atom chirality when positions may or + * may not be defined. Currently the criteria for chirality is + * absolute orientation of the vectors joining this atom to its neighbors. + * The neighbors are passed as vPA, vPB, vPC, vPD and bA, bB, bC, bD + * define whether or not the position is defined. + * + * This routine calculates the chirality using the defined vectors and + * then flips the sign depending on which vectors were used to calculate + * the chirality. If the ATOMs have (fKnown) set then their coordinate + * is considered to be known. + */ +double Cpptraj::Structure::Chirality::VectorAtomNormalizedChirality(Vec3 const& Center, + Vec3 const& vPA, bool bA, + Vec3 const& vPB, bool bB, + Vec3 const& vPC, bool bC, + Vec3 const& vPD, bool bD) +{ + double dChi = 0; + + if (!bA) { + // If A is not known then use B,C,D to calc chirality. + // The chirality calculated will be negative w.r.t. the + // correct chirality. + if (!bB || !bC || !bD) return dChi; + dChi = -VectorAtomChirality( Center, vPB, vPC, vPD ); + return dChi; + } + + if (!bB) { + // If B is not known then use A,C,D to calc chirality. + // The chirality calculated will be correct. + if (!bB || !bD) return dChi; + dChi = VectorAtomChirality( Center, vPA, vPC, vPD ); + return dChi; + } + + if (!bC) { + // If C is not known then use A,B,D to calc chirality. + // The chirality calculated will be negative w.r.t. the + // correct chirality. + if (!bD) return dChi; + dChi = -VectorAtomChirality( Center, vPA, vPB, vPD ); + return dChi; + } + + dChi = VectorAtomChirality( Center, vPA, vPB, vPC ); + + return dChi; +} + +/** \return index of atom less than all others but larger than aLast */ +static inline int findLeastLargerThan(Atom const& aAtom, int aLast) +{ + int aSmall = -1; + for (Atom::bond_iterator aCur = aAtom.bondbegin(); aCur != aAtom.bondend(); ++aCur) + { + if (aLast != -1) { + if (aLast >= *aCur) continue; + } + if (aSmall == -1) + aSmall = *aCur; + else if ( *aCur < aSmall ) + aSmall = *aCur; + } + return aSmall; +} + +/** Transform the orientation that has been measured with + * respect to the ordering in aaOrig[4] to the ordering + * in aaNew[4]. Return the result. + * + * The transformation is done by swapping ATOMs in aaOrig until + * the order matches that of aaNew, each time two ATOMs are swapped, + * flip the sign of the orientation. + * + * SIDE EFFECT: The order in aaOrig is changed. + */ +static inline void chiralityTransformOrientation(double dOrig, int* aaOrig, double& dPNew, const int* aaNew) +{ + dPNew = dOrig; + for (int i=0; i<4; i++ ) { + int j = i; + for ( ; j<4; j++ ) { + if ( aaOrig[j] == aaNew[i] ) + break; + } + if ( j >= 4 ) { + mprinterr("Error: Comparing atoms %i %i %i and %i to atoms %i %i %i and %i.\n", + aaOrig[0]+1, aaOrig[1]+1, aaOrig[2]+1, aaOrig[3]+1, + aaNew[0]+1, aaNew[1]+1, aaNew[2]+1, aaNew[3]+1); + mprinterr("Error: This error may be due to faulty Connection atoms.\n"); + // TODO fatal + } + // Swap elements and flip sign + if ( j != i ) { + std::swap( aaOrig[j], aaOrig[i] ); + dPNew = -dPNew; + } + } +} + +/** Sort neighbors of given atom in the same manner as LEaP. */ +void Cpptraj::Structure::Chirality::chiralityOrderNeighbors(Atom const& aAtom, + int& aPAtomA, int& aPAtomB, + int& aPAtomC, int& aPAtomD) +{ + aPAtomA = -1; + aPAtomB = -1; + aPAtomC = -1; + aPAtomD = -1; + + if (aAtom.Nbonds() < 1) return; + + aPAtomA = findLeastLargerThan(aAtom, -1); + if (aAtom.Nbonds() < 2) return; + + aPAtomB = findLeastLargerThan(aAtom, aPAtomA); + if (aAtom.Nbonds() < 3) return; + + aPAtomC = findLeastLargerThan(aAtom, aPAtomB); + if (aAtom.Nbonds() < 4) return; + + aPAtomD = findLeastLargerThan(aAtom, aPAtomC); +} + +/** Transform the chirality which has been measured with + * respect to ATOM ID ordering to an arbitrary ordering. + */ +double Cpptraj::Structure::Chirality::chiralityToOrientation(double dChirality, Atom const& aCenter, + int aAtomA, int aAtomB, int aAtomC, int aAtomD) +{ + if (fabs(dChirality) < Constants::SMALL) return 0.0; + + int aaOrig[4]; + chiralityOrderNeighbors( aCenter, aaOrig[0], aaOrig[1], aaOrig[2], aaOrig[3] ); + + int aaNew[4]; + aaNew[0] = aAtomA; + aaNew[1] = aAtomB; + aaNew[2] = aAtomC; + aaNew[3] = aAtomD; + + bool newNull = (aaNew[3] == -1); + bool origNull = (aaOrig[3] == -1); + if (newNull && !origNull) { + for (int i = 0; i < 4; i++) { + bool found = false; + for (int j=0; j<3; j++) found |= (aaOrig[i] == aaNew[j]); + if ( !found ) { + aaNew[3] = aaOrig[i]; + break; + } + } + } else if (!newNull && origNull) { + mprinterr("Error: Only three neighbors around: aCenter, but orientation has 4\n"); + } + + double dOrient; + chiralityTransformOrientation( dChirality, aaOrig, dOrient, aaNew ); + + return dOrient; +} + + diff --git a/src/Structure/Chirality.h b/src/Structure/Chirality.h new file mode 100644 index 0000000000..569218e417 --- /dev/null +++ b/src/Structure/Chirality.h @@ -0,0 +1,23 @@ +#ifndef INC_STRUCTURE_CHIRALITY_H +#define INC_STRUCTURE_CHIRALITY_H +class Atom; +class Vec3; +namespace Cpptraj { +namespace Structure { +namespace Chirality { + +/// Calculate chirality in same manner as LEaP. All atom positions should be known. +double VectorAtomChirality(Vec3 const&, Vec3 const&, Vec3 const&, Vec3 const&); +/// Calculate chirality in same manner as LEaP. Some atom positions may not be known. +double VectorAtomNormalizedChirality(Vec3 const&, + Vec3 const&, bool, Vec3 const&, bool, + Vec3 const&, bool, Vec3 const&, bool); +/// Order atoms for chirality calculation like LEaP +void chiralityOrderNeighbors(Atom const&, int&, int&, int&, int&); +/// Transform given chirality to an orientation +double chiralityToOrientation(double, Atom const&, int, int, int, int); + +} +} +} +#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 0343bb0aa9..8038bb531b 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,5 +1,6 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h -Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Builder.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h +Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Builder.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h +Chirality.o : Chirality.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../SymbolExporting.h ../Vec3.h Chirality.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index 1e7c8a3f12..d00e816504 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -2,6 +2,7 @@ STRUCTURE_SOURCES= \ BuildAtom.cpp \ Builder.cpp \ + Chirality.cpp \ Disulfide.cpp \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 2a8695bccc..2059dc510f 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -446,7 +446,8 @@ Spline.o : Spline.cpp CpptrajStdio.h Spline.h SplineFxnTable.o : SplineFxnTable.cpp Constants.h CpptrajStdio.h Spline.h SplineFxnTable.h StringRoutines.h StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h -Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Builder.h Structure/Chirality.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h +Structure/Chirality.o : Structure/Chirality.cpp Atom.h Constants.h CpptrajStdio.h NameType.h Structure/Chirality.h SymbolExporting.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 1aec22d705a4982dc1926d0ea80ddfe8d2b58327 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 09:17:08 -0500 Subject: [PATCH 0511/1492] Do not use cpptraj guess if a hybridization parameter was found. --- src/Structure/Builder.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index b40e1a7e0e..d434c43448 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -728,13 +728,15 @@ AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom, std } } // Use the cpptraj guess. - H1 = GuessAtomHybridization(aAtom, atoms); - // FIXME this is a bit of a hack. If we get an SP type here its likely we - // are generating internals for a fragment that has not been bonded - // yet. Do SP2 instead. - if (H1 == AtomType::SP) - H1 = AtomType::SP2; - // Guess in the same way leap does + if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) { + H1 = GuessAtomHybridization(aAtom, atoms); + // FIXME this is a bit of a hack. If we get an SP type here its likely we + // are generating internals for a fragment that has not been bonded + // yet. Do SP2 instead. + if (H1 == AtomType::SP) + H1 = AtomType::SP2; + } + // If still unknown, guess in the same way leap does. if (H1 == AtomType::UNKNOWN_HYBRIDIZATION) { // TODO bond orders? int iSingle = 0; From 96f4e4cd67dfac06358e84d687b865cd74ff3547 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 10:42:44 -0500 Subject: [PATCH 0512/1492] Standalone routine to calculate orientation around an atom --- src/Structure/Builder.cpp | 34 +++++++++++++++++++++++++++++++++- src/Structure/Builder.h | 2 ++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index d434c43448..cfdf69fe01 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -225,10 +225,11 @@ class Cpptraj::Structure::Builder::TorsionModel { bool AxHasKnownAtoms() const { return axHasKnownAtoms_; } /// \return True if AY has known bonded atoms bool AyHasKnownAtoms() const { return ayHasKnownAtoms_; } + /// Sort an array of MockAtoms the way that LEaP does + static Marray SortBondedAtomsLikeLeap(unsigned int&, Topology const& topIn, Marray const&); private: static int LeapAtomWeight(Atom const&); //static inline std::vector SiftBondedAtomsLikeLeap(unsigned int&, Atom const&, std::vector const&); - static inline Marray SortBondedAtomsLikeLeap(unsigned int&, Topology const& topIn, Marray const&); static inline void swap_heaviest(Marray&, Topology const&); MockAtom atX_; ///< Atom X @@ -628,6 +629,37 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Iarray const& } // ----------------------------------------------------------------------------- +/** Calculate the orientation around a single atom. Assume all positions are known. */ +void Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameIn, Topology const& topIn) { + using namespace Cpptraj::Structure::Chirality; + + Vec3 iXPos( frameIn.XYZ(ax) ); + Vec3 iYPos( frameIn.XYZ(ay) ); + // Create array of AX bonded atoms + Atom const& AX = topIn[ax]; + std::vector sorted_ax; + sorted_ax.reserve( AX.Nbonds() - 1 ); + for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) { + if (*bat != ay) { + sorted_ax.push_back( MockAtom(*bat, frameIn.XYZ(*bat)) ); + sorted_ax.back().SetBuildInternals( true ); + } + } + // Sort AX bonds + unsigned int firstUnknownIdxX = 0; + sorted_ax = TorsionModel::SortBondedAtomsLikeLeap(firstUnknownIdxX, topIn, sorted_ax); + // Calculate the chirality around atom X + double Xorientation = 0; + if (sorted_ax.size() < 2) + Xorientation = 1.0; + else + Xorientation = VectorAtomChirality( iXPos, sorted_ax[0].Pos(), iYPos, sorted_ax[1].Pos() ); + mprintf("ORIENTATION: around atom %s (- %s) = %f\n", + topIn.LeapName(ax).c_str(), + topIn.LeapName(ay).c_str(), + Xorientation); +} + /** Update all indices in internals according to the given offset. */ void Builder::UpdateIndicesWithOffset(int atomOffset) { for (Tarray::iterator it = internalTorsions_.begin(); it != internalTorsions_.end(); ++it) diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index e1a15cdbeb..8a8a631dde 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -29,6 +29,8 @@ class Builder { /// Update existing indices with given offset void UpdateIndicesWithOffset(int); + void CalculateOrientationAroundAtom(int, int, Frame const&, Topology const&); // TODO const? + /// Build position from internals for any atom with unset position int BuildFromInternals(Frame&, Topology const&, Barray&) const; From d63e6e91972fbd4230bce50c7d0cc3d0d94f63b7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 10:46:51 -0500 Subject: [PATCH 0513/1492] Make static --- src/Structure/Builder.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 8a8a631dde..718de2e1ac 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -92,12 +92,8 @@ class Builder { /// Build bond internal void buildBondInternal(int, int, Frame const&, Topology const&, Barray const&); - /// Find index of bonded atom less than all others but larger than last - //static inline int findLeastLargerThan(Atom const&, int); - /// Sort neighbors of atom. Used in determineChirality - //static void chiralityOrderNeighbors(Atom const&, int&, int&, int&, int&); /// Determine chirality around an atom - int determineChirality(double&, int, Frame const&, Topology const&, Barray const&); + static int determineChirality(double&, int, Frame const&, Topology const&, Barray const&); /// Generate internal coords for a given atom int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); From 6d37afa14846b212b885407204e29e103e74cf45 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 10:48:25 -0500 Subject: [PATCH 0514/1492] Make static, return orientation --- src/Structure/Builder.cpp | 3 ++- src/Structure/Builder.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index cfdf69fe01..b77f21eefe 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -630,7 +630,7 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Iarray const& // ----------------------------------------------------------------------------- /** Calculate the orientation around a single atom. Assume all positions are known. */ -void Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameIn, Topology const& topIn) { +double Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameIn, Topology const& topIn) { using namespace Cpptraj::Structure::Chirality; Vec3 iXPos( frameIn.XYZ(ax) ); @@ -658,6 +658,7 @@ void Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameI topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str(), Xorientation); + return Xorientation; } /** Update all indices in internals according to the given offset. */ diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 718de2e1ac..6f4cf47cce 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -29,7 +29,7 @@ class Builder { /// Update existing indices with given offset void UpdateIndicesWithOffset(int); - void CalculateOrientationAroundAtom(int, int, Frame const&, Topology const&); // TODO const? + static double CalculateOrientationAroundAtom(int, int, Frame const&, Topology const&); // TODO const? /// Build position from internals for any atom with unset position int BuildFromInternals(Frame&, Topology const&, Barray&) const; From 87190c98a31c1c4efef72fe4b6d39b695a03a53f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 10:57:31 -0500 Subject: [PATCH 0515/1492] Add code for saving atom orientations --- src/Structure/Builder.cpp | 25 +++++++++++++++++++++++++ src/Structure/Builder.h | 5 +++++ 2 files changed, 30 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index b77f21eefe..6edd5157b3 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -30,6 +30,18 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { params_ = paramsIn; } +/** Set an atoms orientation */ +void Cpptraj::Structure::Builder::SetAtomOrientation(int at, double orient) { + int oidx = getExistingOrientationIdx(at); + if (oidx == -1) { + internalOrientation_.push_back( InternalChirality(at, orient) ); + } else { + mprintf("Warning: Overriding existing orientation %f for atom %i with %f\n", + internalOrientation_[oidx].ChiralVal(), at+1, orient); + internalOrientation_[oidx].SetChiralVal( orient ); + } +} + /** Get length from parameter set if present. * \return 1 if a length parameter was found. */ @@ -748,6 +760,19 @@ int Builder::getExistingChiralityIdx(int ai) const { return idx; } +/** \return Index of existing orientation value matching given atom, 1 for no match. */ +int Builder::getExistingOrientationIdx(int ai) const { + int idx = -1; + for (Carray::const_iterator it = internalOrientation_.begin(); it != internalOrientation_.end(); ++it) + { + if (it->AtI() == ai) { + idx = (int)(it - internalOrientation_.begin()); + break; + } + } + return idx; +} + /** Determine hybridization in the same manner as leap */ AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom, std::vector const& atoms) const { AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 6f4cf47cce..d20fdd252b 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -20,6 +20,8 @@ class Builder { void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); + /// Set atom orientation + void SetAtomOrientation(int, double); /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters TODO combine into BuildFromInternals? int UpdateICsFromFrame(Frame const&, Topology const&, Barray const&); /// Generate internal coordinates in the same manner as LEaP @@ -85,6 +87,8 @@ class Builder { int getExistingBondIdx(int, int) const; /// Get specific chirality int getExistingChiralityIdx(int) const; + /// Get specific orientation + int getExistingOrientationIdx(int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Build angle internal @@ -110,6 +114,7 @@ class Builder { Aarray internalAngles_; Larray internalBonds_; Carray internalChirality_; + Carray internalOrientation_; Iarray Rnums_; ///< Hold residue indices pertaining to current internals }; /// ----- Hold torsion internal ------------------ From af9591a47829391138b22819b0331ff4ff48d849 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 11:03:13 -0500 Subject: [PATCH 0516/1492] Start looking for existing orientations --- src/Structure/Builder.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 6edd5157b3..e5655fbc7e 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -1146,6 +1146,11 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo double chiY = 0; int Ycidx = getExistingChiralityIdx( ay ); if (Ycidx != -1) chiY = internalChirality_[Ycidx].ChiralVal(); + // See if orientations exist + int Xoidx = getExistingOrientationIdx( ax ); + if (Xoidx != -1) mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ax).c_str(), internalOrientation_[Xoidx].ChiralVal()); + int Yoidx = getExistingOrientationIdx( ay ); + if (Yoidx != -1) mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ay).c_str(), internalOrientation_[Yoidx].ChiralVal()); // Set up the torsion model if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY)) { mprinterr("Error: Could not set up torsions around %s - %s\n", From 8b9b588e54e92fd449f70f3e1b1bceb1ec788e7c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 11:55:46 -0500 Subject: [PATCH 0517/1492] Skip comment lines. Handle non-terminal pdb maps --- src/DataIO_LeapRC.cpp | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/src/DataIO_LeapRC.cpp b/src/DataIO_LeapRC.cpp index 724a2c8388..2180645cde 100644 --- a/src/DataIO_LeapRC.cpp +++ b/src/DataIO_LeapRC.cpp @@ -108,7 +108,10 @@ const std::string tmp; for (const char* ptr = line; *ptr != '\0'; ++ptr) { - if (*ptr == '{') + if (*ptr == '#') { + // Comment - skip everything else + break; + } else if (*ptr == '{') bracketCount++; else if (*ptr == '}') { bracketCount--; @@ -187,7 +190,10 @@ const std::string tmp; for (const char* ptr = line; *ptr != '\0'; ++ptr) { - if (*ptr == '{') + if (*ptr == '#') { + // Comment - skip everything else + break; + } else if (*ptr == '{') bracketCount++; else if (*ptr == '}') { bracketCount--; @@ -195,24 +201,30 @@ const mprintf("DEBUG: addPdbResMap: %s\n", tmp.c_str()); ArgList aline( tmp ); // 3 tokens: terminal type (0=beg 1=end), PDB name, unit name - if (aline.Nargs() != 3) { + if (aline.Nargs() < 2 || aline.Nargs() > 3) { mprinterr("Error: Malformed entry in addPdbResMap: %s\n", tmp.c_str()); return 1; } Cpptraj::Structure::TerminalType termType = Cpptraj::Structure::NON_TERMINAL; - if (aline[0] == "0") - termType = Cpptraj::Structure::BEG_TERMINAL; - else if (aline[0] == "1") - termType = Cpptraj::Structure::END_TERMINAL; - else - mprintf("Warning: Unrecognized terminal type in addPdbResMap: %s\n", aline[0].c_str()); - if (termType != Cpptraj::Structure::NON_TERMINAL) { + int pdbidx = 0; + int unitidx = 1; + if (aline.Nargs() == 3) { + if (aline[0] == "0") + termType = Cpptraj::Structure::BEG_TERMINAL; + else if (aline[0] == "1") + termType = Cpptraj::Structure::END_TERMINAL; + else + mprintf("Warning: Unrecognized terminal type in addPdbResMap: %s\n", aline[0].c_str()); + pdbidx = 1; + unitidx = 2; + } + //if (termType != Cpptraj::Structure::NON_TERMINAL) { PdbResMapType prm; prm.termType_ = termType; - prm.pdbName_ = aline[1]; - prm.unitName_ = aline[2]; + prm.pdbName_ = aline[pdbidx]; + prm.unitName_ = aline[unitidx]; pdbResMap.push_back( prm ); - } + //} tmp.clear(); } } else { @@ -226,7 +238,7 @@ const } else if (bracketCount == 0) { break; } //else { - //mprintf("DEBUG: addPdbResMap: %s\n", tmp.c_str()); + //mprintf("DEBUG: END OF LINE: addPdbResMap: %s\n", tmp.c_str()); //} line = infile.Line(); } From 7eeb190397c4adf5640a1d4f4a3b1f4701acd4db Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 14:35:09 -0500 Subject: [PATCH 0518/1492] Save original chirality to use when grafting. Seems to be enough to save this and not orientation since we can get orientation using chirality --- src/Exec_Graft.cpp | 86 +++++++++++++++++++++++++++++++++++- src/Exec_Graft.h | 9 ++++ src/Structure/Builder.cpp | 91 ++++++++++++++++++++++++++++----------- src/Structure/Builder.h | 11 +++-- 4 files changed, 167 insertions(+), 30 deletions(-) diff --git a/src/Exec_Graft.cpp b/src/Exec_Graft.cpp index e1b33151fb..4c07198e93 100644 --- a/src/Exec_Graft.cpp +++ b/src/Exec_Graft.cpp @@ -3,6 +3,7 @@ #include "DataSet_Coords.h" #include "Structure/Builder.h" #include "Structure/Zmatrix.h" +#include "CharMask.h" #include // std::copy #include // std::pair @@ -13,7 +14,13 @@ Exec_Graft::Exec_Graft() : Exec(COORDS), debug_(0), newMol0Top_(0), - newMol1Top_(0) + newMol1Top_(0), + hasOrient0_(false), + hasOrient1_(false), +// orient0_(0), +// orient1_(0), + chi0_(0), + chi1_(0) {} /** DESTRUCTOR */ @@ -224,6 +231,12 @@ Exec::RetType Exec_Graft::Execute(CpptrajState& State, ArgList& argIn) mol1frm.Trans_Rot_Trans( Trans, Rot, refTrans ); } + if (use_ic) { + // Get internals for both topologies before they are modified. + get_original_orientations(mol0crd->Top(), mol0frm, mol1crd->Top(), mol1frm, + mol0Mask, mol1Mask, bond0ArgStrings, bond1ArgStrings); + } + // Modify the target (mol0) topology if (newMol0Top_ != 0) delete newMol0Top_; newMol0Top_ = 0; @@ -271,6 +284,70 @@ Exec::RetType Exec_Graft::Execute(CpptrajState& State, ArgList& argIn) return CpptrajState::OK; } +/** Get internals for molecules before modification. */ +int Exec_Graft::get_original_orientations(Topology const& mol0Top, Frame const& mol0frm, + Topology const& mol1Top, Frame const& mol1frm, + AtomMask const& mol0mask, AtomMask const& mol1mask, + Sarray const& bond0Atoms, Sarray const& bond1Atoms) +{ + // Get bonding atom masks + if (bond0Atoms.size() != 1 || bond1Atoms.size() != 1) { + mprinterr("Error: Graft with internal coordinates only works with 1 bond.\n"); + return 1; + } + std::string const& tgtbondmask = bond0Atoms[0]; + std::string const& srcbondmask = bond1Atoms[0]; + + // Select bond atom indices + int bondat0 = select_bond_idx(tgtbondmask, mol0Top); + if (bondat0 < 0) { + mprinterr("Error: Could not select target bond atom '%s'\n", tgtbondmask.c_str()); + return 1; + } + int bondat1 = select_bond_idx(srcbondmask, mol1Top); + if (bondat1 < 0) { + mprinterr("Error: Could not select source bond atom '%s'\n", srcbondmask.c_str()); + return 1; + } + + // Will an atom bonded to this atom disappear? +// orient0_ = 0.0; + Atom const& At0 = mol0Top[bondat0]; + CharMask cmask0( mol0mask.ConvertToCharMask(), mol0mask.Nselected() ); + int vanish0idx = -1; + for (Atom::bond_iterator bat = At0.bondbegin(); bat != At0.bondend(); ++bat) { + if (!cmask0.AtomInCharMask( *bat )) { // TODO check multiple disappearing atoms + mprintf("DEBUG: Atom0 %s will vanish.\n", mol0Top.AtomMaskName(*bat).c_str()); + if (vanish0idx == -1) vanish0idx = *bat; + } + } + if (vanish0idx != -1) { + hasOrient0_ = true; + chi0_ = Builder::DetermineChiralityAroundAtom(bondat0, mol0frm, mol0Top); + mprintf("DEBUG: Chirality around %s is %f\n", mol0Top.LeapName(bondat0).c_str(), chi0_); +// orient0_ = Builder::CalculateOrientationAroundAtom(bondat0, vanish0idx, mol0frm, mol0Top); + } + +// orient1_ = 0.0; + Atom const& At1 = mol1Top[bondat1]; + CharMask cmask1( mol1mask.ConvertToCharMask(), mol1mask.Nselected() ); + int vanish1idx = -1; + for (Atom::bond_iterator bat = At1.bondbegin(); bat != At1.bondend(); ++bat) { + if (!cmask1.AtomInCharMask( *bat )) { // TODO check multiple disappearing atoms + mprintf("DEBUG: Atom1 %s will vanish.\n", mol1Top.AtomMaskName(*bat).c_str()); + if (vanish1idx == -1) vanish1idx = *bat; + } + } + if (vanish1idx != -1) { + hasOrient1_ = true; + chi1_ = Builder::DetermineChiralityAroundAtom(bondat1, mol1frm, mol1Top); + mprintf("DEBUG: Chirality around %s is %f\n", mol1Top.LeapName(bondat1).c_str(), chi1_); +// orient1_ = Builder::CalculateOrientationAroundAtom(bondat1, vanish1idx, mol1frm, mol1Top); + } + + return 0; +} + /** Graft using internal coordinates to build the final structure. */ int Exec_Graft::graft_ic(DataSet_Coords* outCoords, @@ -383,6 +460,13 @@ const mol1Top.AtomMaskName(bondat1).c_str(), mol0Top.AtomMaskName(bondat0).c_str()); topOut.AddBond( bondat1 + atomOffset, bondat0 ); + // Set any saved orientations + if (hasOrient0_ && hasOrient1_) { +// structureBuilder.SetAtomOrientation(bondat0, orient0_); + structureBuilder.SetAtomChirality(bondat0, chi0_); +// structureBuilder.SetAtomOrientation(bondat1 + atomOffset, orient1_); + structureBuilder.SetAtomChirality(bondat1 + atomOffset, chi1_); + } // Generate internals around the link if (structureBuilder.GenerateInternalsAroundLink( bondat1 + atomOffset, bondat0, diff --git a/src/Exec_Graft.h b/src/Exec_Graft.h index ea7443a609..80732d7314 100644 --- a/src/Exec_Graft.h +++ b/src/Exec_Graft.h @@ -23,8 +23,17 @@ class Exec_Graft : public Exec { /// Graft assuming structures have been rms fit int graft_rms(DataSet_Coords*, Topology const&, Frame const&, Topology const&, Frame const&, Sarray const&, Sarray const&) const; + int get_original_orientations(Topology const&, Frame const&, Topology const&, Frame const&, + AtomMask const&, AtomMask const&, + Sarray const&, Sarray const&); int debug_; Topology* newMol0Top_; ///< Hold target topology if modified. Topology* newMol1Top_; ///< Hold source topology if modified. + bool hasOrient0_; + bool hasOrient1_; +// double orient0_; ///< When using IC, record original orientation around bonding atom 0 +// double orient1_; ///< When using IC, record original orientation around bonding atom 1 + double chi0_; ///< When using IC, record original chirality around bonding atom 0 + double chi1_; ///< When using IC, record original chirality around bonding atom 1 }; #endif diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index e5655fbc7e..44e6cd2520 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -31,7 +31,7 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { } /** Set an atoms orientation */ -void Cpptraj::Structure::Builder::SetAtomOrientation(int at, double orient) { +/*void Cpptraj::Structure::Builder::SetAtomOrientation(int at, double orient) { int oidx = getExistingOrientationIdx(at); if (oidx == -1) { internalOrientation_.push_back( InternalChirality(at, orient) ); @@ -40,6 +40,18 @@ void Cpptraj::Structure::Builder::SetAtomOrientation(int at, double orient) { internalOrientation_[oidx].ChiralVal(), at+1, orient); internalOrientation_[oidx].SetChiralVal( orient ); } +}*/ + +/** Set an atoms chirality */ +void Cpptraj::Structure::Builder::SetAtomChirality(int at, double chi) { + int cidx = getExistingChiralityIdx(at); + if (cidx == -1) { + internalChirality_.push_back( InternalChirality(at, chi) ); + } else { + mprintf("Warning: Overriding existing chirality %f for atom %i with %f\n", + internalChirality_[cidx].ChiralVal(), at+1, chi); + internalChirality_[cidx].SetChiralVal( chi ); + } } /** Get length from parameter set if present. @@ -216,6 +228,7 @@ class Cpptraj::Structure::Builder::TorsionModel { int InitTorsion(int, int, Frame const&, Topology const&, std::vector const&, int); /// Set up torsions around bonded atoms int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn, double, double); + //int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn, double, double, double, double); /// Build mock externals from given internals int BuildMockExternals(Iarray const&, Tarray const&, Topology const&); @@ -428,6 +441,7 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat AtomType::HybridizationType Hy, Topology const& topIn, double chiX, double chiY) +// double orientX, double orientY) { if (Hx != AtomType::UNKNOWN_HYBRIDIZATION && Hy != AtomType::UNKNOWN_HYBRIDIZATION) { if (Hy > Hx) { @@ -441,22 +455,31 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat // Sort AY bonds unsigned int firstUnknownIdxY = 0; sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, topIn, sorted_ay_); - // Calculate the chirality around atom X - Xorientation_ = 0; - if (Hx == AtomType::SP3) { - if (sorted_ax_.size() < 2) - Xorientation_ = 1.0; - else - Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); - } - // Calculate the chirality around atom Y - Yorientation_ = 0; - if (Hy == AtomType::SP3) { - if (sorted_ay_.size() < 2) - Yorientation_ = 1.0; - else - Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); - } + // If both orientations exist, use those. Otherwise calculate. +// bool existingOrientationX = (orientX > 0 || orientX < 0); +// bool existingOrientationY = (orientY > 0 || orientY < 0); +// if (existingOrientationX && existingOrientationY) { +// //Xorientation_ = orientX; +// //Yorientation_ = orientY; +// mprintf("DEBUG: ExistingOrientationX= %f ExistingOrientationY= %f\n", orientX, orientY); +// }// else { + // Calculate the chirality around atom X + Xorientation_ = 0; + if (Hx == AtomType::SP3) { + if (sorted_ax_.size() < 2) + Xorientation_ = 1.0; + else + Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); + } + // Calculate the chirality around atom Y + Yorientation_ = 0; + if (Hy == AtomType::SP3) { + if (sorted_ay_.size() < 2) + Yorientation_ = 1.0; + else + Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); + } + //} // DEBUG Atom const& AX = topIn[atX_.Idx()]; Atom const& AY = topIn[atY_.Idx()]; @@ -642,7 +665,7 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Iarray const& // ----------------------------------------------------------------------------- /** Calculate the orientation around a single atom. Assume all positions are known. */ -double Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameIn, Topology const& topIn) { +/*double Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameIn, Topology const& topIn) { using namespace Cpptraj::Structure::Chirality; Vec3 iXPos( frameIn.XYZ(ax) ); @@ -671,6 +694,14 @@ double Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& fram topIn.LeapName(ay).c_str(), Xorientation); return Xorientation; +}*/ + +/** Determine the chirality around a single atom. Assume all positions are known. */ +double Builder::DetermineChiralityAroundAtom(int at, Frame const& frameIn, Topology const& topIn) +{ + double dChi = 0; + determineChirality(dChi, at, frameIn, topIn, std::vector(topIn.Natom(), true)); + return dChi; } /** Update all indices in internals according to the given offset. */ @@ -761,7 +792,7 @@ int Builder::getExistingChiralityIdx(int ai) const { } /** \return Index of existing orientation value matching given atom, 1 for no match. */ -int Builder::getExistingOrientationIdx(int ai) const { +/*int Builder::getExistingOrientationIdx(int ai) const { int idx = -1; for (Carray::const_iterator it = internalOrientation_.begin(); it != internalOrientation_.end(); ++it) { @@ -771,7 +802,7 @@ int Builder::getExistingOrientationIdx(int ai) const { } } return idx; -} +}*/ /** Determine hybridization in the same manner as leap */ AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom, std::vector const& atoms) const { @@ -1147,12 +1178,22 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo int Ycidx = getExistingChiralityIdx( ay ); if (Ycidx != -1) chiY = internalChirality_[Ycidx].ChiralVal(); // See if orientations exist - int Xoidx = getExistingOrientationIdx( ax ); - if (Xoidx != -1) mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ax).c_str(), internalOrientation_[Xoidx].ChiralVal()); - int Yoidx = getExistingOrientationIdx( ay ); - if (Yoidx != -1) mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ay).c_str(), internalOrientation_[Yoidx].ChiralVal()); +// double orientX = 0; +// int Xoidx = getExistingOrientationIdx( ax ); +// if (Xoidx != -1) { +// orientX = internalOrientation_[Xoidx].ChiralVal(); +// mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ax).c_str(), orientX); +// } +// double orientY = 0; +// int Yoidx = getExistingOrientationIdx( ay ); +// if (Yoidx != -1) { +// orientY = internalOrientation_[Yoidx].ChiralVal(); +// mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ay).c_str(), orientY); +// } // Set up the torsion model - if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY)) { + //if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY, orientX, orientY)) + if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY)) + { mprinterr("Error: Could not set up torsions around %s - %s\n", topIn.LeapName(ax).c_str(), topIn.LeapName(ay).c_str()); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index d20fdd252b..996a0ba647 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -21,7 +21,9 @@ class Builder { /// Set optional parameter set void SetParameters(ParameterSet const*); /// Set atom orientation - void SetAtomOrientation(int, double); +// void SetAtomOrientation(int, double); + /// Set atom chirality + void SetAtomChirality(int, double); /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters TODO combine into BuildFromInternals? int UpdateICsFromFrame(Frame const&, Topology const&, Barray const&); /// Generate internal coordinates in the same manner as LEaP @@ -31,7 +33,8 @@ class Builder { /// Update existing indices with given offset void UpdateIndicesWithOffset(int); - static double CalculateOrientationAroundAtom(int, int, Frame const&, Topology const&); // TODO const? +// static double CalculateOrientationAroundAtom(int, int, Frame const&, Topology const&); // TODO const? + static double DetermineChiralityAroundAtom(int, Frame const&, Topology const&); /// Build position from internals for any atom with unset position int BuildFromInternals(Frame&, Topology const&, Barray&) const; @@ -88,7 +91,7 @@ class Builder { /// Get specific chirality int getExistingChiralityIdx(int) const; /// Get specific orientation - int getExistingOrientationIdx(int) const; +// int getExistingOrientationIdx(int) const; /// Build mock coordinates around given torsion int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Build angle internal @@ -114,7 +117,7 @@ class Builder { Aarray internalAngles_; Larray internalBonds_; Carray internalChirality_; - Carray internalOrientation_; +// Carray internalOrientation_; Iarray Rnums_; ///< Hold residue indices pertaining to current internals }; /// ----- Hold torsion internal ------------------ From 9178fcb32d8ac3006a4558e647328457c4d6e314 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 15:06:46 -0500 Subject: [PATCH 0519/1492] Update save for latest IC change --- test/Test_Graft/IC.Final.graft.mol2.save | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Test_Graft/IC.Final.graft.mol2.save b/test/Test_Graft/IC.Final.graft.mol2.save index 0355474365..c87c8124e7 100644 --- a/test/Test_Graft/IC.Final.graft.mol2.save +++ b/test/Test_Graft/IC.Final.graft.mol2.save @@ -16,8 +16,8 @@ USER_CHARGES 8 C 5.4855 2.7052 -0.0000 C 1 TYR 0.597300 9 O 6.0088 1.5932 -0.0000 O 1 TYR -0.567900 10 C2 4.2167 4.8987 1.1983 CA 2 PRY 0.033204 - 11 C3 4.0500 5.8609 2.1981 CA 2 PRY -0.149016 - 12 H4 3.4057 5.6495 3.0346 HA 2 PRY 0.153372 + 11 C3 4.0092 5.8193 2.2292 CA 2 PRY -0.149016 + 12 H4 3.3701 5.6304 3.0751 HA 2 PRY 0.153372 13 C4 4.6895 7.0771 2.1412 CA 2 PRY -0.336291 14 H5 4.5566 7.8128 2.9127 HA 2 PRY 0.167425 15 C5 5.5298 7.3802 1.0703 CA 2 PRY 0.423974 @@ -25,7 +25,7 @@ USER_CHARGES 17 C6 5.7104 6.4428 0.0703 CA 2 PRY -0.336291 18 H6 6.3501 6.6384 -0.7684 HA 2 PRY 0.167425 19 C7 5.0526 5.2168 0.1465 CA 2 PRY -0.149016 - 20 H7 5.2076 4.5030 -0.6439 HA 2 PRY 0.153372 + 20 H7 5.2087 4.5024 -0.6431 HA 2 PRY 0.153372 21 C8 6.9535 9.0030 0.0541 CT 2 PRY 0.358047 22 C9 7.3730 10.4140 0.3402 CM 2 PRY -0.496680 23 C10 8.5864 10.9389 0.2629 CM 2 PRY 0.317549 From 66299862953f26c80b865e554189cc2d910c8e45 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 13 Feb 2024 15:22:55 -0500 Subject: [PATCH 0520/1492] Update for recent changes --- test/Test_Sequence/Mol.mol2.save | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/Test_Sequence/Mol.mol2.save b/test/Test_Sequence/Mol.mol2.save index 23ccbc3d64..5f9908d9e1 100644 --- a/test/Test_Sequence/Mol.mol2.save +++ b/test/Test_Sequence/Mol.mol2.save @@ -11,18 +11,18 @@ USER_CHARGES 3 H3 -1.2286 0.8227 -0.8832 H1 1 MOC -0.288000 4 H4 -1.2287 0.8227 0.8831 H1 1 MOC -0.288000 5 O5 0.0000 -0.5708 0.0000 OS 1 MOC -0.523200 - 6 N 1.1916 0.3403 0.0000 N 2 CNALA -0.570310 - 7 H 1.1430 0.8923 -0.8547 H 2 CNALA 0.364710 - 8 CA 2.4264 -0.4645 0.0001 CX 2 CNALA 0.118030 - 9 HA 2.4901 -0.9979 0.9529 H1 2 CNALA 0.105630 - 10 CB 2.3829 -1.4921 -1.1479 CT 2 CNALA -0.214290 - 11 HB1 1.4987 -2.1277 -1.0603 HC 2 CNALA 0.081710 - 12 HB2 2.3542 -0.9887 -2.1172 HC 2 CNALA 0.081710 - 13 HB3 3.2659 -2.1348 -1.1206 HC 2 CNALA 0.081710 - 14 C 3.6613 0.4137 -0.1142 C 2 CNALA 0.597740 - 15 O 3.6774 1.4856 -0.6854 O 2 CNALA -0.533510 - 16 OXT 4.7542 -0.1713 0.2984 OH 2 CNALA -0.566290 - 17 HXT 4.5091 -1.0471 0.6406 HO 2 CNALA 0.453160 + 6 N 1.1121 0.2796 0.0000 N 2 CNALA -0.570310 + 7 H 0.9809 1.2897 -0.0001 H 2 CNALA 0.364710 + 8 CA 2.4729 -0.2868 0.0001 CX 2 CNALA 0.118030 + 9 HA 2.3931 -1.3756 0.0659 H1 2 CNALA 0.105630 + 10 CB 3.1959 0.0847 -1.3094 CT 2 CNALA -0.214290 + 11 HB1 2.6253 -0.2619 -2.1741 HC 2 CNALA 0.081710 + 12 HB2 3.3226 1.1672 -1.3882 HC 2 CNALA 0.081710 + 13 HB3 4.1837 -0.3803 -1.3471 HC 2 CNALA 0.081710 + 14 C 3.2705 0.1855 1.2044 C 2 CNALA 0.597740 + 15 O 3.0963 1.2554 1.7526 O 2 CNALA -0.533510 + 16 OXT 4.2882 -0.5835 1.4869 OH 2 CNALA -0.566290 + 17 HXT 4.2716 -1.3337 0.8695 HO 2 CNALA 0.453160 @BOND 1 1 5 1 2 6 8 1 From 875b106119a06e90beaaa87a6988821d8b6c5d48 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 08:33:00 -0500 Subject: [PATCH 0521/1492] Code cleanup --- src/Structure/Builder.cpp | 122 +++++++------------------------------- src/Structure/Builder.h | 13 +--- 2 files changed, 22 insertions(+), 113 deletions(-) diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 44e6cd2520..802c31be7c 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -30,18 +30,6 @@ void Cpptraj::Structure::Builder::SetParameters(ParameterSet const* paramsIn) { params_ = paramsIn; } -/** Set an atoms orientation */ -/*void Cpptraj::Structure::Builder::SetAtomOrientation(int at, double orient) { - int oidx = getExistingOrientationIdx(at); - if (oidx == -1) { - internalOrientation_.push_back( InternalChirality(at, orient) ); - } else { - mprintf("Warning: Overriding existing orientation %f for atom %i with %f\n", - internalOrientation_[oidx].ChiralVal(), at+1, orient); - internalOrientation_[oidx].SetChiralVal( orient ); - } -}*/ - /** Set an atoms chirality */ void Cpptraj::Structure::Builder::SetAtomChirality(int at, double chi) { int cidx = getExistingChiralityIdx(at); @@ -222,13 +210,10 @@ class Cpptraj::Structure::Builder::TorsionModel { typedef std::vector Marray; /// CONSTRUCTOR TorsionModel() : dAbsolute_(0), Xorientation_(0), Yorientation_(0), axHasKnownAtoms_(false), ayHasKnownAtoms_(false) {} - /// CONSTRUCTOR - AX and AY atom indices - //TorsionModel(int ax, int ay) : ax_(ax), ay_(ay), dAbsolute_(0), Xorientation_(0), Yorientation_(0) {} /// Initialize torsions around bonded atoms int InitTorsion(int, int, Frame const&, Topology const&, std::vector const&, int); /// Set up torsions around bonded atoms int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn, double, double); - //int SetupTorsion(AtomType::HybridizationType, AtomType::HybridizationType, Topology const& topIn, double, double, double, double); /// Build mock externals from given internals int BuildMockExternals(Iarray const&, Tarray const&, Topology const&); @@ -455,31 +440,22 @@ int Cpptraj::Structure::Builder::TorsionModel::SetupTorsion(AtomType::Hybridizat // Sort AY bonds unsigned int firstUnknownIdxY = 0; sorted_ay_ = SortBondedAtomsLikeLeap(firstUnknownIdxY, topIn, sorted_ay_); - // If both orientations exist, use those. Otherwise calculate. -// bool existingOrientationX = (orientX > 0 || orientX < 0); -// bool existingOrientationY = (orientY > 0 || orientY < 0); -// if (existingOrientationX && existingOrientationY) { -// //Xorientation_ = orientX; -// //Yorientation_ = orientY; -// mprintf("DEBUG: ExistingOrientationX= %f ExistingOrientationY= %f\n", orientX, orientY); -// }// else { - // Calculate the chirality around atom X - Xorientation_ = 0; - if (Hx == AtomType::SP3) { - if (sorted_ax_.size() < 2) - Xorientation_ = 1.0; - else - Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); - } - // Calculate the chirality around atom Y - Yorientation_ = 0; - if (Hy == AtomType::SP3) { - if (sorted_ay_.size() < 2) - Yorientation_ = 1.0; - else - Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); - } - //} + // Calculate the chirality around atom X + Xorientation_ = 0; + if (Hx == AtomType::SP3) { + if (sorted_ax_.size() < 2) + Xorientation_ = 1.0; + else + Xorientation_ = calculateOrientation( atX_, chiX, topIn[atX_.Idx()], sorted_ax_[0], atY_, sorted_ax_[1] ); + } + // Calculate the chirality around atom Y + Yorientation_ = 0; + if (Hy == AtomType::SP3) { + if (sorted_ay_.size() < 2) + Yorientation_ = 1.0; + else + Yorientation_ = calculateOrientation( atY_, chiY, topIn[atY_.Idx()], sorted_ay_[0], atX_, sorted_ay_[1] ); + } // DEBUG Atom const& AX = topIn[atX_.Idx()]; Atom const& AY = topIn[atY_.Idx()]; @@ -529,7 +505,7 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Iarray const& Topology const& topIn) // DEBUG topIn for debug only { if (iaTorsions.empty()) { - mprinterr("Internal Error: Builder::buildMockExternals() called with no internal torsions.\n"); + mprinterr("Internal Error: TorsionModel::BuildMockExternals() called with no internal torsions.\n"); return 1; } mprintf("======= Started mock coords from: %s\n", topIn.LeapName(internalTorsionsIn[iaTorsions.front()].AtI()).c_str()); @@ -596,11 +572,11 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Iarray const& Marray::iterator tmpAt1 = find_mock_atom(outerAtoms, iInt.AtI()); Marray::iterator tmpAt4 = find_mock_atom(outerAtoms, iInt.AtL()); if (tmpAt1 == outerAtoms.end()) { - mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom I %i not found.\n", iInt.AtI()+1); + mprinterr("Internal Error: TorsionModel::BuildMockExternals(): Outer atom I %i not found.\n", iInt.AtI()+1); return 1; } if (tmpAt4 == outerAtoms.end()) { - mprinterr("Internal Error: Builder::buildMockExternals(): Outer atom L %i not found.\n", iInt.AtL()+1); + mprinterr("Internal Error: TorsionModel::BuildMockExternals(): Outer atom L %i not found.\n", iInt.AtL()+1); return 1; } Vec3 maPC1, maPC2; @@ -664,38 +640,6 @@ int Cpptraj::Structure::Builder::TorsionModel::BuildMockExternals(Iarray const& } // ----------------------------------------------------------------------------- -/** Calculate the orientation around a single atom. Assume all positions are known. */ -/*double Builder::CalculateOrientationAroundAtom(int ax, int ay, Frame const& frameIn, Topology const& topIn) { - using namespace Cpptraj::Structure::Chirality; - - Vec3 iXPos( frameIn.XYZ(ax) ); - Vec3 iYPos( frameIn.XYZ(ay) ); - // Create array of AX bonded atoms - Atom const& AX = topIn[ax]; - std::vector sorted_ax; - sorted_ax.reserve( AX.Nbonds() - 1 ); - for (Atom::bond_iterator bat = AX.bondbegin(); bat != AX.bondend(); ++bat) { - if (*bat != ay) { - sorted_ax.push_back( MockAtom(*bat, frameIn.XYZ(*bat)) ); - sorted_ax.back().SetBuildInternals( true ); - } - } - // Sort AX bonds - unsigned int firstUnknownIdxX = 0; - sorted_ax = TorsionModel::SortBondedAtomsLikeLeap(firstUnknownIdxX, topIn, sorted_ax); - // Calculate the chirality around atom X - double Xorientation = 0; - if (sorted_ax.size() < 2) - Xorientation = 1.0; - else - Xorientation = VectorAtomChirality( iXPos, sorted_ax[0].Pos(), iYPos, sorted_ax[1].Pos() ); - mprintf("ORIENTATION: around atom %s (- %s) = %f\n", - topIn.LeapName(ax).c_str(), - topIn.LeapName(ay).c_str(), - Xorientation); - return Xorientation; -}*/ - /** Determine the chirality around a single atom. Assume all positions are known. */ double Builder::DetermineChiralityAroundAtom(int at, Frame const& frameIn, Topology const& topIn) { @@ -791,19 +735,6 @@ int Builder::getExistingChiralityIdx(int ai) const { return idx; } -/** \return Index of existing orientation value matching given atom, 1 for no match. */ -/*int Builder::getExistingOrientationIdx(int ai) const { - int idx = -1; - for (Carray::const_iterator it = internalOrientation_.begin(); it != internalOrientation_.end(); ++it) - { - if (it->AtI() == ai) { - idx = (int)(it - internalOrientation_.begin()); - break; - } - } - return idx; -}*/ - /** Determine hybridization in the same manner as leap */ AtomType::HybridizationType Builder::getAtomHybridization(Atom const& aAtom, std::vector const& atoms) const { AtomType::HybridizationType H1 = AtomType::UNKNOWN_HYBRIDIZATION; @@ -1177,21 +1108,7 @@ int Builder::assignTorsionsAroundBond(int a1, int a2, Frame const& frameIn, Topo double chiY = 0; int Ycidx = getExistingChiralityIdx( ay ); if (Ycidx != -1) chiY = internalChirality_[Ycidx].ChiralVal(); - // See if orientations exist -// double orientX = 0; -// int Xoidx = getExistingOrientationIdx( ax ); -// if (Xoidx != -1) { -// orientX = internalOrientation_[Xoidx].ChiralVal(); -// mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ax).c_str(), orientX); -// } -// double orientY = 0; -// int Yoidx = getExistingOrientationIdx( ay ); -// if (Yoidx != -1) { -// orientY = internalOrientation_[Yoidx].ChiralVal(); -// mprintf("DEBUG: Existing orientation for %s : %f\n", topIn.LeapName(ay).c_str(), orientY); -// } // Set up the torsion model - //if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY, orientX, orientY)) if (mT.SetupTorsion(Hx, Hy, topIn, chiX, chiY)) { mprinterr("Error: Could not set up torsions around %s - %s\n", @@ -1552,6 +1469,7 @@ int Builder::GenerateInternalsAroundLink(int at0, int at1, return 0; } +/** For debugging, print all the complete internals associated with the given atom. */ void Builder::printAllInternalsForAtom(int at, Topology const& topIn, Barray const& hasPosition) const { mprintf("DEBUG: All internals for atom %s\n", topIn.LeapName(at).c_str()); diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 996a0ba647..155740dde2 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -16,12 +16,10 @@ class Builder { public: /// CONSTRUCTOR Builder(); - /// Set debug + /// Set debug level void SetDebug(int d) { debug_ = d; } /// Set optional parameter set void SetParameters(ParameterSet const*); - /// Set atom orientation -// void SetAtomOrientation(int, double); /// Set atom chirality void SetAtomChirality(int, double); /// Update the internal coordinates in given Zmatrix with values from Frame/Parameters TODO combine into BuildFromInternals? @@ -33,12 +31,10 @@ class Builder { /// Update existing indices with given offset void UpdateIndicesWithOffset(int); -// static double CalculateOrientationAroundAtom(int, int, Frame const&, Topology const&); // TODO const? + /// \return LEaP chirality value around given atom static double DetermineChiralityAroundAtom(int, Frame const&, Topology const&); - /// Build position from internals for any atom with unset position int BuildFromInternals(Frame&, Topology const&, Barray&) const; - /// \return Zmatrix from current internals //int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; private: @@ -90,10 +86,6 @@ class Builder { int getExistingBondIdx(int, int) const; /// Get specific chirality int getExistingChiralityIdx(int) const; - /// Get specific orientation -// int getExistingOrientationIdx(int) const; - /// Build mock coordinates around given torsion - int buildMockExternals(TorsionModel& MT, std::vector const& iaTorsions) const; /// Build angle internal void buildAngleInternal(int, int, int, Frame const&, Topology const&, Barray const&); /// Build bond internal @@ -117,7 +109,6 @@ class Builder { Aarray internalAngles_; Larray internalBonds_; Carray internalChirality_; -// Carray internalOrientation_; Iarray Rnums_; ///< Hold residue indices pertaining to current internals }; /// ----- Hold torsion internal ------------------ From d68e77ef702e756eb16a05ca5bdaa318e0dfee54 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 09:11:20 -0500 Subject: [PATCH 0522/1492] When grafting, adjust torsion around link so longest depth has trans --- src/Exec_Graft.cpp | 12 +++-- src/Structure/Builder.cpp | 92 +++++++++++++++++++++++++++++++++++++++ src/Structure/Builder.h | 6 ++- 3 files changed, 105 insertions(+), 5 deletions(-) diff --git a/src/Exec_Graft.cpp b/src/Exec_Graft.cpp index 4c07198e93..ab8f20c758 100644 --- a/src/Exec_Graft.cpp +++ b/src/Exec_Graft.cpp @@ -461,12 +461,10 @@ const mol0Top.AtomMaskName(bondat0).c_str()); topOut.AddBond( bondat1 + atomOffset, bondat0 ); // Set any saved orientations - if (hasOrient0_ && hasOrient1_) { -// structureBuilder.SetAtomOrientation(bondat0, orient0_); + if (hasOrient0_) structureBuilder.SetAtomChirality(bondat0, chi0_); -// structureBuilder.SetAtomOrientation(bondat1 + atomOffset, orient1_); + if (hasOrient1_) structureBuilder.SetAtomChirality(bondat1 + atomOffset, chi1_); - } // Generate internals around the link if (structureBuilder.GenerateInternalsAroundLink( bondat1 + atomOffset, bondat0, @@ -477,6 +475,12 @@ const topOut.AtomMaskName(bondat0).c_str()); return 1; } + // Adjust torsions around link so that longest 'path' is trans + if (structureBuilder.AdjustIcAroundLink(bondat0, bondat1 + atomOffset, frameOut, topOut)) + { + mprinterr("Error: Failed to adjust internal coords around the link.\n"); + return 1; + } // Update internal coords from known positions if (structureBuilder.UpdateICsFromFrame( frameOut, topOut, hasPosition )) { mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); diff --git a/src/Structure/Builder.cpp b/src/Structure/Builder.cpp index 802c31be7c..b1b0ca0150 100644 --- a/src/Structure/Builder.cpp +++ b/src/Structure/Builder.cpp @@ -94,6 +94,98 @@ const return 0; } +/// Recursive function to return depth from an atom along bonds +static int atom_depth(int& depth, + int at, Topology const& topIn, std::vector& visited, int maxdepth) +{ + if (depth == maxdepth) return 0; + depth++; + visited[at] = true; + int depthFromHere = 1; + for (Atom::bond_iterator bat = topIn[at].bondbegin(); bat != topIn[at].bondend(); ++bat) + { + if (!visited[*bat]) + depthFromHere += atom_depth( depth, *bat, topIn, visited, maxdepth ); + } + return depthFromHere; +} + +/** \return Index of atom with longest 'depth' around an atom, ignoring one bonded atom. */ +int Builder::get_depths_around_atom(int at0, int at1, Topology const& topIn) { + int largest_depth = 0; + int largest_depth_idx = -1; + Atom const& Atm0 = topIn[at0]; + mprintf("DEBUG: Depths around %s\n", topIn.AtomMaskName(at0).c_str()); + for (Atom::bond_iterator bat = Atm0.bondbegin(); bat != Atm0.bondend(); ++bat) + { + if (*bat != at1) { + Barray visited(topIn.Natom(), false); + visited[at0] = true; + visited[at1] = true; + // Get depth from here + int currentDepth = 0; + int depth = atom_depth(currentDepth, *bat, topIn, visited, 10); + mprintf("DEBUG:\t\t%s = %i\n", topIn.AtomMaskName(*bat).c_str(), depth); + if (depth > largest_depth) { + largest_depth = depth; + largest_depth_idx = *bat; + } + } + } + return largest_depth_idx; +} + +/** Adjust internals around a link so that atoms with longest 'depth' are trans. */ +int Builder::AdjustIcAroundLink(int at0, int at1, Frame const& frameIn, Topology const& topIn) +{ + int atA = get_depths_around_atom(at0, at1, topIn); + int atD = get_depths_around_atom(at1, at0, topIn); + if (atA < 0 || atD < 0) return 0; + mprintf("DEBUG: Highest depth torsion is %s - %s - %s - %s\n", + topIn.AtomMaskName(atA).c_str(), + topIn.AtomMaskName(at0).c_str(), + topIn.AtomMaskName(at1).c_str(), + topIn.AtomMaskName(atD).c_str()); + // Get that torsion + int tidx = getExistingTorsionIdx(atA, at0, at1, atD); + if (tidx < 0) { + mprintf("Warning: Could not adjust internal torsion %s - %s - %s - %s, not present.\n", + topIn.AtomMaskName(atA).c_str(), + topIn.AtomMaskName(at0).c_str(), + topIn.AtomMaskName(at1).c_str(), + topIn.AtomMaskName(atD).c_str()); + return 0; + } + // Figure out the delta from 180 + double dTorsion = 180.0 * Constants::DEGRAD; + double dInternalValue = internalTorsions_[tidx].PhiVal(); + double tDiff = (dTorsion - dInternalValue); + mprintf("\tdTorsion= %f dInternalValue= %f tDiff= %f\n", + dTorsion*Constants::RADDEG, dInternalValue*Constants::RADDEG, tDiff*Constants::RADDEG); + if (fabs(tDiff) > Constants::SMALL) { + // Find all ICs that share atoms 1 and 2 (J and K) + Iarray iTorsions = getExistingTorsionIdxs(at0, at1); + mprintf("Twisting torsions centered on %s - %s by %f degrees\n", + topIn.LeapName(at0).c_str(), + topIn.LeapName(at1).c_str(), + tDiff*Constants::RADDEG); + for (Iarray::const_iterator idx = iTorsions.begin(); idx != iTorsions.end(); ++idx) + { + InternalTorsion& dih = internalTorsions_[*idx]; + double dNew = dih.PhiVal() + tDiff; + mprintf("Twisting torsion for atoms: %s-%s-%s-%s\n", + *(topIn[dih.AtI()].Name()), + *(topIn[dih.AtJ()].Name()), + *(topIn[dih.AtK()].Name()), + *(topIn[dih.AtL()].Name())); + mprintf("------- From %f to %f\n", dih.PhiVal()*Constants::RADDEG, dNew*Constants::RADDEG); + dih.SetPhiVal( dNew ); + } + } + + return 0; +} + /** For existing torsions, see if all coordinates in that torsion * exist. If so, update the torsion from the existing coordinates. */ diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 155740dde2..5788d51ef7 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -37,6 +37,8 @@ class Builder { int BuildFromInternals(Frame&, Topology const&, Barray&) const; /// \return Zmatrix from current internals //int GetZmatrixFromInternals(Zmatrix&, Topology const&) const; + /// Adjust torsion around a bond so that atoms with longest 'depth' are trans + int AdjustIcAroundLink(int, int, Frame const&, Topology const&); private: typedef std::vector Iarray; @@ -98,8 +100,10 @@ class Builder { int generateAtomInternals(int, Frame const&, Topology const&, Barray const&); /// Get complete internal coords that can be used to construct specified atom int getIcFromInternals(InternalCoords&, int, Barray const&) const; - // For debug + /// For debug, print all valid internals associated with an atom void printAllInternalsForAtom(int, Topology const&, Barray const&) const; + /// \\return index of atom with longest 'depth' bonded to a given atom (ignoring one bonded atom). + static int get_depths_around_atom(int, int, Topology const&); int debug_; ParameterSet const* params_; From 4745f1908a6c013446454f279d11b270b7200c71 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 09:26:47 -0500 Subject: [PATCH 0523/1492] Fixed with link adjusted to trans --- test/Test_Graft/IC.Nucleotide.pdb.save | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/Test_Graft/IC.Nucleotide.pdb.save b/test/Test_Graft/IC.Nucleotide.pdb.save index 59b95bddc8..47c7f549ad 100644 --- a/test/Test_Graft/IC.Nucleotide.pdb.save +++ b/test/Test_Graft/IC.Nucleotide.pdb.save @@ -12,22 +12,22 @@ ATOM 11 C2 DA 1 5.285 -2.520 5.935 1.00 0.00 C ATOM 12 H2 DA 1 5.498 -2.482 6.993 1.00 0.00 H ATOM 13 N3 DA 1 5.073 -1.309 5.456 1.00 0.00 N ATOM 14 C4 DA 1 4.806 -1.356 4.133 1.00 0.00 C -ATOM 15 C5' DA 1 1.109 1.452 3.145 1.00 0.00 C -ATOM 16 H5' DA 1 0.981 0.812 4.017 1.00 0.00 H -ATOM 17 H5'' DA 1 0.230 2.087 3.028 1.00 0.00 H -ATOM 18 C4' DA 1 2.335 2.328 3.343 1.00 0.00 C -ATOM 19 H4' DA 1 2.082 3.168 3.988 1.00 0.00 H -ATOM 20 O4' DA 1 3.334 1.576 4.098 1.00 0.00 O -ATOM 21 C1' DA 1 4.385 1.163 3.237 1.00 0.00 C -ATOM 22 H1' DA 1 5.314 1.643 3.542 1.00 0.00 H -ATOM 23 C3' DA 1 3.063 2.753 2.066 1.00 0.00 C -ATOM 24 H3' DA 1 2.348 2.823 1.246 1.00 0.00 H -ATOM 25 C2' DA 1 4.053 1.564 1.798 1.00 0.00 C -ATOM 26 H2' DA 1 3.856 1.107 0.829 1.00 0.00 H -ATOM 27 O3' DA 1 3.851 3.932 2.147 1.00 0.00 O -ATOM 28 P DA 1 -0.042 -0.302 1.764 0.00 0.00 P -ATOM 29 O1P DA 1 -1.186 0.613 1.641 0.00 0.00 O -ATOM 30 O2P DA 1 0.290 -1.365 0.804 0.00 0.00 O -ATOM 31 O5' DA 1 1.283 0.644 1.978 0.00 0.00 O +ATOM 15 C5' DA 1 4.531 3.163 5.051 1.00 0.00 C +ATOM 16 H5' DA 1 4.258 2.516 5.885 1.00 0.00 H +ATOM 17 H5'' DA 1 4.648 4.186 5.409 1.00 0.00 H +ATOM 18 C4' DA 1 5.847 2.687 4.459 1.00 0.00 C +ATOM 19 H4' DA 1 6.672 3.026 5.084 1.00 0.00 H +ATOM 20 O4' DA 1 5.901 1.230 4.542 1.00 0.00 O +ATOM 21 C1' DA 1 5.692 0.661 3.257 1.00 0.00 C +ATOM 22 H1' DA 1 6.590 0.129 2.945 1.00 0.00 H +ATOM 23 C3' DA 1 6.045 2.985 2.908 1.00 0.00 C +ATOM 24 H3' DA 1 5.511 3.890 2.619 1.00 0.00 H +ATOM 25 C2' DA 1 5.383 1.772 2.252 1.00 0.00 C +ATOM 26 H2' DA 1 4.562 2.104 1.616 1.00 0.00 H +ATOM 27 O3' DA 1 7.391 3.030 2.458 1.00 0.00 O +ATOM 28 P DA 1 2.039 3.624 4.641 1.00 0.00 P +ATOM 29 O1P DA 1 1.047 3.543 3.559 1.00 0.00 O +ATOM 30 O2P DA 1 1.683 2.744 5.764 1.00 0.00 O +ATOM 31 O5' DA 1 3.461 3.109 4.001 1.00 0.00 O TER 32 DA 1 END From a18baab31c075d96203ce6a9274b8614767cf014 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 12:43:45 -0500 Subject: [PATCH 0524/1492] Record template head/tail atoms --- src/Exec_Build.cpp | 33 ++++++++++++++++++++++++++++++++- src/cpptrajdepend | 4 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index e92251914a..2a04ace165 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -6,6 +6,7 @@ #include "Structure/Zmatrix.h" #include "Parm/GB_Params.h" #include "AssociatedData_ResId.h" +#include "AssociatedData_Connect.h" /** Try to identify residue template DataSet from the given residue * name (from e.g. the PDB/Mol2/etc file). @@ -74,6 +75,12 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, Topology const& topIn, Frame const& frameIn, ParameterSet const& mainParmSet) { + // Array of head/tail connect atoms for each residue + typedef std::vector Iarray; + Iarray resHeadAtoms; + Iarray resTailAtoms; + resHeadAtoms.reserve( topIn.Nres() ); + resTailAtoms.reserve( topIn.Nres() ); // Array of templates for each residue std::vector ResTemplates; ResTemplates.reserve( topIn.Nres() ); @@ -107,9 +114,26 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, if (resTemplate == 0) { mprintf("Warning: No template found for residue %s\n", topIn.TruncResNameOnumId(ires).c_str()); newNatom += currentRes.NumAtoms(); + // Head and tail atoms are blank + resHeadAtoms.push_back( -1 ); + resTailAtoms.push_back( -1 ); } else { mprintf("\tTemplate %s being used for residue %s\n", resTemplate->legend(), topIn.TruncResNameOnumId(ires).c_str()); + // Save the head and tail atoms + AssociatedData* ad = resTemplate->GetAssociatedData(AssociatedData::CONNECT); + if (ad == 0) { + mprintf("Warning: Unit '%s' does not have CONNECT data.\n", resTemplate->legend()); + } else { + AssociatedData_Connect const& CONN = static_cast( *ad ); + if (CONN.NconnectAtoms() < 2) { + mprinterr("Error: Not enough connect atoms in unit '%s'\n", resTemplate->legend()); + return 1; + } + resHeadAtoms.push_back( CONN.Connect()[0] + newNatom ); + resTailAtoms.push_back( CONN.Connect()[1] + newNatom ); + } + // Update # of atoms newNatom += resTemplate->Top().Natom(); } ResTemplates.push_back( resTemplate ); @@ -125,7 +149,6 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, hasPosition.reserve( newNatom ); // Hold atom offsets needed when building residues - typedef std::vector Iarray; Iarray AtomOffsets; AtomOffsets.reserve( topIn.Nres() ); @@ -254,6 +277,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("\t%i template atoms missing in source.\n", nRefAtomsMissing); // ----------------------------------- + for (unsigned int idx = 0; idx != ResTemplates.size(); idx++) { + if (ResTemplates[idx] != 0) { + mprintf("DEBUG: Template %s", ResTemplates[idx]->legend()); + if (resHeadAtoms[idx] > -1) mprintf(" head %s", topOut.AtomMaskName(resHeadAtoms[idx]).c_str()); + if (resTailAtoms[idx] > -1) mprintf(" tail %s", topOut.AtomMaskName(resTailAtoms[idx]).c_str()); + mprintf("\n"); + } + } // Check inter-residue bonds std::vector resBondingAtoms(topOut.Nres()); for (ResAtArray::const_iterator it = interResBonds.begin(); it != interResBonds.end(); ++it) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 2059dc510f..f33234614a 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -290,7 +290,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -312,7 +312,7 @@ Exec_Emin.o : Exec_Emin.cpp Action.h ActionList.h ActionState.h Analysis.h Analy Exec_ExtendedComparison.o : Exec_ExtendedComparison.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_ExtendedComparison.h ExtendedSimilarity.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Flatten.o : Exec_Flatten.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Flatten.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OnlineVarT.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_GenerateAmberRst.o : Exec_GenerateAmberRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h DistRoutines.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_GenerateAmberRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h ImageOption.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Graft.o : Exec_Graft.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Graft.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Graft.o : Exec_Graft.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Graft.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Help.o : Exec_Help.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Help.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_HmassRepartition.o : Exec_HmassRepartition.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_HmassRepartition.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_LoadCrd.o : Exec_LoadCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_LoadCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From dac790764f70f2c56bfba1f223130c366b5deca1 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 12:46:54 -0500 Subject: [PATCH 0525/1492] Make final residue end-terminal by default --- src/Exec_Build.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 2a04ace165..68cc452d15 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -105,6 +105,8 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, resTermType = Cpptraj::Structure::BEG_TERMINAL; } else if (nres < topIn.Nres() && topIn.Res(nres).ChainId() != currentRes.ChainId()) { resTermType = Cpptraj::Structure::END_TERMINAL; + } else if (nres == topIn.Nres()) { + resTermType = Cpptraj::Structure::END_TERMINAL; } else { resTermType = Cpptraj::Structure::NON_TERMINAL; } From ceca343c9156690519dcd4300e9a181129b1aee5 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 13:09:20 -0500 Subject: [PATCH 0526/1492] Check head/tail atoms --- src/Exec_Build.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index 68cc452d15..ea3fe4eff7 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -311,6 +311,36 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, resBondingAtoms[ra0.first].push_back( Ipair(at0, at1) ); resBondingAtoms[ra1.first].push_back( Ipair(at1, at0) ); } + // For each residue bonding atom pair, check that they match expected + // head/tail atoms. + for (std::vector::const_iterator rit = resBondingAtoms.begin(); + rit != resBondingAtoms.end(); ++rit) + { + long int ires = rit - resBondingAtoms.begin(); + for (IParray::const_iterator atPair = rit->begin(); atPair != rit->end(); ++atPair) + { + long int jres = topOut[atPair->second].ResNum(); + if (atPair->first == resHeadAtoms[ires]) { + // HEAD atom. Should connect to other residue TAIL atom. + if (atPair->second != resTailAtoms[jres]) { + mprintf("Warning: Detected inter-res bond %s - %s HEAD does not match TAIL.\n", + topOut.AtomMaskName(atPair->first).c_str(), + topOut.AtomMaskName(atPair->second).c_str()); + } + } else if (atPair->first == resTailAtoms[ires]) { + // TAIL atom. Should connect to other residue HEAD atom. + if (atPair->second != resHeadAtoms[jres]) { + mprintf("Warning: Detected inter-res bond %s - %s TAIL does not match HEAD.\n", + topOut.AtomMaskName(atPair->first).c_str(), + topOut.AtomMaskName(atPair->second).c_str()); + } + } else { + mprintf("Warning: Atom %s is not a HEAD or TAIL atom.\n", + topOut.AtomMaskName(atPair->first).c_str()); + } + } // END loop over inter-residue bond pairs for this residue + } // END loop over residues + // DEBUG print residue bonding atoms for (std::vector::const_iterator rit = resBondingAtoms.begin(); rit != resBondingAtoms.end(); ++rit) From 00f33c0d3e2be68b687ad93d4cd20019e72532aa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 14 Feb 2024 13:26:28 -0500 Subject: [PATCH 0527/1492] Fix when template has no HEAD or has no TAIL. Report unused HEAD/TAIL atoms. --- src/Exec_Build.cpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index ea3fe4eff7..b020c41fbe 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -132,8 +132,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Not enough connect atoms in unit '%s'\n", resTemplate->legend()); return 1; } - resHeadAtoms.push_back( CONN.Connect()[0] + newNatom ); - resTailAtoms.push_back( CONN.Connect()[1] + newNatom ); + if (CONN.Connect()[0] > -1) + resHeadAtoms.push_back( CONN.Connect()[0] + newNatom ); + else + resHeadAtoms.push_back( -1 ); + if (CONN.Connect()[1] > -1) + resTailAtoms.push_back( CONN.Connect()[1] + newNatom ); + else + resTailAtoms.push_back( -1 ); } // Update # of atoms newNatom += resTemplate->Top().Natom(); @@ -341,6 +347,28 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } // END loop over inter-residue bond pairs for this residue } // END loop over residues + // Mark used HEAD/TAIL atoms + for (std::vector::const_iterator rit = resBondingAtoms.begin(); + rit != resBondingAtoms.end(); ++rit) + { + long int ires = rit - resBondingAtoms.begin(); + for (IParray::const_iterator atPair = rit->begin(); atPair != rit->end(); ++atPair) + { + if (atPair->first == resHeadAtoms[ires]) + resHeadAtoms[ires] = -1; + else if (atPair->first == resTailAtoms[ires]) + resTailAtoms[ires] = -1; + } + } + + // Report unused HEAD/TAIL atoms + for (int ires = 0; ires != topOut.Nres(); ires++) { // TODO should be topIn? + if (resHeadAtoms[ires] != -1) + mprintf("Warning: Unused head atom %s\n", topOut.AtomMaskName(resHeadAtoms[ires]).c_str()); + if (resTailAtoms[ires] != -1) + mprintf("Warning: Unused tail atom %s\n", topOut.AtomMaskName(resTailAtoms[ires]).c_str()); + } + // DEBUG print residue bonding atoms for (std::vector::const_iterator rit = resBondingAtoms.begin(); rit != resBondingAtoms.end(); ++rit) From 8993ba948cd439af954b5ff07745a9fa85cfacd8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 15 Feb 2024 08:59:26 -0500 Subject: [PATCH 0528/1492] No longer needs to depend on zmatrix --- src/Exec_Build.cpp | 17 +++-------------- src/Structure/Builder.h | 2 +- src/cpptrajdepend | 2 +- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index b020c41fbe..b8a00e8bd5 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -3,7 +3,6 @@ #include "DataSet_Parameters.h" #include "Structure/Builder.h" #include "Structure/GenerateConnectivityArrays.h" -#include "Structure/Zmatrix.h" #include "Parm/GB_Params.h" #include "AssociatedData_ResId.h" #include "AssociatedData_Connect.h" @@ -153,7 +152,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, // ----------------------------------- // hasPosition - for each atom in topOut, status on whether atom in frameOut needs building - Cpptraj::Structure::Zmatrix::Barray hasPosition; + Cpptraj::Structure::Builder::Barray hasPosition; hasPosition.reserve( newNatom ); // Hold atom offsets needed when building residues @@ -446,24 +445,14 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } // Update internal coords from known positions if (structureBuilder.UpdateICsFromFrame( frameOut, topOut, hasPosition )) { - mprinterr("Error: Failed to update Zmatrix with values from existing positions.\n"); + mprinterr("Error: Failed to update internals with values from existing positions.\n"); return 1; } - // Convert to Zmatrix and assign missing atom positions - //Cpptraj::Structure::Zmatrix tmpz; - //tmpz.SetDebug( 1 ); // DEBUG - //if (structureBuilder.GetZmatrixFromInternals(tmpz, topOut)) { - // mprinterr("Error: Could not get Zmatrix from internals.\n"); - // return 1; - //} - //if (tmpz.SetToFrame( frameOut, hasPosition )) { if (structureBuilder.BuildFromInternals(frameOut, topOut, hasPosition)) { mprinterr("Error: Building residue %s failed.\n", topOut.TruncResNameOnumId(ires).c_str()); buildFailed = true; - }// else - // resIsBuilt[ires] = true; - //delete structureBuilder; + } } } // END loop over atom offsets diff --git a/src/Structure/Builder.h b/src/Structure/Builder.h index 5788d51ef7..a2d94a4b2a 100644 --- a/src/Structure/Builder.h +++ b/src/Structure/Builder.h @@ -12,8 +12,8 @@ class Zmatrix; class InternalCoords; /// Used to attach different topology/frame combos using internal coordinates class Builder { - typedef std::vector Barray; public: + typedef std::vector Barray; /// CONSTRUCTOR Builder(); /// Set debug level diff --git a/src/cpptrajdepend b/src/cpptrajdepend index f33234614a..d376b56682 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -290,7 +290,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/StructureEnum.h Structure/Zmatrix.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h From 6669749304432ad4d1db4e306efd3df4019c24d9 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 15 Feb 2024 09:11:05 -0500 Subject: [PATCH 0529/1492] Connect unused HEAD atoms to unused TAIL atoms of prior residues --- src/Exec_Build.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index b8a00e8bd5..af00c82de9 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -292,7 +292,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("\n"); } } - // Check inter-residue bonds + // Check detected inter-residue bonds std::vector resBondingAtoms(topOut.Nres()); for (ResAtArray::const_iterator it = interResBonds.begin(); it != interResBonds.end(); ++it) { @@ -312,11 +312,13 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprinterr("Error: Atom %s not found in residue %i\n", *(ra1.second), ra1.first); return 1; } - // Save bonding atoms + // Save inter-residue bonding atoms; convention is atom belonging to + // the residue is first. resBondingAtoms[ra0.first].push_back( Ipair(at0, at1) ); resBondingAtoms[ra1.first].push_back( Ipair(at1, at0) ); } - // For each residue bonding atom pair, check that they match expected + + // For each inter-residue bonding atom pair, check that they match expected // head/tail atoms. for (std::vector::const_iterator rit = resBondingAtoms.begin(); rit != resBondingAtoms.end(); ++rit) @@ -346,7 +348,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } // END loop over inter-residue bond pairs for this residue } // END loop over residues - // Mark used HEAD/TAIL atoms + // Mark used HEAD/TAIL atoms in existing inter-residue bonds. for (std::vector::const_iterator rit = resBondingAtoms.begin(); rit != resBondingAtoms.end(); ++rit) { @@ -360,6 +362,22 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, } } + // Try to connect unused HEAD atoms to previous unused TAIL atoms + for (int ires = 1; ires < topOut.Nres(); ires++) { + int pres = ires - 1; + if (resHeadAtoms[ires] != -1) { + if (resTailAtoms[pres] != -1) { + mprintf("DEBUG: Connecting unused HEAD atom %s to unused tail atom %s\n", + topOut.AtomMaskName(resHeadAtoms[ires]).c_str(), + topOut.AtomMaskName(resTailAtoms[pres]).c_str()); + resBondingAtoms[ires].push_back( Ipair(resHeadAtoms[ires], resTailAtoms[pres]) ); + resBondingAtoms[pres].push_back( Ipair(resTailAtoms[pres], resHeadAtoms[ires]) ); + resHeadAtoms[ires] = -1; + resTailAtoms[pres] = -1; + } + } + } + // Report unused HEAD/TAIL atoms for (int ires = 0; ires != topOut.Nres(); ires++) { // TODO should be topIn? if (resHeadAtoms[ires] != -1) @@ -368,7 +386,7 @@ int Exec_Build::FillAtomsWithTemplates(Topology& topOut, Frame& frameOut, mprintf("Warning: Unused tail atom %s\n", topOut.AtomMaskName(resTailAtoms[ires]).c_str()); } - // DEBUG print residue bonding atoms + // DEBUG print inter-residue bonding atoms for (std::vector::const_iterator rit = resBondingAtoms.begin(); rit != resBondingAtoms.end(); ++rit) { From b8dd9782cac8b77b0a65dddcf07248e56038c0f7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 15 Feb 2024 09:25:48 -0500 Subject: [PATCH 0530/1492] Start new creator class --- src/Structure/CMakeLists.txt | 1 + src/Structure/Creator.cpp | 80 +++++++++++++++++++++++++++++++++++ src/Structure/Creator.h | 26 ++++++++++++ src/Structure/structuredepend | 1 + src/Structure/structurefiles | 1 + 5 files changed, 109 insertions(+) create mode 100644 src/Structure/Creator.cpp create mode 100644 src/Structure/Creator.h diff --git a/src/Structure/CMakeLists.txt b/src/Structure/CMakeLists.txt index b434c765d1..18f46a3c1e 100644 --- a/src/Structure/CMakeLists.txt +++ b/src/Structure/CMakeLists.txt @@ -3,6 +3,7 @@ target_sources(cpptraj_common_obj PRIVATE ${CMAKE_CURRENT_LIST_DIR}/BuildAtom.cpp ${CMAKE_CURRENT_LIST_DIR}/Builder.cpp ${CMAKE_CURRENT_LIST_DIR}/Chirality.cpp + ${CMAKE_CURRENT_LIST_DIR}/Creator.cpp ${CMAKE_CURRENT_LIST_DIR}/Disulfide.cpp ${CMAKE_CURRENT_LIST_DIR}/FunctionalGroup.cpp ${CMAKE_CURRENT_LIST_DIR}/FxnGroupBuilder.cpp diff --git a/src/Structure/Creator.cpp b/src/Structure/Creator.cpp new file mode 100644 index 0000000000..2b9fa2c2f1 --- /dev/null +++ b/src/Structure/Creator.cpp @@ -0,0 +1,80 @@ +#include "Creator.h" +#include "../ArgList.h" +#include "../CpptrajStdio.h" +#include "../DataSet_Parameters.h" +#include "../DataSetList.h" + +using namespace Cpptraj::Structure; + +/** CONSTRUCTOR */ +Creator::Creator() : + mainParmSet_(0), + debug_(0), + free_parmset_mem_(false) +{} + +/** DESTRUCTOR */ +Creator::~Creator() { + if (mainParmSet_ != 0) + delete mainParmSet_; +} + +const char* Creator::keywords_ = "parmset "; + +/** Initialize */ +int Creator::InitCreator(ArgList& argIn, DataSetList const& DSL, int debugIn) +{ + debug_ = debugIn; + // Get parameter sets. + typedef std::vector Parray; + Parray ParamSets; + std::string parmset = argIn.GetStringKey("parmset"); + if (parmset.empty()) { + mprintf("\tNo parameter set(s) specified with 'parmset'; using any loaded sets.\n"); + // See if there are any parameter sets. + DataSetList sets = DSL.GetSetsOfType( "*", DataSet::PARAMETERS ); + for (DataSetList::const_iterator it = sets.begin(); it != sets.end(); ++it) + ParamSets.push_back( (DataSet_Parameters*)(*it) ); + } else { + while (!parmset.empty()) { + DataSetList sets = DSL.GetSetsOfType( parmset, DataSet::PARAMETERS ); + if (sets.empty()) { + mprintf("Warning: No parameter sets corresponding to '%s'\n", parmset.c_str()); + } else { + for (DataSetList::const_iterator it = sets.begin(); it != sets.end(); ++it) + ParamSets.push_back( (DataSet_Parameters*)(*it) ); + } + parmset = argIn.GetStringKey("parmset"); + } + } + //if (ParamSets.empty()) { + // mprinterr("Error: No parameter sets.\n"); + // return CpptrajState::ERR; + //} + if (!ParamSets.empty()) { + mprintf("\tParameter sets:\n"); + for (Parray::const_iterator it = ParamSets.begin(); it != ParamSets.end(); ++it) + mprintf("\t %s\n", (*it)->legend()); + + // Combine parameters if needed + if (mainParmSet_ != 0) { + if (free_parmset_mem_) delete mainParmSet_; + } + mainParmSet_ = 0; + free_parmset_mem_ = false; + if (ParamSets.size() == 1) + mainParmSet_ = ParamSets.front(); + else { + free_parmset_mem_ = true; + mprintf("\tCombining parameter sets.\n"); + Parray::const_iterator it = ParamSets.begin(); + mainParmSet_ = new DataSet_Parameters( *(*it) ); + ++it; + ParameterSet::UpdateCount UC; + for (; it != ParamSets.end(); ++it) + mainParmSet_->UpdateParamSet( *(*it), UC, debug_, debug_ ); // FIXME verbose + } + } + return 0; +} + diff --git a/src/Structure/Creator.h b/src/Structure/Creator.h new file mode 100644 index 0000000000..b4ce0571d2 --- /dev/null +++ b/src/Structure/Creator.h @@ -0,0 +1,26 @@ +#ifndef INC_STRUCTURE_CREATOR_H +#define INC_STRUCTURE_CREATOR_H +class ArgList; +class DataSet_Parameters; +class DataSetList; +namespace Cpptraj { +namespace Structure { +/// Used to create a system from individual units +class Creator { + public: + /// CONSTRUCTOR + Creator(); + /// DESTRUCTOR + ~Creator(); + /// Associated keywords for InitCreator + static const char* keywords_; + /// Initialize the Creator + int InitCreator(ArgList&, DataSetList const&, int); + private: + DataSet_Parameters* mainParmSet_; ///< Hold optional parameter set. + int debug_; ///< Debug level + bool free_parmset_mem_; ///< True if main parm set is combined and should be freed +}; +} +} +#endif diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index 8038bb531b..a41b2cd8d1 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,6 +1,7 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Builder.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h Chirality.o : Chirality.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../SymbolExporting.h ../Vec3.h Chirality.h +Creator.o : Creator.cpp ../AssociatedData.h ../AtomType.h ../Constants.h ../CpptrajFile.h ../DataSet.h ../DataSet_Parameters.h ../Dimension.h ../FileIO.h ../FileName.h ../MetaData.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../TextFormat.h ../TypeNameHolder.h Creator.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h diff --git a/src/Structure/structurefiles b/src/Structure/structurefiles index d00e816504..00491304ea 100644 --- a/src/Structure/structurefiles +++ b/src/Structure/structurefiles @@ -3,6 +3,7 @@ STRUCTURE_SOURCES= \ BuildAtom.cpp \ Builder.cpp \ Chirality.cpp \ + Creator.cpp \ Disulfide.cpp \ FunctionalGroup.cpp \ FxnGroupBuilder.cpp \ From bc561f356ef668605a1b02106be6b13f44c8072a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 15 Feb 2024 09:41:32 -0500 Subject: [PATCH 0531/1492] Put in separate function --- src/Structure/Creator.cpp | 21 +++++++++++++++------ src/Structure/Creator.h | 6 ++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Structure/Creator.cpp b/src/Structure/Creator.cpp index 2b9fa2c2f1..0cd76c4e09 100644 --- a/src/Structure/Creator.cpp +++ b/src/Structure/Creator.cpp @@ -25,7 +25,20 @@ const char* Creator::keywords_ = "parmset "; int Creator::InitCreator(ArgList& argIn, DataSetList const& DSL, int debugIn) { debug_ = debugIn; - // Get parameter sets. + if (getParameterSets(argIn, DSL)) return 1; + + return 0; +} + +/** Get parameter sets. */ +int Creator::getParameterSets(ArgList& argIn, DataSetList const& DSL) { + // Clear any existing set + if (mainParmSet_ != 0) { + if (free_parmset_mem_) delete mainParmSet_; + } + mainParmSet_ = 0; + free_parmset_mem_ = false; + // Look for parmset args typedef std::vector Parray; Parray ParamSets; std::string parmset = argIn.GetStringKey("parmset"); @@ -57,11 +70,7 @@ int Creator::InitCreator(ArgList& argIn, DataSetList const& DSL, int debugIn) mprintf("\t %s\n", (*it)->legend()); // Combine parameters if needed - if (mainParmSet_ != 0) { - if (free_parmset_mem_) delete mainParmSet_; - } - mainParmSet_ = 0; - free_parmset_mem_ = false; + if (ParamSets.size() == 1) mainParmSet_ = ParamSets.front(); else { diff --git a/src/Structure/Creator.h b/src/Structure/Creator.h index b4ce0571d2..3d8ae7b0e8 100644 --- a/src/Structure/Creator.h +++ b/src/Structure/Creator.h @@ -16,7 +16,13 @@ class Creator { static const char* keywords_; /// Initialize the Creator int InitCreator(ArgList&, DataSetList const&, int); + + /// \return True if a parameter set is defined + bool HasMainParmSet() const { return (mainParmSet_ != 0); } private: + /// Get parameter sets + int getParameterSets(ArgList&, DataSetList const&); + DataSet_Parameters* mainParmSet_; ///< Hold optional parameter set. int debug_; ///< Debug level bool free_parmset_mem_; ///< True if main parm set is combined and should be freed From df17ecc14a8db043a86c5918edbd316e73b68956 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 15 Feb 2024 11:22:15 -0500 Subject: [PATCH 0532/1492] Fix memory issue in destructor. Start using creator in build. --- src/Exec_Build.cpp | 18 ++++++++++++++---- src/Structure/Creator.cpp | 2 +- src/Structure/Creator.h | 2 ++ src/Structure/structuredepend | 2 +- src/cpptrajdepend | 3 ++- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/Exec_Build.cpp b/src/Exec_Build.cpp index af00c82de9..f7992964ea 100644 --- a/src/Exec_Build.cpp +++ b/src/Exec_Build.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "DataSet_Parameters.h" #include "Structure/Builder.h" +#include "Structure/Creator.h" #include "Structure/GenerateConnectivityArrays.h" #include "Parm/GB_Params.h" #include "AssociatedData_ResId.h" @@ -609,6 +610,15 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) } // Get parameter sets. + Cpptraj::Structure::Creator creator; + if (creator.InitCreator(argIn, State.DSL(), State.Debug())) { + return CpptrajState::ERR; + } + if (!creator.HasMainParmSet()) { + mprinterr("Error: No parameter sets.\n"); + return CpptrajState::ERR; + } +/* typedef std::vector Parray; Parray ParamSets; std::string parmset = argIn.GetStringKey("parmset"); @@ -652,12 +662,12 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) ParameterSet::UpdateCount UC; for (; it != ParamSets.end(); ++it) mainParmSet->UpdateParamSet( *(*it), UC, State.Debug(), State.Debug() ); // FIXME verbose - } + }*/ // Fill in atoms with templates Topology topOut; Frame frameOut; - if (FillAtomsWithTemplates(topOut, frameOut, Templates, topIn, frameIn, *mainParmSet)) { + if (FillAtomsWithTemplates(topOut, frameOut, Templates, topIn, frameIn, creator.MainParmSet())) { mprinterr("Error: Could not fill in atoms using templates.\n"); return CpptrajState::ERR; } @@ -666,7 +676,7 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) // Assign parameters. This will create the bond/angle/dihedral/improper // arrays as well. Exec::RetType ret = CpptrajState::OK; - if ( topOut.AssignParams( *mainParmSet ) ) { + if ( topOut.AssignParams( creator.MainParmSet() ) ) { mprinterr("Error: Could not assign parameters for '%s'.\n", topOut.c_str()); ret = CpptrajState::ERR; } @@ -680,7 +690,7 @@ Exec::RetType Exec_Build::Execute(CpptrajState& State, ArgList& argIn) topOut.AllocJoinArray(); topOut.AllocRotateArray(); - if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; + //if (free_parmset_mem && mainParmSet != 0) delete mainParmSet; // Update coords if (crdout.CoordsSetup( topOut, CoordinateInfo() )) { // FIXME better coordinate info diff --git a/src/Structure/Creator.cpp b/src/Structure/Creator.cpp index 0cd76c4e09..ae0ff6a8fa 100644 --- a/src/Structure/Creator.cpp +++ b/src/Structure/Creator.cpp @@ -15,7 +15,7 @@ Creator::Creator() : /** DESTRUCTOR */ Creator::~Creator() { - if (mainParmSet_ != 0) + if (mainParmSet_ != 0 && free_parmset_mem_) delete mainParmSet_; } diff --git a/src/Structure/Creator.h b/src/Structure/Creator.h index 3d8ae7b0e8..358f918473 100644 --- a/src/Structure/Creator.h +++ b/src/Structure/Creator.h @@ -19,6 +19,8 @@ class Creator { /// \return True if a parameter set is defined bool HasMainParmSet() const { return (mainParmSet_ != 0); } + /// \return Main parm set + DataSet_Parameters const& MainParmSet() const { return *mainParmSet_; } private: /// Get parameter sets int getParameterSets(ArgList&, DataSetList const&); diff --git a/src/Structure/structuredepend b/src/Structure/structuredepend index a41b2cd8d1..c81f6828ae 100644 --- a/src/Structure/structuredepend +++ b/src/Structure/structuredepend @@ -1,7 +1,7 @@ BuildAtom.o : BuildAtom.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h BuildAtom.h StructureEnum.h Builder.o : Builder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../GuessAtomHybridization.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TorsionRoutines.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Builder.h Chirality.h GenerateConnectivityArrays.h InternalCoords.h Zmatrix.h Chirality.o : Chirality.cpp ../Atom.h ../Constants.h ../CpptrajStdio.h ../NameType.h ../SymbolExporting.h ../Vec3.h Chirality.h -Creator.o : Creator.cpp ../AssociatedData.h ../AtomType.h ../Constants.h ../CpptrajFile.h ../DataSet.h ../DataSet_Parameters.h ../Dimension.h ../FileIO.h ../FileName.h ../MetaData.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../TextFormat.h ../TypeNameHolder.h Creator.h +Creator.o : Creator.cpp ../ArgList.h ../AssociatedData.h ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajFile.h ../CpptrajStdio.h ../DataSet.h ../DataSetList.h ../DataSet_Coords.h ../DataSet_Coords_REF.h ../DataSet_Parameters.h ../Dimension.h ../FileIO.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../MetaData.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReferenceFrame.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../TextFormat.h ../Timer.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Creator.h Disulfide.o : Disulfide.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../DistRoutines.h ../FileName.h ../Frame.h ../ImageOption.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h Disulfide.h ResStatArray.h StructureRoutines.h FunctionalGroup.o : FunctionalGroup.cpp ../Atom.h ../AtomMap.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MapAtom.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.o : FxnGroupBuilder.cpp ../Atom.h ../AtomMask.h ../AtomType.h ../Box.h ../Constants.h ../CoordinateInfo.h ../CpptrajStdio.h ../FileName.h ../Frame.h ../MaskToken.h ../Matrix_3x3.h ../Molecule.h ../NameType.h ../Parallel.h ../ParameterHolders.h ../ParameterSet.h ../ParameterTypes.h ../Range.h ../ReplicaDimArray.h ../Residue.h ../Segment.h ../SymbolExporting.h ../Topology.h ../TypeNameHolder.h ../Unit.h ../Vec3.h FunctionalGroup.h FxnGroupBuilder.h StructureRoutines.h Sugar.h SugarToken.h diff --git a/src/cpptrajdepend b/src/cpptrajdepend index d376b56682..0592e8acb4 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -290,7 +290,7 @@ Ewald_Regular.o : Ewald_Regular.cpp Atom.h AtomMask.h Box.h Constants.h Coordina ExclusionArray.o : ExclusionArray.cpp Atom.h AtomMask.h CharMask.h CpptrajStdio.h ExclusionArray.h MaskToken.h Molecule.h NameType.h Residue.h Segment.h StringRoutines.h SymbolExporting.h Unit.h Exec_AddMissingRes.o : Exec_AddMissingRes.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h CompactFrameArray.h Constants.h Constraints.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnergyArray.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_AddMissingRes.h Exec_AddMissingRes_Pres.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MdOpts.h MetaData.h Minimize_SteepestDescent.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h PotentialFunction.h PotentialTerm.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h Trajin_Single.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Unit.h Vec3.h Exec_Analyze.o : Exec_Analyze.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Cmd.h CmdList.h Command.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h -Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/GenerateConnectivityArrays.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h +Exec_Build.o : Exec_Build.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h AssociatedData_Connect.h AssociatedData_ResId.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Build.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Parm/GB_Params.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h Structure/Builder.h Structure/Creator.h Structure/GenerateConnectivityArrays.h Structure/StructureEnum.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Calc.o : Exec_Calc.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Calc.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_CatCrd.o : Exec_CatCrd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CatCrd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h Exec_Change.o : Exec_Change.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Change.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Segment.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Unit.h Vec3.h @@ -448,6 +448,7 @@ StringRoutines.o : StringRoutines.cpp CpptrajStdio.h StringRoutines.h Structure/BuildAtom.o : Structure/BuildAtom.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/BuildAtom.h Structure/StructureEnum.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/Builder.o : Structure/Builder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h GuessAtomHybridization.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Builder.h Structure/Chirality.h Structure/GenerateConnectivityArrays.h Structure/InternalCoords.h Structure/Zmatrix.h SymbolExporting.h Topology.h TorsionRoutines.h TypeNameHolder.h Unit.h Vec3.h Structure/Chirality.o : Structure/Chirality.cpp Atom.h Constants.h CpptrajStdio.h NameType.h Structure/Chirality.h SymbolExporting.h Vec3.h +Structure/Creator.o : Structure/Creator.cpp ArgList.h AssociatedData.h Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Parameters.h Dimension.h FileIO.h FileName.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Segment.h Structure/Creator.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/Disulfide.o : Structure/Disulfide.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h DistRoutines.h FileName.h Frame.h ImageOption.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/Disulfide.h Structure/ResStatArray.h Structure/StructureRoutines.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FunctionalGroup.o : Structure/FunctionalGroup.cpp Atom.h AtomMap.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MapAtom.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h Structure/FxnGroupBuilder.o : Structure/FxnGroupBuilder.cpp Atom.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h Segment.h Structure/FunctionalGroup.h Structure/FxnGroupBuilder.h Structure/StructureRoutines.h Structure/Sugar.h Structure/SugarToken.h SymbolExporting.h Topology.h TypeNameHolder.h Unit.h Vec3.h From 0331f33a001c65a1c8c41ac10283957be47784ed Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 15 Feb 2024 11:34:28 -0500 Subject: [PATCH 0533/1492] Code to get templates --- src/Structure/Creator.cpp | 47 ++++++++++++++++++++++++++++++++++++++- src/Structure/Creator.h | 14 ++++++++++-- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/Structure/Creator.cpp b/src/Structure/Creator.cpp index ae0ff6a8fa..4afbc98f5d 100644 --- a/src/Structure/Creator.cpp +++ b/src/Structure/Creator.cpp @@ -1,6 +1,7 @@ #include "Creator.h" #include "../ArgList.h" #include "../CpptrajStdio.h" +#include "../DataSet_Coords.h" // TODO new coords type #include "../DataSet_Parameters.h" #include "../DataSetList.h" @@ -19,7 +20,9 @@ Creator::~Creator() { delete mainParmSet_; } -const char* Creator::keywords_ = "parmset "; +const char* Creator::parm_keywords_ = "parmset "; + +const char* Creator::template_keywords_ = "lib