mirror of https://github.com/CGAL/cgal
caught up with the shared code from KDS
This commit is contained in:
parent
2f35c55283
commit
024cca3979
|
|
@ -34,6 +34,7 @@ class PDB;
|
|||
You can iterator through the chains and soon the heterogens.
|
||||
*/
|
||||
class Model {
|
||||
typedef Model This;
|
||||
friend class PDB;
|
||||
|
||||
CGAL_SMALL_MAP_VALUE_TYPE(Model_vt, CGAL::Label<Model>, Chain, chain);
|
||||
|
|
@ -76,6 +77,7 @@ public:
|
|||
|
||||
//! \cond
|
||||
class Hetatom_data {
|
||||
typedef Hetatom_data This;
|
||||
public:
|
||||
Hetatom_data(const char *rnm,
|
||||
const char *anm, int rn, char ch): resname_(rnm),
|
||||
|
|
@ -83,15 +85,15 @@ public:
|
|||
rnum_(rn), chain_(ch){
|
||||
}
|
||||
Hetatom_data(){}
|
||||
CGAL_GETNR( char*, molecule_name, return resname_.c_str())
|
||||
CGAL_GETNR( char*, molecule_name, return resname_.c_str());
|
||||
|
||||
CGAL_GETNR( char*, atom_name, return atomname_.c_str())
|
||||
CGAL_GETNR( char*, atom_name, return atomname_.c_str());
|
||||
|
||||
CGAL_GETNR(int, molecule_number, return rnum_)
|
||||
CGAL_GETNR(int, molecule_number, return rnum_);
|
||||
|
||||
CGAL_GETNR(Chain_key, chain, return chain_)
|
||||
|
||||
CGAL_COMPARISONS2(Hetatom_data, rnum_, chain_)
|
||||
CGAL_GETNR(Chain_key, chain, return chain_);
|
||||
|
||||
CGAL_COMPARISONS2(rnum_, chain_);
|
||||
|
||||
protected:
|
||||
std::string resname_;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define CGAL_PDB_BASIC_H
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/Tools/utility_macros.h>
|
||||
#include <CGAL/Tools/Log.h>
|
||||
|
||||
#define CGAL_PDB_BEGIN_NAMESPACE CGAL_BEGIN_NAMESPACE namespace PDB{
|
||||
#define CGAL_PDB_END_NAMESPACE CGAL_END_NAMESPACE }
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
|
||||
#include <CGAL/Tools/Log.h>
|
||||
|
||||
#include "check_equal.h"
|
||||
|
||||
|
|
@ -53,8 +52,8 @@ int main(int , char *[]){
|
|||
unsigned int nb= std::distance(m.bonds_begin(), m.bonds_end());
|
||||
std::cout << "There are " << nb << " bonds" << std::endl;
|
||||
|
||||
CGAL_assert_equal(na, 1059);
|
||||
CGAL_assert_equal(nb, 1062);
|
||||
CGAL_assertion(na==1059);
|
||||
CGAL_assertion(nb==1062);
|
||||
|
||||
unsigned int totaL_atoms=0;
|
||||
unsigned int total_bonds=0;
|
||||
|
|
@ -65,8 +64,8 @@ int main(int , char *[]){
|
|||
totaL_atoms += std::distance(it->chain().atoms_begin(), it->chain().atoms_end());
|
||||
total_bonds += std::distance(it->chain().bonds_begin(), it->chain().bonds_end());
|
||||
}
|
||||
CGAL_assert_equal(std::distance(m.atoms_begin(), m.atoms_end()), totaL_atoms);
|
||||
CGAL_assert_equal(std::distance(m.bonds_begin(), m.bonds_end()), total_bonds);
|
||||
CGAL_assertion(std::distance(m.atoms_begin(), m.atoms_end()) == totaL_atoms);
|
||||
CGAL_assertion(std::distance(m.bonds_begin(), m.bonds_end()) == total_bonds);
|
||||
}
|
||||
|
||||
p.write(of);
|
||||
|
|
|
|||
Loading…
Reference in New Issue