Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /Conograph/trunk/src/lattice_symmetry/LatticeFigureOfMeritToCheckSymmetry.hh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (hide annotations) (download) (as text)
Wed Sep 7 04:38:51 2016 UTC (7 years, 6 months ago) by rtomiyasu
File MIME type: text/x-c++hdr
File size: 3974 byte(s)
The output format for base-centered monoclinic cells was corrected.
1 rtomiyasu 3 /*
2     * The MIT License
3    
4 rtomiyasu 25 BLDConograph (Bravais lattice determination module in Conograph)
5 rtomiyasu 3
6     Copyright (c) <2012> <Ryoko Oishi-Tomiyasu, KEK>
7    
8     Permission is hereby granted, free of charge, to any person obtaining a copy
9     of this software and associated documentation files (the "Software"), to deal
10     in the Software without restriction, including without limitation the rights
11     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12     copies of the Software, and to permit persons to whom the Software is
13     furnished to do so, subject to the following conditions:
14    
15     The above copyright notice and this permission notice shall be included in
16     all copies or substantial portions of the Software.
17    
18     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24     THE SOFTWARE.
25     *
26     */
27     #ifndef LATTICEFIGUREOFMERITTOCHECKSYMMETRY_HH_
28     #define LATTICEFIGUREOFMERITTOCHECKSYMMETRY_HH_
29    
30 rtomiyasu 25 #include "LatticeFigureOfMerit.hh"
31 rtomiyasu 3
32     class OutputInfo;
33    
34     // Class for outputting information about a lattice in index file.
35     class LatticeFigureOfMeritToCheckSymmetry
36     {
37     private:
38 rtomiyasu 25 LatticeFigureOfMerit m_latfom;
39 rtomiyasu 3
40 rtomiyasu 25 // m_S_red.first is Buerger-reduced.
41     // m_S_red.second * m_S_red.first * Transpose(m_S_red.second) is Selling-reduced.
42     SymMat43_Double m_S_red;
43 rtomiyasu 3
44 rtomiyasu 25 bool checkIfLatticeIsMonoclinic(const ePointGroup& epg_new, const Double& resol,
45     map< SymMat<Double>, NRMat<Int4> >& ans) const;
46     bool checkIfLatticeIsOrthorhombic(const Double& resol,
47     map< SymMat<Double>, NRMat<Int4> >& ans) const;
48     bool checkIfLatticeIsTetragonal(const Double& resol,
49     map< SymMat<Double>, NRMat<Int4> >& ans) const;
50     bool checkIfLatticeIsHexagonal(const ePointGroup& epg_new, const Double& resol,
51     map< SymMat<Double>, NRMat<Int4> >& ans) const;
52 rtomiyasu 3
53     public:
54 rtomiyasu 16 LatticeFigureOfMeritToCheckSymmetry();
55 rtomiyasu 3 LatticeFigureOfMeritToCheckSymmetry(const Double& rhs); // Sets only m_latfom.m_determ_GramMat = rhs;
56     LatticeFigureOfMeritToCheckSymmetry(const BravaisType& ebrat,
57 rtomiyasu 25 const SymMat43_Double& S_red);
58 rtomiyasu 3 virtual ~LatticeFigureOfMeritToCheckSymmetry(){};
59    
60 rtomiyasu 25 void setDistance(const SymMat<Double>& S_super0);
61     inline bool operator<(const LatticeFigureOfMeritToCheckSymmetry& rhs) const { return m_latfom < rhs.m_latfom; };
62 rtomiyasu 3
63 rtomiyasu 25 const LatticeFigureOfMerit& putLatticeFigureOfMerit() const { return m_latfom; };
64 rtomiyasu 3
65 rtomiyasu 33 inline void setDeWolffFigureOfMerit(const Int4& num_ref_figure_of_merit, const vector<QData>& qdata) { m_latfom.setDeWolffFigureOfMerit(num_ref_figure_of_merit, -1, qdata); };
66 rtomiyasu 25
67 rtomiyasu 3 // Returns true if the lattice has at least the symmetry of eps.
68     // On output, ans equals the equivalent lattice with symmetry of eps.
69 rtomiyasu 25 bool checkLatticeSymmetry(const ePointGroup& epg_new, const Double& resol,
70     map< SymMat<Double>, NRMat<Int4> >& ans) const;
71 rtomiyasu 3
72     // Set-functions.
73 rtomiyasu 25 void setLatticeConstants43(const BravaisType& brat, const SymMat43_Double& S);
74 rtomiyasu 3
75 rtomiyasu 25 inline const SymMat43_Double& putInitialForm() const { return m_S_red; };
76     inline const SymMat<Double> putInitialSellingReducedForm() const { return transform_sym_matrix(m_S_red.second, m_S_red.first); };
77 rtomiyasu 3
78 rtomiyasu 25 void putLatticesOfHigherSymmetry(const ePointGroup& epg, const Double& resol,
79     vector<LatticeFigureOfMeritToCheckSymmetry>& lattice_result) const;
80 rtomiyasu 3
81     static bool cmpFOMdeWolff(const LatticeFigureOfMeritToCheckSymmetry& lhs, const LatticeFigureOfMeritToCheckSymmetry& rhs)
82     {
83     return LatticeFigureOfMerit::cmpFOMdeWolff( lhs.putLatticeFigureOfMerit(), rhs.putLatticeFigureOfMerit() );
84     }
85     };
86    
87     #endif /*LatticeFigureOfMeritToCheckSymmetry_HH_*/

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26