Skip to content

Commit cfd6f4a

Browse files
committed
Now using the new fields from CrystalBuilder
1 parent 1dbfcbd commit cfd6f4a

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalBuilder.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,33 @@ public CrystalBuilder(Structure structure) {
102102
if (structure.isCrystallographic()) {
103103

104104
this.isCrystallographic = true;
105+
105106
// we need to check space group not null for the cases where the entry is crystallographic but
106107
// the space group is not a standard one recognized by biojava, e.g. 1mnk (SG: 'I 21')
107-
if (this.crystallographicInfo.getSpaceGroup()==null) {
108-
logger.warn("Could not find a space group, will only calculate asymmetric unit interfaces.");
108+
if (this.crystallographicInfo.isNonStandardSg()) {
109+
logger.warn("Space group is non-standard, will only calculate asymmetric unit interfaces.");
110+
this.isCrystallographic = false;
111+
112+
} else if (this.crystallographicInfo.getSpaceGroup()==null) {
113+
// just in case we still check for space group null (a user pdb file could potentially be crystallographic and have no space group)
114+
logger.warn("Space group is null, will only calculate asymmetric unit interfaces.");
109115
this.isCrystallographic = false;
110116
} else {
111117
this.numOperatorsSg = this.crystallographicInfo.getSpaceGroup().getMultiplicity();
112118
}
119+
113120
// we need to check crystal cell not null for the rare cases where the entry is crystallographic but
114121
// the crystal cell is not given, e.g. 2i68, 2xkm, 4bpq
115122
if (this.crystallographicInfo.getCrystalCell()==null) {
116123
logger.warn("Could not find a crystal cell definition, will only calculate asymmetric unit interfaces.");
117124
this.isCrystallographic = false;
118125
}
126+
127+
// check for cases like 4hhb that are in a non-standard coordinate frame convention, see https://github.com/eppic-team/owl/issues/4
128+
if (this.crystallographicInfo.isNonStandardCoordFrameConvention()) {
129+
logger.warn("Non-standard coordinate frame convention, will only calculate asymmetric unit interfaces.");
130+
this.isCrystallographic = false;
131+
}
119132

120133
} else {
121134
this.isCrystallographic = false;

0 commit comments

Comments
 (0)