本文整理汇总了C++中MatrixPtr::multiplyIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixPtr::multiplyIndex方法的具体用法?C++ MatrixPtr::multiplyIndex怎么用?C++ MatrixPtr::multiplyIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MatrixPtr
的用法示例。
在下文中一共展示了MatrixPtr::multiplyIndex方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generateReflectionIds
void Reflection::generateReflectionIds()
{
if (millerCount() == 0)
{
std::cout << "Warning! Miller count is 0" << std::endl;
}
int h = miller(0)->getH();
int k = miller(0)->getK();
int l = miller(0)->getL();
cctbx::miller::index<> cctbxMiller = cctbx::miller::index<>(h, k, l);
for (int i = 0; i < ambiguityCount(); i++)
{
MatrixPtr ambiguityMat = matrixForAmbiguity(i);
cctbx::miller::index<> cctbxTwinnedMiller = ambiguityMat->multiplyIndex(&cctbxMiller);
asym_index asymmetricMiller = asym_index(spaceGroup, asymmetricUnit, cctbxTwinnedMiller);
// sym_equiv_indices equivMaker = sym_equiv_indices(spaceGroup, cctbxTwinnedMiller);
// cctbx::miller::index<> asymmetricMiller = equivMaker(0).h();
int newId = reflectionIdForMiller(asymmetricMiller.h());
// int newId = reflectionIdForMiller(cctbxMiller);
reflectionIds.push_back(newId);
}
}
示例2: plotOrientationStats
void GraphDrawer::plotOrientationStats(vector<MtzPtr> mtzs)
{
cctbx::miller::index<> genericIndex = cctbx::miller::index<>(0, 0, 1);
cctbx::sgtbx::space_group *spaceGroup = mtzs[0]->reflection(0)->getSpaceGroup();
vector<double> xs, ys, zs;
for (int i = 0; i < mtzs.size(); i++)
{
MatrixPtr matrix = mtzs[i]->getMatrix();
cctbx::miller::sym_equiv_indices indices = cctbx::miller::sym_equiv_indices(*spaceGroup, genericIndex);
cctbx::miller::index<double> position = matrix->multiplyIndex(&genericIndex);
vec pos = new_vector(position[0], position[1], position[2]);
scale_vector_to_distance(&pos, 1);
std::cout << mtzs[i]->getFilename() << "\t" << pos.h << "\t" << pos.k << "\t" << pos.l << std::endl;
}
for (int i = 0; i < mtzs.size(); i++)
{
MatrixPtr matrix = mtzs[i]->getMatrix();
cctbx::miller::sym_equiv_indices indices = cctbx::miller::sym_equiv_indices(*spaceGroup, genericIndex);
// unsigned long size = indices.indices().size();
// cctbx::miller::index<double> position = matrix->multiplyIndex(&genericIndex);
// double h = position[0];
// double k = position[1];
// double l = position[2];
/*
for (int i = 0; i < size; i++)
{
cctbx::miller::index<> asymIndex = indices.indices()[i].h();
cctbx::miller::index<double> position = matrix->multiplyIndex(&asymIndex);
xs.push_back(position[0]);
ys.push_back(position[1]);
zs.push_back(position[2]);
std::cout << position[0] << "\t" << position[1] << "\t" << position[2] << std::endl;
std::cout << -position[0] << "\t" << -position[1] << "\t" << -position[2] << std::endl;
}*/
}
}