Commit 0747929c by Maarten L. Hekkelman

Allow missing CRYST1 record in PDB files... finally

parent 5bcfb102
......@@ -5277,6 +5277,8 @@ void PDBFileParser::ParseMiscellaneousFeatures()
void PDBFileParser::ParseCrystallographic()
{
if (mRec->is("CRYST1"))
{
Match("CRYST1", true);
getCategory("cell")->emplace({
......@@ -5307,6 +5309,29 @@ void PDBFileParser::ParseCrystallographic()
{ "Int_Tables_number", intTablesNr } });
GetNextRecord();
}
else
{
// no cryst1, make a simple one, like this:
// CRYST1 1.000 1.000 1.000 90.00 90.00 90.00 P 1 1
getCategory("cell")->emplace({
{ "entry_id", mStructureID }, // 1 - 6 Record name "CRYST1"
{ "length_a", 1 }, // 7 - 15 Real(9.3) a a (Angstroms).
{ "length_b", 1 }, // 16 - 24 Real(9.3) b b (Angstroms).
{ "length_c", 1 }, // 25 - 33 Real(9.3) c c (Angstroms).
{ "angle_alpha", 90 }, // 34 - 40 Real(7.2) alpha alpha (degrees).
{ "angle_beta", 90 }, // 41 - 47 Real(7.2) beta beta (degrees).
{ "angle_gamma", 90 }, // 48 - 54 Real(7.2) gamma gamma (degrees).
/* goes into symmetry */ // 56 - 66 LString sGroup Space group.
{ "Z_PDB", 1 } // 67 - 70 Integer z Z value.
});
getCategory("symmetry")->emplace({
{ "entry_id", mStructureID },
{ "space_group_name_H-M", "P 1" },
{ "Int_Tables_number", 1 }
});
}
}
void PDBFileParser::ParseCoordinateTransformation()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment