public static void main(String[] args) throws Exception {


		String pdbCode = "1smt";

		AtomCache cache = new AtomCache();
		cache.setUseMmCif(true);

		FileParsingParameters params = new FileParsingParameters();
		params.setAlignSeqRes(true);
		cache.setFileParsingParams(params);

		StructureIO.setAtomCache(cache);

		Structure structure = StructureIO.getStructure(pdbCode);


		System.out.println(structure.getPDBCode());


		SpaceGroup sg = structure.getCrystallographicInfo().getSpaceGroup();

		if (sg!=null) {
			System.out.println(sg.getShortSymbol()+" ("+sg.getId()+")");
			System.out.println("Symmetry operators: "+sg.getNumOperators());
		}
		System.out.println("Calculating possible interfaces... (using "+NTHREADS+" CPUs for ASA calculation)");
		long start = System.currentTimeMillis();

		CrystalBuilder cb = new CrystalBuilder(structure);


		StructureInterfaceList interfaces = cb.getUniqueInterfaces(CUTOFF);
		interfaces.calcAsas(N_SPHERE_POINTS, NTHREADS, CONSIDER_COFACTORS);
		interfaces.removeInterfacesBelowArea(MIN_AREA_TO_KEEP);
		List<StructureInterfaceCluster> clusters = interfaces.getClusters();


		//interfaces.initialiseClusters(pdb, CLUSTERING_CUTOFF, MINATOMS_CLUSTERING, "CA");

		long end = System.currentTimeMillis();
		long total = (end-start)/1000;
		System.out.println("Total time for interface calculation: "+total+"s");

		System.out.println("Total number of interfaces found: "+interfaces.size());

		for (int i=0;i<interfaces.size();i++) {
			StructureInterface interf = interfaces.get(i+1);

			String infiniteStr = "";
			if (interf.isInfinite()) infiniteStr = " -- INFINITE interface";
			System.out.println("\n##Interface "+(i+1)+" "+
					interf.getCrystalIds().getFirst()+"-"+
					interf.getCrystalIds().getSecond()+infiniteStr);
			// warning if more than 10 clashes found at interface
			List<AtomContact> clashing = interf.getContacts().getContactsWithinDistance(CLASH_DISTANCE);
			if (clashing.size()>10)
				System.out.println(clashing.size()+" CLASHES!!!");

			CrystalTransform transf1 = interf.getTransforms().getFirst();
			CrystalTransform transf2 = interf.getTransforms().getSecond();

			System.out.println("Transf1: "+SpaceGroup.getAlgebraicFromMatrix(transf1.getMatTransform())+
					". Transf2: "+SpaceGroup.getAlgebraicFromMatrix(transf2.getMatTransform()));


			String screwStr = "";
			if (transf2.getTransformType().isScrew()) {
				Vector3d screwTransl =
						transf2.getTranslScrewComponent();
				screwStr = " -- "+transf2.getTransformType().getShortName()+" with translation "+
				String.format("(%5.2f,%5.2f,%5.2f)",screwTransl.x,screwTransl.y,screwTransl.z);

			}

			if (structure.isCrystallographic()) {
				int foldType = sg.getAxisFoldType(transf2.getTransformId());
				AxisAngle4d axisAngle = sg.getRotAxisAngle(transf2.getTransformId());

				System.out.println(" "+foldType+"-fold on axis "+String.format("(%5.2f,%5.2f,%5.2f)",axisAngle.x,axisAngle.y,axisAngle.z)+screwStr);
			}

			System.out.println("Number of contacts: "+interf.getContacts().size());
			//System.out.println("Number of contacting atoms (from both molecules): "+interf.getNumAtomsInContact());
			Pair<List<Group>> cores = interf.getCoreResidues(BSATOASA_CUTOFF, MIN_ASA_FOR_SURFACE);
			System.out.println("Number of core residues at "+String.format("%4.2f", BSATOASA_CUTOFF)+
					" bsa to asa cutoff: "+
					cores.getFirst().size()+" "+
					cores.getSecond().size());
			System.out.printf("Interface area: %8.2f\n",interf.getTotalArea());

			if (interf.isIsologous()) {
				System.out.println("Isologous");
			} else {
				System.out.println("Heterologous");
			}

		}

		System.out.println("Interface clusters (one per line): ");
		for (StructureInterfaceCluster cluster:clusters) {
			System.out.print(cluster.getId()+": ");
			for (StructureInterface member:cluster.getMembers()) {
				System.out.print(member.getId()+" ");
			}
			System.out.println();
		}

	}
