import {BrandMark} from './BrandMark'; import {MotionControl} from './Motion'; import {useEffect,useMemo,useRef,useState} from 'react'; import {AtlasMap} from './AtlasMap'; import {AtlasCoverage} from './AtlasCoverage'; import {apiUrl,atlasPath} from './api'; import type {AtlasPoints,AtlasLandmark} from './AtlasMap'; import {Molecule} from './Molecule'; import type {ProteinCase,Residue} from './types'; import './atlas.css'; type AtlasRecord={uniref_id:string;sequence:string;sequence_length:number;pred_text:string;prediction_status:string;output_hit_limit:boolean;model?:string;dataset_version?:string}; type AtlasCase=AtlasRecord&AtlasLandmark&{domain_support_display:string;pdbUrl:string;mean_plddt:number;map_xy:number[];residues?:Residue[];organism?:string;source_url?:string;sequence_sha256?:string}; type Manifest={available?:boolean;status?:string;records?:number;dataset_url?:string;revision?:string;version?:string;message?:string}; const DATASET='https://huggingface.co/datasets/REXWind/Ouroboros-Atlas'; const TOTAL=51321839; async function readJson(url:string,signal:AbortSignal):Promise{const r=await fetch(apiUrl(url),{signal});if(!r.ok)throw new Error('The Atlas assets could not be loaded.');return r.json();} function canonical(value:string){const id=value.trim().toUpperCase();return 'UniRef50_'+id.replace(/^UNIREF50_/,'');} function download(text:string,name:string,type:string){const url=URL.createObjectURL(new Blob([text],{type})),a=document.createElement('a');a.href=url;a.download=name;a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);} function Stats(){return
51.32MSearchable representatives
34Sequence communities
08Featured proteins
;} function CaseCards({cases,selected,onSelect,compact=false}:{cases:AtlasCase[];selected?:string|null;onSelect:(c:AtlasCase)=>void;compact?:boolean}){return
{cases.map(c=>)}
;} function asProtein(c:AtlasCase):ProteinCase{return {id:c.uniref_id,assetId:c.uniref_id,title:c.uniref_id,cohort:'Atlas featured illustrations',rank:0,cohortSize:8,sequence:c.sequence,prompt:c.pred_text,residues:c.residues||[],plddt:c.mean_plddt,pae:0,length:c.sequence_length,pdbUrl:c.pdbUrl,fastaUrl:'',selection:'Sequence-verified AlphaFold DB structure.',structureStatus:'Predicted',experimentalStatus:'Function not experimentally validated.',provenance:c.source_url||'',modelLabel:'AlphaFold DB'};} export function AtlasPreview(){ const host=useRef(null),[visible,setVisible]=useState(false),[points,setPoints]=useState(null),[cases,setCases]=useState([]),[error,setError]=useState(false); const [selected,setSelected]=useState(null); useEffect(()=>{const observer=new IntersectionObserver(entries=>{if(entries.some(e=>e.isIntersecting)){setVisible(true);observer.disconnect();}},{rootMargin:'250px'});if(host.current)observer.observe(host.current);return()=>observer.disconnect();},[]); useEffect(()=>{if(!visible)return;const ac=new AbortController();Promise.all([readJson('/data/atlas-preview.json',ac.signal),readJson('/data/atlas-cases.json',ac.signal)]).then(([p,c])=>{setPoints(p);setCases(c);}).catch(()=>{if(!ac.signal.aborted)setError(true);});return()=>ac.abort();},[visible]); const choose=(id:string)=>{const c=cases.find(c=>c.uniref_id===id);if(c)setSelected(c);else window.location.href=atlasPath()+'?id='+encodeURIComponent(id);}; return

OUROBOROS ATLAS A MAP TO EXPLORE

A wider world
of protein function.

Curated references cover a small corner of protein sequence space. Ouroboros helps extend functional annotation across the landscape, giving more sequences a description to explore.

Search the full Atlas ↗
{points?:
{error?'The map preview is unavailable. Open the Atlas to retry.':'Loading the protein landscape…'}
}

Eight sequences. Different possibilities.

Select a structure to discover its story

{points?.ids.length.toLocaleString()||'4,000'} points in this preview. Search all {TOTAL.toLocaleString()} records by ID. Generated descriptions are functional hypotheses.

Explore Atlas ↗
; } export function AtlasPage(){ const [points,setPoints]=useState(null),[cases,setCases]=useState([]),[manifest,setManifest]=useState(null),[assetsError,setAssetsError]=useState(false); const [casesState,setCasesState]=useState<'loading'|'ready'|'error'>('loading'); const [query,setQuery]=useState(()=>new URLSearchParams(window.location.search).get('id')||''),[selected,setSelected]=useState(null),[record,setRecord]=useState(null),[loading,setLoading]=useState(false),[error,setError]=useState<{title:string;body:string}|null>(null),[featuredRecord,setFeaturedRecord]=useState(false),[spin,setSpin]=useState(false),[structureColor,setStructureColor]=useState('spectrum'),[copyStatus,setCopyStatus]=useState('Copy link'); const active=useRef(null),requestNumber=useRef(0),detail=useRef(null),mapHost=useRef(null); const mapIds=useMemo(()=>new Set(points?.ids||[]),[points]); const selectedCase=record?cases.find(c=>c.uniref_id===record.uniref_id&&c.sequence===record.sequence):undefined; useEffect(()=>{const ac=new AbortController();readJson('/data/atlas-map.json',ac.signal).then(setPoints).catch(()=>{if(!ac.signal.aborted)setAssetsError(true);});readJson('/data/atlas-cases.json',ac.signal).then(c=>{setCases(c);setCasesState('ready');}).catch(()=>{if(!ac.signal.aborted)setCasesState('error');});readJson('/api/atlas/manifest',ac.signal).then(setManifest).catch(()=>{if(!ac.signal.aborted)setManifest({available:false,message:'The full Atlas lookup is currently unavailable. Please try again later.'});});return()=>{ac.abort();active.current?.abort();};},[]); function updateUrl(id:string){const url=new URL(window.location.href);url.searchParams.set('id',id);window.history.pushState(null,'',url);} async function lookup(raw:string,changeUrl=true){ active.current?.abort();const number=++requestNumber.current,ac=new AbortController();active.current=ac; const id=canonical(raw);const archived=cases.find(c=>c.uniref_id===id);if(archived){openFeatured(archived,changeUrl);return;}setQuery(raw.trim());setRecord(null);setSelected(null);setError(null);setFeaturedRecord(false);setSpin(false);setCopyStatus('Copy link'); if(!/^UniRef50_[A-Z0-9]+(?:-[0-9]+)?$/.test(id)){setLoading(false);setError({title:'Enter a record ID',body:'Use a UniRef50 ID or its accession suffix, for example UniRef50_A0A9J7N2Q8 or A0A9J7N2Q8. This field does not search protein sequence fragments.'});return;} setLoading(true);if(changeUrl)updateUrl(id); const timeout=setTimeout(()=>ac.abort('timeout'),45000); try{ const r=await fetch(apiUrl('/api/atlas/proteins/'+encodeURIComponent(id)),{signal:ac.signal}); if(number!==requestNumber.current)return; if(!r.ok){if(r.status===404)setError({title:'Record not found',body:'This ID is not in the published set of 51,321,839 annotated representatives. Other cluster members and deferred long sequences are outside this release.'});else if(r.status===429)setError({title:'Lookup is busy',body:'The data service is rate limited. Please wait briefly and try again.'});else if(r.status===504)setError({title:'Lookup timed out',body:'The data service took too long to respond. The ID may still be present; please retry.'});else if(r.status===422||r.status===400)setError({title:'Check the record ID',body:'Enter a UniRef50 ID or the accession suffix of an Atlas record.'});else setError({title:'Lookup temporarily unavailable',body:'The data service could not return this record. This does not mean that the ID is absent. Please retry.'});return;} const result:AtlasRecord=await r.json();if(number!==requestNumber.current)return; setRecord(result);setSelected(result.uniref_id);setQuery(result.uniref_id);if(window.innerWidth<=780)detail.current?.scrollIntoView({behavior:window.matchMedia('(prefers-reduced-motion: reduce)').matches?'instant':'smooth',block:'start'}); }catch{if(number===requestNumber.current){if(ac.signal.reason==='timeout')setError({title:'Lookup timed out',body:'The data service took too long to respond. The ID may still be present; please retry.'});else if(!ac.signal.aborted)setError({title:'Could not reach the data service',body:'Check your connection and try again. No conclusion about this ID can be drawn from a connection error.'});}} finally{clearTimeout(timeout);if(number===requestNumber.current)setLoading(false);} } function openFeatured(c:AtlasCase,changeUrl=true){active.current?.abort();requestNumber.current++;setLoading(false);setError(null);setRecord(c);setSelected(c.uniref_id);setQuery(c.uniref_id);setFeaturedRecord(true);setSpin(false);setCopyStatus('Copy link');if(changeUrl)updateUrl(c.uniref_id);if(window.innerWidth<=780)detail.current?.scrollIntoView({behavior:window.matchMedia('(prefers-reduced-motion: reduce)').matches?'instant':'smooth',block:'start'});} useEffect(()=>{document.title='Ouroboros Atlas — Explore protein descriptions';if(casesState==='loading')return;const navigate=()=>{const id=new URLSearchParams(window.location.search).get('id');if(id)void lookup(id,false);else{active.current?.abort();requestNumber.current++;setLoading(false);setRecord(null);setSelected(null);setQuery('');setError(null);}};navigate();window.addEventListener('popstate',navigate);return()=>window.removeEventListener('popstate',navigate);},[casesState]); const selectCase=(c:AtlasCase)=>{openFeatured(c);if(window.innerWidth>780)mapHost.current?.scrollIntoView({behavior:window.matchMedia('(prefers-reduced-motion: reduce)').matches?'instant':'smooth',block:'start'});}; const caseIndex=cases.findIndex(c=>c.uniref_id===selected); const unavailable=manifest?.available===false||manifest?.status==='unavailable'; return
ouroboros← Back to the research showcase

OUROBOROS ATLAS · FIX LARGE

The protein landscape.
Yours to explore.

Explore 34 sequence communities and eight featured proteins. Search any of 51.32 million annotated representatives by ID.

{unavailable&&

Full-dataset lookup is currently unavailable. The map and eight featured proteins remain browsable. Lookup errors do not mean an ID is absent.

}
{e.preventDefault();void lookup(query);}}>

