Skip to main content

ncorpos-vi-py

Um binding para Python da biblioteca em fortran ncorpos-vi, utilizada no gravidade-fortran.

Permite a geração de valores iniciais para problema de N-corpos e o seu condicionamento para constantes de movimento específicas.

Uso

No momento, o pacote providencia uma única classe Gerador, cuja inicialização recebe os parâmetros:

  • N: Quantidade de corpos (integer);
  • G: Constante de gravitação universal (float). Por padrão, G=1.0;
  • eps: Amortecedor para o potencial (float). Por padrão, eps=0.0;
  • modo: Modo de sorteio. Modos disponíveis:
    • sorteio: Apenas sorteia, sem condicionar;
    • sorteio_ip_iterativo: Sorteia e condiciona as integrais primeiras via método iterativo;
    • sorteio_ip_direto: Sorteia e condiciona as integrais primeiras via método direto;
    • sorteio_aarseth: Sorteia e condiciona as integrais primeiras conforme proposto por (Aarseth, 2003), forçando $E=-0.25$, $J = 0$, $P=0$ e com $2T = - V$ no instante inicial;
    • sorteio_aarseth_modificado: Igual ao sorteio_aarseth se eps=0.0, mas implementa um método iterativo para obter o equilíbrio inicial quando eps!=0.0.
  • energia: Valor da energia total desejada. Por padrão, energia=0.0.
  • angular: Valor do momento angular total desejada. Por padrão, angular=[0.0,0.0,0.0].
  • linear: Valor do momento linear total desejada. Por padrão, linear=[0.0,0.0,0.0].

Exemplo de uso:

>>> import ncorpos_vi

>>> G = ncorpos_vi.Gerador(N=10, modo="sorteio_ip_direto")

Isso instancia a classe. É possível re-instanciar usando a função configurar, que recebe os mesmos parâmetros do inicializador. Não modifique as variáveis diretamente na classe, pois isso não funcionará!

Exemplo de geração de valores iniciais:

>>> G.gerar()
Gerando valores iniciais com as seguintes configuracoes: 
N = 10 / G = 1.0 / eps = 0.0 / modo = sorteio_ip_direto
Constantes de movimento: E = 0.0 / J = [0.0, 0.0, 0.0] / P = [0.0, 0.0, 0.0]

Massas:
 - intervalo = [1.0, 1.0]
 - normalizadas = False

Posicoes:
 - distribuicao = uniforme
 - regiao = cubo
 - intervalo = [-10.0, 10.0]

Momentos lineares:
 - distribuicao = uniforme
 - regiao = cubo
 - intervalo = [-1.0, 1.0]

GERACAO DAS VALORES INICIAIS (sorteio_ip_direto)
  > gerando valores...
    * gerando massas
    * gerando posicoes (uniforme)
    * gerando momentos (uniforme)
 
  > condicionando...
    > coeficientes:
      * alpha =   1.0000000000000000     
      * beta  =   1.2544283054674359     
      * S1    =   3.2290389342212205     
      * S2    =   0.0000000000000000     
      * T.I.  =   588.96154068688691        393.72305489257315        437.72817364181810     
      * Autovalores (T.I.):    314.89279495786678        506.12642349964420        599.39355076376728     
 
  > valores iniciais condicionados!
      * V   =   -5.0811845827341813     
      * T   =    5.0811845827341831     
      * E   =    1.7763568394002505E-015
      * Vir =    5.0811845827341848     
      * J   =    3.9968028886505635E-015  -1.7763568394002505E-015  -5.5511151231257827E-015
      * P   =   -2.2204460492503131E-016  -1.6653345369377348E-016   2.6454533008646308E-016
      * I   =    710.20638461063891     
      * D   =   -30.363431913548109     
      * A_I =   0.31904518875470239     
      * MD  =    11.523791095116417 

Referências

  • AARSETH, Sverre. Gravitational N-Body Simulations: Tools and Algorithms. Cambridge: Cambridge University Press, 2003.

Metadata

Release files for ncorpos-vi-py 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for ncorpos-vi-py 1.0.2
File Actions
ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Total release size: 62.2 MB

Release files / ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 15.5 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
736cd0b350525c7223f092092aa3fdb0d149a2c1043f7564d3d23fb966c8385f
BLAKE2b-256 checksum
How to use checksums
e319eacb74e9eff0b150e8a886b460092be1f5ea005899334018e65a574f9808
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2026.

Transparency log

Release files / ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ncorpos_vi_py-1.0.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 15.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
82f059958ac8078b862ecb9bb2d29e4094490ac20fbb7c76f5d50899b510b230
BLAKE2b-256 checksum
How to use checksums
605cd2e58f6fdcfbd95583af0c21d171a9aa4f279db0664f805a9ae070cd4078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2026.

Transparency log

Release files / ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ncorpos_vi_py-1.0.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
55ac36f751a3638bc8b718a279d9bbee938d0ad951045004b023a331bc275187
BLAKE2b-256 checksum
How to use checksums
1d27d299ed14189b3ff3458f6061c1dc8352477adb20aa37f5d0d7839c4d1076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2026.

Transparency log

Release files / ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL ncorpos_vi_py-1.0.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4dedac3e75b9731b6a38dda2889a3e05d24bc229ee2226ecdb36204c580dbb39
BLAKE2b-256 checksum
How to use checksums
fc5806edfee7e5309aaa122e840ec3edca71a6e5d75c54efaa6794cfb2bfa46a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2026.

Transparency log

Security for ncorpos-vi-py 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for ncorpos_vi_py-1.0.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page