Skip to content

Commit aced582

Browse files
author
Dmytro Guzenko
committed
cleaning up and adding tags
1 parent 8c67933 commit aced582

3 files changed

Lines changed: 5 additions & 57 deletions

File tree

‎biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java‎

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,59 +2015,6 @@ public static void cleanUpAltLocs(Structure structure) {
20152015
}
20162016
}
20172017

2018-
/**
2019-
* Expands the NCS operators in the given Structure adding new chains as needed.
2020-
* The new chains are assigned ids of the form: original_chain_id+ncs_operator_index+"n"
2021-
* @param structure
2022-
* @deprecated use {@link org.biojava.nbio.structure.xtal.CrystalBuilder#expandNcsOps(Structure, Map, Map)} instead.
2023-
*/
2024-
@Deprecated
2025-
public static void expandNcsOps(Structure structure) {
2026-
PDBCrystallographicInfo xtalInfo = structure.getCrystallographicInfo();
2027-
if (xtalInfo ==null) return;
2028-
2029-
if (xtalInfo.getNcsOperators()==null || xtalInfo.getNcsOperators().length==0) return;
2030-
2031-
List<Chain> chainsToAdd = new ArrayList<>();
2032-
int i = 0;
2033-
for (Matrix4d m:xtalInfo.getNcsOperators()) {
2034-
i++;
2035-
2036-
for (Chain c:structure.getChains()) {
2037-
Chain clonedChain = (Chain)c.clone();
2038-
String newChainId = c.getId()+i+"n";
2039-
String newChainName = c.getName()+i+"n";
2040-
clonedChain.setId(newChainId);
2041-
clonedChain.setName(newChainName);
2042-
setChainIdsInResidueNumbers(clonedChain, newChainName);
2043-
Calc.transform(clonedChain, m);
2044-
chainsToAdd.add(clonedChain);
2045-
c.getEntityInfo().addChain(clonedChain);
2046-
}
2047-
}
2048-
2049-
for (Chain c:chainsToAdd) {
2050-
structure.addChain(c);
2051-
}
2052-
}
2053-
2054-
/**
2055-
* Auxiliary method to reset chain ids of residue numbers in a chain.
2056-
* Used when cloning chains and resetting their ids: one needs to take care of
2057-
* resetting the ids within residue numbers too.
2058-
* @param c
2059-
* @param newChainName
2060-
*/
2061-
private static void setChainIdsInResidueNumbers(Chain c, String newChainName) {
2062-
for (Group g:c.getAtomGroups()) {
2063-
g.setResidueNumber(newChainName, g.getResidueNumber().getSeqNum(), g.getResidueNumber().getInsCode());
2064-
}
2065-
for (Group g:c.getSeqResGroups()) {
2066-
if (g.getResidueNumber()==null) continue;
2067-
g.setResidueNumber(newChainName, g.getResidueNumber().getSeqNum(), g.getResidueNumber().getInsCode());
2068-
}
2069-
}
2070-
20712018
/**
20722019
* Check to see if an Deuterated atom has a non deuterated brother in the group.
20732020
* @param atom the input atom that is putatively deuterium

‎biojava-structure/src/main/java/org/biojava/nbio/structure/contact/StructureInterfaceList.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public void sort() {
195195
* 1. The chains forming the first interface are NCS-copies of the chains forming the second interface, in any order.
196196
* 2. Relative orientation of the chains is preserved, i.e. the contacts are identical.
197197
* @return list of {@link StructureInterfaceCluster} objects.
198+
* @since 5.0.0
198199
*/
199200
public List<StructureInterfaceCluster> getClustersNcs() {
200201
return clustersNcs;
@@ -208,8 +209,8 @@ public List<StructureInterfaceCluster> getClustersNcs() {
208209
* @param interfaceRef
209210
* interfaceNew will be added to the cluster which contains interfaceRef.
210211
* If interfaceRef is null, new cluster will be created for interfaceNew.
212+
* @since 5.0.0
211213
*/
212-
213214
public void addNcsEquivalent(StructureInterface interfaceNew, StructureInterface interfaceRef) {
214215

215216
this.add(interfaceNew);
@@ -218,7 +219,6 @@ public void addNcsEquivalent(StructureInterface interfaceNew, StructureInterface
218219
}
219220

220221
if (interfaceRef == null) {
221-
222222
StructureInterfaceCluster newCluster = new StructureInterfaceCluster();
223223
newCluster.addMember(interfaceNew);
224224
clustersNcs.add(newCluster);

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public class CrystalBuilder {
102102
* chain names mapped to the original chain names (pre-NCS extension)
103103
* @param chainNcsOps
104104
* chain names mapped to the ncs operators that was used to generate them
105+
* @since 5.0.0
105106
*/
106107
public CrystalBuilder(Structure structure, Map<String,String> chainOrigNames, Map<String,Matrix4d> chainNcsOps) {
107108
this(structure);
@@ -164,6 +165,7 @@ public CrystalBuilder(Structure structure) {
164165

165166
/**
166167
* @return true if this CrystalBuilder is NCS-aware.
168+
* @since 5.0.0
167169
*/
168170
public boolean hasNcsOps() {
169171
return chainNcsOps != null;
@@ -438,8 +440,6 @@ private StructureInterface findNcsRef(StructureInterface interf) {
438440
// transformation to bring chain j near X_i: M_i^(-1) * Cn * M_j
439441
// transformation to bring chain i near X_j: (Cn * M_j)^(-1) * M_i = (M_i^(-1) * Cn * M_j)^(-1)
440442

441-
if(chainNcsOps.get(chainIName) == null)
442-
return null;
443443
Matrix4d mChainIInv = new Matrix4d(chainNcsOps.get(chainIName));
444444
mChainIInv.invert();
445445

@@ -559,6 +559,7 @@ public void translate(Matrix4d m, Vector3d translation) {
559559
* new chain names mapped to the original chain names
560560
* @param chainNcsOps
561561
* new chain names mapped to the ncs operators that was used to generate them
562+
* @since 5.0.0
562563
*/
563564
public static void expandNcsOps(Structure structure, Map<String,String> chainOrigNames, Map<String,Matrix4d> chainNcsOps) {
564565
PDBCrystallographicInfo xtalInfo = structure.getCrystallographicInfo();

0 commit comments

Comments
 (0)