Exact ID lookup across {TOTAL.toLocaleString()} annotated representatives. Accession suffixes refer to existing Atlas records; this is not a cluster-member or sequence-fragment search.

{points?{void lookup(id);}} featured={cases}/>:
{assetsError?'The map could not be loaded. ID search is independent of the map; refresh to retry the visualization.':'Loading the protein landscape…'}
}
{loading?

LOOKING UP THE ATLAS

Opening your protein…

The matching data shard is loaded on demand. The first lookup can take longer.

:error?

{error.title}

{error.body}

:record?<>{caseIndex>=0&&
SHOWCASE {String(caseIndex+1).padStart(2,'0')} / 08
}

{featuredRecord?'FEATURED PROTEIN · ARCHIVED DESCRIPTION':'ATLAS RECORD · OUROBOROS FIX LARGE'}

{record.uniref_id}

{record.sequence_length} amino acids{selectedCase?.organism?' · '+selectedCase.organism:''}

MODEL-GENERATED DESCRIPTION

{record.pred_text?.replace(/([.!?])(?=[A-Z])/g,'$1 ')||'No readable description is available for this record.'}

{selectedCase?.domain_support_display&&

{selectedCase.domain_support_display.replace('Domain evidence: ','')}

}{record.output_hit_limit&&

Generation reached the output-length limit. The archived description may be incomplete.

}{record.prediction_status&&record.prediction_status!=='ok'&&

Prediction status: {record.prediction_status.replaceAll('_',' ')}. The original record is preserved.

}
Amino-acid sequence · {record.sequence_length} residues
{record.sequence}
UniRef entry ↗
{points&&

{mapIds.has(record.uniref_id)?'Highlighted in the display sample.':'This record is outside the current map sample. Its description is part of the full Atlas.'}

}
{selectedCase?
ALPHAFOLD DB · PREDICTED STRUCTURE

Mean pLDDT {selectedCase.mean_plddt.toFixed(2)}

Structure sequence matches this Atlas sequence. pLDDT measures structural confidence, not functional accuracy. This illustration has not undergone functional validation.

↓ PDB{selectedCase.source_url&&Structure source ↗}
:

{casesState==='loading'?'Loading structure availability…':casesState==='error'?'Featured structure metadata is unavailable. Refresh to retry.':'No sequence-verified structure is bundled for this record.'}

}:

YOUR NEXT PROTEIN

A point on the map.
A sequence to explore.

Click a point, choose one of the eight featured proteins below, or enter an Atlas ID. The full database extends beyond this map sample.

{cases.slice(0,4).map(c=>)}
}

FEATURED PROTEINS

Eight windows into protein space.

Sequence-verified structures · Generated descriptions

{casesState==='error'&&

The featured proteins could not be loaded. Refresh to retry; ID lookup remains available.

}

A community-stratified display sample of {points?.ids.length.toLocaleString()||'12,000'} sequences retains the archived coordinates, community colors and all eight cases. Full-corpus search covers 51,321,839 representatives of 1–511 aa. Reference overlap denotes exact sequence identity to Swiss-Prot 2024_01; it does not establish functional accuracy or novelty. Structures are predictions, and cases are selected illustrations rather than an accuracy sample. Atlas descriptions use Ouroboros FIX large; the live playground uses original large-v5. Full dataset ↗ · Map provenance ↗

; }