Skip to content

Commit f9682fa

Browse files
committed
Redoing how #341 is handled
1 parent 0ad855f commit f9682fa

8 files changed

Lines changed: 61 additions & 322 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ <li> atomserial (mandatory) : Atom serial number</li>
267267
* Return the connections value.
268268
* @return a List object representing the connections value
269269
* @see #setConnections
270+
* @deprecated use {@link Atom#getBonds()} instead
270271
*/
272+
@Deprecated
271273
public List<Map<String,Integer>> getConnections();
272274

273275
/**

‎biojava-structure/src/main/java/org/biojava/nbio/structure/io/FileParsingParameters.java‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ public class FileParsingParameters implements Serializable
6767
*/
6868
boolean alignSeqRes;
6969

70-
71-
/** Should we create connections instead of bonds for ligands?
72-
*
73-
*/
74-
boolean createConects;
75-
7670
/** Flag to control if the chemical component info should be downloaded while parsing the files. (files will be cached).
7771
*
7872
*/
@@ -158,8 +152,6 @@ public void setDefault(){
158152
parseBioAssembly = false;
159153

160154
createAtomBonds = false;
161-
162-
createConects = false;
163155

164156
createAtomCharges = true;
165157

@@ -412,24 +404,6 @@ public void setCreateAtomCharges(boolean createAtomCharges) {
412404
this.createAtomCharges = createAtomCharges;
413405
}
414406

415-
/**Should we create Bonds for ligands when parsing an mmCIF file?
416-
*
417-
* @return true if we should create bonds based on ChemComp information.
418-
*/
419-
public boolean isCreateLigandConects(){
420-
return createConects;
421-
}
422-
423-
/**Should we create connections between atoms in ligands when parsing
424-
* a file? Setting this to true must also set AlignSeqRes true.
425-
*
426-
* @param createLigandConects boolean flag yes/no
427-
*/
428-
public void setCreateLigandConects(boolean createLigandConects){
429-
this.createConects = createLigandConects;
430-
this.alignSeqRes = true;
431-
}
432-
433407
public boolean isUseInternalChainId() {
434408
return useInternalChainId;
435409
}

‎biojava-structure/src/main/java/org/biojava/nbio/structure/io/LigandConnectMaker.java‎

Lines changed: 0 additions & 217 deletions
This file was deleted.

‎biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,10 +2758,6 @@ else if ( params.isParseSecStruc()) {
27582758
if ( params.shouldCreateAtomCharges()) {
27592759
addCharges();
27602760
}
2761-
2762-
if (params.isCreateLigandConects()){
2763-
addLigandConnections();
2764-
}
27652761

27662762
if ( params.isParseSecStruc() && !params.isHeaderOnly())
27672763
setSecStruc();
@@ -2831,12 +2827,6 @@ private void formBonds() {
28312827
maker.makeBonds();
28322828
}
28332829

2834-
//Builds a list of connections from ligands in a Structure
2835-
private void addLigandConnections(){
2836-
LigandConnectMaker maker = new LigandConnectMaker(structure);
2837-
maker.addLigandConnections();
2838-
}
2839-
28402830
private void formLinkRecordBond(LinkRecord linkRecord) {
28412831
// only work with atoms that aren't alternate locations
28422832
if (linkRecord.getAltLoc1().equals(" ")

‎biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/SimpleMMcifConsumer.java‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
import org.biojava.nbio.structure.io.BondMaker;
6060
import org.biojava.nbio.structure.io.ChargeAdder;
6161
import org.biojava.nbio.structure.io.FileParsingParameters;
62-
import org.biojava.nbio.structure.io.LigandConnectMaker;
6362
import org.biojava.nbio.structure.io.SeqRes2AtomAligner;
6463
import org.biojava.nbio.structure.io.mmcif.model.AtomSite;
6564
import org.biojava.nbio.structure.io.mmcif.model.AuditAuthor;
@@ -723,11 +722,6 @@ public void documentEnd() {
723722
if ( params.shouldCreateAtomBonds()) {
724723
addBonds();
725724
}
726-
727-
// Adds the equivalent CONECT-style records as a PDB has for ligands.
728-
if ( params.isCreateLigandConects()) {
729-
addLigandConnections();
730-
}
731725

732726
if ( params.shouldCreateAtomCharges()) {
733727
addCharges();
@@ -1039,11 +1033,6 @@ private void addBonds() {
10391033
maker.makeBonds();
10401034
}
10411035

1042-
private void addLigandConnections(){
1043-
LigandConnectMaker maker = new LigandConnectMaker(structure);
1044-
maker.addLigandConnections();
1045-
}
1046-
10471036
private void alignSeqRes() {
10481037

10491038
logger.debug("Parsing mode align_seqres, will align to ATOM to SEQRES sequence");

‎biojava-structure/src/test/java/org/biojava/nbio/structure/ChemCompTest.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
*/
2121
package org.biojava.nbio.structure;
2222

23-
import org.biojava.nbio.core.util.SoftHashMap;
2423
import org.biojava.nbio.structure.io.mmcif.ChemCompGroupFactory;
2524
import org.biojava.nbio.structure.io.mmcif.ChemCompProvider;
2625
import org.biojava.nbio.structure.io.mmcif.DownloadChemCompProvider;

0 commit comments

Comments
 (0)