public static void main ( String [ ] args ) throws Exception { String pdbCode = "1smt" ; AtomCache cache = new AtomCache ( ) ; cache . setUseMmCif ( true ) ; FileParsingParameters params = new FileParsingParameters ( ) ; params . setAlignSeqRes ( true ) ; cache . setFileParsingParams ( params ) ; StructureIO . setAtomCache ( cache ) ; Structure structure = StructureIO . getStructure ( pdbCode ) ; System . out . println ( structure . getPDBCode ( ) ) ; SpaceGroup sg = structure . getCrystallographicInfo ( ) . getSpaceGroup ( ) ; if ( sg != null ) { System . out . println ( sg . getShortSymbol ( ) + " (" + sg . getId ( ) + ")" ) ; System . out . println ( "Symmetry operators: " + sg . getNumOperators ( ) ) ; } System . out . println ( "Calculating possible interfaces... (using " + NTHREADS + " CPUs for ASA calculation)" ) ; long start = System . currentTimeMillis ( ) ; CrystalBuilder cb = new CrystalBuilder ( structure ) ; StructureInterfaceList interfaces = cb . getUniqueInterfaces ( CUTOFF ) ; interfaces . calcAsas ( N_SPHERE_POINTS , NTHREADS , CONSIDER_COFACTORS ) ; interfaces . removeInterfacesBelowArea ( MIN_AREA_TO_KEEP ) ; List < StructureInterfaceCluster > clusters = interfaces . getClusters ( ) ; long end = System . currentTimeMillis ( ) ; long total = ( end - start ) / 1000 ; System . out . println ( "Total time for interface calculation: " + total + "s" ) ; System . out . println ( "Total number of interfaces found: " + interfaces . size ( ) ) ; for ( int i = 0 ; i < interfaces . size ( ) ; i ++ ) { StructureInterface interf = interfaces . get ( i + 1 ) ; String infiniteStr = "" ; if ( interf . isInfinite ( ) ) infiniteStr = " -- INFINITE interface" ; System . out . println ( "\n##Interface " + ( i + 1 ) + " " + interf . getCrystalIds ( ) . getFirst ( ) + "-" + interf . getCrystalIds ( ) . getSecond ( ) + infiniteStr ) ; List < AtomContact > clashing = interf . getContacts ( ) . getContactsWithinDistance ( CLASH_DISTANCE ) ; if ( clashing . size ( ) > 10 ) System . out . println ( clashing . size ( ) + " CLASHES!!!" ) ; CrystalTransform transf1 = interf . getTransforms ( ) . getFirst ( ) ; CrystalTransform transf2 = interf . getTransforms ( ) . getSecond ( ) ; System . out . println ( "Transf1: " + SpaceGroup . getAlgebraicFromMatrix ( transf1 . getMatTransform ( ) ) + ". Transf2: " + SpaceGroup . getAlgebraicFromMatrix ( transf2 . getMatTransform ( ) ) ) ; String screwStr = "" ; if ( transf2 . getTransformType ( ) . isScrew ( ) ) { Vector3d screwTransl = transf2 . getTranslScrewComponent ( ) ; screwStr = " -- " + transf2 . getTransformType ( ) . getShortName ( ) + " with translation " + String . format ( "(%5.2f,%5.2f,%5.2f)" , screwTransl . x , screwTransl . y , screwTransl . z ) ; } if ( structure . isCrystallographic ( ) ) { int foldType = sg . getAxisFoldType ( transf2 . getTransformId ( ) ) ; AxisAngle4d axisAngle = sg . getRotAxisAngle ( transf2 . getTransformId ( ) ) ; System . out . println ( " " + foldType + "-fold on axis " + String . format ( "(%5.2f,%5.2f,%5.2f)" , axisAngle . x , axisAngle . y , axisAngle . z ) + screwStr ) ; } System . out . println ( "Number of contacts: " + interf . getContacts ( ) . size ( ) ) ; Pair < List < Group > > cores = interf . getCoreResidues ( BSATOASA_CUTOFF , MIN_ASA_FOR_SURFACE ) ; System . out . println ( "Number of core residues at " + String . format ( "%4.2f" , BSATOASA_CUTOFF ) + " bsa to asa cutoff: " + cores . getFirst ( ) . size ( ) + " " + cores . getSecond ( ) . size ( ) ) ; System . out . printf ( "Interface area: %8.2f\n" , interf . getTotalArea ( ) ) ; if ( interf . isIsologous ( ) ) { System . out . println ( "Isologous" ) ; } else { System . out . println ( "Heterologous" ) ; } } System . out . println ( "Interface clusters (one per line): " ) ; for ( StructureInterfaceCluster cluster : clusters ) { System . out . print ( cluster . getId ( ) + ": " ) ; for ( StructureInterface member : cluster . getMembers ( ) ) { System . out . print ( member . getId ( ) + " " ) ; } System . out . println ( ) ; } }
@param args